Skip to content

Commit 8d1d0df

Browse files
author
CBWS
committed
Update generated protobuf docs based on v0.0.12
1 parent 8df8024 commit 8d1d0df

1 file changed

Lines changed: 222 additions & 0 deletions

File tree

protobuf/resource-accounting.md

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
# Protocol Documentation
2+
<a name="top"></a>
3+
4+
## Table of Contents
5+
6+
- [cbws/service_management/resource_accounting/v1alpha1/resource_accounting.proto](#cbws/service_management/resource_accounting/v1alpha1/resource_accounting.proto)
7+
- [AccountRequest](#cbws.service_management.resource_accounting.v1alpha1.AccountRequest)
8+
- [AccountResponse](#cbws.service_management.resource_accounting.v1alpha1.AccountResponse)
9+
- [ListResourcesRequest](#cbws.service_management.resource_accounting.v1alpha1.ListResourcesRequest)
10+
- [ListResourcesResponse](#cbws.service_management.resource_accounting.v1alpha1.ListResourcesResponse)
11+
- [Resource](#cbws.service_management.resource_accounting.v1alpha1.Resource)
12+
- [Usage](#cbws.service_management.resource_accounting.v1alpha1.Usage)
13+
- [UsageCurrent](#cbws.service_management.resource_accounting.v1alpha1.UsageCurrent)
14+
- [UsageDelta](#cbws.service_management.resource_accounting.v1alpha1.UsageDelta)
15+
- [UsageTotal](#cbws.service_management.resource_accounting.v1alpha1.UsageTotal)
16+
17+
- [ResourceAccountingService](#cbws.service_management.resource_accounting.v1alpha1.ResourceAccountingService)
18+
19+
- [Scalar Value Types](#scalar-value-types)
20+
21+
22+
23+
<a name="cbws/service_management/resource_accounting/v1alpha1/resource_accounting.proto"></a>
24+
<p align="right"><a href="#top">Top</a></p>
25+
26+
## cbws/service_management/resource_accounting/v1alpha1/resource_accounting.proto
27+
28+
29+
30+
<a name="cbws.service_management.resource_accounting.v1alpha1.AccountRequest"></a>
31+
32+
### AccountRequest
33+
34+
35+
36+
| Field | Type | Label | Description |
37+
| ----- | ---- | ----- | ----------- |
38+
| service | [string](#string) | | The service resource name in the format of services/vm.cbws.xyz |
39+
| consumer_project | [string](#string) | | The project resource name in the format of projects/project-name |
40+
| resource | [string](#string) | | The resource to account usage for in format of //service.cbws.xyz/resource-name |
41+
| resource_display_name | [string](#string) | | The display name to be shown in UIs and on resource accounting documents. The display name will be updated to the last updated value. |
42+
| usage | [Usage](#cbws.service_management.resource_accounting.v1alpha1.Usage) | repeated | All the usages to report by product |
43+
44+
45+
46+
47+
48+
49+
<a name="cbws.service_management.resource_accounting.v1alpha1.AccountResponse"></a>
50+
51+
### AccountResponse
52+
53+
54+
55+
56+
57+
58+
59+
<a name="cbws.service_management.resource_accounting.v1alpha1.ListResourcesRequest"></a>
60+
61+
### ListResourcesRequest
62+
The resource list request.
63+
64+
65+
| Field | Type | Label | Description |
66+
| ----- | ---- | ----- | ----------- |
67+
| parent | [string](#string) | | Required. The resource name of the project associated with the resource, such as `projects/my-project-123`. |
68+
| page_size | [int32](#int32) | | Optional limit on the number of resources to include in the response. Further resources can subsequently be obtained by including the next_page_token in a subsequent request. |
69+
| page_token | [string](#string) | | Optional pagination token returned in an earlier next_page_token. |
70+
71+
72+
73+
74+
75+
76+
<a name="cbws.service_management.resource_accounting.v1alpha1.ListResourcesResponse"></a>
77+
78+
### ListResourcesResponse
79+
The resource list response.
80+
81+
82+
| Field | Type | Label | Description |
83+
| ----- | ---- | ----- | ----------- |
84+
| resources | [Resource](#cbws.service_management.resource_accounting.v1alpha1.Resource) | repeated | The list of matching resources. |
85+
| next_page_token | [string](#string) | | To retrieve the next page of results, set ListResourcesRequest to this value. |
86+
87+
88+
89+
90+
91+
92+
<a name="cbws.service_management.resource_accounting.v1alpha1.Resource"></a>
93+
94+
### Resource
95+
96+
97+
98+
| Field | Type | Label | Description |
99+
| ----- | ---- | ----- | ----------- |
100+
| name | [string](#string) | | The full resource name of the resource in the format of projects/project-name/resources/iam.cbws.xyz/projects/project-name/serviceAccounts/iam@iam |
101+
| parent | [string](#string) | | The project name of this resource |
102+
| display_name | [string](#string) | | The display name of this resource |
103+
104+
105+
106+
107+
108+
109+
<a name="cbws.service_management.resource_accounting.v1alpha1.Usage"></a>
110+
111+
### Usage
112+
113+
114+
115+
| Field | Type | Label | Description |
116+
| ----- | ---- | ----- | ----------- |
117+
| product | [string](#string) | | The product resource name in format services/domains.cbws.xyz/products/domain-nl |
118+
| total | [UsageTotal](#cbws.service_management.resource_accounting.v1alpha1.UsageTotal) | | Report the latest total usage of a particular product
119+
120+
This is useful where you only know the latest value, like kWh power usage read from powerbars. |
121+
| delta | [UsageDelta](#cbws.service_management.resource_accounting.v1alpha1.UsageDelta) | | Report the new usage since the latest accounting request of a particular product
122+
123+
This is useful when you want to report complexity of an API call, report the renewal/registration of a domain name or other one of actions. |
124+
| current | [UsageCurrent](#cbws.service_management.resource_accounting.v1alpha1.UsageCurrent) | | Report the current resource usage per period of a particular product this will automatically calculate the delta since the last accounting request
125+
126+
This is useful for services that have constant usage like virtual machines, you can simply report that the current usage is 4 CPUs, 8 GB of RAM and 20 GB of SSD. |
127+
128+
129+
130+
131+
132+
133+
<a name="cbws.service_management.resource_accounting.v1alpha1.UsageCurrent"></a>
134+
135+
### UsageCurrent
136+
137+
138+
139+
| Field | Type | Label | Description |
140+
| ----- | ---- | ----- | ----------- |
141+
| usage | [double](#double) | | |
142+
143+
144+
145+
146+
147+
148+
<a name="cbws.service_management.resource_accounting.v1alpha1.UsageDelta"></a>
149+
150+
### UsageDelta
151+
152+
153+
154+
| Field | Type | Label | Description |
155+
| ----- | ---- | ----- | ----------- |
156+
| delta | [double](#double) | | |
157+
158+
159+
160+
161+
162+
163+
<a name="cbws.service_management.resource_accounting.v1alpha1.UsageTotal"></a>
164+
165+
### UsageTotal
166+
167+
168+
169+
| Field | Type | Label | Description |
170+
| ----- | ---- | ----- | ----------- |
171+
| current_total | [double](#double) | | The current total value of usage |
172+
173+
174+
175+
176+
177+
178+
179+
180+
181+
182+
183+
184+
<a name="cbws.service_management.resource_accounting.v1alpha1.ResourceAccountingService"></a>
185+
186+
### ResourceAccountingService
187+
This service is meant to be used by service owners and can be used to report product usage for resource in a
188+
consumer project.
189+
190+
Hostname: resourceaccounting.cbws.xyz
191+
192+
| Method Name | Request Type | Response Type | Description |
193+
| ----------- | ------------ | ------------- | ------------|
194+
| ListResources | [ListResourcesRequest](#cbws.service_management.resource_accounting.v1alpha1.ListResourcesRequest) | [ListResourcesResponse](#cbws.service_management.resource_accounting.v1alpha1.ListResourcesResponse) | Permission required: resourceaccounting.cbws.xyz/Resource/list |
195+
| Account | [AccountRequest](#cbws.service_management.resource_accounting.v1alpha1.AccountRequest) | [AccountResponse](#cbws.service_management.resource_accounting.v1alpha1.AccountResponse) | Account usage for a resource in a consumer project
196+
197+
Permission required: servicemanagement.cbws.xyz/Service/accountUsage |
198+
199+
200+
201+
202+
203+
## Scalar Value Types
204+
205+
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
206+
| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
207+
| <a name="double" /> double | | double | double | float | float64 | double | float | Float |
208+
| <a name="float" /> float | | float | float | float | float32 | float | float | Float |
209+
| <a name="int32" /> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
210+
| <a name="int64" /> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
211+
| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
212+
| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
213+
| <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
214+
| <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
215+
| <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
216+
| <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
217+
| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
218+
| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
219+
| <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
220+
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
221+
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |
222+

0 commit comments

Comments
 (0)