|
| 1 | +// Copyright 2025 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.shopping.merchant.issueresolution.v1beta; |
| 18 | + |
| 19 | +import "google/api/annotations.proto"; |
| 20 | +import "google/api/client.proto"; |
| 21 | +import "google/api/field_behavior.proto"; |
| 22 | +import "google/api/resource.proto"; |
| 23 | +import "google/shopping/type/types.proto"; |
| 24 | + |
| 25 | +option csharp_namespace = "Google.Shopping.Merchant.IssueResolution.V1Beta"; |
| 26 | +option go_package = "cloud.google.com/go/shopping/merchant/issueresolution/apiv1beta/issueresolutionpb;issueresolutionpb"; |
| 27 | +option java_multiple_files = true; |
| 28 | +option java_outer_classname = "AggregateProductStatusesProto"; |
| 29 | +option java_package = "com.google.shopping.merchant.issueresolution.v1beta"; |
| 30 | +option php_namespace = "Google\\Shopping\\Merchant\\IssueResolution\\V1beta"; |
| 31 | +option ruby_package = "Google::Shopping::Merchant::IssueResolution::V1beta"; |
| 32 | + |
| 33 | +// Service to manage aggregate product statuses. |
| 34 | +service AggregateProductStatusesService { |
| 35 | + option (google.api.default_host) = "merchantapi.googleapis.com"; |
| 36 | + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/content"; |
| 37 | + |
| 38 | + // Lists the `AggregateProductStatuses` resources for your merchant account. |
| 39 | + // The response might contain fewer items than specified by `pageSize`. |
| 40 | + // If `pageToken` was returned in previous request, it can be used to obtain |
| 41 | + // additional results. |
| 42 | + rpc ListAggregateProductStatuses(ListAggregateProductStatusesRequest) |
| 43 | + returns (ListAggregateProductStatusesResponse) { |
| 44 | + option (google.api.http) = { |
| 45 | + get: "/issueresolution/v1beta/{parent=accounts/*}/aggregateProductStatuses" |
| 46 | + }; |
| 47 | + option (google.api.method_signature) = "parent"; |
| 48 | + } |
| 49 | +} |
| 50 | + |
| 51 | +// Request message for the `ListAggregateProductStatuses` method. |
| 52 | +message ListAggregateProductStatusesRequest { |
| 53 | + // Required. The account to list aggregate product statuses for. |
| 54 | + // Format: `accounts/{account}` |
| 55 | + string parent = 1 [ |
| 56 | + (google.api.field_behavior) = REQUIRED, |
| 57 | + (google.api.resource_reference) = { |
| 58 | + child_type: "merchantapi.googleapis.com/AggregateProductStatus" |
| 59 | + } |
| 60 | + ]; |
| 61 | + |
| 62 | + // Optional. The maximum number of aggregate product statuses to return. The |
| 63 | + // service may return fewer than this value. If unspecified, at most 25 |
| 64 | + // aggregate product statuses are returned. The maximum value is 250; values |
| 65 | + // above 250 are coerced to 250. |
| 66 | + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 67 | + |
| 68 | + // Optional. A page token, received from a previous |
| 69 | + // `ListAggregateProductStatuses` call. Provide this to retrieve the |
| 70 | + // subsequent page. |
| 71 | + // |
| 72 | + // When paginating, all other parameters provided to |
| 73 | + // `ListAggregateProductStatuses` must match the call that provided the page |
| 74 | + // token. |
| 75 | + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 76 | + |
| 77 | + // Optional. A filter expression that filters the aggregate product statuses. |
| 78 | + // Filtering is only supported by the `reporting_context` and `country` field. |
| 79 | + // For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`. |
| 80 | + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; |
| 81 | +} |
| 82 | + |
| 83 | +// Response message for the `ListAggregateProductStatuses` method. |
| 84 | +message ListAggregateProductStatusesResponse { |
| 85 | + // The `AggregateProductStatuses` resources for the given account. |
| 86 | + repeated AggregateProductStatus aggregate_product_statuses = 1; |
| 87 | + |
| 88 | + // A token, which can be sent as `pageToken` to retrieve the next page. |
| 89 | + // If this field is omitted, there are no subsequent pages. |
| 90 | + string next_page_token = 2; |
| 91 | +} |
| 92 | + |
| 93 | +// Aggregate product statuses for a given reporting context and country. |
| 94 | +message AggregateProductStatus { |
| 95 | + option (google.api.resource) = { |
| 96 | + type: "merchantapi.googleapis.com/AggregateProductStatus" |
| 97 | + pattern: "accounts/{account}/aggregateProductStatuses/{aggregate_product_status}" |
| 98 | + plural: "aggregateProductStatuses" |
| 99 | + singular: "aggregateProductStatus" |
| 100 | + }; |
| 101 | + |
| 102 | + // Products statistics. |
| 103 | + message Stats { |
| 104 | + // The number of products that are active. |
| 105 | + int64 active_count = 1; |
| 106 | + |
| 107 | + // The number of products that are pending. |
| 108 | + int64 pending_count = 2; |
| 109 | + |
| 110 | + // The number of products that are disapproved. |
| 111 | + int64 disapproved_count = 3; |
| 112 | + |
| 113 | + // The number of products that are expiring. |
| 114 | + int64 expiring_count = 4; |
| 115 | + } |
| 116 | + |
| 117 | + // The ItemLevelIssue of the product status. |
| 118 | + message ItemLevelIssue { |
| 119 | + // How the issue affects the serving of the product. |
| 120 | + enum Severity { |
| 121 | + // Not specified. |
| 122 | + SEVERITY_UNSPECIFIED = 0; |
| 123 | + |
| 124 | + // This issue represents a warning and does not have a direct affect |
| 125 | + // on the product. |
| 126 | + NOT_IMPACTED = 1; |
| 127 | + |
| 128 | + // The product is demoted and most likely have limited performance |
| 129 | + // in search results |
| 130 | + DEMOTED = 2; |
| 131 | + |
| 132 | + // Issue disapproves the product. |
| 133 | + DISAPPROVED = 3; |
| 134 | + } |
| 135 | + |
| 136 | + // How the issue can be resolved. |
| 137 | + enum Resolution { |
| 138 | + // Not specified. |
| 139 | + RESOLUTION_UNSPECIFIED = 0; |
| 140 | + |
| 141 | + // The issue can be resolved by the merchant. |
| 142 | + MERCHANT_ACTION = 1; |
| 143 | + |
| 144 | + // The issue will be resolved auomatically. |
| 145 | + PENDING_PROCESSING = 2; |
| 146 | + } |
| 147 | + |
| 148 | + // The error code of the issue. |
| 149 | + string code = 1; |
| 150 | + |
| 151 | + // How this issue affects serving of the offer. |
| 152 | + Severity severity = 2; |
| 153 | + |
| 154 | + // Whether the issue can be resolved by the merchant. |
| 155 | + Resolution resolution = 3; |
| 156 | + |
| 157 | + // The attribute's name, if the issue is caused by a single attribute. |
| 158 | + string attribute = 4; |
| 159 | + |
| 160 | + // A short issue description in English. |
| 161 | + string description = 6; |
| 162 | + |
| 163 | + // A detailed issue description in English. |
| 164 | + string detail = 7; |
| 165 | + |
| 166 | + // The URL of a web page to help with resolving this issue. |
| 167 | + string documentation_uri = 8; |
| 168 | + |
| 169 | + // The number of products affected by this issue. |
| 170 | + int64 product_count = 9; |
| 171 | + } |
| 172 | + |
| 173 | + // Identifier. The name of the `AggregateProductStatuses` resource. |
| 174 | + // Format: |
| 175 | + // `accounts/{account}/aggregateProductStatuses/{aggregateProductStatuses}` |
| 176 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 177 | + |
| 178 | + // The reporting context of the aggregate product statuses. |
| 179 | + google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = |
| 180 | + 3; |
| 181 | + |
| 182 | + // The country of the aggregate product statuses. Represented as a |
| 183 | + // [CLDR territory |
| 184 | + // code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). |
| 185 | + string country = 4; |
| 186 | + |
| 187 | + // Products statistics for the given reporting context and country. |
| 188 | + Stats stats = 5; |
| 189 | + |
| 190 | + // The product issues that affect the given reporting context and country. |
| 191 | + repeated ItemLevelIssue item_level_issues = 6; |
| 192 | +} |
0 commit comments