Class GuestPolicies.GuestPolicy (2.5.0)

public static final class GuestPolicies.GuestPolicy extends GeneratedMessageV3 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 Fields

ASSIGNMENT_FIELD_NUMBER

public static final int ASSIGNMENT_FIELD_NUMBER
Field Value
TypeDescription
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PACKAGES_FIELD_NUMBER

public static final int PACKAGES_FIELD_NUMBER
Field Value
TypeDescription
int

PACKAGE_REPOSITORIES_FIELD_NUMBER

public static final int PACKAGE_REPOSITORIES_FIELD_NUMBER
Field Value
TypeDescription
int

RECIPES_FIELD_NUMBER

public static final int RECIPES_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static GuestPolicies.GuestPolicy getDefaultInstance()
Returns
TypeDescription
GuestPolicies.GuestPolicy

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static GuestPolicies.GuestPolicy.Builder newBuilder()
Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder

newBuilder(GuestPolicies.GuestPolicy prototype)

public static GuestPolicies.GuestPolicy.Builder newBuilder(GuestPolicies.GuestPolicy prototype)
Parameter
NameDescription
prototypeGuestPolicies.GuestPolicy
Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder

parseDelimitedFrom(InputStream input)

public static GuestPolicies.GuestPolicy parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static GuestPolicies.GuestPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static GuestPolicies.GuestPolicy parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static GuestPolicies.GuestPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static GuestPolicies.GuestPolicy parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static GuestPolicies.GuestPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static GuestPolicies.GuestPolicy parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static GuestPolicies.GuestPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static GuestPolicies.GuestPolicy parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static GuestPolicies.GuestPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static GuestPolicies.GuestPolicy parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static GuestPolicies.GuestPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
GuestPolicies.GuestPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<GuestPolicies.GuestPolicy> parser()
Returns
TypeDescription
Parser<GuestPolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.

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.

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.

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

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

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>

getParserForType()

public Parser<GuestPolicies.GuestPolicy> getParserForType()
Returns
TypeDescription
Parser<GuestPolicy>
Overrides

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

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>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public GuestPolicies.GuestPolicy.Builder newBuilderForType()
Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected GuestPolicies.GuestPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public GuestPolicies.GuestPolicy.Builder toBuilder()
Returns
TypeDescription
GuestPolicies.GuestPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException