Package com.google.cloud.osconfig.v1beta
Class GuestPolicies.Package.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GuestPolicies.Package.Builder>
com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder
- All Implemented Interfaces:
GuestPolicies.PackageOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- GuestPolicies.Package
public static final class GuestPolicies.Package.Builder
extends com.google.protobuf.GeneratedMessage.Builder<GuestPolicies.Package.Builder>
implements GuestPolicies.PackageOrBuilder
Package is a reference to the software package to be installed or removed. The agent on the VM instance uses the system package manager to apply the config. These are the commands that the agent uses to install or remove packages. Apt install: `apt-get update && apt-get -y install package1 package2 package3` remove: `apt-get -y remove package1 package2 package3` Yum install: `yum -y install package1 package2 package3` remove: `yum -y remove package1 package2 package3` Zypper install: `zypper install package1 package2 package3` remove: `zypper rm package1 package2` Googet install: `googet -noconfirm install package1 package2 package3` remove: `googet -noconfirm remove package1 package2 package3`Protobuf type
google.cloud.osconfig.v1beta.Package-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The desired_state the agent should maintain for this package.Type of package manager that can be used to install this package.Required.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe desired_state the agent should maintain for this package.intThe desired_state the agent should maintain for this package.Type of package manager that can be used to install this package.intType of package manager that can be used to install this package.getName()Required.com.google.protobuf.ByteStringRequired.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(GuestPolicies.Package other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) The desired_state the agent should maintain for this package.setDesiredStateValue(int value) The desired_state the agent should maintain for this package.Type of package manager that can be used to install this package.setManagerValue(int value) Type of package manager that can be used to install this package.Required.setNameBytes(com.google.protobuf.ByteString value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<GuestPolicies.Package.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<GuestPolicies.Package.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<GuestPolicies.Package.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GuestPolicies.Package.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<GuestPolicies.Package.Builder>
-
mergeFrom
public GuestPolicies.Package.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GuestPolicies.Package.Builder>- Throws:
IOException
-
getName
Required. The name of the package. A package is uniquely identified for conflict validation by checking the package name and the manager(s) that the package targets.
string name = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getNamein interfaceGuestPolicies.PackageOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Required. The name of the package. A package is uniquely identified for conflict validation by checking the package name and the manager(s) that the package targets.
string name = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getNameBytesin interfaceGuestPolicies.PackageOrBuilder- Returns:
- The bytes for name.
-
setName
Required. The name of the package. A package is uniquely identified for conflict validation by checking the package name and the manager(s) that the package targets.
string name = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Required. The name of the package. A package is uniquely identified for conflict validation by checking the package name and the manager(s) that the package targets.
string name = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setNameBytes
Required. The name of the package. A package is uniquely identified for conflict validation by checking the package name and the manager(s) that the package targets.
string name = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getDesiredStateValue
public int getDesiredStateValue()The desired_state the agent should maintain for this package. The default is to ensure the package is installed.
.google.cloud.osconfig.v1beta.DesiredState desired_state = 2;- Specified by:
getDesiredStateValuein interfaceGuestPolicies.PackageOrBuilder- Returns:
- The enum numeric value on the wire for desiredState.
-
setDesiredStateValue
The desired_state the agent should maintain for this package. The default is to ensure the package is installed.
.google.cloud.osconfig.v1beta.DesiredState desired_state = 2;- Parameters:
value- The enum numeric value on the wire for desiredState to set.- Returns:
- This builder for chaining.
-
getDesiredState
The desired_state the agent should maintain for this package. The default is to ensure the package is installed.
.google.cloud.osconfig.v1beta.DesiredState desired_state = 2;- Specified by:
getDesiredStatein interfaceGuestPolicies.PackageOrBuilder- Returns:
- The desiredState.
-
setDesiredState
The desired_state the agent should maintain for this package. The default is to ensure the package is installed.
.google.cloud.osconfig.v1beta.DesiredState desired_state = 2;- Parameters:
value- The desiredState to set.- Returns:
- This builder for chaining.
-
clearDesiredState
The desired_state the agent should maintain for this package. The default is to ensure the package is installed.
.google.cloud.osconfig.v1beta.DesiredState desired_state = 2;- Returns:
- This builder for chaining.
-
getManagerValue
public int getManagerValue()Type of package manager that can be used to install this package. If a system does not have the package manager, the package is not installed or removed no error message is returned. By default, or if you specify `ANY`, the agent attempts to install and remove this package using the default package manager. This is useful when creating a policy that applies to different types of systems. The default behavior is ANY.
.google.cloud.osconfig.v1beta.Package.Manager manager = 3;- Specified by:
getManagerValuein interfaceGuestPolicies.PackageOrBuilder- Returns:
- The enum numeric value on the wire for manager.
-
setManagerValue
Type of package manager that can be used to install this package. If a system does not have the package manager, the package is not installed or removed no error message is returned. By default, or if you specify `ANY`, the agent attempts to install and remove this package using the default package manager. This is useful when creating a policy that applies to different types of systems. The default behavior is ANY.
.google.cloud.osconfig.v1beta.Package.Manager manager = 3;- Parameters:
value- The enum numeric value on the wire for manager to set.- Returns:
- This builder for chaining.
-
getManager
Type of package manager that can be used to install this package. If a system does not have the package manager, the package is not installed or removed no error message is returned. By default, or if you specify `ANY`, the agent attempts to install and remove this package using the default package manager. This is useful when creating a policy that applies to different types of systems. The default behavior is ANY.
.google.cloud.osconfig.v1beta.Package.Manager manager = 3;- Specified by:
getManagerin interfaceGuestPolicies.PackageOrBuilder- Returns:
- The manager.
-
setManager
Type of package manager that can be used to install this package. If a system does not have the package manager, the package is not installed or removed no error message is returned. By default, or if you specify `ANY`, the agent attempts to install and remove this package using the default package manager. This is useful when creating a policy that applies to different types of systems. The default behavior is ANY.
.google.cloud.osconfig.v1beta.Package.Manager manager = 3;- Parameters:
value- The manager to set.- Returns:
- This builder for chaining.
-
clearManager
Type of package manager that can be used to install this package. If a system does not have the package manager, the package is not installed or removed no error message is returned. By default, or if you specify `ANY`, the agent attempts to install and remove this package using the default package manager. This is useful when creating a policy that applies to different types of systems. The default behavior is ANY.
.google.cloud.osconfig.v1beta.Package.Manager manager = 3;- Returns:
- This builder for chaining.
-