Class ProductSearchParams.Builder

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

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

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

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

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

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

        public ProductSearchParams.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<ProductSearchParams.Builder>
      • clearField

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

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

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

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

        public ProductSearchParams.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<ProductSearchParams.Builder>
      • isInitialized

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

        public ProductSearchParams.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<ProductSearchParams.Builder>
        Throws:
        IOException
      • hasBoundingPoly

        public boolean hasBoundingPoly()
         The bounding polygon around the area of interest in the image.
         If it is not specified, system discretion will be applied.
         
        .google.cloud.vision.v1.BoundingPoly bounding_poly = 9;
        Specified by:
        hasBoundingPoly in interface ProductSearchParamsOrBuilder
        Returns:
        Whether the boundingPoly field is set.
      • getBoundingPoly

        public BoundingPoly getBoundingPoly()
         The bounding polygon around the area of interest in the image.
         If it is not specified, system discretion will be applied.
         
        .google.cloud.vision.v1.BoundingPoly bounding_poly = 9;
        Specified by:
        getBoundingPoly in interface ProductSearchParamsOrBuilder
        Returns:
        The boundingPoly.
      • setBoundingPoly

        public ProductSearchParams.Builder setBoundingPoly​(BoundingPoly value)
         The bounding polygon around the area of interest in the image.
         If it is not specified, system discretion will be applied.
         
        .google.cloud.vision.v1.BoundingPoly bounding_poly = 9;
      • setBoundingPoly

        public ProductSearchParams.Builder setBoundingPoly​(BoundingPoly.Builder builderForValue)
         The bounding polygon around the area of interest in the image.
         If it is not specified, system discretion will be applied.
         
        .google.cloud.vision.v1.BoundingPoly bounding_poly = 9;
      • mergeBoundingPoly

        public ProductSearchParams.Builder mergeBoundingPoly​(BoundingPoly value)
         The bounding polygon around the area of interest in the image.
         If it is not specified, system discretion will be applied.
         
        .google.cloud.vision.v1.BoundingPoly bounding_poly = 9;
      • clearBoundingPoly

        public ProductSearchParams.Builder clearBoundingPoly()
         The bounding polygon around the area of interest in the image.
         If it is not specified, system discretion will be applied.
         
        .google.cloud.vision.v1.BoundingPoly bounding_poly = 9;
      • getBoundingPolyBuilder

        public BoundingPoly.Builder getBoundingPolyBuilder()
         The bounding polygon around the area of interest in the image.
         If it is not specified, system discretion will be applied.
         
        .google.cloud.vision.v1.BoundingPoly bounding_poly = 9;
      • getProductSet

        public String getProductSet()
         The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
        
         Format is:
         `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
         
        string product_set = 6 [(.google.api.resource_reference) = { ... }
        Specified by:
        getProductSet in interface ProductSearchParamsOrBuilder
        Returns:
        The productSet.
      • getProductSetBytes

        public com.google.protobuf.ByteString getProductSetBytes()
         The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
        
         Format is:
         `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
         
        string product_set = 6 [(.google.api.resource_reference) = { ... }
        Specified by:
        getProductSetBytes in interface ProductSearchParamsOrBuilder
        Returns:
        The bytes for productSet.
      • setProductSet

        public ProductSearchParams.Builder setProductSet​(String value)
         The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
        
         Format is:
         `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
         
        string product_set = 6 [(.google.api.resource_reference) = { ... }
        Parameters:
        value - The productSet to set.
        Returns:
        This builder for chaining.
      • clearProductSet

        public ProductSearchParams.Builder clearProductSet()
         The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
        
         Format is:
         `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
         
        string product_set = 6 [(.google.api.resource_reference) = { ... }
        Returns:
        This builder for chaining.
      • setProductSetBytes

        public ProductSearchParams.Builder setProductSetBytes​(com.google.protobuf.ByteString value)
         The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
        
         Format is:
         `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
         
        string product_set = 6 [(.google.api.resource_reference) = { ... }
        Parameters:
        value - The bytes for productSet to set.
        Returns:
        This builder for chaining.
      • getProductCategoriesList

        public com.google.protobuf.ProtocolStringList getProductCategoriesList()
         The list of product categories to search in. Currently, we only consider
         the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
         "packagedgoods-v1", or "general-v1" should be specified. The legacy
         categories "homegoods", "apparel", and "toys" are still supported but will
         be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
         or "toys-v2" for better product search accuracy. It is recommended to
         migrate existing products to these categories as well.
         
        repeated string product_categories = 7;
        Specified by:
        getProductCategoriesList in interface ProductSearchParamsOrBuilder
        Returns:
        A list containing the productCategories.
      • getProductCategoriesCount

        public int getProductCategoriesCount()
         The list of product categories to search in. Currently, we only consider
         the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
         "packagedgoods-v1", or "general-v1" should be specified. The legacy
         categories "homegoods", "apparel", and "toys" are still supported but will
         be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
         or "toys-v2" for better product search accuracy. It is recommended to
         migrate existing products to these categories as well.
         
        repeated string product_categories = 7;
        Specified by:
        getProductCategoriesCount in interface ProductSearchParamsOrBuilder
        Returns:
        The count of productCategories.
      • getProductCategories

        public String getProductCategories​(int index)
         The list of product categories to search in. Currently, we only consider
         the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
         "packagedgoods-v1", or "general-v1" should be specified. The legacy
         categories "homegoods", "apparel", and "toys" are still supported but will
         be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
         or "toys-v2" for better product search accuracy. It is recommended to
         migrate existing products to these categories as well.
         
        repeated string product_categories = 7;
        Specified by:
        getProductCategories in interface ProductSearchParamsOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The productCategories at the given index.
      • getProductCategoriesBytes

        public com.google.protobuf.ByteString getProductCategoriesBytes​(int index)
         The list of product categories to search in. Currently, we only consider
         the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
         "packagedgoods-v1", or "general-v1" should be specified. The legacy
         categories "homegoods", "apparel", and "toys" are still supported but will
         be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
         or "toys-v2" for better product search accuracy. It is recommended to
         migrate existing products to these categories as well.
         
        repeated string product_categories = 7;
        Specified by:
        getProductCategoriesBytes in interface ProductSearchParamsOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the productCategories at the given index.
      • setProductCategories

        public ProductSearchParams.Builder setProductCategories​(int index,
                                                                String value)
         The list of product categories to search in. Currently, we only consider
         the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
         "packagedgoods-v1", or "general-v1" should be specified. The legacy
         categories "homegoods", "apparel", and "toys" are still supported but will
         be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
         or "toys-v2" for better product search accuracy. It is recommended to
         migrate existing products to these categories as well.
         
        repeated string product_categories = 7;
        Parameters:
        index - The index to set the value at.
        value - The productCategories to set.
        Returns:
        This builder for chaining.
      • addProductCategories

        public ProductSearchParams.Builder addProductCategories​(String value)
         The list of product categories to search in. Currently, we only consider
         the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
         "packagedgoods-v1", or "general-v1" should be specified. The legacy
         categories "homegoods", "apparel", and "toys" are still supported but will
         be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
         or "toys-v2" for better product search accuracy. It is recommended to
         migrate existing products to these categories as well.
         
        repeated string product_categories = 7;
        Parameters:
        value - The productCategories to add.
        Returns:
        This builder for chaining.
      • addAllProductCategories

        public ProductSearchParams.Builder addAllProductCategories​(Iterable<String> values)
         The list of product categories to search in. Currently, we only consider
         the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
         "packagedgoods-v1", or "general-v1" should be specified. The legacy
         categories "homegoods", "apparel", and "toys" are still supported but will
         be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
         or "toys-v2" for better product search accuracy. It is recommended to
         migrate existing products to these categories as well.
         
        repeated string product_categories = 7;
        Parameters:
        values - The productCategories to add.
        Returns:
        This builder for chaining.
      • clearProductCategories

        public ProductSearchParams.Builder clearProductCategories()
         The list of product categories to search in. Currently, we only consider
         the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
         "packagedgoods-v1", or "general-v1" should be specified. The legacy
         categories "homegoods", "apparel", and "toys" are still supported but will
         be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
         or "toys-v2" for better product search accuracy. It is recommended to
         migrate existing products to these categories as well.
         
        repeated string product_categories = 7;
        Returns:
        This builder for chaining.
      • addProductCategoriesBytes

        public ProductSearchParams.Builder addProductCategoriesBytes​(com.google.protobuf.ByteString value)
         The list of product categories to search in. Currently, we only consider
         the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
         "packagedgoods-v1", or "general-v1" should be specified. The legacy
         categories "homegoods", "apparel", and "toys" are still supported but will
         be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
         or "toys-v2" for better product search accuracy. It is recommended to
         migrate existing products to these categories as well.
         
        repeated string product_categories = 7;
        Parameters:
        value - The bytes of the productCategories to add.
        Returns:
        This builder for chaining.
      • getFilter

        public String getFilter()
         The filtering expression. This can be used to restrict search results based
         on Product labels. We currently support an AND of OR of key-value
         expressions, where each expression within an OR must have the same key. An
         '=' should be used to connect the key and value.
        
         For example, "(color = red OR color = blue) AND brand = Google" is
         acceptable, but "(color = red OR brand = Google)" is not acceptable.
         "color: red" is not acceptable because it uses a ':' instead of an '='.
         
        string filter = 8;
        Specified by:
        getFilter in interface ProductSearchParamsOrBuilder
        Returns:
        The filter.
      • getFilterBytes

        public com.google.protobuf.ByteString getFilterBytes()
         The filtering expression. This can be used to restrict search results based
         on Product labels. We currently support an AND of OR of key-value
         expressions, where each expression within an OR must have the same key. An
         '=' should be used to connect the key and value.
        
         For example, "(color = red OR color = blue) AND brand = Google" is
         acceptable, but "(color = red OR brand = Google)" is not acceptable.
         "color: red" is not acceptable because it uses a ':' instead of an '='.
         
        string filter = 8;
        Specified by:
        getFilterBytes in interface ProductSearchParamsOrBuilder
        Returns:
        The bytes for filter.
      • setFilter

        public ProductSearchParams.Builder setFilter​(String value)
         The filtering expression. This can be used to restrict search results based
         on Product labels. We currently support an AND of OR of key-value
         expressions, where each expression within an OR must have the same key. An
         '=' should be used to connect the key and value.
        
         For example, "(color = red OR color = blue) AND brand = Google" is
         acceptable, but "(color = red OR brand = Google)" is not acceptable.
         "color: red" is not acceptable because it uses a ':' instead of an '='.
         
        string filter = 8;
        Parameters:
        value - The filter to set.
        Returns:
        This builder for chaining.
      • clearFilter

        public ProductSearchParams.Builder clearFilter()
         The filtering expression. This can be used to restrict search results based
         on Product labels. We currently support an AND of OR of key-value
         expressions, where each expression within an OR must have the same key. An
         '=' should be used to connect the key and value.
        
         For example, "(color = red OR color = blue) AND brand = Google" is
         acceptable, but "(color = red OR brand = Google)" is not acceptable.
         "color: red" is not acceptable because it uses a ':' instead of an '='.
         
        string filter = 8;
        Returns:
        This builder for chaining.
      • setFilterBytes

        public ProductSearchParams.Builder setFilterBytes​(com.google.protobuf.ByteString value)
         The filtering expression. This can be used to restrict search results based
         on Product labels. We currently support an AND of OR of key-value
         expressions, where each expression within an OR must have the same key. An
         '=' should be used to connect the key and value.
        
         For example, "(color = red OR color = blue) AND brand = Google" is
         acceptable, but "(color = red OR brand = Google)" is not acceptable.
         "color: red" is not acceptable because it uses a ':' instead of an '='.
         
        string filter = 8;
        Parameters:
        value - The bytes for filter to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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