Class GuestPolicies.AptRepository.Builder (2.21.0)

public static final class GuestPolicies.AptRepository.Builder extends GeneratedMessageV3.Builder<GuestPolicies.AptRepository.Builder> implements GuestPolicies.AptRepositoryOrBuilder

Represents a single Apt package repository. This repository is added to a repo file that is stored at /etc/apt/sources.list.d/google_osconfig.list.

Protobuf type google.cloud.osconfig.v1beta.AptRepository

Static Methods

getDescriptor()

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

Methods

addAllComponents(Iterable<String> values)

public GuestPolicies.AptRepository.Builder addAllComponents(Iterable<String> values)

Required. List of components for this repository. Must contain at least one item.

repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valuesIterable<String>

The components to add.

Returns
TypeDescription
GuestPolicies.AptRepository.Builder

This builder for chaining.

addComponents(String value)

public GuestPolicies.AptRepository.Builder addComponents(String value)

Required. List of components for this repository. Must contain at least one item.

repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The components to add.

Returns
TypeDescription
GuestPolicies.AptRepository.Builder

This builder for chaining.

addComponentsBytes(ByteString value)

public GuestPolicies.AptRepository.Builder addComponentsBytes(ByteString value)

Required. List of components for this repository. Must contain at least one item.

repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes of the components to add.

Returns
TypeDescription
GuestPolicies.AptRepository.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GuestPolicies.AptRepository.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
GuestPolicies.AptRepository.Builder
Overrides

build()

public GuestPolicies.AptRepository build()
Returns
TypeDescription
GuestPolicies.AptRepository

buildPartial()

public GuestPolicies.AptRepository buildPartial()
Returns
TypeDescription
GuestPolicies.AptRepository

clear()

public GuestPolicies.AptRepository.Builder clear()
Returns
TypeDescription
GuestPolicies.AptRepository.Builder
Overrides

clearArchiveType()

public GuestPolicies.AptRepository.Builder clearArchiveType()

Type of archive files in this repository. The default behavior is DEB.

.google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1;

Returns
TypeDescription
GuestPolicies.AptRepository.Builder

This builder for chaining.

clearComponents()

public GuestPolicies.AptRepository.Builder clearComponents()

Required. List of components for this repository. Must contain at least one item.

repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
GuestPolicies.AptRepository.Builder

This builder for chaining.

clearDistribution()

public GuestPolicies.AptRepository.Builder clearDistribution()

Required. Distribution of this repository.

string distribution = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
GuestPolicies.AptRepository.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public GuestPolicies.AptRepository.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
GuestPolicies.AptRepository.Builder
Overrides

clearGpgKey()

public GuestPolicies.AptRepository.Builder clearGpgKey()

URI of the key file for this repository. The agent maintains a keyring at /etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg containing all the keys in any applied guest policy.

string gpg_key = 5;

Returns
TypeDescription
GuestPolicies.AptRepository.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public GuestPolicies.AptRepository.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
GuestPolicies.AptRepository.Builder
Overrides

clearUri()

public GuestPolicies.AptRepository.Builder clearUri()

Required. URI for this repository.

string uri = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
GuestPolicies.AptRepository.Builder

This builder for chaining.

clone()

public GuestPolicies.AptRepository.Builder clone()
Returns
TypeDescription
GuestPolicies.AptRepository.Builder
Overrides

getArchiveType()

public GuestPolicies.AptRepository.ArchiveType getArchiveType()

Type of archive files in this repository. The default behavior is DEB.

.google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1;

Returns
TypeDescription
GuestPolicies.AptRepository.ArchiveType

The archiveType.

getArchiveTypeValue()

public int getArchiveTypeValue()

Type of archive files in this repository. The default behavior is DEB.

.google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1;

Returns
TypeDescription