Package com.google.cloud.compute.v1
Class NetworkEndpoint.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
com.google.cloud.compute.v1.NetworkEndpoint.Builder
- All Implemented Interfaces:
NetworkEndpointOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- NetworkEndpoint
public static final class NetworkEndpoint.Builder
extends com.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
implements NetworkEndpointOrBuilder
The network endpoint.Protobuf type
google.cloud.compute.v1.NetworkEndpoint-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Represents the port number to which PSC consumer sends packets.Optional fully qualified domain name of network endpoint.The name or a URL of VM instance of this network endpoint.Optional IPv4 address of network endpoint.Optional IPv6 address of network endpoint.Optional port number of network endpoint.booleanOptional metadata defined as annotations on the network endpoint.Deprecated.intOptional metadata defined as annotations on the network endpoint.Optional metadata defined as annotations on the network endpoint.getAnnotationsOrDefault(String key, String defaultValue) Optional metadata defined as annotations on the network endpoint.Optional metadata defined as annotations on the network endpoint.intRepresents the port number to which PSC consumer sends packets.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetFqdn()Optional fully qualified domain name of network endpoint.com.google.protobuf.ByteStringOptional fully qualified domain name of network endpoint.The name or a URL of VM instance of this network endpoint.com.google.protobuf.ByteStringThe name or a URL of VM instance of this network endpoint.Optional IPv4 address of network endpoint.com.google.protobuf.ByteStringOptional IPv4 address of network endpoint.Optional IPv6 address of network endpoint.com.google.protobuf.ByteStringOptional IPv6 address of network endpoint.Deprecated.intgetPort()Optional port number of network endpoint.booleanRepresents the port number to which PSC consumer sends packets.booleanhasFqdn()Optional fully qualified domain name of network endpoint.booleanThe name or a URL of VM instance of this network endpoint.booleanOptional IPv4 address of network endpoint.booleanOptional IPv6 address of network endpoint.booleanhasPort()Optional port number of network endpoint.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(NetworkEndpoint other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) putAllAnnotations(Map<String, String> values) Optional metadata defined as annotations on the network endpoint.putAnnotations(String key, String value) Optional metadata defined as annotations on the network endpoint.removeAnnotations(String key) Optional metadata defined as annotations on the network endpoint.setClientDestinationPort(int value) Represents the port number to which PSC consumer sends packets.Optional fully qualified domain name of network endpoint.setFqdnBytes(com.google.protobuf.ByteString value) Optional fully qualified domain name of network endpoint.setInstance(String value) The name or a URL of VM instance of this network endpoint.setInstanceBytes(com.google.protobuf.ByteString value) The name or a URL of VM instance of this network endpoint.setIpAddress(String value) Optional IPv4 address of network endpoint.setIpAddressBytes(com.google.protobuf.ByteString value) Optional IPv4 address of network endpoint.setIpv6Address(String value) Optional IPv6 address of network endpoint.setIpv6AddressBytes(com.google.protobuf.ByteString value) Optional IPv6 address of network endpoint.setPort(int value) Optional port number of network endpoint.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<NetworkEndpoint.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
-
mergeFrom
public NetworkEndpoint.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<NetworkEndpoint.Builder>- Throws:
IOException
-
getAnnotationsCount
public int getAnnotationsCount()Description copied from interface:NetworkEndpointOrBuilderOptional metadata defined as annotations on the network endpoint.
map<string, string> annotations = 112032548;- Specified by:
getAnnotationsCountin interfaceNetworkEndpointOrBuilder
-
containsAnnotations
Optional metadata defined as annotations on the network endpoint.
map<string, string> annotations = 112032548;- Specified by:
containsAnnotationsin interfaceNetworkEndpointOrBuilder
-
getAnnotations
Deprecated.UsegetAnnotationsMap()instead.- Specified by:
getAnnotationsin interfaceNetworkEndpointOrBuilder
-
getAnnotationsMap
Optional metadata defined as annotations on the network endpoint.
map<string, string> annotations = 112032548;- Specified by:
getAnnotationsMapin interfaceNetworkEndpointOrBuilder
-
getAnnotationsOrDefault
Optional metadata defined as annotations on the network endpoint.
map<string, string> annotations = 112032548;- Specified by:
getAnnotationsOrDefaultin interfaceNetworkEndpointOrBuilder
-
getAnnotationsOrThrow
Optional metadata defined as annotations on the network endpoint.
map<string, string> annotations = 112032548;- Specified by:
getAnnotationsOrThrowin interfaceNetworkEndpointOrBuilder
-
clearAnnotations
-
removeAnnotations
Optional metadata defined as annotations on the network endpoint.
map<string, string> annotations = 112032548; -
getMutableAnnotations
Deprecated.Use alternate mutation accessors instead. -
putAnnotations
Optional metadata defined as annotations on the network endpoint.
map<string, string> annotations = 112032548; -
putAllAnnotations
Optional metadata defined as annotations on the network endpoint.
map<string, string> annotations = 112032548; -
hasClientDestinationPort
public boolean hasClientDestinationPort()Represents the port number to which PSC consumer sends packets. Optional. Only valid for network endpoint groups created withGCE_VM_IP_PORTMAP endpoint type.
optional int32 client_destination_port = 123765766;- Specified by:
hasClientDestinationPortin interfaceNetworkEndpointOrBuilder- Returns:
- Whether the clientDestinationPort field is set.
-
getClientDestinationPort
public int getClientDestinationPort()Represents the port number to which PSC consumer sends packets. Optional. Only valid for network endpoint groups created withGCE_VM_IP_PORTMAP endpoint type.
optional int32 client_destination_port = 123765766;- Specified by:
getClientDestinationPortin interfaceNetworkEndpointOrBuilder- Returns:
- The clientDestinationPort.
-
setClientDestinationPort
Represents the port number to which PSC consumer sends packets. Optional. Only valid for network endpoint groups created withGCE_VM_IP_PORTMAP endpoint type.
optional int32 client_destination_port = 123765766;- Parameters:
value- The clientDestinationPort to set.- Returns:
- This builder for chaining.
-
clearClientDestinationPort
Represents the port number to which PSC consumer sends packets. Optional. Only valid for network endpoint groups created withGCE_VM_IP_PORTMAP endpoint type.
optional int32 client_destination_port = 123765766;- Returns:
- This builder for chaining.
-
hasFqdn
public boolean hasFqdn()Optional fully qualified domain name of network endpoint. This can only be specified when NetworkEndpointGroup.network_endpoint_type isNON_GCP_FQDN_PORT.
optional string fqdn = 3150485;- Specified by:
hasFqdnin interfaceNetworkEndpointOrBuilder- Returns:
- Whether the fqdn field is set.
-
getFqdn
Optional fully qualified domain name of network endpoint. This can only be specified when NetworkEndpointGroup.network_endpoint_type isNON_GCP_FQDN_PORT.
optional string fqdn = 3150485;- Specified by:
getFqdnin interfaceNetworkEndpointOrBuilder- Returns:
- The fqdn.
-
getFqdnBytes
public com.google.protobuf.ByteString getFqdnBytes()Optional fully qualified domain name of network endpoint. This can only be specified when NetworkEndpointGroup.network_endpoint_type isNON_GCP_FQDN_PORT.
optional string fqdn = 3150485;- Specified by:
getFqdnBytesin interfaceNetworkEndpointOrBuilder- Returns:
- The bytes for fqdn.
-
setFqdn
Optional fully qualified domain name of network endpoint. This can only be specified when NetworkEndpointGroup.network_endpoint_type isNON_GCP_FQDN_PORT.
optional string fqdn = 3150485;- Parameters:
value- The fqdn to set.- Returns:
- This builder for chaining.
-
clearFqdn
Optional fully qualified domain name of network endpoint. This can only be specified when NetworkEndpointGroup.network_endpoint_type isNON_GCP_FQDN_PORT.
optional string fqdn = 3150485;- Returns:
- This builder for chaining.
-
setFqdnBytes
Optional fully qualified domain name of network endpoint. This can only be specified when NetworkEndpointGroup.network_endpoint_type isNON_GCP_FQDN_PORT.
optional string fqdn = 3150485;- Parameters:
value- The bytes for fqdn to set.- Returns:
- This builder for chaining.
-
hasInstance
public boolean hasInstance()The name or a URL of VM instance of this network endpoint. Optional, the field presence depends on the network endpoint type. The field is required for network endpoints of type GCE_VM_IP andGCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group (for zonal NEGs) or in the zone within the region of the NEG (for regional NEGs). If the ipAddress is specified, it must belongs to the VM instance. The name must be 1-63 characters long, and comply withRFC1035 or be a valid URL pointing to an existing instance.
optional string instance = 18257045;- Specified by:
hasInstancein interfaceNetworkEndpointOrBuilder- Returns:
- Whether the instance field is set.
-
getInstance
The name or a URL of VM instance of this network endpoint. Optional, the field presence depends on the network endpoint type. The field is required for network endpoints of type GCE_VM_IP andGCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group (for zonal NEGs) or in the zone within the region of the NEG (for regional NEGs). If the ipAddress is specified, it must belongs to the VM instance. The name must be 1-63 characters long, and comply withRFC1035 or be a valid URL pointing to an existing instance.
optional string instance = 18257045;- Specified by:
getInstancein interfaceNetworkEndpointOrBuilder- Returns:
- The instance.
-
getInstanceBytes
public com.google.protobuf.ByteString getInstanceBytes()The name or a URL of VM instance of this network endpoint. Optional, the field presence depends on the network endpoint type. The field is required for network endpoints of type GCE_VM_IP andGCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group (for zonal NEGs) or in the zone within the region of the NEG (for regional NEGs). If the ipAddress is specified, it must belongs to the VM instance. The name must be 1-63 characters long, and comply withRFC1035 or be a valid URL pointing to an existing instance.
optional string instance = 18257045;- Specified by:
getInstanceBytesin interfaceNetworkEndpointOrBuilder- Returns:
- The bytes for instance.
-
setInstance
The name or a URL of VM instance of this network endpoint. Optional, the field presence depends on the network endpoint type. The field is required for network endpoints of type GCE_VM_IP andGCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group (for zonal NEGs) or in the zone within the region of the NEG (for regional NEGs). If the ipAddress is specified, it must belongs to the VM instance. The name must be 1-63 characters long, and comply withRFC1035 or be a valid URL pointing to an existing instance.
optional string instance = 18257045;- Parameters:
value- The instance to set.- Returns:
- This builder for chaining.
-
clearInstance
The name or a URL of VM instance of this network endpoint. Optional, the field presence depends on the network endpoint type. The field is required for network endpoints of type GCE_VM_IP andGCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group (for zonal NEGs) or in the zone within the region of the NEG (for regional NEGs). If the ipAddress is specified, it must belongs to the VM instance. The name must be 1-63 characters long, and comply withRFC1035 or be a valid URL pointing to an existing instance.
optional string instance = 18257045;- Returns:
- This builder for chaining.
-
setInstanceBytes
The name or a URL of VM instance of this network endpoint. Optional, the field presence depends on the network endpoint type. The field is required for network endpoints of type GCE_VM_IP andGCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group (for zonal NEGs) or in the zone within the region of the NEG (for regional NEGs). If the ipAddress is specified, it must belongs to the VM instance. The name must be 1-63 characters long, and comply withRFC1035 or be a valid URL pointing to an existing instance.
optional string instance = 18257045;- Parameters:
value- The bytes for instance to set.- Returns:
- This builder for chaining.
-
hasIpAddress
public boolean hasIpAddress()Optional IPv4 address of network endpoint. The IP address must belong to a VM in Compute Engine (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used. This field is redundant and need not be set for network endpoints of typeGCE_VM_IP. If set, it must be set to the primary internal IP address of the attached VM instance that matches the subnetwork of the NEG. The primary internal IP address from any NIC of a multi-NIC VM instance can be added to a NEG as long as it matches the NEG subnetwork.
optional string ip_address = 406272220;- Specified by:
hasIpAddressin interfaceNetworkEndpointOrBuilder- Returns:
- Whether the ipAddress field is set.
-
getIpAddress
Optional IPv4 address of network endpoint. The IP address must belong to a VM in Compute Engine (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used. This field is redundant and need not be set for network endpoints of typeGCE_VM_IP. If set, it must be set to the primary internal IP address of the attached VM instance that matches the subnetwork of the NEG. The primary internal IP address from any NIC of a multi-NIC VM instance can be added to a NEG as long as it matches the NEG subnetwork.
optional string ip_address = 406272220;- Specified by:
getIpAddressin interfaceNetworkEndpointOrBuilder- Returns:
- The ipAddress.
-
getIpAddressBytes
public com.google.protobuf.ByteString getIpAddressBytes()Optional IPv4 address of network endpoint. The IP address must belong to a VM in Compute Engine (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used. This field is redundant and need not be set for network endpoints of typeGCE_VM_IP. If set, it must be set to the primary internal IP address of the attached VM instance that matches the subnetwork of the NEG. The primary internal IP address from any NIC of a multi-NIC VM instance can be added to a NEG as long as it matches the NEG subnetwork.
optional string ip_address = 406272220;- Specified by:
getIpAddressBytesin interfaceNetworkEndpointOrBuilder- Returns:
- The bytes for ipAddress.
-
setIpAddress
Optional IPv4 address of network endpoint. The IP address must belong to a VM in Compute Engine (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used. This field is redundant and need not be set for network endpoints of typeGCE_VM_IP. If set, it must be set to the primary internal IP address of the attached VM instance that matches the subnetwork of the NEG. The primary internal IP address from any NIC of a multi-NIC VM instance can be added to a NEG as long as it matches the NEG subnetwork.
optional string ip_address = 406272220;- Parameters:
value- The ipAddress to set.- Returns:
- This builder for chaining.
-
clearIpAddress
Optional IPv4 address of network endpoint. The IP address must belong to a VM in Compute Engine (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used. This field is redundant and need not be set for network endpoints of typeGCE_VM_IP. If set, it must be set to the primary internal IP address of the attached VM instance that matches the subnetwork of the NEG. The primary internal IP address from any NIC of a multi-NIC VM instance can be added to a NEG as long as it matches the NEG subnetwork.
optional string ip_address = 406272220;- Returns:
- This builder for chaining.
-
setIpAddressBytes
Optional IPv4 address of network endpoint. The IP address must belong to a VM in Compute Engine (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used. This field is redundant and need not be set for network endpoints of typeGCE_VM_IP. If set, it must be set to the primary internal IP address of the attached VM instance that matches the subnetwork of the NEG. The primary internal IP address from any NIC of a multi-NIC VM instance can be added to a NEG as long as it matches the NEG subnetwork.
optional string ip_address = 406272220;- Parameters:
value- The bytes for ipAddress to set.- Returns:
- This builder for chaining.
-
hasIpv6Address
public boolean hasIpv6Address()Optional IPv6 address of network endpoint.
optional string ipv6_address = 341563804;- Specified by:
hasIpv6Addressin interfaceNetworkEndpointOrBuilder- Returns:
- Whether the ipv6Address field is set.
-
getIpv6Address
Optional IPv6 address of network endpoint.
optional string ipv6_address = 341563804;- Specified by:
getIpv6Addressin interfaceNetworkEndpointOrBuilder- Returns:
- The ipv6Address.
-
getIpv6AddressBytes
public com.google.protobuf.ByteString getIpv6AddressBytes()Optional IPv6 address of network endpoint.
optional string ipv6_address = 341563804;- Specified by:
getIpv6AddressBytesin interfaceNetworkEndpointOrBuilder- Returns:
- The bytes for ipv6Address.
-
setIpv6Address
Optional IPv6 address of network endpoint.
optional string ipv6_address = 341563804;- Parameters:
value- The ipv6Address to set.- Returns:
- This builder for chaining.
-
clearIpv6Address
Optional IPv6 address of network endpoint.
optional string ipv6_address = 341563804;- Returns:
- This builder for chaining.
-
setIpv6AddressBytes
Optional IPv6 address of network endpoint.
optional string ipv6_address = 341563804;- Parameters:
value- The bytes for ipv6Address to set.- Returns:
- This builder for chaining.
-
hasPort
public boolean hasPort()Optional port number of network endpoint. If not specified, the defaultPort for the network endpoint group will be used. This field can not be set for network endpoints of typeGCE_VM_IP.
optional int32 port = 3446913;- Specified by:
hasPortin interfaceNetworkEndpointOrBuilder- Returns:
- Whether the port field is set.
-
getPort
public int getPort()Optional port number of network endpoint. If not specified, the defaultPort for the network endpoint group will be used. This field can not be set for network endpoints of typeGCE_VM_IP.
optional int32 port = 3446913;- Specified by:
getPortin interfaceNetworkEndpointOrBuilder- Returns:
- The port.
-
setPort
Optional port number of network endpoint. If not specified, the defaultPort for the network endpoint group will be used. This field can not be set for network endpoints of typeGCE_VM_IP.
optional int32 port = 3446913;- Parameters:
value- The port to set.- Returns:
- This builder for chaining.
-
clearPort
Optional port number of network endpoint. If not specified, the defaultPort for the network endpoint group will be used. This field can not be set for network endpoints of typeGCE_VM_IP.
optional int32 port = 3446913;- Returns:
- This builder for chaining.
-