Class WeightedBackendService.Builder

  • All Implemented Interfaces:
    WeightedBackendServiceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    WeightedBackendService

    public static final class WeightedBackendService.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
    implements WeightedBackendServiceOrBuilder
     In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple backend services. The volume of traffic for each backend service is proportional to the weight specified in each WeightedBackendService
     
    Protobuf type google.cloud.compute.v1.WeightedBackendService
    • Method Detail

      • getDescriptor

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

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

        public WeightedBackendService.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.GeneratedMessageV3.Builder<WeightedBackendService.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.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
      • getDefaultInstanceForType

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

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

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

        public WeightedBackendService.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
      • clearField

        public WeightedBackendService.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
      • clearOneof

        public WeightedBackendService.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
      • setRepeatedField

        public WeightedBackendService.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                               int index,
                                                               Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
      • addRepeatedField

        public WeightedBackendService.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                               Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
      • isInitialized

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

        public WeightedBackendService.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<WeightedBackendService.Builder>
        Throws:
        IOException
      • hasBackendService

        public boolean hasBackendService()
         The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight.
         
        optional string backend_service = 306946058;
        Specified by:
        hasBackendService in interface WeightedBackendServiceOrBuilder
        Returns:
        Whether the backendService field is set.
      • getBackendService

        public String getBackendService()
         The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight.
         
        optional string backend_service = 306946058;
        Specified by:
        getBackendService in interface WeightedBackendServiceOrBuilder
        Returns:
        The backendService.
      • getBackendServiceBytes

        public com.google.protobuf.ByteString getBackendServiceBytes()
         The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight.
         
        optional string backend_service = 306946058;
        Specified by:
        getBackendServiceBytes in interface WeightedBackendServiceOrBuilder
        Returns:
        The bytes for backendService.
      • setBackendService

        public WeightedBackendService.Builder setBackendService​(String value)
         The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight.
         
        optional string backend_service = 306946058;
        Parameters:
        value - The backendService to set.
        Returns:
        This builder for chaining.
      • clearBackendService

        public WeightedBackendService.Builder clearBackendService()
         The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight.
         
        optional string backend_service = 306946058;
        Returns:
        This builder for chaining.
      • setBackendServiceBytes

        public WeightedBackendService.Builder setBackendServiceBytes​(com.google.protobuf.ByteString value)
         The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight.
         
        optional string backend_service = 306946058;
        Parameters:
        value - The bytes for backendService to set.
        Returns:
        This builder for chaining.
      • hasHeaderAction

        public boolean hasHeaderAction()
         Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
         
        optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;
        Specified by:
        hasHeaderAction in interface WeightedBackendServiceOrBuilder
        Returns:
        Whether the headerAction field is set.
      • getHeaderAction

        public HttpHeaderAction getHeaderAction()
         Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
         
        optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;
        Specified by:
        getHeaderAction in interface WeightedBackendServiceOrBuilder
        Returns:
        The headerAction.
      • setHeaderAction

        public WeightedBackendService.Builder setHeaderAction​(HttpHeaderAction value)
         Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
         
        optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;
      • setHeaderAction

        public WeightedBackendService.Builder setHeaderAction​(HttpHeaderAction.Builder builderForValue)
         Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
         
        optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;
      • mergeHeaderAction

        public WeightedBackendService.Builder mergeHeaderAction​(HttpHeaderAction value)
         Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
         
        optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;
      • clearHeaderAction

        public WeightedBackendService.Builder clearHeaderAction()
         Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
         
        optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;
      • getHeaderActionBuilder

        public HttpHeaderAction.Builder getHeaderActionBuilder()
         Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
         
        optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;
      • getHeaderActionOrBuilder

        public HttpHeaderActionOrBuilder getHeaderActionOrBuilder()
         Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
         
        optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;
        Specified by:
        getHeaderActionOrBuilder in interface WeightedBackendServiceOrBuilder
      • hasWeight

        public boolean hasWeight()
         Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000.
         
        optional uint32 weight = 282149496;
        Specified by:
        hasWeight in interface WeightedBackendServiceOrBuilder
        Returns:
        Whether the weight field is set.
      • getWeight

        public int getWeight()
         Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000.
         
        optional uint32 weight = 282149496;
        Specified by:
        getWeight in interface WeightedBackendServiceOrBuilder
        Returns:
        The weight.
      • setWeight

        public WeightedBackendService.Builder setWeight​(int value)
         Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000.
         
        optional uint32 weight = 282149496;
        Parameters:
        value - The weight to set.
        Returns:
        This builder for chaining.
      • clearWeight

        public WeightedBackendService.Builder clearWeight()
         Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000.
         
        optional uint32 weight = 282149496;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final WeightedBackendService.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
      • mergeUnknownFields

        public final WeightedBackendService.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>