Skip to content

Commit 529f785

Browse files
sjoblomjWorking Group Two Maintainers
andauthored
Syncing protocol buffers (#67)
GitOrigin-RevId: 051b69b321579560a25b03a39639fdcae5411bdb Co-authored-by: Working Group Two Maintainers <[email protected]>
1 parent 304b962 commit 529f785

File tree

4 files changed

+61
-1
lines changed

4 files changed

+61
-1
lines changed

wgtwo/annotations/annotations.proto

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,38 @@ option java_package = "com.wgtwo.api.annotations";
99
option java_outer_classname = "AnnotationsProto";
1010

1111
extend google.protobuf.MethodOptions {
12+
// Specifies the required access scope for this method.
1213
string scope = 50013;
1314
}
1415

16+
// Enum representing the release status of API methods.
17+
//
18+
// More guidance around release status can be found in the
19+
// [API Lifecycle documentation](https://developer.cisco.com/docs/mobility-services/api-lifecycle/).
1520
enum ReleaseStatus {
21+
// Default status when unspecified.
1622
UNSPECIFIED = 0;
23+
24+
// Indicates a stable method, suitable for production use.
25+
// No breaking changes will be made to this method.
1726
STABLE = 1;
27+
28+
// Indicates a beta method, suitable for initial development and testing.
29+
// Note that breaking changes may occur without notice.
30+
//
31+
// Most new methods will be released as beta, awaiting feedback from developers.
1832
BETA = 2;
33+
34+
// Indicates a deprecated method.
35+
// It is recommended to migrate to newer alternatives if available.
36+
//
37+
// Please consult the
38+
// [Cisco DevNet Mobility Services API documentation](https://docs.mobility.cisco.com/)
39+
// for guidance.
1940
DEPRECATED = 3;
2041
}
2142

2243
extend google.protobuf.MethodOptions {
44+
// The release status of the method.
2345
ReleaseStatus status = 50015;
2446
}

wgtwo/annotations/buf.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Annotations
2+
3+
The annotations in the `wgtwo` package provide critical metadata for API methods.
4+
5+
They are intended to aid developers in understanding the access scope required to use the API method.
6+
7+
It also provides information about the API method's stability and deprecation status.

wgtwo/common/v0/pagination.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
syntax = "proto3";
2+
3+
package wgtwo.common.v0;
4+
5+
option go_package = "github.com/working-group-two/wgtwoapis/wgtwo/common/v0";
6+
option java_package = "com.wgtwo.api.v0.common";
7+
option java_outer_classname = "PaginationProto";
8+
9+
message PaginationRequest {
10+
// 1 is reserved for 'parent'
11+
int32 page_size = 2;
12+
string page_token = 3;
13+
}
14+
15+
message PaginationResponse {
16+
string next_page_token = 2;
17+
}

wgtwo/consents/v0/consents.proto

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package wgtwo.consents.v0;
1919

2020
import "wgtwo/annotations/annotations.proto";
2121
import "wgtwo/common/v0/errors.proto";
22+
import "wgtwo/common/v0/pagination.proto";
2223
import "wgtwo/common/v0/phonenumber.proto";
2324
import "wgtwo/common/v0/types.proto";
2425

@@ -46,6 +47,19 @@ service ConsentService {
4647
option (scope) = "subscription.consent:write";
4748
}
4849

50+
rpc ListConsentsForProduct (ListConsentsForProductRequest)
51+
returns (ListConsentsForProductResponse) {
52+
option (scope) = "";
53+
}
54+
}
55+
56+
message ListConsentsForProductRequest {
57+
wgtwo.common.v0.PaginationRequest pagination = 1;
58+
}
59+
60+
message ListConsentsForProductResponse {
61+
repeated Consent consents = 1;
62+
wgtwo.common.v0.PaginationResponse pagination = 2;
4963
}
5064

5165
// Request to get consents for a subscription.
@@ -115,7 +129,7 @@ message Consent {
115129
// The scopes of the consent.
116130
repeated Scope scopes = 3;
117131
// Whether the consent is revocable.
118-
bool revokable = 4;
132+
bool revocable = 4;
119133
map<string, string> metadata = 5;
120134
}
121135

0 commit comments

Comments
 (0)