Class ListProductsResponse.Builder (2.38.0)

public static final class ListProductsResponse.Builder extends GeneratedMessageV3.Builder<ListProductsResponse.Builder> implements ListProductsResponseOrBuilder

Response message for ProductService.ListProducts method.

Protobuf type google.cloud.retail.v2alpha.ListProductsResponse

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllProducts(Iterable<? extends Product> values)

public ListProductsResponse.Builder addAllProducts(Iterable<? extends Product> values)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.retail.v2alpha.Product>
Returns
TypeDescription
ListProductsResponse.Builder

addProducts(Product value)

public ListProductsResponse.Builder addProducts(Product value)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameter
NameDescription
valueProduct
Returns
TypeDescription
ListProductsResponse.Builder

addProducts(Product.Builder builderForValue)

public ListProductsResponse.Builder addProducts(Product.Builder builderForValue)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameter
NameDescription
builderForValueProduct.Builder
Returns
TypeDescription
ListProductsResponse.Builder

addProducts(int index, Product value)

public ListProductsResponse.Builder addProducts(int index, Product value)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameters
NameDescription
indexint
valueProduct
Returns
TypeDescription
ListProductsResponse.Builder

addProducts(int index, Product.Builder builderForValue)

public ListProductsResponse.Builder addProducts(int index, Product.Builder builderForValue)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameters
NameDescription
indexint
builderForValueProduct.Builder
Returns
TypeDescription
ListProductsResponse.Builder

addProductsBuilder()

public Product.Builder addProductsBuilder()

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Returns
TypeDescription
Product.Builder

addProductsBuilder(int index)

public Product.Builder addProductsBuilder(int index)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Product.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ListProductsResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ListProductsResponse.Builder
Overrides

build()

public ListProductsResponse build()
Returns
TypeDescription
ListProductsResponse

buildPartial()

public ListProductsResponse buildPartial()
Returns
TypeDescription
ListProductsResponse

clear()

public ListProductsResponse.Builder clear()
Returns
TypeDescription
ListProductsResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ListProductsResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ListProductsResponse.Builder
Overrides

clearNextPageToken()

public ListProductsResponse.Builder clearNextPageToken()

A token that can be sent as ListProductsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

string next_page_token = 2;

Returns
TypeDescription
ListProductsResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ListProductsResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ListProductsResponse.Builder
Overrides

clearProducts()

public ListProductsResponse.Builder clearProducts()

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Returns
TypeDescription
ListProductsResponse.Builder

clearTotalSize()

public ListProductsResponse.Builder clearTotalSize()

The total count of matched Products irrespective of pagination. The total number of Products returned by pagination may be less than the total_size that matches.

This field is ignored if ListProductsRequest.require_total_size is not set or ListProductsRequest.page_token is not empty.

int32 total_size = 3;

Returns
TypeDescription
ListProductsResponse.Builder

This builder for chaining.

clone()

public ListProductsResponse.Builder clone()
Returns
TypeDescription
ListProductsResponse.Builder
Overrides

getDefaultInstanceForType()

public ListProductsResponse getDefaultInstanceForType()
Returns
TypeDescription
ListProductsResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getNextPageToken()

public String getNextPageToken()

A token that can be sent as ListProductsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

string next_page_token = 2;

Returns
TypeDescription
String

The nextPageToken.

getNextPageTokenBytes()

public ByteString getNextPageTokenBytes()

A token that can be sent as ListProductsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

string next_page_token = 2;

Returns
TypeDescription
ByteString

The bytes for nextPageToken.

getProducts(int index)

public Product getProducts(int index)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Product

getProductsBuilder(int index)

public Product.Builder getProductsBuilder(int index)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Product.Builder

getProductsBuilderList()

public List<Product.Builder> getProductsBuilderList()

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Returns
TypeDescription
List<Builder>

getProductsCount()

public int getProductsCount()

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Returns
TypeDescription
int

getProductsList()

public List<Product> getProductsList()

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Returns
TypeDescription
List<Product>

getProductsOrBuilder(int index)

public ProductOrBuilder getProductsOrBuilder(int index)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ProductOrBuilder

getProductsOrBuilderList()

public List<? extends ProductOrBuilder> getProductsOrBuilderList()

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Returns
TypeDescription
List<? extends com.google.cloud.retail.v2alpha.ProductOrBuilder>

getTotalSize()

public int getTotalSize()

The total count of matched Products irrespective of pagination. The total number of Products returned by pagination may be less than the total_size that matches.

This field is ignored if ListProductsRequest.require_total_size is not set or ListProductsRequest.page_token is not empty.

int32 total_size = 3;

Returns
TypeDescription
int

The totalSize.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ListProductsResponse other)

public ListProductsResponse.Builder mergeFrom(ListProductsResponse other)
Parameter
NameDescription
otherListProductsResponse
Returns
TypeDescription
ListProductsResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ListProductsResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ListProductsResponse.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ListProductsResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ListProductsResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ListProductsResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ListProductsResponse.Builder
Overrides

removeProducts(int index)

public ListProductsResponse.Builder removeProducts(int index)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ListProductsResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ListProductsResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ListProductsResponse.Builder
Overrides

setNextPageToken(String value)

public ListProductsResponse.Builder setNextPageToken(String value)

A token that can be sent as ListProductsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

string next_page_token = 2;

Parameter
NameDescription
valueString

The nextPageToken to set.

Returns
TypeDescription
ListProductsResponse.Builder

This builder for chaining.

setNextPageTokenBytes(ByteString value)

public ListProductsResponse.Builder setNextPageTokenBytes(ByteString value)

A token that can be sent as ListProductsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

string next_page_token = 2;

Parameter
NameDescription
valueByteString

The bytes for nextPageToken to set.

Returns
TypeDescription
ListProductsResponse.Builder

This builder for chaining.

setProducts(int index, Product value)

public ListProductsResponse.Builder setProducts(int index, Product value)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameters
NameDescription
indexint
valueProduct
Returns
TypeDescription
ListProductsResponse.Builder

setProducts(int index, Product.Builder builderForValue)

public ListProductsResponse.Builder setProducts(int index, Product.Builder builderForValue)

The Products.

repeated .google.cloud.retail.v2alpha.Product products = 1;

Parameters
NameDescription
indexint
builderForValueProduct.Builder
Returns
TypeDescription
ListProductsResponse.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ListProductsResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ListProductsResponse.Builder
Overrides

setTotalSize(int value)

public ListProductsResponse.Builder setTotalSize(int value)

The total count of matched Products irrespective of pagination. The total number of Products returned by pagination may be less than the total_size that matches.

This field is ignored if ListProductsRequest.require_total_size is not set or ListProductsRequest.page_token is not empty.

int32 total_size = 3;

Parameter
NameDescription
valueint

The totalSize to set.

Returns
TypeDescription
ListProductsResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ListProductsResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ListProductsResponse.Builder
Overrides