Class OSPolicy.Resource.File.Builder (2.53.0)

public static final class OSPolicy.Resource.File.Builder extends GeneratedMessageV3.Builder<OSPolicy.Resource.File.Builder> implements OSPolicy.Resource.FileOrBuilder

A remote or local file.

Protobuf type google.cloud.osconfig.v1.OSPolicy.Resource.File

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OSPolicy.Resource.File.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides

build()

public OSPolicy.Resource.File build()
Returns
Type Description
OSPolicy.Resource.File

buildPartial()

public OSPolicy.Resource.File buildPartial()
Returns
Type Description
OSPolicy.Resource.File

clear()

public OSPolicy.Resource.File.Builder clear()
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides

clearAllowInsecure()

public OSPolicy.Resource.File.Builder clearAllowInsecure()

Defaults to false. When false, files are subject to validations based on the file type:

Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.

bool allow_insecure = 4;

Returns
Type Description
OSPolicy.Resource.File.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public OSPolicy.Resource.File.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides

clearGcs()

public OSPolicy.Resource.File.Builder clearGcs()

A Cloud Storage object.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2;

Returns
Type Description
OSPolicy.Resource.File.Builder

clearLocalPath()

public OSPolicy.Resource.File.Builder clearLocalPath()

A local path within the VM to use.

string local_path = 3;

Returns
Type Description
OSPolicy.Resource.File.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public OSPolicy.Resource.File.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides

clearRemote()

public OSPolicy.Resource.File.Builder clearRemote()

A generic remote file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1;

Returns
Type Description
OSPolicy.Resource.File.Builder

clearType()

public OSPolicy.Resource.File.Builder clearType()
Returns
Type Description
OSPolicy.Resource.File.Builder

clone()

public OSPolicy.Resource.File.Builder clone()
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides

getAllowInsecure()

public boolean getAllowInsecure()

Defaults to false. When false, files are subject to validations based on the file type:

Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.

bool allow_insecure = 4;

Returns
Type Description
boolean

The allowInsecure.

getDefaultInstanceForType()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getGcs()

public OSPolicy.Resource.File.Gcs getGcs()

A Cloud Storage object.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2;

Returns
Type Description
OSPolicy.Resource.File.Gcs

The gcs.

getGcsBuilder()

public OSPolicy.Resource.File.Gcs.Builder getGcsBuilder()

A Cloud Storage object.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2;

Returns
Type Description
OSPolicy.Resource.File.Gcs.Builder

getGcsOrBuilder()

public OSPolicy.Resource.File.GcsOrBuilder getGcsOrBuilder()

A Cloud Storage object.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2;

Returns
Type Description
OSPolicy.Resource.File.GcsOrBuilder

getLocalPath()

public String getLocalPath()

A local path within the VM to use.

string local_path = 3;

Returns
Type Description
String

The localPath.

getLocalPathBytes()

public ByteString getLocalPathBytes()

A local path within the VM to use.

string local_path = 3;

Returns
Type Description
ByteString

The bytes for localPath.

getRemote()

public OSPolicy.Resource.File.Remote getRemote()

A generic remote file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1;

Returns
Type Description
OSPolicy.Resource.File.Remote

The remote.

getRemoteBuilder()

public OSPolicy.Resource.File.Remote.Builder getRemoteBuilder()

A generic remote file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1;

Returns
Type Description
OSPolicy.Resource.File.Remote.Builder

getRemoteOrBuilder()

public OSPolicy.Resource.File.RemoteOrBuilder getRemoteOrBuilder()

A generic remote file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1;

Returns
Type Description
OSPolicy.Resource.File.RemoteOrBuilder

getTypeCase()

public OSPolicy.Resource.File.TypeCase getTypeCase()
Returns
Type Description
OSPolicy.Resource.File.TypeCase

hasGcs()

public boolean hasGcs()

A Cloud Storage object.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2;

Returns
Type Description
boolean

Whether the gcs field is set.

hasLocalPath()

public boolean hasLocalPath()

A local path within the VM to use.

string local_path = 3;

Returns
Type Description
boolean

Whether the localPath field is set.

hasRemote()

public boolean hasRemote()

A generic remote file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1;

Returns
Type Description
boolean

Whether the remote field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(OSPolicy.Resource.File other)

public OSPolicy.Resource.File.Builder mergeFrom(OSPolicy.Resource.File other)
Parameter
Name Description
other OSPolicy.Resource.File
Returns
Type Description
OSPolicy.Resource.File.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OSPolicy.Resource.File.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public OSPolicy.Resource.File.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides

mergeGcs(OSPolicy.Resource.File.Gcs value)

public OSPolicy.Resource.File.Builder mergeGcs(OSPolicy.Resource.File.Gcs value)

A Cloud Storage object.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2;

Parameter
Name Description
value OSPolicy.Resource.File.Gcs
Returns
Type Description
OSPolicy.Resource.File.Builder

mergeRemote(OSPolicy.Resource.File.Remote value)

public OSPolicy.Resource.File.Builder mergeRemote(OSPolicy.Resource.File.Remote value)

A generic remote file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1;

Parameter
Name Description
value OSPolicy.Resource.File.Remote
Returns
Type Description
OSPolicy.Resource.File.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OSPolicy.Resource.File.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides

setAllowInsecure(boolean value)

public OSPolicy.Resource.File.Builder setAllowInsecure(boolean value)

Defaults to false. When false, files are subject to validations based on the file type:

Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.

bool allow_insecure = 4;

Parameter
Name Description
value boolean

The allowInsecure to set.

Returns
Type Description
OSPolicy.Resource.File.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public OSPolicy.Resource.File.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides

setGcs(OSPolicy.Resource.File.Gcs value)

public OSPolicy.Resource.File.Builder setGcs(OSPolicy.Resource.File.Gcs value)

A Cloud Storage object.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2;

Parameter
Name Description
value OSPolicy.Resource.File.Gcs
Returns
Type Description
OSPolicy.Resource.File.Builder

setGcs(OSPolicy.Resource.File.Gcs.Builder builderForValue)

public OSPolicy.Resource.File.Builder setGcs(OSPolicy.Resource.File.Gcs.Builder builderForValue)

A Cloud Storage object.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2;

Parameter
Name Description
builderForValue OSPolicy.Resource.File.Gcs.Builder
Returns
Type Description
OSPolicy.Resource.File.Builder

setLocalPath(String value)

public OSPolicy.Resource.File.Builder setLocalPath(String value)

A local path within the VM to use.

string local_path = 3;

Parameter
Name Description
value String

The localPath to set.

Returns
Type Description
OSPolicy.Resource.File.Builder

This builder for chaining.

setLocalPathBytes(ByteString value)

public OSPolicy.Resource.File.Builder setLocalPathBytes(ByteString value)

A local path within the VM to use.

string local_path = 3;

Parameter
Name Description
value ByteString

The bytes for localPath to set.

Returns
Type Description
OSPolicy.Resource.File.Builder

This builder for chaining.

setRemote(OSPolicy.Resource.File.Remote value)

public OSPolicy.Resource.File.Builder setRemote(OSPolicy.Resource.File.Remote value)

A generic remote file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1;

Parameter
Name Description
value OSPolicy.Resource.File.Remote
Returns
Type Description
OSPolicy.Resource.File.Builder

setRemote(OSPolicy.Resource.File.Remote.Builder builderForValue)

public OSPolicy.Resource.File.Builder setRemote(OSPolicy.Resource.File.Remote.Builder builderForValue)

A generic remote file.

.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1;

Parameter
Name Description
builderForValue OSPolicy.Resource.File.Remote.Builder
Returns
Type Description
OSPolicy.Resource.File.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public OSPolicy.Resource.File.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final OSPolicy.Resource.File.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OSPolicy.Resource.File.Builder
Overrides