Constants
ImageService_GenerateProductImageBackground_FullMethodName, ImageService_RemoveProductImageBackground_FullMethodName, ImageService_UpscaleProductImage_FullMethodName
const (
ImageService_GenerateProductImageBackground_FullMethodName = "/google.shopping.merchant.productstudio.v1alpha.ImageService/GenerateProductImageBackground"
ImageService_RemoveProductImageBackground_FullMethodName = "/google.shopping.merchant.productstudio.v1alpha.ImageService/RemoveProductImageBackground"
ImageService_UpscaleProductImage_FullMethodName = "/google.shopping.merchant.productstudio.v1alpha.ImageService/UpscaleProductImage"
)TextSuggestionsService_GenerateProductTextSuggestions_FullMethodName
const (
TextSuggestionsService_GenerateProductTextSuggestions_FullMethodName = "/google.shopping.merchant.productstudio.v1alpha.TextSuggestionsService/GenerateProductTextSuggestions"
)Variables
File_google_shopping_merchant_productstudio_v1alpha_image_proto
var File_google_shopping_merchant_productstudio_v1alpha_image_proto protoreflect.FileDescriptorFile_google_shopping_merchant_productstudio_v1alpha_productstudio_common_proto
var File_google_shopping_merchant_productstudio_v1alpha_productstudio_common_proto protoreflect.FileDescriptorFile_google_shopping_merchant_productstudio_v1alpha_textsuggestions_proto
var File_google_shopping_merchant_productstudio_v1alpha_textsuggestions_proto protoreflect.FileDescriptorImageService_ServiceDesc
var ImageService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.shopping.merchant.productstudio.v1alpha.ImageService",
HandlerType: (*ImageServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GenerateProductImageBackground",
Handler: _ImageService_GenerateProductImageBackground_Handler,
},
{
MethodName: "RemoveProductImageBackground",
Handler: _ImageService_RemoveProductImageBackground_Handler,
},
{
MethodName: "UpscaleProductImage",
Handler: _ImageService_UpscaleProductImage_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/shopping/merchant/productstudio/v1alpha/image.proto",
}ImageService_ServiceDesc is the grpc.ServiceDesc for ImageService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
TextSuggestionsService_ServiceDesc
var TextSuggestionsService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.shopping.merchant.productstudio.v1alpha.TextSuggestionsService",
HandlerType: (*TextSuggestionsServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GenerateProductTextSuggestions",
Handler: _TextSuggestionsService_GenerateProductTextSuggestions_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/shopping/merchant/productstudio/v1alpha/textsuggestions.proto",
}TextSuggestionsService_ServiceDesc is the grpc.ServiceDesc for TextSuggestionsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions
func RegisterImageServiceServer
func RegisterImageServiceServer(s grpc.ServiceRegistrar, srv ImageServiceServer)func RegisterTextSuggestionsServiceServer
func RegisterTextSuggestionsServiceServer(s grpc.ServiceRegistrar, srv TextSuggestionsServiceServer)GenerateImageBackgroundConfig
type GenerateImageBackgroundConfig struct {
// Required. Example: "Hat on a baseball field"
// "Hat" = product description
// Description of product.
ProductDescription string `protobuf:"bytes,1,opt,name=product_description,json=productDescription,proto3" json:"product_description,omitempty"`
// Required. Example: "Hat on a baseball field"
// "on a baseball field" = background description
// Description of wanted background.
BackgroundDescription string `protobuf:"bytes,2,opt,name=background_description,json=backgroundDescription,proto3" json:"background_description,omitempty"`
// contains filtered or unexported fields
}Client provided input configuration for generating the background.
func (*GenerateImageBackgroundConfig) Descriptor
func (*GenerateImageBackgroundConfig) Descriptor() ([]byte, []int)Deprecated: Use GenerateImageBackgroundConfig.ProtoReflect.Descriptor instead.
func (*GenerateImageBackgroundConfig) GetBackgroundDescription
func (x *GenerateImageBackgroundConfig) GetBackgroundDescription() stringfunc (*GenerateImageBackgroundConfig) GetProductDescription
func (x *GenerateImageBackgroundConfig) GetProductDescription() stringfunc (*GenerateImageBackgroundConfig) ProtoMessage
func (*GenerateImageBackgroundConfig) ProtoMessage()func (*GenerateImageBackgroundConfig) ProtoReflect
func (x *GenerateImageBackgroundConfig) ProtoReflect() protoreflect.Messagefunc (*GenerateImageBackgroundConfig) Reset
func (x *GenerateImageBackgroundConfig) Reset()func (*GenerateImageBackgroundConfig) String
func (x *GenerateImageBackgroundConfig) String() stringGenerateProductImageBackgroundRequest
type GenerateProductImageBackgroundRequest struct {
// Required. The account for which to generate an image. This acts as a
// container for the request and does not affect the generation itself.
// Format: accounts/{account}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. Configuration for how the output image should be returned.
OutputConfig *OutputImageConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
// Required. The input image.
InputImage *InputImage `protobuf:"bytes,3,opt,name=input_image,json=inputImage,proto3" json:"input_image,omitempty"`
// Required. Configuration parameters for the generation of the background.
Config *GenerateImageBackgroundConfig `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
// contains filtered or unexported fields
}Request message for the GenerateProductImageBackground method.
func (*GenerateProductImageBackgroundRequest) Descriptor
func (*GenerateProductImageBackgroundRequest) Descriptor() ([]byte, []int)Deprecated: Use GenerateProductImageBackgroundRequest.ProtoReflect.Descriptor instead.
func (*GenerateProductImageBackgroundRequest) GetConfig
func (x *GenerateProductImageBackgroundRequest) GetConfig() *GenerateImageBackgroundConfigfunc (*GenerateProductImageBackgroundRequest) GetInputImage
func (x *GenerateProductImageBackgroundRequest) GetInputImage() *InputImagefunc (*GenerateProductImageBackgroundRequest) GetName
func (x *GenerateProductImageBackgroundRequest) GetName() stringfunc (*GenerateProductImageBackgroundRequest) GetOutputConfig
func (x *GenerateProductImageBackgroundRequest) GetOutputConfig() *OutputImageConfigfunc (*GenerateProductImageBackgroundRequest) ProtoMessage
func (*GenerateProductImageBackgroundRequest) ProtoMessage()func (*GenerateProductImageBackgroundRequest) ProtoReflect
func (x *GenerateProductImageBackgroundRequest) ProtoReflect() protoreflect.Messagefunc (*GenerateProductImageBackgroundRequest) Reset
func (x *GenerateProductImageBackgroundRequest) Reset()func (*GenerateProductImageBackgroundRequest) String
func (x *GenerateProductImageBackgroundRequest) String() stringGenerateProductImageBackgroundResponse
type GenerateProductImageBackgroundResponse struct {
// The generated output image.
GeneratedImage *GeneratedImage `protobuf:"bytes,1,opt,name=generated_image,json=generatedImage,proto3" json:"generated_image,omitempty"`
// contains filtered or unexported fields
}Response message for the GenerateProductImageBackground method.
func (*GenerateProductImageBackgroundResponse) Descriptor
func (*GenerateProductImageBackgroundResponse) Descriptor() ([]byte, []int)Deprecated: Use GenerateProductImageBackgroundResponse.ProtoReflect.Descriptor instead.
func (*GenerateProductImageBackgroundResponse) GetGeneratedImage
func (x *GenerateProductImageBackgroundResponse) GetGeneratedImage() *GeneratedImagefunc (*GenerateProductImageBackgroundResponse) ProtoMessage
func (*GenerateProductImageBackgroundResponse) ProtoMessage()func (*GenerateProductImageBackgroundResponse) ProtoReflect
func (x *GenerateProductImageBackgroundResponse) ProtoReflect() protoreflect.Messagefunc (*GenerateProductImageBackgroundResponse) Reset
func (x *GenerateProductImageBackgroundResponse) Reset()func (*GenerateProductImageBackgroundResponse) String
func (x *GenerateProductImageBackgroundResponse) String() stringGenerateProductTextSuggestionsRequest
type GenerateProductTextSuggestionsRequest struct {
// Required. The name of the account to generate text suggestions for. This
// acts as a container for the request and does not affect the generation
// itself, as this is a stateless API. Format: accounts/{account}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. Available information about the product. Used to inform the genAI
// models.
ProductInfo *ProductInfo `protobuf:"bytes,2,opt,name=product_info,json=productInfo,proto3" json:"product_info,omitempty"`
// Optional. Configuration parameters that directly influence what content is
// generated, and how that content is rendered in the final response.
OutputSpec *OutputSpec `protobuf:"bytes,3,opt,name=output_spec,json=outputSpec,proto3,oneof" json:"output_spec,omitempty"`
// Optional. Provide some hand-crafted examples of title improvements that are
// unique to your use case. This is a general tool that handles multiple
// product categories, but your brand identity may require custom
// functionality. Feel free to specify that here.
TitleExamples []*TitleExample `protobuf:"bytes,4,rep,name=title_examples,json=titleExamples,proto3" json:"title_examples,omitempty"`
// contains filtered or unexported fields
}Request message for the GenerateProductTextSuggestions method.
func (*GenerateProductTextSuggestionsRequest) Descriptor
func (*GenerateProductTextSuggestionsRequest) Descriptor() ([]byte, []int)Deprecated: Use GenerateProductTextSuggestionsRequest.ProtoReflect.Descriptor instead.
func (*GenerateProductTextSuggestionsRequest) GetName
func (x *GenerateProductTextSuggestionsRequest) GetName() stringfunc (*GenerateProductTextSuggestionsRequest) GetOutputSpec
func (x *GenerateProductTextSuggestionsRequest) GetOutputSpec() *OutputSpecfunc (*GenerateProductTextSuggestionsRequest) GetProductInfo
func (x *GenerateProductTextSuggestionsRequest) GetProductInfo() *ProductInfofunc (*GenerateProductTextSuggestionsRequest) GetTitleExamples
func (x *GenerateProductTextSuggestionsRequest) GetTitleExamples() []*TitleExamplefunc (*GenerateProductTextSuggestionsRequest) ProtoMessage
func (*GenerateProductTextSuggestionsRequest) ProtoMessage()func (*GenerateProductTextSuggestionsRequest) ProtoReflect
func (x *GenerateProductTextSuggestionsRequest) ProtoReflect() protoreflect.Messagefunc (*GenerateProductTextSuggestionsRequest) Reset
func (x *GenerateProductTextSuggestionsRequest) Reset()func (*GenerateProductTextSuggestionsRequest) String
func (x *GenerateProductTextSuggestionsRequest) String() stringGenerateProductTextSuggestionsResponse
type GenerateProductTextSuggestionsResponse struct {
// Generated title suggestion.
Title *ProductTextGenerationSuggestion `protobuf:"bytes,1,opt,name=title,proto3,oneof" json:"title,omitempty"`
// Generated description suggestion.
Description *ProductTextGenerationSuggestion `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"`
// Any other generated attributes.
Attributes map[string]string `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Additional info that clients may want to audit surrounding the generation.
Metadata *ProductTextGenerationMetadata `protobuf:"bytes,4,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
// contains filtered or unexported fields
}Response message for the GenerateProductTextSuggestions method.
func (*GenerateProductTextSuggestionsResponse) Descriptor
func (*GenerateProductTextSuggestionsResponse) Descriptor() ([]byte, []int)Deprecated: Use GenerateProductTextSuggestionsResponse.ProtoReflect.Descriptor instead.
func (*GenerateProductTextSuggestionsResponse) GetAttributes
func (x *GenerateProductTextSuggestionsResponse) GetAttributes() map[string]stringfunc (*GenerateProductTextSuggestionsResponse) GetDescription
func (x *GenerateProductTextSuggestionsResponse) GetDescription() *ProductTextGenerationSuggestionfunc (*GenerateProductTextSuggestionsResponse) GetMetadata
func (x *GenerateProductTextSuggestionsResponse) GetMetadata() *ProductTextGenerationMetadatafunc (*GenerateProductTextSuggestionsResponse) GetTitle
func (x *GenerateProductTextSuggestionsResponse) GetTitle() *ProductTextGenerationSuggestionfunc (*GenerateProductTextSuggestionsResponse) ProtoMessage
func (*GenerateProductTextSuggestionsResponse) ProtoMessage()func (*GenerateProductTextSuggestionsResponse) ProtoReflect
func (x *GenerateProductTextSuggestionsResponse) ProtoReflect() protoreflect.Messagefunc (*GenerateProductTextSuggestionsResponse) Reset
func (x *GenerateProductTextSuggestionsResponse) Reset()func (*GenerateProductTextSuggestionsResponse) String
func (x *GenerateProductTextSuggestionsResponse) String() stringGeneratedImage
type GeneratedImage struct {
// The generated image.
//
// Types that are valid to be assigned to Image:
//
// *GeneratedImage_Uri
// *GeneratedImage_ImageBytes
Image isGeneratedImage_Image `protobuf_oneof:"image"`
// Identifier. The unique key for the image.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The timestamp when the image was generated.
GenerationTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=generation_time,json=generationTime,proto3" json:"generation_time,omitempty"`
// contains filtered or unexported fields
}Represents a generated image object.
func (*GeneratedImage) Descriptor
func (*GeneratedImage) Descriptor() ([]byte, []int)Deprecated: Use GeneratedImage.ProtoReflect.Descriptor instead.
func (*GeneratedImage) GetGenerationTime
func (x *GeneratedImage) GetGenerationTime() *timestamppb.Timestampfunc (*GeneratedImage) GetImage
func (x *GeneratedImage) GetImage() isGeneratedImage_Imagefunc (*GeneratedImage) GetImageBytes
func (x *GeneratedImage) GetImageBytes() []bytefunc (*GeneratedImage) GetName
func (x *GeneratedImage) GetName() stringfunc (*GeneratedImage) GetUri
func (x *GeneratedImage) GetUri() stringfunc (*GeneratedImage) ProtoMessage
func (*GeneratedImage) ProtoMessage()func (*GeneratedImage) ProtoReflect
func (x *GeneratedImage) ProtoReflect() protoreflect.Messagefunc (*GeneratedImage) Reset
func (x *GeneratedImage) Reset()func (*GeneratedImage) String
func (x *GeneratedImage) String() stringGeneratedImage_ImageBytes
type GeneratedImage_ImageBytes struct {
// Raw bytes for the image.
ImageBytes []byte `protobuf:"bytes,3,opt,name=image_bytes,json=imageBytes,proto3,oneof"`
}GeneratedImage_Uri
type GeneratedImage_Uri struct {
// Generally web-requestable URI of the generated image. This is a temporary
// URI and will expire after 6 months. A URI may not be populated
// immediately after generation. Use get or list api using image_id to get
// the URI.
Uri string `protobuf:"bytes,2,opt,name=uri,proto3,oneof"`
}Image
type Image struct {
// Required. The image to use for text generation.
//
// Types that are valid to be assigned to Image:
//
// *Image_Uri
// *Image_Data
Image isImage_Image `protobuf_oneof:"image"`
// contains filtered or unexported fields
}Product image represented as bytes directly or a URI.
func (*Image) Descriptor
Deprecated: Use Image.ProtoReflect.Descriptor instead.
func (*Image) GetData
func (*Image) GetImage
func (x *Image) GetImage() isImage_Imagefunc (*Image) GetUri
func (*Image) ProtoMessage
func (*Image) ProtoMessage()func (*Image) ProtoReflect
func (x *Image) ProtoReflect() protoreflect.Messagefunc (*Image) Reset
func (x *Image) Reset()func (*Image) String
ImageServiceClient
type ImageServiceClient interface {
// GenerateProductImageBackground generates a new image where the background
// of the original image is replaced by an AI generated scene based on
// provided product information and a text prompt.
GenerateProductImageBackground(ctx context.Context, in *GenerateProductImageBackgroundRequest, opts ...grpc.CallOption) (*GenerateProductImageBackgroundResponse, error)
// RemoveProductImageBackground generates a new image where the background of
// the original image is removed.
RemoveProductImageBackground(ctx context.Context, in *RemoveProductImageBackgroundRequest, opts ...grpc.CallOption) (*RemoveProductImageBackgroundResponse, error)
// UpscaleProductImage generates a new image where the resolution of the
// original image is enhanced.
UpscaleProductImage(ctx context.Context, in *UpscaleProductImageRequest, opts ...grpc.CallOption) (*UpscaleProductImageResponse, error)
}ImageServiceClient is the client API for ImageService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewImageServiceClient
func NewImageServiceClient(cc grpc.ClientConnInterface) ImageServiceClientImageServiceServer
type ImageServiceServer interface {
// GenerateProductImageBackground generates a new image where the background
// of the original image is replaced by an AI generated scene based on
// provided product information and a text prompt.
GenerateProductImageBackground(context.Context, *GenerateProductImageBackgroundRequest) (*GenerateProductImageBackgroundResponse, error)
// RemoveProductImageBackground generates a new image where the background of
// the original image is removed.
RemoveProductImageBackground(context.Context, *RemoveProductImageBackgroundRequest) (*RemoveProductImageBackgroundResponse, error)
// UpscaleProductImage generates a new image where the resolution of the
// original image is enhanced.
UpscaleProductImage(context.Context, *UpscaleProductImageRequest) (*UpscaleProductImageResponse, error)
}ImageServiceServer is the server API for ImageService service. All implementations should embed UnimplementedImageServiceServer for forward compatibility
Image_Data
type Image_Data struct {
// Raw bytes for the image.
Data []byte `protobuf:"bytes,2,opt,name=data,proto3,oneof"`
}Image_Uri
type Image_Uri struct {
// Generally web-requestable URI.
Uri string `protobuf:"bytes,1,opt,name=uri,proto3,oneof"`
}InputImage
type InputImage struct {
// The input image.
//
// Types that are valid to be assigned to Image:
//
// *InputImage_ImageUri
// *InputImage_ImageBytes
Image isInputImage_Image `protobuf_oneof:"image"`
// contains filtered or unexported fields
}Represents an input image.
func (*InputImage) Descriptor
func (*InputImage) Descriptor() ([]byte, []int)Deprecated: Use InputImage.ProtoReflect.Descriptor instead.
func (*InputImage) GetImage
func (x *InputImage) GetImage() isInputImage_Imagefunc (*InputImage) GetImageBytes
func (x *InputImage) GetImageBytes() []bytefunc (*InputImage) GetImageUri
func (x *InputImage) GetImageUri() stringfunc (*InputImage) ProtoMessage
func (*InputImage) ProtoMessage()func (*InputImage) ProtoReflect
func (x *InputImage) ProtoReflect() protoreflect.Messagefunc (*InputImage) Reset
func (x *InputImage) Reset()func (*InputImage) String
func (x *InputImage) String() stringInputImage_ImageBytes
type InputImage_ImageBytes struct {
// Raw image bytes.
ImageBytes []byte `protobuf:"bytes,2,opt,name=image_bytes,json=imageBytes,proto3,oneof"`
}InputImage_ImageUri
type InputImage_ImageUri struct {
// Public uri of the image.
ImageUri string `protobuf:"bytes,1,opt,name=image_uri,json=imageUri,proto3,oneof"`
}OutputImageConfig
type OutputImageConfig struct {
// Optional. If true, returns the output images as serving uris instead of
// bytes.
ReturnImageUri bool `protobuf:"varint,1,opt,name=return_image_uri,json=returnImageUri,proto3" json:"return_image_uri,omitempty"`
// contains filtered or unexported fields
}Configuration for how the output image should be returned.
func (*OutputImageConfig) Descriptor
func (*OutputImageConfig) Descriptor() ([]byte, []int)Deprecated: Use OutputImageConfig.ProtoReflect.Descriptor instead.
func (*OutputImageConfig) GetReturnImageUri
func (x *OutputImageConfig) GetReturnImageUri() boolfunc (*OutputImageConfig) ProtoMessage
func (*OutputImageConfig) ProtoMessage()func (*OutputImageConfig) ProtoReflect
func (x *OutputImageConfig) ProtoReflect() protoreflect.Messagefunc (*OutputImageConfig) Reset
func (x *OutputImageConfig) Reset()func (*OutputImageConfig) String
func (x *OutputImageConfig) String() stringOutputSpec
type OutputSpec struct {
// Optional. The workflow to execute for the provided product data. Workflows
// may populate the response's title, description, or both. Currently
// supported workflow_ids are: "title", "description", and "tide"
WorkflowId *string `protobuf:"bytes,1,opt,name=workflow_id,json=workflowId,proto3,oneof" json:"workflow_id,omitempty"`
// Optional. The tone of the output generated text. Supported tones are:
// "playful", "formal", "persuasive", and "conversational"
Tone *string `protobuf:"bytes,2,opt,name=tone,proto3,oneof" json:"tone,omitempty"`
// Optional. Any editorial changes for the generated product data. For
// example, replace Small with "S", do not modify color if already present.
EditorialChanges *string `protobuf:"bytes,3,opt,name=editorial_changes,json=editorialChanges,proto3,oneof" json:"editorial_changes,omitempty"`
// Optional. The language for output titles/descriptions. For example.
// 'German', 'es', 'FR'. Default is 'en'.
TargetLanguage *string `protobuf:"bytes,4,opt,name=target_language,json=targetLanguage,proto3,oneof" json:"target_language,omitempty"`
// Optional. The order that generated attributes should be placed in the
// generated title. Eg., if the attribute order is ["brand", "product",
// "size"], the generated title will have brand first, followed by the product
// name, and then size information after that.
AttributeOrder []string `protobuf:"bytes,5,rep,name=attribute_order,json=attributeOrder,proto3" json:"attribute_order,omitempty"`
// Optional. Character used to separate attributes in the generated title.
// For example, '|', '-', ','.
AttributeSeparator *string `protobuf:"bytes,6,opt,name=attribute_separator,json=attributeSeparator,proto3,oneof" json:"attribute_separator,omitempty"`
// contains filtered or unexported fields
}Configuration parameters that directly influence what content is generated, and how that content is rendered in the final response.
func (*OutputSpec) Descriptor
func (*OutputSpec) Descriptor() ([]byte, []int)Deprecated: Use OutputSpec.ProtoReflect.Descriptor instead.
func (*OutputSpec) GetAttributeOrder
func (x *OutputSpec) GetAttributeOrder() []stringfunc (*OutputSpec) GetAttributeSeparator
func (x *OutputSpec) GetAttributeSeparator() stringfunc (*OutputSpec) GetEditorialChanges
func (x *OutputSpec) GetEditorialChanges() stringfunc (*OutputSpec) GetTargetLanguage
func (x *OutputSpec) GetTargetLanguage() stringfunc (*OutputSpec) GetTone
func (x *OutputSpec) GetTone() stringfunc (*OutputSpec) GetWorkflowId
func (x *OutputSpec) GetWorkflowId() stringfunc (*OutputSpec) ProtoMessage
func (*OutputSpec) ProtoMessage()func (*OutputSpec) ProtoReflect
func (x *OutputSpec) ProtoReflect() protoreflect.Messagefunc (*OutputSpec) Reset
func (x *OutputSpec) Reset()func (*OutputSpec) String
func (x *OutputSpec) String() stringProductInfo
type ProductInfo struct {
// Required. A mapping of all available product attributes. This may include
// title, description, brand, gender, color, size, etc.
ProductAttributes map[string]string `protobuf:"bytes,1,rep,name=product_attributes,json=productAttributes,proto3" json:"product_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Optional. Image associated with the product.
ProductImage *Image `protobuf:"bytes,2,opt,name=product_image,json=productImage,proto3,oneof" json:"product_image,omitempty"`
// contains filtered or unexported fields
}Available information about the product. Used to inform the genAI models.
func (*ProductInfo) Descriptor
func (*ProductInfo) Descriptor() ([]byte, []int)Deprecated: Use ProductInfo.ProtoReflect.Descriptor instead.
func (*ProductInfo) GetProductAttributes
func (x *ProductInfo) GetProductAttributes() map[string]stringfunc (*ProductInfo) GetProductImage
func (x *ProductInfo) GetProductImage() *Imagefunc (*ProductInfo) ProtoMessage
func (*ProductInfo) ProtoMessage()func (*ProductInfo) ProtoReflect
func (x *ProductInfo) ProtoReflect() protoreflect.Messagefunc (*ProductInfo) Reset
func (x *ProductInfo) Reset()func (*ProductInfo) String
func (x *ProductInfo) String() stringProductTextGenerationMetadata
type ProductTextGenerationMetadata struct {
// Metadata is a pretty loose concept. The data is modeled as a map here to
// indicate that there is no guaranteed structure to the output past a simple
// K:V association.
// The first use-case is to track words added/removed/changed in generations.
Metadata *structpb.Struct `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
// contains filtered or unexported fields
}Wrapper data type for any metadata associated with text generation.
func (*ProductTextGenerationMetadata) Descriptor
func (*ProductTextGenerationMetadata) Descriptor() ([]byte, []int)Deprecated: Use ProductTextGenerationMetadata.ProtoReflect.Descriptor instead.
func (*ProductTextGenerationMetadata) GetMetadata
func (x *ProductTextGenerationMetadata) GetMetadata() *structpb.Structfunc (*ProductTextGenerationMetadata) ProtoMessage
func (*ProductTextGenerationMetadata) ProtoMessage()func (*ProductTextGenerationMetadata) ProtoReflect
func (x *ProductTextGenerationMetadata) ProtoReflect() protoreflect.Messagefunc (*ProductTextGenerationMetadata) Reset
func (x *ProductTextGenerationMetadata) Reset()func (*ProductTextGenerationMetadata) String
func (x *ProductTextGenerationMetadata) String() stringProductTextGenerationSuggestion
type ProductTextGenerationSuggestion struct {
// The text generated
Text *string `protobuf:"bytes,1,opt,name=text,proto3,oneof" json:"text,omitempty"`
// The quality score associated with the generation. Heuristic implemented
// according to the feedgen team's implementation styles.
Score *float32 `protobuf:"fixed32,2,opt,name=score,proto3,oneof" json:"score,omitempty"`
// A brief summarization of all the changes that have been made.
ChangeSummary *string `protobuf:"bytes,3,opt,name=change_summary,json=changeSummary,proto3,oneof" json:"change_summary,omitempty"`
// contains filtered or unexported fields
}Text generated for a product, optionally including its quality score.
func (*ProductTextGenerationSuggestion) Descriptor
func (*ProductTextGenerationSuggestion) Descriptor() ([]byte, []int)Deprecated: Use ProductTextGenerationSuggestion.ProtoReflect.Descriptor instead.
func (*ProductTextGenerationSuggestion) GetChangeSummary
func (x *ProductTextGenerationSuggestion) GetChangeSummary() stringfunc (*ProductTextGenerationSuggestion) GetScore
func (x *ProductTextGenerationSuggestion) GetScore() float32func (*ProductTextGenerationSuggestion) GetText
func (x *ProductTextGenerationSuggestion) GetText() stringfunc (*ProductTextGenerationSuggestion) ProtoMessage
func (*ProductTextGenerationSuggestion) ProtoMessage()func (*ProductTextGenerationSuggestion) ProtoReflect
func (x *ProductTextGenerationSuggestion) ProtoReflect() protoreflect.Messagefunc (*ProductTextGenerationSuggestion) Reset
func (x *ProductTextGenerationSuggestion) Reset()func (*ProductTextGenerationSuggestion) String
func (x *ProductTextGenerationSuggestion) String() stringRemoveImageBackgroundConfig
type RemoveImageBackgroundConfig struct {
// Optional. If set, the result of background removal will be an RGB image
// with this given color as the background, instead of an RGBA 4-channel
// transparent image.
BackgroundColor *RgbColor `protobuf:"bytes,1,opt,name=background_color,json=backgroundColor,proto3" json:"background_color,omitempty"`
// contains filtered or unexported fields
}Client provided input configuration for removing the background.
func (*RemoveImageBackgroundConfig) Descriptor
func (*RemoveImageBackgroundConfig) Descriptor() ([]byte, []int)Deprecated: Use RemoveImageBackgroundConfig.ProtoReflect.Descriptor instead.
func (*RemoveImageBackgroundConfig) GetBackgroundColor
func (x *RemoveImageBackgroundConfig) GetBackgroundColor() *RgbColorfunc (*RemoveImageBackgroundConfig) ProtoMessage
func (*RemoveImageBackgroundConfig) ProtoMessage()func (*RemoveImageBackgroundConfig) ProtoReflect
func (x *RemoveImageBackgroundConfig) ProtoReflect() protoreflect.Messagefunc (*RemoveImageBackgroundConfig) Reset
func (x *RemoveImageBackgroundConfig) Reset()func (*RemoveImageBackgroundConfig) String
func (x *RemoveImageBackgroundConfig) String() stringRemoveProductImageBackgroundRequest
type RemoveProductImageBackgroundRequest struct {
// Required. The account for which to generate an image. This acts as a
// container for the request and does not affect the generation itself.
// Format: accounts/{account}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. Configuration for how the output image should be returned.
OutputConfig *OutputImageConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
// Required. The input image.
InputImage *InputImage `protobuf:"bytes,3,opt,name=input_image,json=inputImage,proto3" json:"input_image,omitempty"`
// Optional. Configuration parameters for the removal of the background.
Config *RemoveImageBackgroundConfig `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
// contains filtered or unexported fields
}Request message for the RemoveProductImageBackground method.
func (*RemoveProductImageBackgroundRequest) Descriptor
func (*RemoveProductImageBackgroundRequest) Descriptor() ([]byte, []int)Deprecated: Use RemoveProductImageBackgroundRequest.ProtoReflect.Descriptor instead.
func (*RemoveProductImageBackgroundRequest) GetConfig
func (x *RemoveProductImageBackgroundRequest) GetConfig() *RemoveImageBackgroundConfigfunc (*RemoveProductImageBackgroundRequest) GetInputImage
func (x *RemoveProductImageBackgroundRequest) GetInputImage() *InputImagefunc (*RemoveProductImageBackgroundRequest) GetName
func (x *RemoveProductImageBackgroundRequest) GetName() stringfunc (*RemoveProductImageBackgroundRequest) GetOutputConfig
func (x *RemoveProductImageBackgroundRequest) GetOutputConfig() *OutputImageConfigfunc (*RemoveProductImageBackgroundRequest) ProtoMessage
func (*RemoveProductImageBackgroundRequest) ProtoMessage()func (*RemoveProductImageBackgroundRequest) ProtoReflect
func (x *RemoveProductImageBackgroundRequest) ProtoReflect() protoreflect.Messagefunc (*RemoveProductImageBackgroundRequest) Reset
func (x *RemoveProductImageBackgroundRequest) Reset()func (*RemoveProductImageBackgroundRequest) String
func (x *RemoveProductImageBackgroundRequest) String() stringRemoveProductImageBackgroundResponse
type RemoveProductImageBackgroundResponse struct {
// The generated output image.
GeneratedImage *GeneratedImage `protobuf:"bytes,1,opt,name=generated_image,json=generatedImage,proto3" json:"generated_image,omitempty"`
// contains filtered or unexported fields
}Response message for the RemoveProductImageBackground method.
func (*RemoveProductImageBackgroundResponse) Descriptor
func (*RemoveProductImageBackgroundResponse) Descriptor() ([]byte, []int)Deprecated: Use RemoveProductImageBackgroundResponse.ProtoReflect.Descriptor instead.
func (*RemoveProductImageBackgroundResponse) GetGeneratedImage
func (x *RemoveProductImageBackgroundResponse) GetGeneratedImage() *GeneratedImagefunc (*RemoveProductImageBackgroundResponse) ProtoMessage
func (*RemoveProductImageBackgroundResponse) ProtoMessage()func (*RemoveProductImageBackgroundResponse) ProtoReflect
func (x *RemoveProductImageBackgroundResponse) ProtoReflect() protoreflect.Messagefunc (*RemoveProductImageBackgroundResponse) Reset
func (x *RemoveProductImageBackgroundResponse) Reset()func (*RemoveProductImageBackgroundResponse) String
func (x *RemoveProductImageBackgroundResponse) String() stringRgbColor
type RgbColor struct {
// Optional. Values in [0, 255].
Red int32 `protobuf:"varint,1,opt,name=red,proto3" json:"red,omitempty"`
// Optional. Values in [0, 255].
Green int32 `protobuf:"varint,2,opt,name=green,proto3" json:"green,omitempty"`
// Optional. Values in [0, 255].
Blue int32 `protobuf:"varint,3,opt,name=blue,proto3" json:"blue,omitempty"`
// contains filtered or unexported fields
}Represents a color in RGB format.
func (*RgbColor) Descriptor
Deprecated: Use RgbColor.ProtoReflect.Descriptor instead.
func (*RgbColor) GetBlue
func (*RgbColor) GetGreen
func (*RgbColor) GetRed
func (*RgbColor) ProtoMessage
func (*RgbColor) ProtoMessage()func (*RgbColor) ProtoReflect
func (x *RgbColor) ProtoReflect() protoreflect.Messagefunc (*RgbColor) Reset
func (x *RgbColor) Reset()func (*RgbColor) String
TextSuggestionsServiceClient
type TextSuggestionsServiceClient interface {
// GenerateProductTextSuggestions generates a set of candidate text
// completions (e.g., product titles, descriptions) based on provided product
// information. This endpoint leverages GenAI models to create suggestions for
// improving existing product text or generating new content.
GenerateProductTextSuggestions(ctx context.Context, in *GenerateProductTextSuggestionsRequest, opts ...grpc.CallOption) (*GenerateProductTextSuggestionsResponse, error)
}TextSuggestionsServiceClient is the client API for TextSuggestionsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewTextSuggestionsServiceClient
func NewTextSuggestionsServiceClient(cc grpc.ClientConnInterface) TextSuggestionsServiceClientTextSuggestionsServiceServer
type TextSuggestionsServiceServer interface {
// GenerateProductTextSuggestions generates a set of candidate text
// completions (e.g., product titles, descriptions) based on provided product
// information. This endpoint leverages GenAI models to create suggestions for
// improving existing product text or generating new content.
GenerateProductTextSuggestions(context.Context, *GenerateProductTextSuggestionsRequest) (*GenerateProductTextSuggestionsResponse, error)
}TextSuggestionsServiceServer is the server API for TextSuggestionsService service. All implementations should embed UnimplementedTextSuggestionsServiceServer for forward compatibility
TitleExample
type TitleExample struct {
// Required. A map containing all existing product information. For example:
// {"title": "dress", "description": "A red dress", "brand": "Dresses4All"}
// Any information that you might use to populate your product feed.
ProductInfo map[string]string `protobuf:"bytes,1,rep,name=product_info,json=productInfo,proto3" json:"product_info,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Required. The product's category. This helps the AI understand when certain
// examples are more relevant than others.
Category *string `protobuf:"bytes,2,opt,name=category,proto3,oneof" json:"category,omitempty"`
// Required. The attributes or approximate attributes that make up the title.
// For example, title "Google GShoe M" title_format can be "brand | product |
// size".
TitleFormat *string `protobuf:"bytes,3,opt,name=title_format,json=titleFormat,proto3,oneof" json:"title_format,omitempty"`
// Required. A map in the same format as product_info but with all
// improvements included. For example, {"brand": "Dresses4All", "product":
// "dress", "color": "red", ...}. The order of attributes in this map may be
// used to guide the order in which they appear in the final generated title.
// For instance, the above will become: Dresses4All dress | red
FinalProductInfo map[string]string `protobuf:"bytes,4,rep,name=final_product_info,json=finalProductInfo,proto3" json:"final_product_info,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// contains filtered or unexported fields
}A hand-crafted example of a product title improvement. These examples are provided to the AI to improve its quality and guide it towards required outputs.
func (*TitleExample) Descriptor
func (*TitleExample) Descriptor() ([]byte, []int)Deprecated: Use TitleExample.ProtoReflect.Descriptor instead.
func (*TitleExample) GetCategory
func (x *TitleExample) GetCategory() stringfunc (*TitleExample) GetFinalProductInfo
func (x *TitleExample) GetFinalProductInfo() map[string]stringfunc (*TitleExample) GetProductInfo
func (x *TitleExample) GetProductInfo() map[string]stringfunc (*TitleExample) GetTitleFormat
func (x *TitleExample) GetTitleFormat() stringfunc (*TitleExample) ProtoMessage
func (*TitleExample) ProtoMessage()func (*TitleExample) ProtoReflect
func (x *TitleExample) ProtoReflect() protoreflect.Messagefunc (*TitleExample) Reset
func (x *TitleExample) Reset()func (*TitleExample) String
func (x *TitleExample) String() stringUnimplementedImageServiceServer
type UnimplementedImageServiceServer struct {
}UnimplementedImageServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedImageServiceServer) GenerateProductImageBackground
func (UnimplementedImageServiceServer) GenerateProductImageBackground(context.Context, *GenerateProductImageBackgroundRequest) (*GenerateProductImageBackgroundResponse, error)func (UnimplementedImageServiceServer) RemoveProductImageBackground
func (UnimplementedImageServiceServer) RemoveProductImageBackground(context.Context, *RemoveProductImageBackgroundRequest) (*RemoveProductImageBackgroundResponse, error)func (UnimplementedImageServiceServer) UpscaleProductImage
func (UnimplementedImageServiceServer) UpscaleProductImage(context.Context, *UpscaleProductImageRequest) (*UpscaleProductImageResponse, error)UnimplementedTextSuggestionsServiceServer
type UnimplementedTextSuggestionsServiceServer struct {
}UnimplementedTextSuggestionsServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedTextSuggestionsServiceServer) GenerateProductTextSuggestions
func (UnimplementedTextSuggestionsServiceServer) GenerateProductTextSuggestions(context.Context, *GenerateProductTextSuggestionsRequest) (*GenerateProductTextSuggestionsResponse, error)UnsafeImageServiceServer
type UnsafeImageServiceServer interface {
// contains filtered or unexported methods
}UnsafeImageServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ImageServiceServer will result in compilation errors.
UnsafeTextSuggestionsServiceServer
type UnsafeTextSuggestionsServiceServer interface {
// contains filtered or unexported methods
}UnsafeTextSuggestionsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TextSuggestionsServiceServer will result in compilation errors.
UpscaleProductImageRequest
type UpscaleProductImageRequest struct {
// Required. The account for which to generate an image. This acts as a
// container for the request and does not affect the generation itself.
// Format: accounts/{account}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. Configuration for how the output image should be returned.
OutputConfig *OutputImageConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
// Required. The input image.
InputImage *InputImage `protobuf:"bytes,3,opt,name=input_image,json=inputImage,proto3" json:"input_image,omitempty"`
// contains filtered or unexported fields
}Request message for the UpscaleProductImage method.
func (*UpscaleProductImageRequest) Descriptor
func (*UpscaleProductImageRequest) Descriptor() ([]byte, []int)Deprecated: Use UpscaleProductImageRequest.ProtoReflect.Descriptor instead.
func (*UpscaleProductImageRequest) GetInputImage
func (x *UpscaleProductImageRequest) GetInputImage() *InputImagefunc (*UpscaleProductImageRequest) GetName
func (x *UpscaleProductImageRequest) GetName() stringfunc (*UpscaleProductImageRequest) GetOutputConfig
func (x *UpscaleProductImageRequest) GetOutputConfig() *OutputImageConfigfunc (*UpscaleProductImageRequest) ProtoMessage
func (*UpscaleProductImageRequest) ProtoMessage()func (*UpscaleProductImageRequest) ProtoReflect
func (x *UpscaleProductImageRequest) ProtoReflect() protoreflect.Messagefunc (*UpscaleProductImageRequest) Reset
func (x *UpscaleProductImageRequest) Reset()func (*UpscaleProductImageRequest) String
func (x *UpscaleProductImageRequest) String() stringUpscaleProductImageResponse
type UpscaleProductImageResponse struct {
// The generated output image.
GeneratedImage *GeneratedImage `protobuf:"bytes,1,opt,name=generated_image,json=generatedImage,proto3" json:"generated_image,omitempty"`
// contains filtered or unexported fields
}Response message for the UpscaleProductImage method.
func (*UpscaleProductImageResponse) Descriptor
func (*UpscaleProductImageResponse) Descriptor() ([]byte, []int)Deprecated: Use UpscaleProductImageResponse.ProtoReflect.Descriptor instead.
func (*UpscaleProductImageResponse) GetGeneratedImage
func (x *UpscaleProductImageResponse) GetGeneratedImage() *GeneratedImagefunc (*UpscaleProductImageResponse) ProtoMessage
func (*UpscaleProductImageResponse) ProtoMessage()func (*UpscaleProductImageResponse) ProtoReflect
func (x *UpscaleProductImageResponse) ProtoReflect() protoreflect.Messagefunc (*UpscaleProductImageResponse) Reset
func (x *UpscaleProductImageResponse) Reset()func (*UpscaleProductImageResponse) String
func (x *UpscaleProductImageResponse) String() string