Class GuestPolicies.GuestPolicy.Builder (2.14.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.B