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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
    • clear

      public NetworkEndpoint.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<NetworkEndpoint.Builder>
    • getDefaultInstanceForType

      public NetworkEndpoint getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public NetworkEndpoint build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public NetworkEndpoint buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public NetworkEndpoint.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NetworkEndpoint.Builder>
    • mergeFrom

      public NetworkEndpoint.Builder mergeFrom(NetworkEndpoint other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NetworkEndpoint.Builder>
      Throws:
      IOException
    • getAnnotationsCount

      public int getAnnotationsCount()
      Description copied from interface: NetworkEndpointOrBuilder
       Optional metadata defined as annotations on the network endpoint.
       
      map<string, string> annotations = 112032548;
      Specified by:
      getAnnotationsCount in interface NetworkEndpointOrBuilder
    • containsAnnotations

      public boolean containsAnnotations(String key)
       Optional metadata defined as annotations on the network endpoint.
       
      map<string, string> annotations = 112032548;
      Specified by:
      containsAnnotations in interface NetworkEndpointOrBuilder
    • getAnnotations

      @Deprecated public Map<String,String> getAnnotations()
      Deprecated.
      Use getAnnotationsMap() instead.
      Specified by:
      getAnnotations in interface NetworkEndpointOrBuilder
    • getAnnotationsMap

      public Map<String,String> getAnnotationsMap()
       Optional metadata defined as annotations on the network endpoint.
       
      map<string, string> annotations = 112032548;
      Specified by:
      getAnnotationsMap in interface NetworkEndpointOrBuilder
    • getAnnotationsOrDefault

      public String getAnnotationsOrDefault(String key, String defaultValue)
       Optional metadata defined as annotations on the network endpoint.
       
      map<string, string> annotations = 112032548;
      Specified by:
      getAnnotationsOrDefault in interface NetworkEndpointOrBuilder
    • getAnnotationsOrThrow

      public String getAnnotationsOrThrow(String key)
       Optional metadata defined as annotations on the network endpoint.
       
      map<string, string> annotations = 112032548;
      Specified by:
      getAnnotationsOrThrow in interface NetworkEndpointOrBuilder
    • clearAnnotations

      public NetworkEndpoint.Builder clearAnnotations()
    • removeAnnotations

      public NetworkEndpoint.Builder removeAnnotations(String key)
       Optional metadata defined as annotations on the network endpoint.
       
      map<string, string> annotations = 112032548;
    • getMutableAnnotations

      @Deprecated public Map<String,String> getMutableAnnotations()
      Deprecated.
      Use alternate mutation accessors instead.
    • putAnnotations

      public NetworkEndpoint.Builder putAnnotations(String key, String value)
       Optional metadata defined as annotations on the network endpoint.
       
      map<string, string> annotations = 112032548;
    • putAllAnnotations

      public NetworkEndpoint.Builder putAllAnnotations(Map<String,String> values)
       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:
      hasClientDestinationPort in interface NetworkEndpointOrBuilder
      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:
      getClientDestinationPort in interface NetworkEndpointOrBuilder
      Returns:
      The clientDestinationPort.
    • setClientDestinationPort

      public NetworkEndpoint.Builder setClientDestinationPort(int value)
       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

      public NetworkEndpoint.Builder 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:
      hasFqdn in interface NetworkEndpointOrBuilder
      Returns:
      Whether the fqdn field is set.
    • getFqdn

      public String 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:
      getFqdn in interface NetworkEndpointOrBuilder
      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:
      getFqdnBytes in interface NetworkEndpointOrBuilder
      Returns:
      The bytes for fqdn.
    • setFqdn

      public NetworkEndpoint.Builder setFqdn(String value)
       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

      public NetworkEndpoint.Builder 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

      public NetworkEndpoint.Builder setFqdnBytes(com.google.protobuf.ByteString value)
       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:
      hasInstance in interface NetworkEndpointOrBuilder
      Returns:
      Whether the instance field is set.
    • getInstance

      public String 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:
      getInstance in interface NetworkEndpointOrBuilder
      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:
      getInstanceBytes in interface NetworkEndpointOrBuilder
      Returns:
      The bytes for instance.
    • setInstance

      public NetworkEndpoint.Builder setInstance(String value)
       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

      public NetworkEndpoint.Builder 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

      public NetworkEndpoint.Builder setInstanceBytes(com.google.protobuf.ByteString value)
       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:
      hasIpAddress in interface NetworkEndpointOrBuilder
      Returns:
      Whether the ipAddress field is set.
    • getIpAddress

      public String 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:
      getIpAddress in interface NetworkEndpointOrBuilder
      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:
      getIpAddressBytes in interface NetworkEndpointOrBuilder
      Returns:
      The bytes for ipAddress.
    • setIpAddress

      public NetworkEndpoint.Builder setIpAddress(String value)
       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

      public NetworkEndpoint.Builder 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

      public NetworkEndpoint.Builder setIpAddressBytes(com.google.protobuf.ByteString value)
       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:
      hasIpv6Address in interface NetworkEndpointOrBuilder
      Returns:
      Whether the ipv6Address field is set.
    • getIpv6Address

      public String getIpv6Address()
       Optional IPv6 address of network endpoint.
       
      optional string ipv6_address = 341563804;
      Specified by:
      getIpv6Address in interface NetworkEndpointOrBuilder
      Returns:
      The ipv6Address.
    • getIpv6AddressBytes

      public com.google.protobuf.ByteString getIpv6AddressBytes()
       Optional IPv6 address of network endpoint.
       
      optional string ipv6_address = 341563804;
      Specified by:
      getIpv6AddressBytes in interface NetworkEndpointOrBuilder
      Returns:
      The bytes for ipv6Address.
    • setIpv6Address

      public NetworkEndpoint.Builder setIpv6Address(String value)
       Optional IPv6 address of network endpoint.
       
      optional string ipv6_address = 341563804;
      Parameters:
      value - The ipv6Address to set.
      Returns:
      This builder for chaining.
    • clearIpv6Address

      public NetworkEndpoint.Builder clearIpv6Address()
       Optional IPv6 address of network endpoint.
       
      optional string ipv6_address = 341563804;
      Returns:
      This builder for chaining.
    • setIpv6AddressBytes

      public NetworkEndpoint.Builder setIpv6AddressBytes(com.google.protobuf.ByteString value)
       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:
      hasPort in interface NetworkEndpointOrBuilder
      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:
      getPort in interface NetworkEndpointOrBuilder
      Returns:
      The port.
    • setPort

      public NetworkEndpoint.Builder setPort(int value)
       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

      public NetworkEndpoint.Builder 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.