Class GuestPolicies.GuestPolicy.Builder (2.46.0)

public static final class GuestPolicies.GuestPolicy.Builder extends GeneratedMessageV3.Builder<GuestPolicies.GuestPolicy.Builder> implements GuestPolicies.GuestPolicyOrBuilder

An OS Config resource representing a guest configuration policy. These policies represent the desired state for VM instance guest environments including packages to install or remove, package repository configurations, and software to install.

Protobuf type google.cloud.osconfig.v1beta.GuestPolicy

Static Methods

getDescriptor()

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

Methods

addAllPackageRepositories(Iterable<? extends GuestPolicies.PackageRepository> values)

public GuestPolicies.GuestPolicy.Builder addAllPackageRepositories(Iterable<? extends GuestPolicies.PackageRepository> values)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameter
Name Description
values Iterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository>
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addAllPackages(Iterable<? extends GuestPolicies.Package> values)

public GuestPolicies.GuestPolicy.Builder addAllPackages(Iterable<? extends GuestPolicies.Package> values)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameter
Name Description
values Iterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Package>
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addAllRecipes(Iterable<? extends GuestPolicies.SoftwareRecipe> values)

public GuestPolicies.GuestPolicy.Builder addAllRecipes(Iterable<? extends GuestPolicies.SoftwareRecipe> values)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameter
Name Description
values Iterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe>
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addPackageRepositories(GuestPolicies.PackageRepository value)

public GuestPolicies.GuestPolicy.Builder addPackageRepositories(GuestPolicies.PackageRepository value)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameter
Name Description
value GuestPolicies.PackageRepository
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addPackageRepositories(GuestPolicies.PackageRepository.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder addPackageRepositories(GuestPolicies.PackageRepository.Builder builderForValue)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameter
Name Description
builderForValue GuestPolicies.PackageRepository.Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addPackageRepositories(int index, GuestPolicies.PackageRepository value)

public GuestPolicies.GuestPolicy.Builder addPackageRepositories(int index, GuestPolicies.PackageRepository value)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameters
Name Description
index int
value GuestPolicies.PackageRepository
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addPackageRepositories(int index, GuestPolicies.PackageRepository.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder addPackageRepositories(int index, GuestPolicies.PackageRepository.Builder builderForValue)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameters
Name Description
index int
builderForValue GuestPolicies.PackageRepository.Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addPackageRepositoriesBuilder()

public GuestPolicies.PackageRepository.Builder addPackageRepositoriesBuilder()

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Returns
Type Description
GuestPolicies.PackageRepository.Builder

addPackageRepositoriesBuilder(int index)

public GuestPolicies.PackageRepository.Builder addPackageRepositoriesBuilder(int index)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.PackageRepository.Builder

addPackages(GuestPolicies.Package value)

public GuestPolicies.GuestPolicy.Builder addPackages(GuestPolicies.Package value)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameter
Name Description
value GuestPolicies.Package
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addPackages(GuestPolicies.Package.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder addPackages(GuestPolicies.Package.Builder builderForValue)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameter
Name Description
builderForValue GuestPolicies.Package.Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addPackages(int index, GuestPolicies.Package value)

public GuestPolicies.GuestPolicy.Builder addPackages(int index, GuestPolicies.Package value)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameters
Name Description
index int
value GuestPolicies.Package
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addPackages(int index, GuestPolicies.Package.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder addPackages(int index, GuestPolicies.Package.Builder builderForValue)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameters
Name Description
index int
builderForValue GuestPolicies.Package.Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addPackagesBuilder()

public GuestPolicies.Package.Builder addPackagesBuilder()

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Returns
Type Description
GuestPolicies.Package.Builder

addPackagesBuilder(int index)

public GuestPolicies.Package.Builder addPackagesBuilder(int index)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.Package.Builder

addRecipes(GuestPolicies.SoftwareRecipe value)

public GuestPolicies.GuestPolicy.Builder addRecipes(GuestPolicies.SoftwareRecipe value)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameter
Name Description
value GuestPolicies.SoftwareRecipe
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addRecipes(GuestPolicies.SoftwareRecipe.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder addRecipes(GuestPolicies.SoftwareRecipe.Builder builderForValue)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameter
Name Description
builderForValue GuestPolicies.SoftwareRecipe.Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addRecipes(int index, GuestPolicies.SoftwareRecipe value)

public GuestPolicies.GuestPolicy.Builder addRecipes(int index, GuestPolicies.SoftwareRecipe value)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameters
Name Description
index int
value GuestPolicies.SoftwareRecipe
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addRecipes(int index, GuestPolicies.SoftwareRecipe.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder addRecipes(int index, GuestPolicies.SoftwareRecipe.Builder builderForValue)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameters
Name Description
index int
builderForValue GuestPolicies.SoftwareRecipe.Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

addRecipesBuilder()

public GuestPolicies.SoftwareRecipe.Builder addRecipesBuilder()

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Returns
Type Description
GuestPolicies.SoftwareRecipe.Builder

addRecipesBuilder(int index)

public GuestPolicies.SoftwareRecipe.Builder addRecipesBuilder(int index)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.SoftwareRecipe.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public GuestPolicies.GuestPolicy build()
Returns
Type Description
GuestPolicies.GuestPolicy

buildPartial()

public GuestPolicies.GuestPolicy buildPartial()
Returns
Type Description
GuestPolicies.GuestPolicy

clear()

public GuestPolicies.GuestPolicy.Builder clear()
Returns
Type Description
GuestPolicies.GuestPolicy.Builder
Overrides

clearAssignment()

public GuestPolicies.GuestPolicy.Builder clearAssignment()

Required. Specifies the VM instances that are assigned to this policy. This allows you to target sets or groups of VM instances by different parameters such as labels, names, OS, or zones.

If left empty, all VM instances underneath this policy are targeted.

At the same level in the resource hierarchy (that is within a project), the service prevents the creation of multiple policies that conflict with each other. For more information, see how the service handles assignment conflicts.

.google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

clearCreateTime()

public GuestPolicies.GuestPolicy.Builder clearCreateTime()

Output only. Time this guest policy was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

clearDescription()

public GuestPolicies.GuestPolicy.Builder clearDescription()

Description of the guest policy. Length of the description is limited to 1024 characters.

string description = 2;

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

clearEtag()

public GuestPolicies.GuestPolicy.Builder clearEtag()

The etag for this guest policy. If this is provided on update, it must match the server's etag.

string etag = 10;

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public GuestPolicies.GuestPolicy.Builder clearName()

Required. Unique name of the resource in this project using one of the following forms: projects/{project_number}/guestPolicies/{guest_policy_id}.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPackageRepositories()

public GuestPolicies.GuestPolicy.Builder clearPackageRepositories()

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

clearPackages()

public GuestPolicies.GuestPolicy.Builder clearPackages()

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

clearRecipes()

public GuestPolicies.GuestPolicy.Builder clearRecipes()

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

clearUpdateTime()

public GuestPolicies.GuestPolicy.Builder clearUpdateTime()

Output only. Last time this guest policy was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

clone()

public GuestPolicies.GuestPolicy.Builder clone()
Returns
Type Description
GuestPolicies.GuestPolicy.Builder
Overrides

getAssignment()

public GuestPolicies.Assignment getAssignment()

Required. Specifies the VM instances that are assigned to this policy. This allows you to target sets or groups of VM instances by different parameters such as labels, names, OS, or zones.

If left empty, all VM instances underneath this policy are targeted.

At the same level in the resource hierarchy (that is within a project), the service prevents the creation of multiple policies that conflict with each other. For more information, see how the service handles assignment conflicts.

.google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GuestPolicies.Assignment

The assignment.

getAssignmentBuilder()

public GuestPolicies.Assignment.Builder getAssignmentBuilder()

Required. Specifies the VM instances that are assigned to this policy. This allows you to target sets or groups of VM instances by different parameters such as labels, names, OS, or zones.

If left empty, all VM instances underneath this policy are targeted.

At the same level in the resource hierarchy (that is within a project), the service prevents the creation of multiple policies that conflict with each other. For more information, see how the service handles assignment conflicts.

.google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GuestPolicies.Assignment.Builder

getAssignmentOrBuilder()

public GuestPolicies.AssignmentOrBuilder getAssignmentOrBuilder()

Required. Specifies the VM instances that are assigned to this policy. This allows you to target sets or groups of VM instances by different parameters such as labels, names, OS, or zones.

If left empty, all VM instances underneath this policy are targeted.

At the same level in the resource hierarchy (that is within a project), the service prevents the creation of multiple policies that conflict with each other. For more information, see how the service handles assignment conflicts.

.google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GuestPolicies.AssignmentOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. Time this guest policy was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time this guest policy was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time this guest policy was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public GuestPolicies.GuestPolicy getDefaultInstanceForType()
Returns
Type Description
GuestPolicies.GuestPolicy

getDescription()

public String getDescription()

Description of the guest policy. Length of the description is limited to 1024 characters.

string description = 2;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Description of the guest policy. Length of the description is limited to 1024 characters.

string description = 2;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getEtag()

public String getEtag()

The etag for this guest policy. If this is provided on update, it must match the server's etag.

string etag = 10;

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

The etag for this guest policy. If this is provided on update, it must match the server's etag.

string etag = 10;

Returns
Type Description
ByteString

The bytes for etag.

getName()

public String getName()

Required. Unique name of the resource in this project using one of the following forms: projects/{project_number}/guestPolicies/{guest_policy_id}.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. Unique name of the resource in this project using one of the following forms: projects/{project_number}/guestPolicies/{guest_policy_id}.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for name.

getPackageRepositories(int index)

public GuestPolicies.PackageRepository getPackageRepositories(int index)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.PackageRepository

getPackageRepositoriesBuilder(int index)

public GuestPolicies.PackageRepository.Builder getPackageRepositoriesBuilder(int index)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.PackageRepository.Builder

getPackageRepositoriesBuilderList()

public List<GuestPolicies.PackageRepository.Builder> getPackageRepositoriesBuilderList()

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Returns
Type Description
List<Builder>

getPackageRepositoriesCount()

public int getPackageRepositoriesCount()

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Returns
Type Description
int

getPackageRepositoriesList()

public List<GuestPolicies.PackageRepository> getPackageRepositoriesList()

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Returns
Type Description
List<PackageRepository>

getPackageRepositoriesOrBuilder(int index)

public GuestPolicies.PackageRepositoryOrBuilder getPackageRepositoriesOrBuilder(int index)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.PackageRepositoryOrBuilder

getPackageRepositoriesOrBuilderList()

public List<? extends GuestPolicies.PackageRepositoryOrBuilder> getPackageRepositoriesOrBuilderList()

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Returns
Type Description
List<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder>

getPackages(int index)

public GuestPolicies.Package getPackages(int index)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.Package

getPackagesBuilder(int index)

public GuestPolicies.Package.Builder getPackagesBuilder(int index)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.Package.Builder

getPackagesBuilderList()

public List<GuestPolicies.Package.Builder> getPackagesBuilderList()

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Returns
Type Description
List<Builder>

getPackagesCount()

public int getPackagesCount()

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Returns
Type Description
int

getPackagesList()

public List<GuestPolicies.Package> getPackagesList()

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Returns
Type Description
List<Package>

getPackagesOrBuilder(int index)

public GuestPolicies.PackageOrBuilder getPackagesOrBuilder(int index)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.PackageOrBuilder

getPackagesOrBuilderList()

public List<? extends GuestPolicies.PackageOrBuilder> getPackagesOrBuilderList()

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Returns
Type Description
List<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder>

getRecipes(int index)

public GuestPolicies.SoftwareRecipe getRecipes(int index)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.SoftwareRecipe

getRecipesBuilder(int index)

public GuestPolicies.SoftwareRecipe.Builder getRecipesBuilder(int index)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.SoftwareRecipe.Builder

getRecipesBuilderList()

public List<GuestPolicies.SoftwareRecipe.Builder> getRecipesBuilderList()

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Returns
Type Description
List<Builder>

getRecipesCount()

public int getRecipesCount()

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Returns
Type Description
int

getRecipesList()

public List<GuestPolicies.SoftwareRecipe> getRecipesList()

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Returns
Type Description
List<SoftwareRecipe>

getRecipesOrBuilder(int index)

public GuestPolicies.SoftwareRecipeOrBuilder getRecipesOrBuilder(int index)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.SoftwareRecipeOrBuilder

getRecipesOrBuilderList()

public List<? extends GuestPolicies.SoftwareRecipeOrBuilder> getRecipesOrBuilderList()

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Returns
Type Description
List<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder>

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Last time this guest policy was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Last time this guest policy was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Last time this guest policy was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasAssignment()

public boolean hasAssignment()

Required. Specifies the VM instances that are assigned to this policy. This allows you to target sets or groups of VM instances by different parameters such as labels, names, OS, or zones.

If left empty, all VM instances underneath this policy are targeted.

At the same level in the resource hierarchy (that is within a project), the service prevents the creation of multiple policies that conflict with each other. For more information, see how the service handles assignment conflicts.

.google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the assignment field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. Time this guest policy was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Last time this guest policy was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAssignment(GuestPolicies.Assignment value)

public GuestPolicies.GuestPolicy.Builder mergeAssignment(GuestPolicies.Assignment value)

Required. Specifies the VM instances that are assigned to this policy. This allows you to target sets or groups of VM instances by different parameters such as labels, names, OS, or zones.

If left empty, all VM instances underneath this policy are targeted.

At the same level in the resource hierarchy (that is within a project), the service prevents the creation of multiple policies that conflict with each other. For more information, see how the service handles assignment conflicts.

.google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value GuestPolicies.Assignment
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

mergeCreateTime(Timestamp value)

public GuestPolicies.GuestPolicy.Builder mergeCreateTime(Timestamp value)

Output only. Time this guest policy was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

mergeFrom(GuestPolicies.GuestPolicy other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public GuestPolicies.GuestPolicy.Builder mergeUpdateTime(Timestamp value)

Output only. Last time this guest policy was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

removePackageRepositories(int index)

public GuestPolicies.GuestPolicy.Builder removePackageRepositories(int index)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

removePackages(int index)

public GuestPolicies.GuestPolicy.Builder removePackages(int index)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

removeRecipes(int index)

public GuestPolicies.GuestPolicy.Builder removeRecipes(int index)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameter
Name Description
index int
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setAssignment(GuestPolicies.Assignment value)

public GuestPolicies.GuestPolicy.Builder setAssignment(GuestPolicies.Assignment value)

Required. Specifies the VM instances that are assigned to this policy. This allows you to target sets or groups of VM instances by different parameters such as labels, names, OS, or zones.

If left empty, all VM instances underneath this policy are targeted.

At the same level in the resource hierarchy (that is within a project), the service prevents the creation of multiple policies that conflict with each other. For more information, see how the service handles assignment conflicts.

.google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value GuestPolicies.Assignment
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setAssignment(GuestPolicies.Assignment.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder setAssignment(GuestPolicies.Assignment.Builder builderForValue)

Required. Specifies the VM instances that are assigned to this policy. This allows you to target sets or groups of VM instances by different parameters such as labels, names, OS, or zones.

If left empty, all VM instances underneath this policy are targeted.

At the same level in the resource hierarchy (that is within a project), the service prevents the creation of multiple policies that conflict with each other. For more information, see how the service handles assignment conflicts.

.google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue GuestPolicies.Assignment.Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setCreateTime(Timestamp value)

public GuestPolicies.GuestPolicy.Builder setCreateTime(Timestamp value)

Output only. Time this guest policy was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setCreateTime(Timestamp.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Time this guest policy was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setDescription(String value)

public GuestPolicies.GuestPolicy.Builder setDescription(String value)

Description of the guest policy. Length of the description is limited to 1024 characters.

string description = 2;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public GuestPolicies.GuestPolicy.Builder setDescriptionBytes(ByteString value)

Description of the guest policy. Length of the description is limited to 1024 characters.

string description = 2;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

setEtag(String value)

public GuestPolicies.GuestPolicy.Builder setEtag(String value)

The etag for this guest policy. If this is provided on update, it must match the server's etag.

string etag = 10;

Parameter
Name Description
value String

The etag to set.

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public GuestPolicies.GuestPolicy.Builder setEtagBytes(ByteString value)

The etag for this guest policy. If this is provided on update, it must match the server's etag.

string etag = 10;

Parameter
Name Description
value ByteString

The bytes for etag to set.

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public GuestPolicies.GuestPolicy.Builder setName(String value)

Required. Unique name of the resource in this project using one of the following forms: projects/{project_number}/guestPolicies/{guest_policy_id}.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

setNameBytes(ByteString value)

public GuestPolicies.GuestPolicy.Builder setNameBytes(ByteString value)

Required. Unique name of the resource in this project using one of the following forms: projects/{project_number}/guestPolicies/{guest_policy_id}.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

setPackageRepositories(int index, GuestPolicies.PackageRepository value)

public GuestPolicies.GuestPolicy.Builder setPackageRepositories(int index, GuestPolicies.PackageRepository value)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameters
Name Description
index int
value GuestPolicies.PackageRepository
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setPackageRepositories(int index, GuestPolicies.PackageRepository.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder setPackageRepositories(int index, GuestPolicies.PackageRepository.Builder builderForValue)

A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.

repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8;

Parameters
Name Description
index int
builderForValue GuestPolicies.PackageRepository.Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setPackages(int index, GuestPolicies.Package value)

public GuestPolicies.GuestPolicy.Builder setPackages(int index, GuestPolicies.Package value)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameters
Name Description
index int
value GuestPolicies.Package
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setPackages(int index, GuestPolicies.Package.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder setPackages(int index, GuestPolicies.Package.Builder builderForValue)

The software packages to be managed by this policy.

repeated .google.cloud.osconfig.v1beta.Package packages = 7;

Parameters
Name Description
index int
builderForValue GuestPolicies.Package.Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setRecipes(int index, GuestPolicies.SoftwareRecipe value)

public GuestPolicies.GuestPolicy.Builder setRecipes(int index, GuestPolicies.SoftwareRecipe value)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameters
Name Description
index int
value GuestPolicies.SoftwareRecipe
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setRecipes(int index, GuestPolicies.SoftwareRecipe.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder setRecipes(int index, GuestPolicies.SoftwareRecipe.Builder builderForValue)

A list of Recipes to install on the VM instance.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;

Parameters
Name Description
index int
builderForValue GuestPolicies.SoftwareRecipe.Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public GuestPolicies.GuestPolicy.Builder setUpdateTime(Timestamp value)

Output only. Last time this guest policy was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GuestPolicies.GuestPolicy.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public GuestPolicies.GuestPolicy.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Last time this guest policy was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
GuestPolicies.GuestPolicy.Builder