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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > GuestPolicies.GuestPolicy.BuilderImplements
GuestPolicies.GuestPolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
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;
Name | Description |
values | Iterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository> |
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;
Name | Description |
values | Iterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Package> |
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;
Name | Description |
values | Iterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe> |
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;
Name | Description |
value | GuestPolicies.PackageRepository |
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;
Name | Description |
builderForValue | GuestPolicies.PackageRepository.Builder |
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;
Name | Description |
index | int |
value | GuestPolicies.PackageRepository |
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;
Name | Description |
index | int |
builderForValue | GuestPolicies.PackageRepository.Builder |
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;
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;
Name | Description |
index | int |
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;
Name | Description |
value | GuestPolicies.Package |
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;
Name | Description |
builderForValue | GuestPolicies.Package.Builder |
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;
Name | Description |
index | int |
value | GuestPolicies.Package |
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;
Name | Description |
index | int |
builderForValue | GuestPolicies.Package.Builder |
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;
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;
Name | Description |
index | int |
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;
Name | Description |
value | GuestPolicies.SoftwareRecipe |
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;
Name | Description |
builderForValue | GuestPolicies.SoftwareRecipe.Builder |
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;
Name | Description |
index | int |
value | GuestPolicies.SoftwareRecipe |
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;
Name | Description |
index | int |
builderForValue | GuestPolicies.SoftwareRecipe.Builder |
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;
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;
Name | Description |
index | int |
Type | Description |
GuestPolicies.SoftwareRecipe.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public GuestPolicies.GuestPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
GuestPolicies.GuestPolicy.Builder |
build()
public GuestPolicies.GuestPolicy build()
Type | Description |
GuestPolicies.GuestPolicy |
buildPartial()
public GuestPolicies.GuestPolicy buildPartial()
Type | Description |
GuestPolicies.GuestPolicy |
clear()
public GuestPolicies.GuestPolicy.Builder clear()
Type | Description |
GuestPolicies.GuestPolicy.Builder |
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];
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];
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;
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;
Type | Description |
GuestPolicies.GuestPolicy.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public GuestPolicies.GuestPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
GuestPolicies.GuestPolicy.Builder |
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];
Type | Description |
GuestPolicies.GuestPolicy.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public GuestPolicies.GuestPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
GuestPolicies.GuestPolicy.Builder |
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;
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;
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;
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];
Type | Description |
GuestPolicies.GuestPolicy.Builder |
clone()
public GuestPolicies.GuestPolicy.Builder clone()
Type | Description |
GuestPolicies.GuestPolicy.Builder |