Class OSPolicy.Resource.FileResource (2.23.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
TypeDescription
int

FILE_FIELD_NUMBER

public static final int FILE_FIELD_NUMBER
Field Value
TypeDescription
int

PATH_FIELD_NUMBER

public static final int PATH_FIELD_NUMBER
Field Value
TypeDescription
int

PERMISSIONS_FIELD_NUMBER

public static final int PERMISSIONS_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static OSPolicy.Resource.FileResource getDefaultInstance()
Returns
TypeDescription
OSPolicy.Resource.FileResource

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static OSPolicy.Resource.FileResource.Builder newBuilder()
Returns
TypeDescription
OSPolicy.Resource.FileResource.Builder

newBuilder(OSPolicy.Resource.FileResource prototype)

public static OSPolicy.Resource.FileResource.Builder newBuilder(OSPolicy.Resource.FileResource prototype)
Parameter
NameDescription
prototypeOSPolicy.Resource.FileResource
Returns
TypeDescription
OSPolicy.Resource.FileResource.Builder

parseDelimitedFrom(InputStream input)

public static OSPolicy.Resource.FileResource parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static OSPolicy.Resource.FileResource parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OSPolicy.Resource.FileResource parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OSPolicy.Resource.FileResource parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static OSPolicy.Resource.FileResource parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static OSPolicy.Resource.FileResource parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OSPolicy.Resource.FileResource parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.FileResource
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for content.

getDefaultInstanceForType()

public OSPolicy.Resource.FileResource getDefaultInstanceForType()
Returns
TypeDescription
OSPolicy.Resource.FileResource

getFile()

public OSPolicy.Resource.File getFile()

A remote or local source.

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

Returns
TypeDescription
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
TypeDescription
OSPolicy.Resource.FileOrBuilder

getParserForType()

public Parser<OSPolicy.Resource.FileResource> getParserForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for permissions.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSourceCase()

public OSPolicy.Resource.FileResource.SourceCase getSourceCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the file field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public OSPolicy.Resource.FileResource.Builder newBuilderForType()
Returns
TypeDescription
OSPolicy.Resource.FileResource.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OSPolicy.Resource.FileResource.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
OSPolicy.Resource.FileResource.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public OSPolicy.Resource.FileResource.Builder toBuilder()
Returns
TypeDescription
OSPolicy.Resource.FileResource.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException