Class RoutingParameter.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
com.google.api.RoutingParameter.Builder
All Implemented Interfaces:
RoutingParameterOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
RoutingParameter

public static final class RoutingParameter.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder> implements RoutingParameterOrBuilder
 A projection from an input message to the GRPC or REST header.
 
Protobuf type google.api.RoutingParameter
  • Method Details

    • 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<RoutingParameter.Builder>
    • clear

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

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

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

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

      public RoutingParameter.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<RoutingParameter.Builder>
    • setField

      public RoutingParameter.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
    • clearField

      public RoutingParameter.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<RoutingParameter.Builder>
    • clearOneof

      public RoutingParameter.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<RoutingParameter.Builder>
    • setRepeatedField

      public RoutingParameter.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<RoutingParameter.Builder>
    • addRepeatedField

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

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

      public RoutingParameter.Builder mergeFrom(RoutingParameter other)
    • isInitialized

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

      public RoutingParameter.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<RoutingParameter.Builder>
      Throws:
      IOException
    • getField

      public String getField()
       A request field to extract the header key-value pair from.
       
      string field = 1;
      Specified by:
      getField in interface RoutingParameterOrBuilder
      Returns:
      The field.
    • getFieldBytes

      public com.google.protobuf.ByteString getFieldBytes()
       A request field to extract the header key-value pair from.
       
      string field = 1;
      Specified by:
      getFieldBytes in interface RoutingParameterOrBuilder
      Returns:
      The bytes for field.
    • setField

      public RoutingParameter.Builder setField(String value)
       A request field to extract the header key-value pair from.
       
      string field = 1;
      Parameters:
      value - The field to set.
      Returns:
      This builder for chaining.
    • clearField

      public RoutingParameter.Builder clearField()
       A request field to extract the header key-value pair from.
       
      string field = 1;
      Returns:
      This builder for chaining.
    • setFieldBytes

      public RoutingParameter.Builder setFieldBytes(com.google.protobuf.ByteString value)
       A request field to extract the header key-value pair from.
       
      string field = 1;
      Parameters:
      value - The bytes for field to set.
      Returns:
      This builder for chaining.
    • getPathTemplate

      public String getPathTemplate()
       A pattern matching the key-value field. Optional.
       If not specified, the whole field specified in the `field` field will be
       taken as value, and its name used as key. If specified, it MUST contain
       exactly one named segment (along with any number of unnamed segments) The
       pattern will be matched over the field specified in the `field` field, then
       if the match is successful:
       - the name of the single named segment will be used as a header name,
       - the match value of the segment will be used as a header value;
       if the match is NOT successful, nothing will be sent.
       Example:
                     -- This is a field in the request message
                    |   that the header value will be extracted from.
                    |
                    |                     -- This is the key name in the
                    |                    |   routing header.
                    V                    |
           field: "table_name"           v
           path_template: "projects/*/{table_location=instances/*}/tables/*"
                                                      ^            ^
                                                      |            |
             In the {} brackets is the pattern that --             |
             specifies what to extract from the                    |
             field as a value to be sent.                          |
                                                                   |
            The string in the field must match the whole pattern --
            before brackets, inside brackets, after brackets.
       When looking at this specific example, we can see that:
       - A key-value pair with the key `table_location`
         and the value matching `instances/*` should be added
         to the x-goog-request-params routing header.
       - The value is extracted from the request message's `table_name` field
         if it matches the full pattern specified:
         `projects/*/instances/*/tables/*`.
       **NB:** If the `path_template` field is not provided, the key name is
       equal to the field name, and the whole field should be sent as a value.
       This makes the pattern for the field and the value functionally equivalent
       to `**`, and the configuration
           {
             field: "table_name"
           }
       is a functionally equivalent shorthand to:
           {
             field: "table_name"
             path_template: "{table_name=**}"
           }
       See Example 1 for more details.
       
      string path_template = 2;
      Specified by:
      getPathTemplate in interface RoutingParameterOrBuilder
      Returns:
      The pathTemplate.
    • getPathTemplateBytes

      public com.google.protobuf.ByteString getPathTemplateBytes()
       A pattern matching the key-value field. Optional.
       If not specified, the whole field specified in the `field` field will be
       taken as value, and its name used as key. If specified, it MUST contain
       exactly one named segment (along with any number of unnamed segments) The
       pattern will be matched over the field specified in the `field` field, then
       if the match is successful:
       - the name of the single named segment will be used as a header name,
       - the match value of the segment will be used as a header value;
       if the match is NOT successful, nothing will be sent.
       Example:
                     -- This is a field in the request message
                    |   that the header value will be extracted from.
                    |
                    |                     -- This is the key name in the
                    |                    |   routing header.
                    V                    |
           field: "table_name"           v
           path_template: "projects/*/{table_location=instances/*}/tables/*"
                                                      ^            ^
                                                      |            |
             In the {} brackets is the pattern that --             |
             specifies what to extract from the                    |
             field as a value to be sent.                          |
                                                                   |
            The string in the field must match the whole pattern --
            before brackets, inside brackets, after brackets.
       When looking at this specific example, we can see that:
       - A key-value pair with the key `table_location`
         and the value matching `instances/*` should be added
         to the x-goog-request-params routing header.
       - The value is extracted from the request message's `table_name` field
         if it matches the full pattern specified:
         `projects/*/instances/*/tables/*`.
       **NB:** If the `path_template` field is not provided, the key name is
       equal to the field name, and the whole field should be sent as a value.
       This makes the pattern for the field and the value functionally equivalent
       to `**`, and the configuration
           {
             field: "table_name"
           }
       is a functionally equivalent shorthand to:
           {
             field: "table_name"
             path_template: "{table_name=**}"
           }
       See Example 1 for more details.
       
      string path_template = 2;
      Specified by:
      getPathTemplateBytes in interface RoutingParameterOrBuilder
      Returns:
      The bytes for pathTemplate.
    • setPathTemplate

      public RoutingParameter.Builder setPathTemplate(String value)
       A pattern matching the key-value field. Optional.
       If not specified, the whole field specified in the `field` field will be
       taken as value, and its name used as key. If specified, it MUST contain
       exactly one named segment (along with any number of unnamed segments) The
       pattern will be matched over the field specified in the `field` field, then
       if the match is successful:
       - the name of the single named segment will be used as a header name,
       - the match value of the segment will be used as a header value;
       if the match is NOT successful, nothing will be sent.
       Example:
                     -- This is a field in the request message
                    |   that the header value will be extracted from.
                    |
                    |                     -- This is the key name in the
                    |                    |   routing header.
                    V                    |
           field: "table_name"           v
           path_template: "projects/*/{table_location=instances/*}/tables/*"
                                                      ^            ^
                                                      |            |
             In the {} brackets is the pattern that --             |
             specifies what to extract from the                    |
             field as a value to be sent.                          |
                                                                   |
            The string in the field must match the whole pattern --
            before brackets, inside brackets, after brackets.
       When looking at this specific example, we can see that:
       - A key-value pair with the key `table_location`
         and the value matching `instances/*` should be added
         to the x-goog-request-params routing header.
       - The value is extracted from the request message's `table_name` field
         if it matches the full pattern specified:
         `projects/*/instances/*/tables/*`.
       **NB:** If the `path_template` field is not provided, the key name is
       equal to the field name, and the whole field should be sent as a value.
       This makes the pattern for the field and the value functionally equivalent
       to `**`, and the configuration
           {
             field: "table_name"
           }
       is a functionally equivalent shorthand to:
           {
             field: "table_name"
             path_template: "{table_name=**}"
           }
       See Example 1 for more details.
       
      string path_template = 2;
      Parameters:
      value - The pathTemplate to set.
      Returns:
      This builder for chaining.
    • clearPathTemplate

      public RoutingParameter.Builder clearPathTemplate()
       A pattern matching the key-value field. Optional.
       If not specified, the whole field specified in the `field` field will be
       taken as value, and its name used as key. If specified, it MUST contain
       exactly one named segment (along with any number of unnamed segments) The
       pattern will be matched over the field specified in the `field` field, then
       if the match is successful:
       - the name of the single named segment will be used as a header name,
       - the match value of the segment will be used as a header value;
       if the match is NOT successful, nothing will be sent.
       Example:
                     -- This is a field in the request message
                    |   that the header value will be extracted from.
                    |
                    |                     -- This is the key name in the
                    |                    |   routing header.
                    V                    |
           field: "table_name"           v
           path_template: "projects/*/{table_location=instances/*}/tables/*"
                                                      ^            ^
                                                      |            |
             In the {} brackets is the pattern that --             |
             specifies what to extract from the                    |
             field as a value to be sent.                          |
                                                                   |
            The string in the field must match the whole pattern --
            before brackets, inside brackets, after brackets.
       When looking at this specific example, we can see that:
       - A key-value pair with the key `table_location`
         and the value matching `instances/*` should be added
         to the x-goog-request-params routing header.
       - The value is extracted from the request message's `table_name` field
         if it matches the full pattern specified:
         `projects/*/instances/*/tables/*`.
       **NB:** If the `path_template` field is not provided, the key name is
       equal to the field name, and the whole field should be sent as a value.
       This makes the pattern for the field and the value functionally equivalent
       to `**`, and the configuration
           {
             field: "table_name"
           }
       is a functionally equivalent shorthand to:
           {
             field: "table_name"
             path_template: "{table_name=**}"
           }
       See Example 1 for more details.
       
      string path_template = 2;
      Returns:
      This builder for chaining.
    • setPathTemplateBytes

      public RoutingParameter.Builder setPathTemplateBytes(com.google.protobuf.ByteString value)
       A pattern matching the key-value field. Optional.
       If not specified, the whole field specified in the `field` field will be
       taken as value, and its name used as key. If specified, it MUST contain
       exactly one named segment (along with any number of unnamed segments) The
       pattern will be matched over the field specified in the `field` field, then
       if the match is successful:
       - the name of the single named segment will be used as a header name,
       - the match value of the segment will be used as a header value;
       if the match is NOT successful, nothing will be sent.
       Example:
                     -- This is a field in the request message
                    |   that the header value will be extracted from.
                    |
                    |                     -- This is the key name in the
                    |                    |   routing header.
                    V                    |
           field: "table_name"           v
           path_template: "projects/*/{table_location=instances/*}/tables/*"
                                                      ^            ^
                                                      |            |
             In the {} brackets is the pattern that --             |
             specifies what to extract from the                    |
             field as a value to be sent.                          |
                                                                   |
            The string in the field must match the whole pattern --
            before brackets, inside brackets, after brackets.
       When looking at this specific example, we can see that:
       - A key-value pair with the key `table_location`
         and the value matching `instances/*` should be added
         to the x-goog-request-params routing header.
       - The value is extracted from the request message's `table_name` field
         if it matches the full pattern specified:
         `projects/*/instances/*/tables/*`.
       **NB:** If the `path_template` field is not provided, the key name is
       equal to the field name, and the whole field should be sent as a value.
       This makes the pattern for the field and the value functionally equivalent
       to `**`, and the configuration
           {
             field: "table_name"
           }
       is a functionally equivalent shorthand to:
           {
             field: "table_name"
             path_template: "{table_name=**}"
           }
       See Example 1 for more details.
       
      string path_template = 2;
      Parameters:
      value - The bytes for pathTemplate to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final RoutingParameter.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<RoutingParameter.Builder>
    • mergeUnknownFields

      public final RoutingParameter.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<RoutingParameter.Builder>