Class OSPolicy.Resource.FileResource (2.47.0)

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

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > OSPolicy.Resource.FileResource

Static Fields

CONTENT_FIELD_NUMBER

public static final int CONTENT_FIELD_NUMBER
Field Value
Type Description
int

FILE_FIELD_NUMBER

public static final int FILE_FIELD_NUMBER
Field Value
Type Description
int

PATH_FIELD_NUMBER

public static final int PATH_FIELD_NUMBER
Field Value
Type Description
int

PERMISSIONS_FIELD_NUMBER

public static final int PERMISSIONS_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static OSPolicy.Resource.FileResource getDefaultInstance()
Returns
Type Description
OSPolicy.Resource.FileResource

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static OSPolicy.Resource.FileResource.Builder newBuilder()
Returns
Type Description
OSPolicy.Resource.FileResource.Builder

newBuilder(OSPolicy.Resource.FileResource prototype)

public static OSPolicy.Resource.FileResource.Builder newBuilder(OSPolicy.Resource.FileResource prototype)
Parameter
Name Description
prototype OSPolicy.Resource.FileResource
Returns
Type Description
OSPolicy.Resource.FileResource.Builder

parseDelimitedFrom(InputStream input)

public static OSPolicy.Resource.FileResource parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static OSPolicy.Resource.FileResource parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OSPolicy.Resource.FileResource parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OSPolicy.Resource.FileResource parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static OSPolicy.Resource.FileResource parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static OSPolicy.Resource.FileResource parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.Resource.FileResource
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<OSPolicy.Resource.FileResource> parser()
Returns
Type Description
Parser<FileResource>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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
Type Description
ByteString

The bytes for content.

getDefaultInstanceForType()

public OSPolicy.Resource.FileResource getDefaultInstanceForType()
Returns
Type Description
OSPolicy.Resource.FileResource

getFile()

public OSPolicy.Resource.File getFile()

A remote or local source.

.google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1;

Returns
Type Description
OSPolicy.Resource.File

The file.

getFileOrBuilder()

public OSPolicy.Resource.FileOrBuilder getFileOrBuilder()

A remote or local source.

.google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1;

Returns
Type Description
OSPolicy.Resource.FileOrBuilder

getParserForType()

public Parser<OSPolicy.Resource.FileResource> getParserForType()
Returns
Type Description
Parser<FileResource>
Overrides

getPath()

public String 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
Type Description
ByteString

The bytes for path.

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
Type Description
int
Overrides

getSourceCase()

public OSPolicy.Resource.FileResource.SourceCase getSourceCase()
Returns
Type Description
OSPolicy.Resource.FileResource.SourceCase

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
Type Description
OSPolicy.Resource.FileResource.DesiredState

The state.

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.

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()

public boolean 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()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public OSPolicy.Resource.FileResource.Builder newBuilderForType()
Returns
Type Description
OSPolicy.Resource.FileResource.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OSPolicy.Resource.FileResource.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
OSPolicy.Resource.FileResource.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public OSPolicy.Resource.FileResource.Builder toBuilder()
Returns
Type Description
OSPolicy.Resource.FileResource.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException