Class OSPolicy.Resource.File.Builder (2.29.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OSPolicy.Resource.File.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
OSPolicy.Resource.File.Builder
Overrides

build()

public OSPolicy.Resource.File build()
Returns
TypeDescription
OSPolicy.Resource.File

buildPartial()

public OSPolicy.Resource.File buildPartial()
Returns
TypeDescription
OSPolicy.Resource.File

clear()

public OSPolicy.Resource.File.Builder clear()
Returns
TypeDescription
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
TypeDescription
OSPolicy.Resource.File.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public OSPolicy.Resource.File.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
OSPolicy.Resource.File.Builder

clearLocalPath()

public OSPolicy.Resource.File.Builder clearLocalPath()

A local path within the VM to use.

string local_path = 3;

Returns
TypeDescription
OSPolicy.Resource.File.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public OSPolicy.Resource.File.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
OSPolicy.Resource.File.Builder

clearType()

public OSPolicy.Resource.File.Builder clearType()
Returns
TypeDescription
OSPolicy.Resource.File.Builder

clone()

public OSPolicy.Resource.File.Builder clone()
Returns
TypeDescription
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
TypeDescription
boolean

The allowInsecure.

getDefaultInstanceForType()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getGcs()

public OSPolicy.Resource.File.Gcs getGcs()

A Cloud Storage object.

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

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

getLocalPath()

public String getLocalPath()

A local path within the VM to use.

string local_path = 3;

Returns
TypeDescription
String

The localPath.

getLocalPathBytes()

public ByteString getLocalPathBytes()

A local path within the VM to use.

string local_path = 3;

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

getTypeCase()

public OSPolicy.Resource.File.TypeCase getTypeCase()
Returns
TypeDescription
OSPolicy.Resource.File.TypeCase

hasGcs()

public boolean hasGcs()

A Cloud Storage object.

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

Returns
TypeDescription
boolean

Whether the gcs field is set.

hasLocalPath()

public boolean hasLocalPath()

A local path within the VM to use.

string local_path = 3;

Returns
TypeDescription
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
TypeDescription
boolean

Whether the remote field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(OSPolicy.Resource.File other)

public OSPolicy.Resource.File.Builder mergeFrom(OSPolicy.Resource.File other)
Parameter
NameDescription
otherOSPolicy.Resource.File
Returns
TypeDescription
OSPolicy.Resource.File.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OSPolicy.Resource.File.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicy.Resource.File.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public OSPolicy.Resource.File.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueOSPolicy.Resource.File.Gcs
Returns
TypeDescription
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
NameDescription
valueOSPolicy.Resource.File.Remote
Returns
TypeDescription
OSPolicy.Resource.File.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OSPolicy.Resource.File.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueboolean

The allowInsecure to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueOSPolicy.Resource.File.Gcs
Returns
TypeDescription
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
NameDescription
builderForValueOSPolicy.Resource.File.Gcs.Builder
Returns
TypeDescription
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
NameDescription
valueString

The localPath to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for localPath to set.

Returns
TypeDescription
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
NameDescription
valueOSPolicy.Resource.File.Remote
Returns
TypeDescription
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
NameDescription
builderForValueOSPolicy.Resource.File.Remote.Builder
Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
OSPolicy.Resource.File.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final OSPolicy.Resource.File.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
OSPolicy.Resource.File.Builder
Overrides