Class Hub.Builder (1.41.0)

public static final class Hub.Builder extends GeneratedMessageV3.Builder<Hub.Builder> implements HubOrBuilder

Network Connectivity Center is a hub-and-spoke abstraction for network connectivity management in Google Cloud. It reduces operational complexity through a simple, centralized connectivity management model. Following is the resource message of a hub.

Protobuf type google.cloud.networkconnectivity.v1alpha1.Hub

Implements

HubOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllSpokes(Iterable<String> values)

public Hub.Builder addAllSpokes(Iterable<String> values)

Output only. A list of the URIs of all attached spokes

repeated string spokes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The spokes to add.

Returns
Type Description
Hub.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addSpokes(String value)

public Hub.Builder addSpokes(String value)

Output only. A list of the URIs of all attached spokes

repeated string spokes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The spokes to add.

Returns
Type Description
Hub.Builder

This builder for chaining.

addSpokesBytes(ByteString value)

public Hub.Builder addSpokesBytes(ByteString value)

Output only. A list of the URIs of all attached spokes

repeated string spokes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the spokes to add.

Returns
Type Description
Hub.Builder

This builder for chaining.

build()

public Hub build()
Returns
Type Description
Hub

buildPartial()

public Hub buildPartial()
Returns
Type Description
Hub

clear()

public Hub.Builder clear()
Returns
Type Description
Hub.Builder
Overrides

clearCreateTime()

public Hub.Builder clearCreateTime()

Time when the Hub was created.

.google.protobuf.Timestamp create_time = 2;

Returns
Type Description
Hub.Builder

clearDescription()

public Hub.Builder clearDescription()

Short description of the hub resource.

string description = 5;

Returns
Type Description
Hub.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Hub.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Hub.Builder
Overrides

clearLabels()

public Hub.Builder clearLabels()
Returns
Type Description
Hub.Builder

clearName()

public Hub.Builder clearName()

Immutable. The name of a Hub resource.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
Hub.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Hub.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Hub.Builder
Overrides

clearSpokes()

public Hub.Builder clearSpokes()

Output only. A list of the URIs of all attached spokes

repeated string spokes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
Hub.Builder

This builder for chaining.

clearState()

public Hub.Builder clearState()

Output only. The current lifecycle state of this Hub.

.google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Hub.Builder

This builder for chaining.

clearUniqueId()

public Hub.Builder clearUniqueId()

Output only. Google-generated UUID for this resource. This is unique across all Hub resources. If a Hub resource is deleted and another with the same name is created, it gets a different unique_id.

string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Hub.Builder

This builder for chaining.

clearUpdateTime()

public Hub.Builder clearUpdateTime()

Time when the Hub was updated.

.google.protobuf.Timestamp update_time = 3;

Returns
Type Description
Hub.Builder

clone()

public Hub.Builder clone()
Returns
Type Description
Hub.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

User-defined labels.

map<string, string> labels = 4;

Parameter
Name Description
key String
Returns
Type Description
boolean

getCreateTime()

public Timestamp getCreateTime()

Time when the Hub was created.

.google.protobuf.Timestamp create_time = 2;

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Time when the Hub was created.

.google.protobuf.Timestamp create_time = 2;

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Time when the Hub was created.

.google.protobuf.Timestamp create_time = 2;

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Hub getDefaultInstanceForType()
Returns
Type Description
Hub

getDescription()

public String getDescription()

Short description of the hub resource.

string description = 5;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Short description of the hub resource.

string description = 5;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

User-defined labels.

map<string, string> labels = 4;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

User-defined labels.

map<string, string> labels = 4;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

User-defined labels.

map<string, string> labels = 4;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

User-defined labels.

map<string, string> labels = 4;

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Immutable. The name of a Hub resource.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. The name of a Hub resource.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for name.

getSpokes(int index)

public String getSpokes(int index)

Output only. A list of the URIs of all attached spokes

repeated string spokes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The spokes at the given index.

getSpokesBytes(int index)

public ByteString getSpokesBytes(int index)

Output only. A list of the URIs of all attached spokes

repeated string spokes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the spokes at the given index.

getSpokesCount()

public int getSpokesCount()

Output only. A list of the URIs of all attached spokes

repeated string spokes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of spokes.

getSpokesList()

public ProtocolStringList getSpokesList()

Output only. A list of the URIs of all attached spokes

repeated string spokes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the spokes.

getState()

public State getState()

Output only. The current lifecycle state of this Hub.

.google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
State

The state.

getStateValue()

public int getStateValue()

Output only. The current lifecycle state of this Hub.

.google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getUniqueId()

public String getUniqueId()

Output only. Google-generated UUID for this resource. This is unique across all Hub resources. If a Hub resource is deleted and another with the same name is created, it gets a different unique_id.

string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The uniqueId.

getUniqueIdBytes()

public ByteString getUniqueIdBytes()

Output only. Google-generated UUID for this resource. This is unique across all Hub resources. If a Hub resource is deleted and another with the same name is created, it gets a different unique_id.

string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for uniqueId.

getUpdateTime()

public Timestamp getUpdateTime()

Time when the Hub was updated.

.google.protobuf.Timestamp update_time = 3;

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Time when the Hub was updated.

.google.protobuf.Timestamp update_time = 3;

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Time when the Hub was updated.

.google.protobuf.Timestamp update_time = 3;

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Time when the Hub was created.

.google.protobuf.Timestamp create_time = 2;

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Time when the Hub was updated.

.google.protobuf.Timestamp update_time = 3;

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Hub.Builder mergeCreateTime(Timestamp value)

Time when the Hub was created.

.google.protobuf.Timestamp create_time = 2;

Parameter
Name Description
value Timestamp
Returns
Type Description
Hub.Builder

mergeFrom(Hub other)

public Hub.Builder mergeFrom(Hub other)
Parameter
Name Description
other Hub
Returns
Type Description
Hub.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Hub.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Hub.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Hub.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Hub.Builder
Overrides

mergeUpdateTime(Timestamp value)

public Hub.Builder mergeUpdateTime(Timestamp value)

Time when the Hub was updated.

.google.protobuf.Timestamp update_time = 3;

Parameter
Name Description
value Timestamp
Returns
Type Description
Hub.Builder

putAllLabels(Map<String,String> values)

public Hub.Builder putAllLabels(Map<String,String> values)

User-defined labels.

map<string, string> labels = 4;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
Hub.Builder

putLabels(String key, String value)

public Hub.Builder putLabels(String key, String value)

User-defined labels.

map<string, string> labels = 4;

Parameters
Name Description
key String
value String
Returns
Type Description
Hub.Builder

removeLabels(String key)

public Hub.Builder removeLabels(String key)

User-defined labels.

map<string, string> labels = 4;

Parameter
Name Description
key String
Returns
Type Description
Hub.Builder

setCreateTime(Timestamp value)

public Hub.Builder setCreateTime(Timestamp value)

Time when the Hub was created.

.google.protobuf.Timestamp create_time = 2;

Parameter
Name Description
value Timestamp
Returns
Type Description
Hub.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Hub.Builder setCreateTime(Timestamp.Builder builderForValue)

Time when the Hub was created.

.google.protobuf.Timestamp create_time = 2;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Hub.Builder

setDescription(String value)

public Hub.Builder setDescription(String value)

Short description of the hub resource.

string description = 5;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Hub.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Hub.Builder setDescriptionBytes(ByteString value)

Short description of the hub resource.

string description = 5;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Hub.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Hub.Builder setName(String value)

Immutable. The name of a Hub resource.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Hub.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Hub.Builder setNameBytes(ByteString value)

Immutable. The name of a Hub resource.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Hub.Builder

This builder for chaining.

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

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

setSpokes(int index, String value)

public Hub.Builder setSpokes(int index, String value)

Output only. A list of the URIs of all attached spokes

repeated string spokes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The spokes to set.

Returns
Type Description
Hub.Builder

This builder for chaining.

setState(State value)

public Hub.Builder setState(State value)

Output only. The current lifecycle state of this Hub.

.google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value State

The state to set.

Returns
Type Description
Hub.Builder

This builder for chaining.

setStateValue(int value)

public Hub.Builder setStateValue(int value)

Output only. The current lifecycle state of this Hub.

.google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
Hub.Builder

This builder for chaining.

setUniqueId(String value)

public Hub.Builder setUniqueId(String value)

Output only. Google-generated UUID for this resource. This is unique across all Hub resources. If a Hub resource is deleted and another with the same name is created, it gets a different unique_id.

string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The uniqueId to set.

Returns
Type Description
Hub.Builder

This builder for chaining.

setUniqueIdBytes(ByteString value)

public Hub.Builder setUniqueIdBytes(ByteString value)

Output only. Google-generated UUID for this resource. This is unique across all Hub resources. If a Hub resource is deleted and another with the same name is created, it gets a different unique_id.

string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for uniqueId to set.

Returns
Type Description
Hub.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Hub.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Hub.Builder
Overrides

setUpdateTime(Timestamp value)

public Hub.Builder setUpdateTime(Timestamp value)

Time when the Hub was updated.

.google.protobuf.Timestamp update_time = 3;

Parameter
Name Description
value Timestamp
Returns
Type Description
Hub.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Hub.Builder setUpdateTime(Timestamp.Builder builderForValue)

Time when the Hub was updated.

.google.protobuf.Timestamp update_time = 3;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Hub.Builder