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
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
Field Value
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value
ETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
PACKAGES_FIELD_NUMBER
public static final int PACKAGES_FIELD_NUMBER
Field Value
PACKAGE_REPOSITORIES_FIELD_NUMBER
public static final int PACKAGE_REPOSITORIES_FIELD_NUMBER
Field Value
RECIPES_FIELD_NUMBER
public static final int RECIPES_FIELD_NUMBER
Field Value
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static GuestPolicies.GuestPolicy getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static GuestPolicies.GuestPolicy.Builder newBuilder()
Returns
newBuilder(GuestPolicies.GuestPolicy prototype)
public static GuestPolicies.GuestPolicy.Builder newBuilder(GuestPolicies.GuestPolicy prototype)
Parameter
Returns
public static GuestPolicies.GuestPolicy parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static GuestPolicies.GuestPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static GuestPolicies.GuestPolicy parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.GuestPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static GuestPolicies.GuestPolicy parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.GuestPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static GuestPolicies.GuestPolicy parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static GuestPolicies.GuestPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static GuestPolicies.GuestPolicy parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static GuestPolicies.GuestPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static GuestPolicies.GuestPolicy parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.GuestPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<GuestPolicies.GuestPolicy> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
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
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
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
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
getDefaultInstanceForType()
public GuestPolicies.GuestPolicy getDefaultInstanceForType()
Returns
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.
|
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
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
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
Returns
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
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
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
Returns
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
Returns
getPackagesCount()
public int getPackagesCount()
The software packages to be managed by this policy.
repeated .google.cloud.osconfig.v1beta.Package packages = 7;
Returns
getPackagesList()
public List<GuestPolicies.Package> getPackagesList()
The software packages to be managed by this policy.
repeated .google.cloud.osconfig.v1beta.Package packages = 7;
Returns
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
Returns
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> | |
getParserForType()
public Parser<GuestPolicies.GuestPolicy> getParserForType()
Returns
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
Returns
getRecipesCount()
public int getRecipesCount()
A list of Recipes to install on the VM instance.
repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9;
Returns
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
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
Returns
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> | |
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
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
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
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.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public GuestPolicies.GuestPolicy.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected GuestPolicies.GuestPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public GuestPolicies.GuestPolicy.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions