Class GuestPolicies.GuestPolicy.Builder (2.5.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Package>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe>
Returns
TypeDescription
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
NameDescription
valueGuestPolicies.PackageRepository
Returns
TypeDescription
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
NameDescription
builderForValueGuestPolicies.PackageRepository.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueGuestPolicies.PackageRepository
Returns
TypeDescription
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
NameDescription
indexint
builderForValueGuestPolicies.PackageRepository.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueGuestPolicies.Package
Returns
TypeDescription
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
NameDescription
builderForValueGuestPolicies.Package.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueGuestPolicies.Package
Returns
TypeDescription
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
NameDescription
indexint
builderForValueGuestPolicies.Package.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueGuestPolicies.SoftwareRecipe
Returns
TypeDescription
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
NameDescription
builderForValueGuestPolicies.SoftwareRecipe.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueGuestPolicies.SoftwareRecipe
Returns
TypeDescription
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
NameDescription
indexint
builderForValueGuestPolicies.SoftwareRecipe.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public GuestPolicies.GuestPolicy build()
Returns
TypeDescription
GuestPolicies.GuestPolicy

buildPartial()

public GuestPolicies.GuestPolicy buildPartial()
Returns
TypeDescription
GuestPolicies.GuestPolicy

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public GuestPolicies.GuestPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public GuestPolicies.GuestPolicy.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public GuestPolicies.GuestPolicy getDefaultInstanceForType()
Returns
TypeDescription
GuestPolicies.GuestPolicy

getDescription()

public String getDescription()

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

string description = 2;

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

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<Builder>

getPackagesCount()

public int getPackagesCount()

The software packages to be managed by this policy.

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueGuestPolicies.Assignment
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder

mergeFrom(GuestPolicies.GuestPolicy other)

public GuestPolicies.GuestPolicy.Builder mergeFrom(GuestPolicies.GuestPolicy other)
Parameter
NameDescription
otherGuestPolicies.GuestPolicy
Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GuestPolicies.GuestPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueGuestPolicies.Assignment
Returns
TypeDescription
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
NameDescription
builderForValueGuestPolicies.Assignment.Builder
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueString

The description to set.

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

The bytes for description to set.

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

The etag to set.

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

The bytes for etag to set.

Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

The name to set.

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

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
indexint
valueGuestPolicies.PackageRepository
Returns
TypeDescription
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
NameDescription
indexint
builderForValueGuestPolicies.PackageRepository.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueGuestPolicies.Package
Returns
TypeDescription
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
NameDescription
indexint
builderForValueGuestPolicies.Package.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueGuestPolicies.SoftwareRecipe
Returns
TypeDescription
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
NameDescription
indexint
builderForValueGuestPolicies.SoftwareRecipe.Builder
Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder

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

public GuestPolicies.GuestPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final GuestPolicies.GuestPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder