Cloud Private Catalog Producer API . catalogs . products . icons

Instance Methods

upload(product, body, x__xgafv=None)

Creates an Icon instance under a given Product.

Method Details

upload(product, body, x__xgafv=None)
Creates an Icon instance under a given Product.
If Product only has a default icon, a new Icon
instance is created and associated with the given Product.
If Product already has a non-default icon, the action creates
a new Icon instance, associates the newly created
Icon with the given Product and deletes the old icon.

Args:
  product: string, The resource name of the product. (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "icon": "A String", # The raw icon bytes user-supplied to be uploaded to the product. The format
        # of the icon can only be PNG or JPEG. The minimum allowed dimensions are
        # 130x130 pixels and the maximum dimensions are 10000x10000 pixels.
        # Required.
  }

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated
      # empty messages in your APIs. A typical example is to use it as the request
      # or the response type of an API method. For instance:
      #
      #     service Foo {
      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
      #     }
      #
      # The JSON representation for `Empty` is empty JSON object `{}`.
  }