public sealed class CreateProductRequest : IMessage<CreateProductRequest>, IEquatable<CreateProductRequest>, IDeepCloneable<CreateProductRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Retail v2 API class CreateProductRequest.
Request message for
[ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
method.
Required. The ID to use for the [Product][google.cloud.retail.v2.Product],
which will become the final component of the
[Product.name][google.cloud.retail.v2.Product.name].
If the caller does not have permission to create the
[Product][google.cloud.retail.v2.Product], regardless of whether or not it
exists, a PERMISSION_DENIED error is returned.
This field must be unique among all
[Product][google.cloud.retail.v2.Product]s with the same
[parent][google.cloud.retail.v2.CreateProductRequest.parent]. Otherwise, an
ALREADY_EXISTS error is returned.
This field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is returned.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis webpage provides reference documentation for the \u003ccode\u003eCreateProductRequest\u003c/code\u003e class within the Google.Cloud.Retail.V2 namespace, detailing its use in the Retail v2 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateProductRequest\u003c/code\u003e class is used to structure requests for the \u003ccode\u003eProductService.CreateProduct\u003c/code\u003e method, enabling the creation of new product entities within the Retail API.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple versions available, the latest being 2.12.0, and many older ones going back to version 1.0.0, all linking to the \u003ccode\u003eCreateProductRequest\u003c/code\u003e class documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateProductRequest\u003c/code\u003e class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable<CreateProductRequest>\u003c/code\u003e, \u003ccode\u003eIDeepCloneable<CreateProductRequest>\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eCreateProductRequest\u003c/code\u003e class include \u003ccode\u003eParent\u003c/code\u003e, \u003ccode\u003eParentAsBranchName\u003c/code\u003e, \u003ccode\u003eProduct\u003c/code\u003e, and \u003ccode\u003eProductId\u003c/code\u003e, which are used to define the context and specifics of the product to be created.\u003c/p\u003e\n"]]],[],null,["# Retail v2 API - Class CreateProductRequest (2.14.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.14.0 (latest)](/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.13.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.12.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.11.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.10.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.9.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.8.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.7.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.6.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.5.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.4.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.3.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.2.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.1.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/2.0.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/1.6.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/1.5.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/1.4.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/1.3.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/1.2.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/1.1.0/Google.Cloud.Retail.V2.CreateProductRequest)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Retail.V2/1.0.0/Google.Cloud.Retail.V2.CreateProductRequest) \n\n public sealed class CreateProductRequest : IMessage\u003cCreateProductRequest\u003e, IEquatable\u003cCreateProductRequest\u003e, IDeepCloneable\u003cCreateProductRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Retail v2 API class CreateProductRequest.\n\nRequest message for\n\\[ProductService.CreateProduct\\]\\[google.cloud.retail.v2.ProductService.CreateProduct\\]\nmethod. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CreateProductRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CreateProductRequest](/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CreateProductRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CreateProductRequest](/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CreateProductRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CreateProductRequest](/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CreateProductRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Retail.V2](/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Retail.V2.dll\n\nConstructors\n------------\n\n### CreateProductRequest()\n\n public CreateProductRequest()\n\n### CreateProductRequest(CreateProductRequest)\n\n public CreateProductRequest(CreateProductRequest other)\n\nProperties\n----------\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. The parent catalog resource name, such as\n`projects/*/locations/global/catalogs/default_catalog/branches/default_branch`.\n\n### ParentAsBranchName\n\n public BranchName ParentAsBranchName { get; set; }\n\n[BranchName](/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.BranchName)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CreateProductRequest#Google_Cloud_Retail_V2_CreateProductRequest_Parent) resource name property.\n\n### Product\n\n public Product Product { get; set; }\n\nRequired. The \\[Product\\]\\[google.cloud.retail.v2.Product\\] to create.\n\n### ProductId\n\n public string ProductId { get; set; }\n\nRequired. The ID to use for the \\[Product\\]\\[google.cloud.retail.v2.Product\\],\nwhich will become the final component of the\n\\[Product.name\\]\\[google.cloud.retail.v2.Product.name\\].\n\nIf the caller does not have permission to create the\n\\[Product\\]\\[google.cloud.retail.v2.Product\\], regardless of whether or not it\nexists, a PERMISSION_DENIED error is returned.\n\nThis field must be unique among all\n\\[Product\\]\\[google.cloud.retail.v2.Product\\]s with the same\n\\[parent\\]\\[google.cloud.retail.v2.CreateProductRequest.parent\\]. Otherwise, an\nALREADY_EXISTS error is returned.\n\nThis field must be a UTF-8 encoded string with a length limit of 128\ncharacters. Otherwise, an INVALID_ARGUMENT error is returned."]]