@google-shopping/quota 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -110,6 +110,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
110
110
 
111
111
  | Sample | Source Code | Try it |
112
112
  | --------------------------- | --------------------------------- | ------ |
113
+ | Quota_service.list_quota_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-quota/samples/generated/v1/quota_service.list_quota_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-quota/samples/generated/v1/quota_service.list_quota_groups.js,packages/google-shopping-merchant-quota/samples/README.md) |
113
114
  | Quota_service.list_quota_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-quota/samples/generated/v1beta/quota_service.list_quota_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-quota/samples/generated/v1beta/quota_service.list_quota_groups.js,packages/google-shopping-merchant-quota/samples/README.md) |
114
115
  | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-quota/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-quota/samples/quickstart.js,packages/google-shopping-merchant-quota/samples/README.md) |
115
116
 
@@ -0,0 +1,131 @@
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.quota.v1;
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 csharp_namespace = "Google.Shopping.Merchant.Quota.V1";
25
+ option go_package = "cloud.google.com/go/shopping/merchant/quota/apiv1/quotapb;quotapb";
26
+ option java_multiple_files = true;
27
+ option java_outer_classname = "QuotaProto";
28
+ option java_package = "com.google.shopping.merchant.quota.v1";
29
+ option php_namespace = "Google\\Shopping\\Merchant\\Quota\\V1";
30
+ option ruby_package = "Google::Shopping::Merchant::Quota::V1";
31
+ option (google.api.resource_definition) = {
32
+ type: "merchantapi.googleapis.com/Account"
33
+ pattern: "accounts/{account}"
34
+ };
35
+
36
+ // Service to get method call quota information per Merchant API method.
37
+ service QuotaService {
38
+ option (google.api.default_host) = "merchantapi.googleapis.com";
39
+ option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/content";
40
+
41
+ // Lists the daily call quota and usage per group for your Merchant
42
+ // Center account.
43
+ rpc ListQuotaGroups(ListQuotaGroupsRequest)
44
+ returns (ListQuotaGroupsResponse) {
45
+ option (google.api.http) = {
46
+ get: "/quota/v1/{parent=accounts/*}/quotas"
47
+ };
48
+ option (google.api.method_signature) = "parent";
49
+ }
50
+ }
51
+
52
+ // The group information for methods in the Merchant API. The quota is shared
53
+ // between all methods in the group. Even if none of the methods within the
54
+ // group have usage the information for the group is returned.
55
+ message QuotaGroup {
56
+ option (google.api.resource) = {
57
+ type: "merchantapi.googleapis.com/QuotaGroup"
58
+ pattern: "accounts/{account}/groups/{group}"
59
+ plural: "quotaGroups"
60
+ singular: "quotaGroup"
61
+ };
62
+
63
+ // Identifier. The resource name of the quota group.
64
+ // Format: accounts/{account}/quotas/{group}
65
+ // Note: There is no guarantee on the format of {group}
66
+ string name = 1 [(google.api.field_behavior) = IDENTIFIER];
67
+
68
+ // Output only. The current quota usage, meaning the number of calls already
69
+ // made on a given day to the methods in the group. The daily quota limits
70
+ // reset at at 12:00 PM midday UTC.
71
+ int64 quota_usage = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
72
+
73
+ // Output only. The maximum number of calls allowed per day for the group.
74
+ int64 quota_limit = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
75
+
76
+ // Output only. The maximum number of calls allowed per minute for the group.
77
+ int64 quota_minute_limit = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
78
+
79
+ // Output only. List of all methods group quota applies to.
80
+ repeated MethodDetails method_details = 4
81
+ [(google.api.field_behavior) = OUTPUT_ONLY];
82
+ }
83
+
84
+ // The method details per method in the Merchant API.
85
+ message MethodDetails {
86
+ // Output only. The name of the method for example `products.list`.
87
+ string method = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
88
+
89
+ // Output only. The API version that the method belongs to.
90
+ string version = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
91
+
92
+ // Output only. The sub-API that the method belongs to.
93
+ string subapi = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
94
+
95
+ // Output only. The path for the method such as
96
+ // `products/v1/productInputs.insert`
97
+ string path = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
98
+ }
99
+
100
+ // Request message for the ListQuotaGroups method.
101
+ message ListQuotaGroupsRequest {
102
+ // Required. The merchant account who owns the collection of method quotas
103
+ // Format: accounts/{account}
104
+ string parent = 1 [
105
+ (google.api.field_behavior) = REQUIRED,
106
+ (google.api.resource_reference) = {
107
+ child_type: "merchantapi.googleapis.com/QuotaGroup"
108
+ }
109
+ ];
110
+
111
+ // Optional. The maximum number of quotas to return in the response, used
112
+ // for paging. Defaults to 500; values above 1000 will be coerced to 1000.
113
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
114
+
115
+ // Optional. Token (if provided) to retrieve the subsequent page. All other
116
+ // parameters must match the original call that provided the page token.
117
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
118
+ }
119
+
120
+ // Response message for the ListMethodGroups method.
121
+ message ListQuotaGroupsResponse {
122
+ // The methods, current quota usage and limits per each group. The quota is
123
+ // shared between all methods in the group. The groups are sorted in
124
+ // descending order based on
125
+ // [quota_usage][google.shopping.merchant.quota.v1.QuotaGroup.quota_usage].
126
+ repeated QuotaGroup quota_groups = 1;
127
+
128
+ // A token, which can be sent as `page_token` to retrieve the next page.
129
+ // If this field is omitted, there are no subsequent pages.
130
+ string next_page_token = 2;
131
+ }