Class ServiceAttachment.Builder (1.88.0)

public static final class ServiceAttachment.Builder extends GeneratedMessageV3.Builder<ServiceAttachment.Builder> implements ServiceAttachmentOrBuilder

Represents a ServiceAttachment resource. A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service.

Protobuf type google.cloud.compute.v1.ServiceAttachment

Static Methods

getDescriptor()

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

Methods

addAllConnectedEndpoints(Iterable<? extends ServiceAttachmentConnectedEndpoint> values)

public ServiceAttachment.Builder addAllConnectedEndpoints(Iterable<? extends ServiceAttachmentConnectedEndpoint> values)

[Output Only] An array of connections for all the consumers connected to this service attachment.

repeated .google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint connected_endpoints = 72223688;

Parameter
Name Description
values Iterable<? extends com.google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint>
Returns
Type Description
ServiceAttachment.Builder

addAllConsumerAcceptLists(Iterable<? extends ServiceAttachmentConsumerProjectLimit> values)

public ServiceAttachment.Builder addAllConsumerAcceptLists(Iterable<? extends ServiceAttachmentConsumerProjectLimit> values)

Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints.

repeated .google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit consumer_accept_lists = 402725703;

Parameter
Name Description
values Iterable<? extends com.google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit>
Returns
Type Description
ServiceAttachment.Builder

addAllConsumerRejectLists(Iterable<String> values)

public ServiceAttachment.Builder addAllConsumerRejectLists(Iterable<String> values)

Specifies a list of projects or networks that are not allowed to connect to this service attachment. The project can be specified using its project ID or project number and the network can be specified using its URL. A given service attachment can manage connections at either the project or network level. Therefore, both the reject and accept lists for a given service attachment must contain either only projects or only networks.

repeated string consumer_reject_lists = 204033182;

Parameter
Name Description
values Iterable<String>

The consumerRejectLists to add.

Returns
Type Description
ServiceAttachment.Builder

This builder for chaining.

addAllDomainNames(Iterable<String> values)

public ServiceAttachment.Builder addAllDomainNames(Iterable<String> values)

If specified, the domain name will be used during the integration between the PSC connected endpoints and the Cloud DNS. For example, this is a valid domain name: "p.mycompany.com.". Current max number of domain names supported is 1.

repeated string domain_names = 6450189;

Parameter
Name Description
values Iterable<String>

The domainNames to add.

Returns
Type Description
ServiceAttachment.Builder

This builder for chaining.

addAllNatSubnets(Iterable<String> values)

public ServiceAttachment.Builder addAllNatSubnets(Iterable<String> values)

An array of URLs where each entry is the URL of a subnet provided by the service producer to use for NAT in this service attachment.

repeated string nat_subnets = 374785944;

Parameter
Name Description
values Iterable<String>

The natSubnets to add.

Returns
Type Description
ServiceAttachment.Builder

This builder for chaining.

addConnectedEndpoints(ServiceAttachmentConnectedEndpoint value)

public ServiceAttachment.Builder addConnectedEndpoints(ServiceAttachmentConnectedEndpoint value)

[Output Only] An array of connections for all the consumers connected to this service attachment.

repeated .google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint connected_endpoints = 72223688;

Parameter
Name Description
value ServiceAttachmentConnectedEndpoint
Returns
Type Description
ServiceAttachment.Builder

addConnectedEndpoints(ServiceAttachmentConnectedEndpoint.Builder builderForValue)

public ServiceAttachment.Builder addConnectedEndpoints(ServiceAttachmentConnectedEndpoint.Builder builderForValue)

[Output Only] An array of connections for all the consumers connected to this service attachment.

repeated .google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint connected_endpoints = 72223688;

Parameter
Name Description
builderForValue ServiceAttachmentConnectedEndpoint.Builder
Returns
Type Description
ServiceAttachment.Builder

addConnectedEndpoints(int index, ServiceAttachmentConnectedEndpoint value)

public ServiceAttachment.Builder addConnectedEndpoints(int index, ServiceAttachmentConnectedEndpoint value)

[Output Only] An array of connections for all the consumers connected to this service attachment.

repeated .google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint connected_endpoints = 72223688;

Parameters
Name Description
index int
value ServiceAttachmentConnectedEndpoint
Returns
Type Description
ServiceAttachment.Builder

addConnectedEndpoints(int index, ServiceAttachmentConnectedEndpoint.Builder builderForValue)

public ServiceAttachment.Builder addConnectedEndpoints(int index, ServiceAttachmentConnectedEndpoint.Builder builderForValue)

[Output Only] An array of connections for all the consumers connected to this service attachment.

repeated .google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint connected_endpoints = 72223688;

Parameters
Name Description
index int
builderForValue ServiceAttachmentConnectedEndpoint.Builder
Returns
Type Description
ServiceAttachment.Builder

addConnectedEndpointsBuilder()

public ServiceAttachmentConnectedEndpoint.Builder addConnectedEndpointsBuilder()

[Output Only] An array of connections for all the consumers connected to this service attachment.

repeated .google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint connected_endpoints = 72223688;

Returns
Type Description
ServiceAttachmentConnectedEndpoint.Builder

addConnectedEndpointsBuilder(int index)

public ServiceAttachmentConnectedEndpoint.Builder addConnectedEndpointsBuilder(int index)

[Output Only] An array of connections for all the consumers connected to this service attachment.

repeated .google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint connected_endpoints = 72223688;

Parameter
Name Description
index int
Returns
Type Description
ServiceAttachmentConnectedEndpoint.Builder

addConsumerAcceptLists(ServiceAttachmentConsumerProjectLimit value)

public ServiceAttachment.Builder addConsumerAcceptLists(ServiceAttachmentConsumerProjectLimit value)

Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints.

repeated .google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit consumer_accept_lists = 402725703;

Parameter
Name Description
value ServiceAttachmentConsumerProjectLimit
Returns
Type Description
ServiceAttachment.Builder

addConsumerAcceptLists(ServiceAttachmentConsumerProjectLimit.Builder builderForValue)

public ServiceAttachment.Builder addConsumerAcceptLists(ServiceAttachmentConsumerProjectLimit.Builder builderForValue)

Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints.

repeated .google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit consumer_accept_lists = 402725703;

Parameter
Name Description
builderForValue ServiceAttachmentConsumerProjectLimit.Builder
Returns
Type Description
ServiceAttachment.Builder

addConsumerAcceptLists(int index, ServiceAttachmentConsumerProjectLimit value)

public ServiceAttachment.Builder addConsumerAcceptLists(int index, ServiceAttachmentConsumerProjectLimit value)

Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints.

repeated .google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit consumer_accept_lists = 402725703;

Parameters
Name Description
index int
value ServiceAttachmentConsumerProjectLimit
Returns
Type Description
ServiceAttachment.Builder

addConsumerAcceptLists(int index, ServiceAttachmentConsumerProjectLimit.Builder builderForValue)

public ServiceAttachment.Builder addConsumerAcceptLists(int index, ServiceAttachmentConsumerProjectLimit.Builder builderForValue)

Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints.

repeated .google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit consumer_accept_lists = 402725703;

Parameters
Name Description
index int
builderForValue ServiceAttachmentConsumerProjectLimit.Builder
Returns
Type Description
ServiceAttachment.Builder

addConsumerAcceptListsBuilder()

public ServiceAttachmentConsumerProjectLimit.Builder addConsumerAcceptListsBuilder()

Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints.

repeated .google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit consumer_accept_lists = 402725703;

Returns
Type Description
ServiceAttachmentConsumerProjectLimit.Builder

addConsumerAcceptListsBuilder(int index)

public ServiceAttachmentConsumerProjectLimit.Builder addConsumerAcceptListsBuilder(int index)

Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints.

repeated .google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit consumer_accept_lists = 402725703;

Parameter
Name Description
index int
Returns
Type Description
ServiceAttachmentConsumerProjectLimit.Builder

addConsumerRejectLists(String value)

public ServiceAttachment.Builder addConsumerRejectLists(String value)

Specifies a list of projects or networks that are not allowed to connect to this service attachment. The project can be specified using its project ID or project number and the network can be specified using its URL. A given service attachment can manage connections at either the project or network level. Therefore, both the reject and accept lists for a given service attachment must contain either only projects or only networks.

repeated string consumer_reject_lists = 204033182;

Parameter
Name Description
value String

The consumerRejectLists to add.

Returns
Type Description
ServiceAttachment.Builder

This builder for chaining.

addConsumerRejectListsBytes(ByteString value)

public ServiceAttachment.Builder addConsumerRejectListsBytes(ByteString value)

Specifies a list of projects or networks that are not allowed to connect to this service attachment. The project can be specified using its project ID or project number and the network can be specified using its URL. A given service attachment can manage connections at either the project or network level. Therefore, both the reject and accept lists for a given service attachment must contain either only projects or only networks.

repeated string consumer_reject_lists = 204033182;

Parameter
Name Description
value ByteString

The bytes of the consumerRejectLists to add.

Returns
Type Description
ServiceAttachment.Builder

This builder for chaining.

addDomainNames(String value)

public ServiceAttachment.Builder addDomainNames(String value)

If specified, the domain name will be used during the integration between the PSC connected endpoints and the Cloud DNS. For example, this is a valid domain name: "p.mycompany.com.". Current max number of domain names supported is 1.

repeated string domain_names = 6450189;

Parameter
Name Description
value String

The domainNames to add.

Returns
Type Description
ServiceAttachment.Builder

Th