# Google Shopping Merchant Reports V1beta Client - Class BestSellersBrandView (1.3.0)

1.3.0 (latest) 1.2.1 1.1.3 1.0.0 0.10.0 0.9.1 0.8.4 0.7.3 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Shopping Merchant Reports V1beta Client class BestSellersBrandView.

Fields available for query in `best_sellers_brand_view` table.

[Best sellers](https://support.google.com/merchants/answer/9488679) report
with top brands.
Values are only set for fields requested explicitly in the request's search
query.

Generated from protobuf message `google.shopping.merchant.reports.v1beta.BestSellersBrandView`

## Namespace

Google \\ Shopping \\ Merchant \\ Reports \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ report_date` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` Report date. The value of this field can only be one of the following: \* \* The first day of the week (Monday) for weekly reports, \* \* The first day of the month for monthly reports. Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is not specified in the query, the latest available weekly or monthly report is returned. |
| `↳ report_granularity` | `int` Granularity of the report. The ranking can be done over a week or a month timeframe. Required in the `SELECT` clause. Condition on `report_granularity` is required in the `WHERE` clause. |
| `↳ report_country_code` | `string` Country where the ranking is calculated. Represented in the ISO 3166 format. Required in the `SELECT` clause. Condition on `report_country_code` is required in the `WHERE` clause. |
| `↳ report_category_id` | `int|string` Google product category ID to calculate the ranking for, represented in [Google's product taxonomy](https://support.google.com/merchants/answer/6324436). Required in the `SELECT` clause. If a `WHERE` condition on `report_category_id` is not specified in the query, rankings for all top-level categories are returned. |
| `↳ brand` | `string` Name of the brand. |
| `↳ rank` | `int|string` Popularity of the brand on Ads and organic surfaces, in the selected category and country, based on the estimated number of units sold. |
| `↳ previous_rank` | `int|string` Popularity rank in the previous week or month. |
| `↳ relative_demand` | `int` Estimated demand in relation to the brand with the highest popularity rank in the same category and country. |
| `↳ previous_relative_demand` | `int` Estimated demand in relation to the brand with the highest popularity rank in the same category and country in the previous week or month. |
| `↳ relative_demand_change` | `int` Change in the estimated demand. Whether it rose, sank or remained flat. |

### getReportDate

Report date. The value of this field can only be one of the following:

- The first day of the week (Monday) for weekly reports,
- The first day of the month for monthly reports.

Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is
not specified in the query, the latest available weekly or monthly report
is returned.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html|null` |   |

### hasReportDate

### clearReportDate

### setReportDate

Report date. The value of this field can only be one of the following:

- The first day of the week (Monday) for weekly reports,
- The first day of the month for monthly reports.

Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is
not specified in the query, the latest available weekly or monthly report
is returned.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getReportGranularity

Granularity of the report. The ranking can be done over a week or a month
timeframe.

Required in the `SELECT` clause. Condition on `report_granularity` is
required in the `WHERE` clause.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasReportGranularity

### clearReportGranularity

### setReportGranularity

Granularity of the report. The ranking can be done over a week or a month
timeframe.

Required in the `SELECT` clause. Condition on `report_granularity` is
required in the `WHERE` clause.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getReportCountryCode

Country where the ranking is calculated. Represented in the ISO 3166
format.

Required in the `SELECT` clause. Condition on `report_country_code` is
required in the `WHERE` clause.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasReportCountryCode

### clearReportCountryCode

### setReportCountryCode

Country where the ranking is calculated. Represented in the ISO 3166
format.

Required in the `SELECT` clause. Condition on `report_country_code` is
required in the `WHERE` clause.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getReportCategoryId

Google product category ID to calculate the ranking for, represented in
[Google's product
taxonomy](https://support.google.com/merchants/answer/6324436).

Required in the `SELECT` clause. If a `WHERE` condition on
`report_category_id` is not specified in the query, rankings for all
top-level categories are returned.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### hasReportCategoryId

### clearReportCategoryId

### setReportCategoryId

Google product category ID to calculate the ranking for, represented in
[Google's product
taxonomy](https://support.google.com/merchants/answer/6324436).

Required in the `SELECT` clause. If a `WHERE` condition on
`report_category_id` is not specified in the query, rankings for all
top-level categories are returned.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBrand

Name of the brand.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasBrand

### clearBrand

### setBrand

Name of the brand.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRank

Popularity of the brand on Ads and organic surfaces, in the selected
category and country, based on the estimated number of units sold.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### hasRank

### clearRank

### setRank

Popularity of the brand on Ads and organic surfaces, in the selected
category and country, based on the estimated number of units sold.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPreviousRank

Popularity rank in the previous week or month.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### hasPreviousRank

### clearPreviousRank

### setPreviousRank

Popularity rank in the previous week or month.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRelativeDemand

Estimated demand in relation to the brand with the highest popularity rank
in the same category and country.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasRelativeDemand

### clearRelativeDemand

### setRelativeDemand

Estimated demand in relation to the brand with the highest popularity rank
in the same category and country.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPreviousRelativeDemand

Estimated demand in relation to the brand with the highest popularity rank
in the same category and country in the previous week or month.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasPreviousRelativeDemand

### clearPreviousRelativeDemand

### setPreviousRelativeDemand

Estimated demand in relation to the brand with the highest popularity rank
in the same category and country in the previous week or month.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRelativeDemandChange

Change in the estimated demand. Whether it rose, sank or remained flat.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasRelativeDemandChange

### clearRelativeDemandChange

### setRelativeDemandChange

Change in the estimated demand. Whether it rose, sank or remained flat.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |