Class OSPolicy.Resource.FileResource.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.FileResource.Builder>
com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder
- All Implemented Interfaces:
OSPolicy.Resource.FileResourceOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- OSPolicy.Resource.FileResource
public static final class OSPolicy.Resource.FileResource.Builder
extends com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.FileResource.Builder>
implements OSPolicy.Resource.FileResourceOrBuilder
A resource that manages the state of a file.Protobuf type
google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()A a file with this content.A remote or local source.Required.Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility).Required.A a file with this content.com.google.protobuf.ByteStringA a file with this content.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetFile()A remote or local source.A remote or local source.A remote or local source.getPath()Required.com.google.protobuf.ByteStringRequired.Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility).com.google.protobuf.ByteStringConsists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility).getState()Required.intRequired.booleanA a file with this content.booleanhasFile()A remote or local source.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFile(OSPolicy.Resource.File value) A remote or local source.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setContent(String value) A a file with this content.setContentBytes(com.google.protobuf.ByteString value) A a file with this content.setFile(OSPolicy.Resource.File value) A remote or local source.setFile(OSPolicy.Resource.File.Builder builderForValue) A remote or local source.Required.setPathBytes(com.google.protobuf.ByteString value) Required.setPermissions(String value) Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility).setPermissionsBytes(com.google.protobuf.ByteString value) Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility).Required.setStateValue(int 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<OSPolicy.Resource.FileResource.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<OSPolicy.Resource.FileResource.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<OSPolicy.Resource.FileResource.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<OSPolicy.Resource.FileResource.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.FileResource.Builder>
-
mergeFrom
public OSPolicy.Resource.FileResource.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<OSPolicy.Resource.FileResource.Builder>- Throws:
IOException
-
getSourceCase
- Specified by:
getSourceCasein interfaceOSPolicy.Resource.FileResourceOrBuilder
-
clearSource
-
hasFile
public boolean hasFile()A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;- Specified by:
hasFilein interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- Whether the file field is set.
-
getFile
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;- Specified by:
getFilein interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- The file.
-
setFile
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; -
setFile
public OSPolicy.Resource.FileResource.Builder setFile(OSPolicy.Resource.File.Builder builderForValue) A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; -
mergeFile
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; -
clearFile
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; -
getFileBuilder
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; -
getFileOrBuilder
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;- Specified by:
getFileOrBuilderin interfaceOSPolicy.Resource.FileResourceOrBuilder
-
hasContent
public boolean hasContent()A a file with this content. The size of the content is limited to 1024 characters.
string content = 2;- Specified by:
hasContentin interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- Whether the content field is set.
-
getContent
A a file with this content. The size of the content is limited to 1024 characters.
string content = 2;- Specified by:
getContentin interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- The content.
-
getContentBytes
public com.google.protobuf.ByteString getContentBytes()A a file with this content. The size of the content is limited to 1024 characters.
string content = 2;- Specified by:
getContentBytesin interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- The bytes for content.
-
setContent
A a file with this content. The size of the content is limited to 1024 characters.
string content = 2;- Parameters:
value- The content to set.- Returns:
- This builder for chaining.
-
clearContent
A a file with this content. The size of the content is limited to 1024 characters.
string content = 2;- Returns:
- This builder for chaining.
-
setContentBytes
A a file with this content. The size of the content is limited to 1024 characters.
string content = 2;- Parameters:
value- The bytes for content to set.- Returns:
- This builder for chaining.
-
getPath
Required. The absolute path of the file within the VM.
string path = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPathin interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- The path.
-
getPathBytes
public com.google.protobuf.ByteString getPathBytes()Required. The absolute path of the file within the VM.
string path = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPathBytesin interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- The bytes for path.
-
setPath
Required. The absolute path of the file within the VM.
string path = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The path to set.- Returns:
- This builder for chaining.
-
clearPath
Required. The absolute path of the file within the VM.
string path = 3 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setPathBytes
Required. The absolute path of the file within the VM.
string path = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for path to set.- Returns:
- This builder for chaining.
-
getStateValue
public int getStateValue()Required. Desired state of the file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getStateValuein interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- The enum numeric value on the wire for state.
-
setStateValue
Required. Desired state of the file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The enum numeric value on the wire for state to set.- Returns:
- This builder for chaining.
-
getState
Required. Desired state of the file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getStatein interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- The state.
-
setState
public OSPolicy.Resource.FileResource.Builder setState(OSPolicy.Resource.FileResource.DesiredState value) Required. Desired state of the file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The state to set.- Returns:
- This builder for chaining.
-
clearState
Required. Desired state of the file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
getPermissions
Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
string permissions = 5;- Specified by:
getPermissionsin interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- The permissions.
-
getPermissionsBytes
public com.google.protobuf.ByteString getPermissionsBytes()Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
string permissions = 5;- Specified by:
getPermissionsBytesin interfaceOSPolicy.Resource.FileResourceOrBuilder- Returns:
- The bytes for permissions.
-
setPermissions
Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
string permissions = 5;- Parameters:
value- The permissions to set.- Returns:
- This builder for chaining.
-
clearPermissions
Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
string permissions = 5;- Returns:
- This builder for chaining.
-
setPermissionsBytes
public OSPolicy.Resource.FileResource.Builder setPermissionsBytes(com.google.protobuf.ByteString value) Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
string permissions = 5;- Parameters:
value- The bytes for permissions to set.- Returns:
- This builder for chaining.
-