Class Compute.ContainerPort.Builder

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

public static final class Compute.ContainerPort.Builder extends com.google.protobuf.GeneratedMessage.Builder<Compute.ContainerPort.Builder> implements Compute.ContainerPortOrBuilder
Protobuf type namespace.cloud.compute.v1beta.ContainerPort
  • 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.ContainerPort.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.ContainerPort.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.ContainerPort.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

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

      public int getProtoValue()
       The protocol the port being expose uses. Must be set.
      
       If the protocol is set to `HTTP` or `H2C` then the platform exposes the
       port using a HTTPS-terminating reverse proxy, which then communicates
       using cleartext HTTP/1.1 or HTTP/2 respectively with the container.
      
       If the protocol is `TCP` then the platform terminates TLS and proxies the
       resulting TCP stream. Client authentication is configured separately.
      
       If the protocol is `TLS_PASSTHROUGH`, the platform routes the encrypted
       stream using SNI and the container terminates TLS. TLS passthrough ports
       must be declared during instance creation.
      
       Example: `HTTP`
       
      .namespace.cloud.compute.v1beta.ContainerPort.Proto proto = 1;
      Specified by:
      getProtoValue in interface Compute.ContainerPortOrBuilder
      Returns:
      The enum numeric value on the wire for proto.
    • setProtoValue

      public Compute.ContainerPort.Builder setProtoValue(int value)
       The protocol the port being expose uses. Must be set.
      
       If the protocol is set to `HTTP` or `H2C` then the platform exposes the
       port using a HTTPS-terminating reverse proxy, which then communicates
       using cleartext HTTP/1.1 or HTTP/2 respectively with the container.
      
       If the protocol is `TCP` then the platform terminates TLS and proxies the
       resulting TCP stream. Client authentication is configured separately.
      
       If the protocol is `TLS_PASSTHROUGH`, the platform routes the encrypted
       stream using SNI and the container terminates TLS. TLS passthrough ports
       must be declared during instance creation.
      
       Example: `HTTP`
       
      .namespace.cloud.compute.v1beta.ContainerPort.Proto proto = 1;
      Parameters:
      value - The enum numeric value on the wire for proto to set.
      Returns:
      This builder for chaining.
    • getProto

      public Compute.ContainerPort.Proto getProto()
       The protocol the port being expose uses. Must be set.
      
       If the protocol is set to `HTTP` or `H2C` then the platform exposes the
       port using a HTTPS-terminating reverse proxy, which then communicates
       using cleartext HTTP/1.1 or HTTP/2 respectively with the container.
      
       If the protocol is `TCP` then the platform terminates TLS and proxies the
       resulting TCP stream. Client authentication is configured separately.
      
       If the protocol is `TLS_PASSTHROUGH`, the platform routes the encrypted
       stream using SNI and the container terminates TLS. TLS passthrough ports
       must be declared during instance creation.
      
       Example: `HTTP`
       
      .namespace.cloud.compute.v1beta.ContainerPort.Proto proto = 1;
      Specified by:
      getProto in interface Compute.ContainerPortOrBuilder
      Returns:
      The proto.
    • setProto

       The protocol the port being expose uses. Must be set.
      
       If the protocol is set to `HTTP` or `H2C` then the platform exposes the
       port using a HTTPS-terminating reverse proxy, which then communicates
       using cleartext HTTP/1.1 or HTTP/2 respectively with the container.
      
       If the protocol is `TCP` then the platform terminates TLS and proxies the
       resulting TCP stream. Client authentication is configured separately.
      
       If the protocol is `TLS_PASSTHROUGH`, the platform routes the encrypted
       stream using SNI and the container terminates TLS. TLS passthrough ports
       must be declared during instance creation.
      
       Example: `HTTP`
       
      .namespace.cloud.compute.v1beta.ContainerPort.Proto proto = 1;
      Parameters:
      value - The proto to set.
      Returns:
      This builder for chaining.
    • clearProto

      public Compute.ContainerPort.Builder clearProto()
       The protocol the port being expose uses. Must be set.
      
       If the protocol is set to `HTTP` or `H2C` then the platform exposes the
       port using a HTTPS-terminating reverse proxy, which then communicates
       using cleartext HTTP/1.1 or HTTP/2 respectively with the container.
      
       If the protocol is `TCP` then the platform terminates TLS and proxies the
       resulting TCP stream. Client authentication is configured separately.
      
       If the protocol is `TLS_PASSTHROUGH`, the platform routes the encrypted
       stream using SNI and the container terminates TLS. TLS passthrough ports
       must be declared during instance creation.
      
       Example: `HTTP`
       
      .namespace.cloud.compute.v1beta.ContainerPort.Proto proto = 1;
      Returns:
      This builder for chaining.
    • getContainerPort

      public int getContainerPort()
       The port the container is listening on. For example, if exposing a HTTP
       server, with `proto=HTTP`, the port the http server is listening on.
      
       Example: `3000`
       
      int32 container_port = 2;
      Specified by:
      getContainerPort in interface Compute.ContainerPortOrBuilder
      Returns:
      The containerPort.
    • setContainerPort

      public Compute.ContainerPort.Builder setContainerPort(int value)
       The port the container is listening on. For example, if exposing a HTTP
       server, with `proto=HTTP`, the port the http server is listening on.
      
       Example: `3000`
       
      int32 container_port = 2;
      Parameters:
      value - The containerPort to set.
      Returns:
      This builder for chaining.
    • clearContainerPort

      public Compute.ContainerPort.Builder clearContainerPort()
       The port the container is listening on. For example, if exposing a HTTP
       server, with `proto=HTTP`, the port the http server is listening on.
      
       Example: `3000`
       
      int32 container_port = 2;
      Returns:
      This builder for chaining.
    • getName

      public String getName()
       If a name is provided, it is used to generate the Internet-facing server
       name used to access this port. If it's not provided, a random id is used.
       
      string name = 4;
      Specified by:
      getName in interface Compute.ContainerPortOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       If a name is provided, it is used to generate the Internet-facing server
       name used to access this port. If it's not provided, a random id is used.
       
      string name = 4;
      Specified by:
      getNameBytes in interface Compute.ContainerPortOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Compute.ContainerPort.Builder setName(String value)
       If a name is provided, it is used to generate the Internet-facing server
       name used to access this port. If it's not provided, a random id is used.
       
      string name = 4;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Compute.ContainerPort.Builder clearName()
       If a name is provided, it is used to generate the Internet-facing server
       name used to access this port. If it's not provided, a random id is used.
       
      string name = 4;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Compute.ContainerPort.Builder setNameBytes(com.google.protobuf.ByteString value)
       If a name is provided, it is used to generate the Internet-facing server
       name used to access this port. If it's not provided, a random id is used.
       
      string name = 4;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getHttpMatchRuleList

      public List<Compute.HttpMatchRule> getHttpMatchRuleList()
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
      Specified by:
      getHttpMatchRuleList in interface Compute.ContainerPortOrBuilder
    • getHttpMatchRuleCount

      public int getHttpMatchRuleCount()
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
      Specified by:
      getHttpMatchRuleCount in interface Compute.ContainerPortOrBuilder
    • getHttpMatchRule

      public Compute.HttpMatchRule getHttpMatchRule(int index)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
      Specified by:
      getHttpMatchRule in interface Compute.ContainerPortOrBuilder
    • setHttpMatchRule

      public Compute.ContainerPort.Builder setHttpMatchRule(int index, Compute.HttpMatchRule value)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • setHttpMatchRule

      public Compute.ContainerPort.Builder setHttpMatchRule(int index, Compute.HttpMatchRule.Builder builderForValue)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • addHttpMatchRule

      public Compute.ContainerPort.Builder addHttpMatchRule(Compute.HttpMatchRule value)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • addHttpMatchRule

      public Compute.ContainerPort.Builder addHttpMatchRule(int index, Compute.HttpMatchRule value)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • addHttpMatchRule

      public Compute.ContainerPort.Builder addHttpMatchRule(Compute.HttpMatchRule.Builder builderForValue)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • addHttpMatchRule

      public Compute.ContainerPort.Builder addHttpMatchRule(int index, Compute.HttpMatchRule.Builder builderForValue)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • addAllHttpMatchRule

      public Compute.ContainerPort.Builder addAllHttpMatchRule(Iterable<? extends Compute.HttpMatchRule> values)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • clearHttpMatchRule

      public Compute.ContainerPort.Builder clearHttpMatchRule()
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • removeHttpMatchRule

      public Compute.ContainerPort.Builder removeHttpMatchRule(int index)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • getHttpMatchRuleBuilder

      public Compute.HttpMatchRule.Builder getHttpMatchRuleBuilder(int index)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • getHttpMatchRuleOrBuilder

      public Compute.HttpMatchRuleOrBuilder getHttpMatchRuleOrBuilder(int index)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
      Specified by:
      getHttpMatchRuleOrBuilder in interface Compute.ContainerPortOrBuilder
    • getHttpMatchRuleOrBuilderList

      public List<? extends Compute.HttpMatchRuleOrBuilder> getHttpMatchRuleOrBuilderList()
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
      Specified by:
      getHttpMatchRuleOrBuilderList in interface Compute.ContainerPortOrBuilder
    • addHttpMatchRuleBuilder

      public Compute.HttpMatchRule.Builder addHttpMatchRuleBuilder()
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • addHttpMatchRuleBuilder

      public Compute.HttpMatchRule.Builder addHttpMatchRuleBuilder(int index)
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • getHttpMatchRuleBuilderList

      public List<Compute.HttpMatchRule.Builder> getHttpMatchRuleBuilderList()
       A set of rules that configure the ingress when accessing this exported
       port. Only settable with `proto` is `HTTP`.
       
      repeated .namespace.cloud.compute.v1beta.HttpMatchRule http_match_rule = 3;
    • getClientAuthenticationValue

      public int getClientAuthenticationValue()
       Configures client authentication when `proto` is `TCP`. MTLS is
       incompatible with TLS_PASSTHROUGH, where NONE and UNSPECIFIED have
       equivalent behavior. Must not be set for HTTP or H2C. TCP defaults to
       requiring mTLS. TCP ports without client authentication must be declared
       during instance creation.
       
      .namespace.cloud.compute.v1beta.IngressClientAuthentication client_authentication = 5;
      Specified by:
      getClientAuthenticationValue in interface Compute.ContainerPortOrBuilder
      Returns:
      The enum numeric value on the wire for clientAuthentication.
    • setClientAuthenticationValue

      public Compute.ContainerPort.Builder setClientAuthenticationValue(int value)
       Configures client authentication when `proto` is `TCP`. MTLS is
       incompatible with TLS_PASSTHROUGH, where NONE and UNSPECIFIED have
       equivalent behavior. Must not be set for HTTP or H2C. TCP defaults to
       requiring mTLS. TCP ports without client authentication must be declared
       during instance creation.
       
      .namespace.cloud.compute.v1beta.IngressClientAuthentication client_authentication = 5;
      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 when `proto` is `TCP`. MTLS is
       incompatible with TLS_PASSTHROUGH, where NONE and UNSPECIFIED have
       equivalent behavior. Must not be set for HTTP or H2C. TCP defaults to
       requiring mTLS. TCP ports without client authentication must be declared
       during instance creation.
       
      .namespace.cloud.compute.v1beta.IngressClientAuthentication client_authentication = 5;
      Specified by:
      getClientAuthentication in interface Compute.ContainerPortOrBuilder
      Returns:
      The clientAuthentication.
    • setClientAuthentication

       Configures client authentication when `proto` is `TCP`. MTLS is
       incompatible with TLS_PASSTHROUGH, where NONE and UNSPECIFIED have
       equivalent behavior. Must not be set for HTTP or H2C. TCP defaults to
       requiring mTLS. TCP ports without client authentication must be declared
       during instance creation.
       
      .namespace.cloud.compute.v1beta.IngressClientAuthentication client_authentication = 5;
      Parameters:
      value - The clientAuthentication to set.
      Returns:
      This builder for chaining.
    • clearClientAuthentication

      public Compute.ContainerPort.Builder clearClientAuthentication()
       Configures client authentication when `proto` is `TCP`. MTLS is
       incompatible with TLS_PASSTHROUGH, where NONE and UNSPECIFIED have
       equivalent behavior. Must not be set for HTTP or H2C. TCP defaults to
       requiring mTLS. TCP ports without client authentication must be declared
       during instance creation.
       
      .namespace.cloud.compute.v1beta.IngressClientAuthentication client_authentication = 5;
      Returns:
      This builder for chaining.