public static final class OSPolicy.Resource.FileResource extends GeneratedMessageV3 implements OSPolicy.Resource.FileResourceOrBuilder
A resource that manages the state of a file.
Protobuf type google.cloud.osconfig.v1.OSPolicy.Resource.FileResource
Static Fields
CONTENT_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER
Field Value
FILE_FIELD_NUMBER
public static final int FILE_FIELD_NUMBER
Field Value
PATH_FIELD_NUMBER
public static final int PATH_FIELD_NUMBER
Field Value
PERMISSIONS_FIELD_NUMBER
public static final int PERMISSIONS_FIELD_NUMBER
Field Value
STATE_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static OSPolicy.Resource.FileResource getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static OSPolicy.Resource.FileResource.Builder newBuilder()
Returns
newBuilder(OSPolicy.Resource.FileResource prototype)
public static OSPolicy.Resource.FileResource.Builder newBuilder(OSPolicy.Resource.FileResource prototype)
Parameter
Returns
public static OSPolicy.Resource.FileResource parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static OSPolicy.Resource.FileResource parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static OSPolicy.Resource.FileResource parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static OSPolicy.Resource.FileResource parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static OSPolicy.Resource.FileResource parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static OSPolicy.Resource.FileResource parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static OSPolicy.Resource.FileResource parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static OSPolicy.Resource.FileResource parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static OSPolicy.Resource.FileResource parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static OSPolicy.Resource.FileResource parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static OSPolicy.Resource.FileResource parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static OSPolicy.Resource.FileResource parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<OSPolicy.Resource.FileResource> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getContent()
public String getContent()
A a file with this content.
The size of the content is limited to 1024 characters.
string content = 2;
Returns
Type | Description |
String | The content.
|
getContentBytes()
public ByteString getContentBytes()
A a file with this content.
The size of the content is limited to 1024 characters.
string content = 2;
Returns
getDefaultInstanceForType()
public OSPolicy.Resource.FileResource getDefaultInstanceForType()
Returns
getFile()
public OSPolicy.Resource.File getFile()
A remote or local source.
.google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1;
Returns
getFileOrBuilder()
public OSPolicy.Resource.FileOrBuilder getFileOrBuilder()
A remote or local source.
.google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1;
Returns
getParserForType()
public Parser<OSPolicy.Resource.FileResource> getParserForType()
Returns
Overrides
getPath()
Required. The absolute path of the file within the VM.
string path = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
Type | Description |
String | The path.
|
getPathBytes()
public ByteString getPathBytes()
Required. The absolute path of the file within the VM.
string path = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
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;
Returns
Type | Description |
String | The permissions.
|
getPermissionsBytes()
public 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;
Returns
Type | Description |
ByteString | The bytes for permissions.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getSourceCase()
public OSPolicy.Resource.FileResource.SourceCase getSourceCase()
Returns
getState()
public OSPolicy.Resource.FileResource.DesiredState getState()
Required. Desired state of the file.
.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];
Returns
getStateValue()
public int getStateValue()
Required. Desired state of the file.
.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];
Returns
Type | Description |
int | The enum numeric value on the wire for state.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasContent()
public boolean hasContent()
A a file with this content.
The size of the content is limited to 1024 characters.
string content = 2;
Returns
Type | Description |
boolean | Whether the content field is set.
|
hasFile()
A remote or local source.
.google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1;
Returns
Type | Description |
boolean | Whether the file field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public OSPolicy.Resource.FileResource.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected OSPolicy.Resource.FileResource.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public OSPolicy.Resource.FileResource.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions