Class Compute.Ingress.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<Compute.Ingress.Builder>
com.google.protobuf.GeneratedMessage.Builder<Compute.Ingress.Builder>
namespace.cloud.compute.v1beta.Compute.Ingress.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, Compute.IngressOrBuilder
Enclosing class:
Compute.Ingress

public static final class Compute.Ingress.Builder extends com.google.protobuf.GeneratedMessage.Builder<Compute.Ingress.Builder> implements Compute.IngressOrBuilder
 Describes a platform-managed, Internet-facing endpoint that routes traffic
 to a service running inside an instance. Use CreateInstanceRequest.ingresses
 for ports exposed directly by the instance, including native applications
 on platforms such as macOS. Use ContainerRequest.export_ports for ports
 owned by containers.

 Traffic and TLS boundaries:

 ```
 HTTP  [client] --HTTPS------> [Namespace ingress] --HTTP--> [backend]
 TCP   [client] --TLS/mTLS---> [Namespace ingress] --TCP---> [backend]
 TLS   [client] --TLS (routed by SNI, not terminated)------> [backend]
 ```

 Each generated server name routes only to its declared instance and port;
 no other instance ports are exposed by that ingress. In HTTP and TCP modes,
 TLS terminates at Namespace and the ingress-to-backend protocol is cleartext
 HTTP or TCP. TLS passthrough preserves end-to-end encryption: Namespace uses
 the SNI hostname for routing but does not terminate TLS.

 HTTP requests require a valid Namespace bearer token with access to the
 instance by default. HttpMatchRule can explicitly make matching requests
 unauthenticated. TCP defaults to requiring a Namespace-issued mTLS client
 certificate with access to the instance; NONE allows any TLS client to
 connect. In TLS passthrough mode the backend is responsible for server and
 client authentication.
 
Protobuf type namespace.cloud.compute.v1beta.Ingress
  • Method Details

    • getDescriptor

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

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

      public Compute.Ingress.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<Compute.Ingress.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<Compute.Ingress.Builder>
    • getDefaultInstanceForType

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

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

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

      public Compute.Ingress.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<Compute.Ingress.Builder>
    • mergeFrom

      public Compute.Ingress.Builder mergeFrom(Compute.Ingress other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Compute.Ingress.Builder>
    • mergeFrom

      public Compute.Ingress.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<Compute.Ingress.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The name used to generate the Internet-facing server name.
       
      string name = 1;
      Specified by:
      getName in interface Compute.IngressOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name used to generate the Internet-facing server name.
       
      string name = 1;
      Specified by:
      getNameBytes in interface Compute.IngressOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Compute.Ingress.Builder setName(String value)
       The name used to generate the Internet-facing server name.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Compute.Ingress.Builder clearName()
       The name used to generate the Internet-facing server name.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Compute.Ingress.Builder setNameBytes(com.google.protobuf.ByteString value)
       The name used to generate the Internet-facing server name.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getModeValue

      public int getModeValue()
       The ingress behavior. Must be set.
       
      .namespace.cloud.compute.v1beta.Ingress.Mode mode = 2;
      Specified by:
      getModeValue in interface Compute.IngressOrBuilder
      Returns:
      The enum numeric value on the wire for mode.
    • setModeValue

      public Compute.Ingress.Builder setModeValue(int value)
       The ingress behavior. Must be set.
       
      .namespace.cloud.compute.v1beta.Ingress.Mode mode = 2;
      Parameters:
      value - The enum numeric value on the wire for mode to set.
      Returns:
      This builder for chaining.
    • getMode

      public Compute.Ingress.Mode getMode()
       The ingress behavior. Must be set.
       
      .namespace.cloud.compute.v1beta.Ingress.Mode mode = 2;
      Specified by:
      getMode in interface Compute.IngressOrBuilder
      Returns:
      The mode.
    • setMode

       The ingress behavior. Must be set.
       
      .namespace.cloud.compute.v1beta.Ingress.Mode mode = 2;
      Parameters:
      value - The mode to set.
      Returns:
      This builder for chaining.
    • clearMode

      public Compute.Ingress.Builder clearMode()
       The ingress behavior. Must be set.
       
      .namespace.cloud.compute.v1beta.Ingress.Mode mode = 2;
      Returns:
      This builder for chaining.
    • getPort

      public int getPort()
       The port the instance is listening on.
       
      int32 port = 3;
      Specified by:
      getPort in interface Compute.IngressOrBuilder
      Returns:
      The port.
    • setPort

      public Compute.Ingress.Builder setPort(int value)
       The port the instance is listening on.
       
      int32 port = 3;
      Parameters:
      value - The port to set.
      Returns:
      This builder for chaining.
    • clearPort

      public Compute.Ingress.Builder clearPort()
       The port the instance is listening on.
       
      int32 port = 3;
      Returns:
      This builder for chaining.
    • getHttpMatchRuleList

      public List<Compute.HttpMatchRule> getHttpMatchRuleList()
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
      Specified by:
      getHttpMatchRuleList in interface Compute.IngressOrBuilder
    • getHttpMatchRuleCount

      public int getHttpMatchRuleCount()
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
      Specified by:
      getHttpMatchRuleCount in interface Compute.IngressOrBuilder
    • getHttpMatchRule

      public Compute.HttpMatchRule getHttpMatchRule(int index)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
      Specified by:
      getHttpMatchRule in interface Compute.IngressOrBuilder
    • setHttpMatchRule

      public Compute.Ingress.Builder setHttpMatchRule(int index, Compute.HttpMatchRule value)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • setHttpMatchRule

      public Compute.Ingress.Builder setHttpMatchRule(int index, Compute.HttpMatchRule.Builder builderForValue)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • addHttpMatchRule

      public Compute.Ingress.Builder addHttpMatchRule(Compute.HttpMatchRule value)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • addHttpMatchRule

      public Compute.Ingress.Builder addHttpMatchRule(int index, Compute.HttpMatchRule value)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • addHttpMatchRule

      public Compute.Ingress.Builder addHttpMatchRule(Compute.HttpMatchRule.Builder builderForValue)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • addHttpMatchRule

      public Compute.Ingress.Builder addHttpMatchRule(int index, Compute.HttpMatchRule.Builder builderForValue)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • addAllHttpMatchRule

      public Compute.Ingress.Builder addAllHttpMatchRule(Iterable<? extends Compute.HttpMatchRule> values)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • clearHttpMatchRule

      public Compute.Ingress.Builder clearHttpMatchRule()
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • removeHttpMatchRule

      public Compute.Ingress.Builder removeHttpMatchRule(int index)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • getHttpMatchRuleBuilder

      public Compute.HttpMatchRule.Builder getHttpMatchRuleBuilder(int index)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • getHttpMatchRuleOrBuilder

      public Compute.HttpMatchRuleOrBuilder getHttpMatchRuleOrBuilder(int index)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
      Specified by:
      getHttpMatchRuleOrBuilder in interface Compute.IngressOrBuilder
    • getHttpMatchRuleOrBuilderList

      public List<? extends Compute.HttpMatchRuleOrBuilder> getHttpMatchRuleOrBuilderList()
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
      Specified by:
      getHttpMatchRuleOrBuilderList in interface Compute.IngressOrBuilder
    • addHttpMatchRuleBuilder

      public Compute.HttpMatchRule.Builder addHttpMatchRuleBuilder()
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • addHttpMatchRuleBuilder

      public Compute.HttpMatchRule.Builder addHttpMatchRuleBuilder(int index)
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • getHttpMatchRuleBuilderList

      public List<Compute.HttpMatchRule.Builder> getHttpMatchRuleBuilderList()
       HTTP routing and authentication rules. Only supported in HTTP mode.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 5;
    • getWildcard

      public boolean getWildcard()
       Routes all first-level subdomains of the instance wildcard domain to
       this ingress. Requires the instance wildcard domain to be enabled via
       experimental.enable_wildcard_domain. Only supported in HTTP mode and
       mutually exclusive with name.
       
      bool wildcard = 6;
      Specified by:
      getWildcard in interface Compute.IngressOrBuilder
      Returns:
      The wildcard.
    • setWildcard

      public Compute.Ingress.Builder setWildcard(boolean value)
       Routes all first-level subdomains of the instance wildcard domain to
       this ingress. Requires the instance wildcard domain to be enabled via
       experimental.enable_wildcard_domain. Only supported in HTTP mode and
       mutually exclusive with name.
       
      bool wildcard = 6;
      Parameters:
      value - The wildcard to set.
      Returns:
      This builder for chaining.
    • clearWildcard

      public Compute.Ingress.Builder clearWildcard()
       Routes all first-level subdomains of the instance wildcard domain to
       this ingress. Requires the instance wildcard domain to be enabled via
       experimental.enable_wildcard_domain. Only supported in HTTP mode and
       mutually exclusive with name.
       
      bool wildcard = 6;
      Returns:
      This builder for chaining.
    • getClientAuthenticationValue

      public int getClientAuthenticationValue()
       Configures client authentication in TCP mode. MTLS is incompatible
       with TLS_PASSTHROUGH, where the backend terminates and authenticates TLS;
       NONE and UNSPECIFIED have equivalent behavior in passthrough mode. Must
       not be set in HTTP mode. TCP defaults to requiring mTLS.
       
      .namespace.cloud.compute.v1beta.IngressClientAuthentication client_authentication = 7;
      Specified by:
      getClientAuthenticationValue in interface Compute.IngressOrBuilder
      Returns:
      The enum numeric value on the wire for clientAuthentication.
    • setClientAuthenticationValue

      public Compute.Ingress.Builder setClientAuthenticationValue(int value)
       Configures client authentication in TCP mode. MTLS is incompatible
       with TLS_PASSTHROUGH, where the backend terminates and authenticates TLS;
       NONE and UNSPECIFIED have equivalent behavior in passthrough mode. Must
       not be set in HTTP mode. TCP defaults to requiring mTLS.
       
      .namespace.cloud.compute.v1beta.IngressClientAuthentication client_authentication = 7;
      Parameters:
      value - The enum numeric value on the wire for clientAuthentication to set.
      Returns:
      This builder for chaining.
    • getClientAuthentication

      public Compute.IngressClientAuthentication getClientAuthentication()
       Configures client authentication in TCP mode. MTLS is incompatible
       with TLS_PASSTHROUGH, where the backend terminates and authenticates TLS;
       NONE and UNSPECIFIED have equivalent behavior in passthrough mode. Must
       not be set in HTTP mode. TCP defaults to requiring mTLS.
       
      .namespace.cloud.compute.v1beta.IngressClientAuthentication client_authentication = 7;
      Specified by:
      getClientAuthentication in interface Compute.IngressOrBuilder
      Returns:
      The clientAuthentication.
    • setClientAuthentication

      public Compute.Ingress.Builder setClientAuthentication(Compute.IngressClientAuthentication value)
       Configures client authentication in TCP mode. MTLS is incompatible
       with TLS_PASSTHROUGH, where the backend terminates and authenticates TLS;
       NONE and UNSPECIFIED have equivalent behavior in passthrough mode. Must
       not be set in HTTP mode. TCP defaults to requiring mTLS.
       
      .namespace.cloud.compute.v1beta.IngressClientAuthentication client_authentication = 7;
      Parameters:
      value - The clientAuthentication to set.
      Returns:
      This builder for chaining.
    • clearClientAuthentication

      public Compute.Ingress.Builder clearClientAuthentication()
       Configures client authentication in TCP mode. MTLS is incompatible
       with TLS_PASSTHROUGH, where the backend terminates and authenticates TLS;
       NONE and UNSPECIFIED have equivalent behavior in passthrough mode. Must
       not be set in HTTP mode. TCP defaults to requiring mTLS.
       
      .namespace.cloud.compute.v1beta.IngressClientAuthentication client_authentication = 7;
      Returns:
      This builder for chaining.