|
| 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.lfp.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 | + |
| 24 | +option go_package = "cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppb"; |
| 25 | +option java_multiple_files = true; |
| 26 | +option java_outer_classname = "LfpMerchantStateProto"; |
| 27 | +option java_package = "com.google.shopping.merchant.lfp.v1beta"; |
| 28 | + |
| 29 | +// Service for a [LFP |
| 30 | +// partner](https://support.google.com/merchants/answer/7676652) to get the |
| 31 | +// state of a merchant. |
| 32 | +service LfpMerchantStateService { |
| 33 | + option (google.api.default_host) = "merchantapi.googleapis.com"; |
| 34 | + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/content"; |
| 35 | + |
| 36 | + // Gets the LFP state of a merchant |
| 37 | + rpc GetLfpMerchantState(GetLfpMerchantStateRequest) |
| 38 | + returns (LfpMerchantState) { |
| 39 | + option (google.api.http) = { |
| 40 | + get: "/lfp/v1beta/{name=accounts/*/lfpMerchantStates/*}" |
| 41 | + }; |
| 42 | + option (google.api.method_signature) = "name"; |
| 43 | + } |
| 44 | +} |
| 45 | + |
| 46 | +// The LFP state of a merchant. |
| 47 | +message LfpMerchantState { |
| 48 | + option (google.api.resource) = { |
| 49 | + type: "merchantapi.googleapis.com/LfpMerchantState" |
| 50 | + pattern: "accounts/{account}/lfpMerchantStates/{lfp_merchant_state}" |
| 51 | + plural: "lfpMerchantStates" |
| 52 | + singular: "lfpMerchantState" |
| 53 | + }; |
| 54 | + |
| 55 | + // The state of a specific merchant's store. |
| 56 | + message LfpStoreState { |
| 57 | + // The state of matching `LfpStore` to a Google Business Profile listing. |
| 58 | + enum StoreMatchingState { |
| 59 | + // Store matching state unspecified. |
| 60 | + STORE_MATCHING_STATE_UNSPECIFIED = 0; |
| 61 | + |
| 62 | + // The `LfpStore` is successfully matched with a Google Business Profile |
| 63 | + // store. |
| 64 | + STORE_MATCHING_STATE_MATCHED = 1; |
| 65 | + |
| 66 | + // The `LfpStore` is not matched with a Google Business Profile store. |
| 67 | + STORE_MATCHING_STATE_FAILED = 2; |
| 68 | + } |
| 69 | + |
| 70 | + // Required. Immutable. The identifier of this store. |
| 71 | + string store_code = 1 [ |
| 72 | + (google.api.field_behavior) = REQUIRED, |
| 73 | + (google.api.field_behavior) = IMMUTABLE |
| 74 | + ]; |
| 75 | + |
| 76 | + // Output only. The store matching state. |
| 77 | + StoreMatchingState matching_state = 2 |
| 78 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 79 | + |
| 80 | + // The hint of why the matching has failed (only set if matching_state is |
| 81 | + // FAILED). |
| 82 | + string matching_state_hint = 3; |
| 83 | + } |
| 84 | + |
| 85 | + // The inventory statistics for a merchant. |
| 86 | + message InventoryStats { |
| 87 | + // Number of entries (understanding entry as a pair of product and store) |
| 88 | + // that were built based on provided inventories/sales and submitted to |
| 89 | + // Google. |
| 90 | + int64 submitted_entries = 1; |
| 91 | + |
| 92 | + // Number of submitted in stock entries. |
| 93 | + int64 submitted_in_stock_entries = 2; |
| 94 | + |
| 95 | + // Number of entries that were built based on provided |
| 96 | + // inventories/sales and couldn't be submitted to Google due to errors like |
| 97 | + // missing product. |
| 98 | + int64 unsubmitted_entries = 3; |
| 99 | + |
| 100 | + // Number of products from provided inventories/sales that were created from |
| 101 | + // matches to existing online products provided by the merchant or to the |
| 102 | + // Google catalog. |
| 103 | + int64 submitted_products = 4; |
| 104 | + } |
| 105 | + |
| 106 | + // Country-specific settings for the merchant. |
| 107 | + message CountrySettings { |
| 108 | + // The possible verification states for different merchant programs. |
| 109 | + enum VerificationState { |
| 110 | + // Verification state unspecified. |
| 111 | + VERIFICATION_STATE_UNSPECIFIED = 0; |
| 112 | + |
| 113 | + // Verification state not approved. |
| 114 | + VERIFICATION_STATE_NOT_APPROVED = 1; |
| 115 | + |
| 116 | + // Verification state in progress. |
| 117 | + VERIFICATION_STATE_IN_PROGRESS = 2; |
| 118 | + |
| 119 | + // Verification state approved. |
| 120 | + VERIFICATION_STATE_APPROVED = 3; |
| 121 | + } |
| 122 | + |
| 123 | + // The possible [product page |
| 124 | + // types](https://support.google.com/merchants/topic/15148370) for a |
| 125 | + // merchant. |
| 126 | + enum ProductPageType { |
| 127 | + // Product page type unspecified. |
| 128 | + PRODUCT_PAGE_TYPE_UNSPECIFIED = 0; |
| 129 | + |
| 130 | + // Google hosted product page. |
| 131 | + GOOGLE_HOSTED = 1; |
| 132 | + |
| 133 | + // Merchant hosted product page. |
| 134 | + MERCHANT_HOSTED = 2; |
| 135 | + |
| 136 | + // Merchant hosted store specific product page. |
| 137 | + MERCHANT_HOSTED_STORE_SPECIFIC = 3; |
| 138 | + } |
| 139 | + |
| 140 | + // Required. The [CLDR territory |
| 141 | + // code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) |
| 142 | + // for the country for which these settings are defined. |
| 143 | + string region_code = 1 [(google.api.field_behavior) = REQUIRED]; |
| 144 | + |
| 145 | + // True if this merchant has enabled free local listings in MC. |
| 146 | + bool free_local_listings_enabled = 2; |
| 147 | + |
| 148 | + // True if this merchant has enabled local inventory ads in MC. |
| 149 | + bool local_inventory_ads_enabled = 3; |
| 150 | + |
| 151 | + // Output only. The verification state of this merchant's inventory check. |
| 152 | + VerificationState inventory_verification_state = 4 |
| 153 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 154 | + |
| 155 | + // Output only. The product page type selected by this merchant. |
| 156 | + ProductPageType product_page_type = 5 |
| 157 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 158 | + |
| 159 | + // Output only. The verification state of this merchant's instock serving |
| 160 | + // feature. |
| 161 | + VerificationState instock_serving_verification_state = 6 |
| 162 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 163 | + |
| 164 | + // Output only. The verification state of this merchant's pickup serving |
| 165 | + // feature. |
| 166 | + VerificationState pickup_serving_verification_state = 7 |
| 167 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 168 | + } |
| 169 | + |
| 170 | + // Identifier. The name of the `LfpMerchantState` resource. Format: |
| 171 | + // `accounts/{account}/lfpMerchantStates/{target_merchant}` |
| 172 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 173 | + |
| 174 | + // Number of [GBPs](https://www.google.com/business/) this merchant has access |
| 175 | + // to. |
| 176 | + int64 linked_gbps = 2; |
| 177 | + |
| 178 | + // Output only. The state per store from the specified merchant. |
| 179 | + repeated LfpStoreState store_states = 3 |
| 180 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 181 | + |
| 182 | + // The inventory statistics for the merchant. |
| 183 | + InventoryStats inventory_stats = 4; |
| 184 | + |
| 185 | + // Country-specific settings for the merchant. |
| 186 | + repeated CountrySettings country_settings = 5; |
| 187 | +} |
| 188 | + |
| 189 | +// Request message for the GetLfpMerchantState method. |
| 190 | +message GetLfpMerchantStateRequest { |
| 191 | + // Required. The name of the state to retrieve. |
| 192 | + // Format: `accounts/{account}/lfpMerchantStates/{target_merchant}` |
| 193 | + string name = 1 [ |
| 194 | + (google.api.field_behavior) = REQUIRED, |
| 195 | + (google.api.resource_reference) = { |
| 196 | + type: "merchantapi.googleapis.com/LfpMerchantState" |
| 197 | + } |
| 198 | + ]; |
| 199 | +} |
0 commit comments