Class OSPolicy.Resource.FileResource.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder> implements OSPolicy.Resource.FileResourceOrBuilder
A resource that manages the state of a file.
Protobuf typegoogle.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OSPolicy.Resource.FileResource.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
OSPolicy.Resource.FileResource
build()
OSPolicy.Resource.FileResource
buildPartial()
OSPolicy.Resource.FileResource.Builder
clear()
OSPolicy.Resource.FileResource.Builder
clearContent()
A a file with this content.OSPolicy.Resource.FileResource.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
OSPolicy.Resource.FileResource.Builder
clearFile()
A remote or local source.OSPolicy.Resource.FileResource.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
OSPolicy.Resource.FileResource.Builder
clearPath()
Required.OSPolicy.Resource.FileResource.Builder
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).OSPolicy.Resource.FileResource.Builder
clearSource()
OSPolicy.Resource.FileResource.Builder
clearState()
Required.OSPolicy.Resource.FileResource.Builder
clone()
String
getContent()
A a file with this content.com.google.protobuf.ByteString
getContentBytes()
A a file with this content.OSPolicy.Resource.FileResource
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
OSPolicy.Resource.File
getFile()
A remote or local source.OSPolicy.Resource.File.Builder
getFileBuilder()
A remote or local source.OSPolicy.Resource.FileOrBuilder
getFileOrBuilder()
A remote or local source.String
getPath()
Required.com.google.protobuf.ByteString
getPathBytes()
Required.String
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).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).OSPolicy.Resource.FileResource.SourceCase
getSourceCase()
OSPolicy.Resource.FileResource.DesiredState
getState()
Required.int
getStateValue()
Required.boolean
hasContent()
A a file with this content.boolean
hasFile()
A remote or local source.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
OSPolicy.Resource.FileResource.Builder
mergeFile(OSPolicy.Resource.File value)
A remote or local source.OSPolicy.Resource.FileResource.Builder
mergeFrom(OSPolicy.Resource.FileResource other)
OSPolicy.Resource.FileResource.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
OSPolicy.Resource.FileResource.Builder
mergeFrom(com.google.protobuf.Message other)
OSPolicy.Resource.FileResource.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
OSPolicy.Resource.FileResource.Builder
setContent(String value)
A a file with this content.OSPolicy.Resource.FileResource.Builder
setContentBytes(com.google.protobuf.ByteString value)
A a file with this content.OSPolicy.Resource.FileResource.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
OSPolicy.Resource.FileResource.Builder
setFile(OSPolicy.Resource.File value)
A remote or local source.OSPolicy.Resource.FileResource.Builder
setFile(OSPolicy.Resource.File.Builder builderForValue)
A remote or local source.OSPolicy.Resource.FileResource.Builder
setPath(String value)
Required.OSPolicy.Resource.FileResource.Builder
setPathBytes(com.google.protobuf.ByteString value)
Required.OSPolicy.Resource.FileResource.Builder
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).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).OSPolicy.Resource.FileResource.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
OSPolicy.Resource.FileResource.Builder
setState(OSPolicy.Resource.FileResource.DesiredState value)
Required.OSPolicy.Resource.FileResource.Builder
setStateValue(int value)
Required.OSPolicy.Resource.FileResource.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
clear
public OSPolicy.Resource.FileResource.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
getDefaultInstanceForType
public OSPolicy.Resource.FileResource getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public OSPolicy.Resource.FileResource build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public OSPolicy.Resource.FileResource buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public OSPolicy.Resource.FileResource.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
setField
public OSPolicy.Resource.FileResource.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
clearField
public OSPolicy.Resource.FileResource.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
clearOneof
public OSPolicy.Resource.FileResource.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
setRepeatedField
public OSPolicy.Resource.FileResource.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
addRepeatedField
public OSPolicy.Resource.FileResource.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
mergeFrom
public OSPolicy.Resource.FileResource.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<OSPolicy.Resource.FileResource.Builder>
-
mergeFrom
public OSPolicy.Resource.FileResource.Builder mergeFrom(OSPolicy.Resource.FileResource other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<OSPolicy.Resource.FileResource.Builder>
- Throws:
IOException
-
getSourceCase
public OSPolicy.Resource.FileResource.SourceCase getSourceCase()
- Specified by:
getSourceCase
in interfaceOSPolicy.Resource.FileResourceOrBuilder
-
clearSource
public OSPolicy.Resource.FileResource.Builder clearSource()
-
hasFile
public boolean hasFile()
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
- Specified by:
hasFile
in interfaceOSPolicy.Resource.FileResourceOrBuilder
- Returns:
- Whether the file field is set.
-
getFile
public OSPolicy.Resource.File getFile()
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
- Specified by:
getFile
in interfaceOSPolicy.Resource.FileResourceOrBuilder
- Returns:
- The file.
-
setFile
public OSPolicy.Resource.FileResource.Builder setFile(OSPolicy.Resource.File value)
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
public OSPolicy.Resource.FileResource.Builder mergeFile(OSPolicy.Resource.File value)
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
-
clearFile
public OSPolicy.Resource.FileResource.Builder clearFile()
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
-
getFileBuilder
public OSPolicy.Resource.File.Builder getFileBuilder()
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
-
getFileOrBuilder
public OSPolicy.Resource.FileOrBuilder getFileOrBuilder()
A remote or local source.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
- Specified by:
getFileOrBuilder
in 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:
hasContent
in interfaceOSPolicy.Resource.FileResourceOrBuilder
- Returns:
- Whether the content field is set.
-
getContent
public String getContent()
A a file with this content. The size of the content is limited to 1024 characters.
string content = 2;
- Specified by:
getContent
in 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:
getContentBytes
in interfaceOSPolicy.Resource.FileResourceOrBuilder
- Returns:
- The bytes for content.
-
setContent
public OSPolicy.Resource.FileResource.Builder setContent(String value)
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
public OSPolicy.Resource.FileResource.Builder 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
public OSPolicy.Resource.FileResource.Builder setContentBytes(com.google.protobuf.ByteString value)
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
public String getPath()
Required. The absolute path of the file within the VM.
string path = 3 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getPath
in 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:
getPathBytes
in interfaceOSPolicy.Resource.FileResourceOrBuilder
- Returns:
- The bytes for path.
-
setPath
public OSPolicy.Resource.FileResource.Builder setPath(String value)
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
public OSPolicy.Resource.FileResource.Builder 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
public OSPolicy.Resource.FileResource.Builder setPathBytes(com.google.protobuf.ByteString value)
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:
getStateValue
in interfaceOSPolicy.Resource.FileResourceOrBuilder
- Returns:
- The enum numeric value on the wire for state.
-
setStateValue
public OSPolicy.Resource.FileResource.Builder setStateValue(int 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 enum numeric value on the wire for state to set.- Returns:
- This builder for chaining.
-
getState
public OSPolicy.Resource.FileResource.DesiredState getState()
Required. Desired state of the file.
.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getState
in 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
public OSPolicy.Resource.FileResource.Builder 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
public String 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:
getPermissions
in 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:
getPermissionsBytes
in interfaceOSPolicy.Resource.FileResourceOrBuilder
- Returns:
- The bytes for permissions.
-
setPermissions
public OSPolicy.Resource.FileResource.Builder 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). 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
public OSPolicy.Resource.FileResource.Builder 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.
-
setUnknownFields
public final OSPolicy.Resource.FileResource.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
mergeUnknownFields
public final OSPolicy.Resource.FileResource.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<OSPolicy.Resource.FileResource.Builder>
-
-