public static final class ProductAttributes.PetPolicy.Builder extends GeneratedMessage.Builder<ProductAttributes.PetPolicy.Builder> implements ProductAttributes.PetPolicyOrBuilderThe pet policy of the property.
Protobuf type google.shopping.merchant.products.v1.ProductAttributes.PetPolicy
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > ProductAttributes.PetPolicy.BuilderImplements
ProductAttributes.PetPolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllPetTypes(Iterable<? extends ProductAttributes.PetPolicy.PetType> values)
public ProductAttributes.PetPolicy.Builder addAllPetTypes(Iterable<? extends ProductAttributes.PetPolicy.PetType> values)The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType>The petTypes to add. |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
This builder for chaining. |
addAllPetTypesValue(Iterable<Integer> values)
public ProductAttributes.PetPolicy.Builder addAllPetTypesValue(Iterable<Integer> values)The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<Integer>The enum numeric values on the wire for petTypes to add. |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
This builder for chaining. |
addPetTypes(ProductAttributes.PetPolicy.PetType value)
public ProductAttributes.PetPolicy.Builder addPetTypes(ProductAttributes.PetPolicy.PetType value)The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
ProductAttributes.PetPolicy.PetTypeThe petTypes to add. |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
This builder for chaining. |
addPetTypesValue(int value)
public ProductAttributes.PetPolicy.Builder addPetTypesValue(int value)The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for petTypes to add. |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
This builder for chaining. |
build()
public ProductAttributes.PetPolicy build()| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy |
|
buildPartial()
public ProductAttributes.PetPolicy buildPartial()| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy |
|
clear()
public ProductAttributes.PetPolicy.Builder clear()| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
|
clearPetTypes()
public ProductAttributes.PetPolicy.Builder clearPetTypes()The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
This builder for chaining. |
clearPetsAllowed()
public ProductAttributes.PetPolicy.Builder clearPetsAllowed()Whether pets are allowed.
bool pets_allowed = 1;
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public ProductAttributes.PetPolicy getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getPetTypes(int index)
public ProductAttributes.PetPolicy.PetType getPetTypes(int index)The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.PetType |
The petTypes at the given index. |
getPetTypesCount()
public int getPetTypesCount()The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Returns | |
|---|---|
| Type | Description |
int |
The count of petTypes. |
getPetTypesList()
public List<ProductAttributes.PetPolicy.PetType> getPetTypesList()The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Returns | |
|---|---|
| Type | Description |
List<PetType> |
A list containing the petTypes. |
getPetTypesValue(int index)
public int getPetTypesValue(int index)The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire of petTypes at the given index. |
getPetTypesValueList()
public List<Integer> getPetTypesValueList()The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Returns | |
|---|---|
| Type | Description |
List<Integer> |
A list containing the enum numeric values on the wire for petTypes. |
getPetsAllowed()
public boolean getPetsAllowed()Whether pets are allowed.
bool pets_allowed = 1;
| Returns | |
|---|---|
| Type | Description |
boolean |
The petsAllowed. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ProductAttributes.PetPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public ProductAttributes.PetPolicy.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
|
mergeFrom(ProductAttributes.PetPolicy other)
public ProductAttributes.PetPolicy.Builder mergeFrom(ProductAttributes.PetPolicy other)| Parameter | |
|---|---|
| Name | Description |
other |
ProductAttributes.PetPolicy |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
|
setPetTypes(int index, ProductAttributes.PetPolicy.PetType value)
public ProductAttributes.PetPolicy.Builder setPetTypes(int index, ProductAttributes.PetPolicy.PetType value)The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
ProductAttributes.PetPolicy.PetTypeThe petTypes to set. |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
This builder for chaining. |
setPetTypesValue(int index, int value)
public ProductAttributes.PetPolicy.Builder setPetTypesValue(int index, int value)The pet types allowed.
repeated .google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType pet_types = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
intThe enum numeric value on the wire for petTypes to set. |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
This builder for chaining. |
setPetsAllowed(boolean value)
public ProductAttributes.PetPolicy.Builder setPetsAllowed(boolean value)Whether pets are allowed.
bool pets_allowed = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
booleanThe petsAllowed to set. |
| Returns | |
|---|---|
| Type | Description |
ProductAttributes.PetPolicy.Builder |
This builder for chaining. |