frequenz-api-common 0.0.1__tar.gz → 0.2.0__tar.gz
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.
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/CONTRIBUTING.md +5 -5
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/PKG-INFO +1 -1
- frequenz-api-common-0.2.0/RELEASE_NOTES.md +6 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/py/frequenz_api_common.egg-info/PKG-INFO +1 -1
- frequenz-api-common-0.2.0/py/frequenz_api_common.egg-info/SOURCES.txt +73 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/py/frequenz_api_common.egg-info/requires.txt +4 -4
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/pyproject.toml +6 -6
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/annotations.proto +31 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/auth.proto +181 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/backend.proto +51 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/billing.proto +67 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/client.proto +99 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/config_change.proto +85 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/consumer.proto +83 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/context.proto +63 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/control.proto +33 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/distribution.proto +213 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/documentation.proto +157 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/endpoint.proto +71 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/field_behavior.proto +84 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/http.proto +318 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/httpbody.proto +76 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/label.proto +49 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/launch_stage.proto +67 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/log.proto +55 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/logging.proto +83 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/metric.proto +192 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/monitored_resource.proto +116 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/monitoring.proto +89 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/quota.proto +259 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/resource.proto +299 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/routing.proto +461 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/service.proto +175 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/source_info.proto +32 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/system_parameter.proto +96 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/api/usage.proto +92 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/cloud/extended_operations.proto +150 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/iam/admin/v1/iam.proto +1087 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/iam/v1/iam_policy.proto +145 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/iam/v1/logging/audit_data.proto +34 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/iam/v1/options.proto +41 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/iam/v1/policy.proto +240 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/logging/type/http_request.proto +92 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/logging/type/log_severity.proto +72 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/longrunning/operations.proto +247 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/rpc/code.proto +186 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/rpc/context/attribute_context.proto +287 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/rpc/error_details.proto +246 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/rpc/status.proto +47 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/calendar_period.proto +57 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/color.proto +170 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/date.proto +50 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/datetime.proto +97 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/dayofweek.proto +51 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/expr.proto +51 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/fraction.proto +34 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/latlng.proto +37 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/money.proto +43 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/month.proto +66 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/postal_address.proto +135 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/quaternion.proto +95 -0
- frequenz-api-common-0.2.0/submodules/api-common-protos/google/type/timeofday.proto +44 -0
- frequenz-api-common-0.0.1/RELEASE_NOTES.md +0 -5
- frequenz-api-common-0.0.1/py/frequenz/api/common/components_pb2.py +0 -33
- frequenz-api-common-0.0.1/py/frequenz/api/common/components_pb2.pyi +0 -207
- frequenz-api-common-0.0.1/py/frequenz/api/common/components_pb2_grpc.py +0 -4
- frequenz-api-common-0.0.1/py/frequenz/api/common/components_pb2_grpc.pyi +0 -11
- frequenz-api-common-0.0.1/py/frequenz/api/common/metrics/electrical_pb2.py +0 -36
- frequenz-api-common-0.0.1/py/frequenz/api/common/metrics/electrical_pb2.pyi +0 -383
- frequenz-api-common-0.0.1/py/frequenz/api/common/metrics/electrical_pb2_grpc.py +0 -4
- frequenz-api-common-0.0.1/py/frequenz/api/common/metrics/electrical_pb2_grpc.pyi +0 -11
- frequenz-api-common-0.0.1/py/frequenz/api/common/metrics_pb2.py +0 -27
- frequenz-api-common-0.0.1/py/frequenz/api/common/metrics_pb2.pyi +0 -142
- frequenz-api-common-0.0.1/py/frequenz/api/common/metrics_pb2_grpc.py +0 -4
- frequenz-api-common-0.0.1/py/frequenz/api/common/metrics_pb2_grpc.pyi +0 -11
- frequenz-api-common-0.0.1/py/frequenz_api_common.egg-info/SOURCES.txt +0 -30
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/CODEOWNERS +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/LICENSE +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/MANIFEST.in +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/README.md +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/proto/frequenz/api/common/components.proto +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/proto/frequenz/api/common/metrics/electrical.proto +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/proto/frequenz/api/common/metrics.proto +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/py/frequenz/api/common/__init__.py +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/py/frequenz/api/common/metrics/__init__.py +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/py/frequenz/api/common/py.typed +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/py/frequenz_api_common.egg-info/dependency_links.txt +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/py/frequenz_api_common.egg-info/top_level.txt +0 -0
- {frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/setup.cfg +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Contributing to Frequenz
|
|
2
|
-
|
|
1
|
+
Contributing to Frequenz Common API
|
|
2
|
+
===================================
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
Build
|
|
@@ -64,11 +64,11 @@ These are the steps to create a new release:
|
|
|
64
64
|
|
|
65
65
|
5. A GitHub action will test the tag and if all goes well it will create
|
|
66
66
|
a [GitHub
|
|
67
|
-
Release](https://github.com/frequenz-floss/frequenz-api-
|
|
67
|
+
Release](https://github.com/frequenz-floss/frequenz-api-common/releases),
|
|
68
68
|
create a new
|
|
69
|
-
[announcement](https://github.com/frequenz-floss/frequenz-api-
|
|
69
|
+
[announcement](https://github.com/frequenz-floss/frequenz-api-common/discussions/categories/announcements)
|
|
70
70
|
about the release, and upload a new package to
|
|
71
|
-
[PyPI](https://pypi.org/project/frequenz-api-
|
|
71
|
+
[PyPI](https://pypi.org/project/frequenz-api-common/) automatically.
|
|
72
72
|
|
|
73
73
|
6. Once this is done, reset the `RELEASE_NOTES.md` with the template:
|
|
74
74
|
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
CODEOWNERS
|
|
2
|
+
CONTRIBUTING.md
|
|
3
|
+
LICENSE
|
|
4
|
+
MANIFEST.in
|
|
5
|
+
README.md
|
|
6
|
+
RELEASE_NOTES.md
|
|
7
|
+
pyproject.toml
|
|
8
|
+
proto/frequenz/api/common/components.proto
|
|
9
|
+
proto/frequenz/api/common/metrics.proto
|
|
10
|
+
proto/frequenz/api/common/metrics/electrical.proto
|
|
11
|
+
py/frequenz/api/common/__init__.py
|
|
12
|
+
py/frequenz/api/common/py.typed
|
|
13
|
+
py/frequenz/api/common/metrics/__init__.py
|
|
14
|
+
py/frequenz_api_common.egg-info/PKG-INFO
|
|
15
|
+
py/frequenz_api_common.egg-info/SOURCES.txt
|
|
16
|
+
py/frequenz_api_common.egg-info/dependency_links.txt
|
|
17
|
+
py/frequenz_api_common.egg-info/requires.txt
|
|
18
|
+
py/frequenz_api_common.egg-info/top_level.txt
|
|
19
|
+
submodules/api-common-protos/google/api/annotations.proto
|
|
20
|
+
submodules/api-common-protos/google/api/auth.proto
|
|
21
|
+
submodules/api-common-protos/google/api/backend.proto
|
|
22
|
+
submodules/api-common-protos/google/api/billing.proto
|
|
23
|
+
submodules/api-common-protos/google/api/client.proto
|
|
24
|
+
submodules/api-common-protos/google/api/config_change.proto
|
|
25
|
+
submodules/api-common-protos/google/api/consumer.proto
|
|
26
|
+
submodules/api-common-protos/google/api/context.proto
|
|
27
|
+
submodules/api-common-protos/google/api/control.proto
|
|
28
|
+
submodules/api-common-protos/google/api/distribution.proto
|
|
29
|
+
submodules/api-common-protos/google/api/documentation.proto
|
|
30
|
+
submodules/api-common-protos/google/api/endpoint.proto
|
|
31
|
+
submodules/api-common-protos/google/api/field_behavior.proto
|
|
32
|
+
submodules/api-common-protos/google/api/http.proto
|
|
33
|
+
submodules/api-common-protos/google/api/httpbody.proto
|
|
34
|
+
submodules/api-common-protos/google/api/label.proto
|
|
35
|
+
submodules/api-common-protos/google/api/launch_stage.proto
|
|
36
|
+
submodules/api-common-protos/google/api/log.proto
|
|
37
|
+
submodules/api-common-protos/google/api/logging.proto
|
|
38
|
+
submodules/api-common-protos/google/api/metric.proto
|
|
39
|
+
submodules/api-common-protos/google/api/monitored_resource.proto
|
|
40
|
+
submodules/api-common-protos/google/api/monitoring.proto
|
|
41
|
+
submodules/api-common-protos/google/api/quota.proto
|
|
42
|
+
submodules/api-common-protos/google/api/resource.proto
|
|
43
|
+
submodules/api-common-protos/google/api/routing.proto
|
|
44
|
+
submodules/api-common-protos/google/api/service.proto
|
|
45
|
+
submodules/api-common-protos/google/api/source_info.proto
|
|
46
|
+
submodules/api-common-protos/google/api/system_parameter.proto
|
|
47
|
+
submodules/api-common-protos/google/api/usage.proto
|
|
48
|
+
submodules/api-common-protos/google/cloud/extended_operations.proto
|
|
49
|
+
submodules/api-common-protos/google/iam/admin/v1/iam.proto
|
|
50
|
+
submodules/api-common-protos/google/iam/v1/iam_policy.proto
|
|
51
|
+
submodules/api-common-protos/google/iam/v1/options.proto
|
|
52
|
+
submodules/api-common-protos/google/iam/v1/policy.proto
|
|
53
|
+
submodules/api-common-protos/google/iam/v1/logging/audit_data.proto
|
|
54
|
+
submodules/api-common-protos/google/logging/type/http_request.proto
|
|
55
|
+
submodules/api-common-protos/google/logging/type/log_severity.proto
|
|
56
|
+
submodules/api-common-protos/google/longrunning/operations.proto
|
|
57
|
+
submodules/api-common-protos/google/rpc/code.proto
|
|
58
|
+
submodules/api-common-protos/google/rpc/error_details.proto
|
|
59
|
+
submodules/api-common-protos/google/rpc/status.proto
|
|
60
|
+
submodules/api-common-protos/google/rpc/context/attribute_context.proto
|
|
61
|
+
submodules/api-common-protos/google/type/calendar_period.proto
|
|
62
|
+
submodules/api-common-protos/google/type/color.proto
|
|
63
|
+
submodules/api-common-protos/google/type/date.proto
|
|
64
|
+
submodules/api-common-protos/google/type/datetime.proto
|
|
65
|
+
submodules/api-common-protos/google/type/dayofweek.proto
|
|
66
|
+
submodules/api-common-protos/google/type/expr.proto
|
|
67
|
+
submodules/api-common-protos/google/type/fraction.proto
|
|
68
|
+
submodules/api-common-protos/google/type/latlng.proto
|
|
69
|
+
submodules/api-common-protos/google/type/money.proto
|
|
70
|
+
submodules/api-common-protos/google/type/month.proto
|
|
71
|
+
submodules/api-common-protos/google/type/postal_address.proto
|
|
72
|
+
submodules/api-common-protos/google/type/quaternion.proto
|
|
73
|
+
submodules/api-common-protos/google/type/timeofday.proto
|
{frequenz-api-common-0.0.1 → frequenz-api-common-0.2.0}/py/frequenz_api_common.egg-info/requires.txt
RENAMED
|
@@ -13,16 +13,16 @@ black==23.3.0
|
|
|
13
13
|
isort==5.12.0
|
|
14
14
|
|
|
15
15
|
[dev-mypy]
|
|
16
|
-
mypy==1.
|
|
16
|
+
mypy==1.3.0
|
|
17
17
|
frequenz-api-common[dev-noxfile,dev-pytest]
|
|
18
18
|
|
|
19
19
|
[dev-noxfile]
|
|
20
|
-
nox==
|
|
20
|
+
nox==2023.4.22
|
|
21
21
|
frequenz-repo-config[api]==0.1.0
|
|
22
22
|
|
|
23
23
|
[dev-pylint]
|
|
24
|
-
pylint==2.17.
|
|
24
|
+
pylint==2.17.4
|
|
25
25
|
frequenz-api-common[dev-noxfile,dev-pytest]
|
|
26
26
|
|
|
27
27
|
[dev-pytest]
|
|
28
|
-
pytest==7.
|
|
28
|
+
pytest==7.3.1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
requires = [
|
|
3
|
-
"setuptools
|
|
4
|
-
"setuptools_scm[toml]
|
|
3
|
+
"setuptools == 67.7.2",
|
|
4
|
+
"setuptools_scm[toml] == 7.1.0",
|
|
5
5
|
"frequenz-repo-config[api] == 0.1.0",
|
|
6
6
|
]
|
|
7
7
|
build-backend = "setuptools.build_meta"
|
|
@@ -35,17 +35,17 @@ email = "floss@frequenz.com"
|
|
|
35
35
|
dev-docstrings = ["pydocstyle == 6.3.0", "darglint == 1.8.1"]
|
|
36
36
|
dev-formatting = ["black == 23.3.0", "isort == 5.12.0"]
|
|
37
37
|
dev-mypy = [
|
|
38
|
-
"mypy == 1.
|
|
38
|
+
"mypy == 1.3.0",
|
|
39
39
|
# For checking the noxfile and tests
|
|
40
40
|
"frequenz-api-common[dev-noxfile,dev-pytest]",
|
|
41
41
|
]
|
|
42
|
-
dev-noxfile = ["nox ==
|
|
42
|
+
dev-noxfile = ["nox == 2023.4.22", "frequenz-repo-config[api] == 0.1.0"]
|
|
43
43
|
dev-pylint = [
|
|
44
|
-
"pylint == 2.17.
|
|
44
|
+
"pylint == 2.17.4",
|
|
45
45
|
# For checking the noxfile and tests
|
|
46
46
|
"frequenz-api-common[dev-noxfile,dev-pytest]",
|
|
47
47
|
]
|
|
48
|
-
dev-pytest = ["pytest == 7.
|
|
48
|
+
dev-pytest = ["pytest == 7.3.1"]
|
|
49
49
|
dev = [
|
|
50
50
|
"frequenz-api-common[dev-docstrings,dev-formatting,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
|
|
51
51
|
]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright (c) 2015, Google Inc.
|
|
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.api;
|
|
18
|
+
|
|
19
|
+
import "google/api/http.proto";
|
|
20
|
+
import "google/protobuf/descriptor.proto";
|
|
21
|
+
|
|
22
|
+
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
|
|
23
|
+
option java_multiple_files = true;
|
|
24
|
+
option java_outer_classname = "AnnotationsProto";
|
|
25
|
+
option java_package = "com.google.api";
|
|
26
|
+
option objc_class_prefix = "GAPI";
|
|
27
|
+
|
|
28
|
+
extend google.protobuf.MethodOptions {
|
|
29
|
+
// See `HttpRule`.
|
|
30
|
+
HttpRule http = 72295728;
|
|
31
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// Copyright 2018 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.api;
|
|
18
|
+
|
|
19
|
+
import "google/api/annotations.proto";
|
|
20
|
+
|
|
21
|
+
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
|
22
|
+
option java_multiple_files = true;
|
|
23
|
+
option java_outer_classname = "AuthProto";
|
|
24
|
+
option java_package = "com.google.api";
|
|
25
|
+
option objc_class_prefix = "GAPI";
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
// `Authentication` defines the authentication configuration for an API.
|
|
29
|
+
//
|
|
30
|
+
// Example for an API targeted for external use:
|
|
31
|
+
//
|
|
32
|
+
// name: calendar.googleapis.com
|
|
33
|
+
// authentication:
|
|
34
|
+
// providers:
|
|
35
|
+
// - id: google_calendar_auth
|
|
36
|
+
// jwks_uri: https://www.googleapis.com/oauth2/v1/certs
|
|
37
|
+
// issuer: https://securetoken.google.com
|
|
38
|
+
// rules:
|
|
39
|
+
// - selector: "*"
|
|
40
|
+
// requirements:
|
|
41
|
+
// provider_id: google_calendar_auth
|
|
42
|
+
message Authentication {
|
|
43
|
+
// A list of authentication rules that apply to individual API methods.
|
|
44
|
+
//
|
|
45
|
+
// **NOTE:** All service configuration rules follow "last one wins" order.
|
|
46
|
+
repeated AuthenticationRule rules = 3;
|
|
47
|
+
|
|
48
|
+
// Defines a set of authentication providers that a service supports.
|
|
49
|
+
repeated AuthProvider providers = 4;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Authentication rules for the service.
|
|
53
|
+
//
|
|
54
|
+
// By default, if a method has any authentication requirements, every request
|
|
55
|
+
// must include a valid credential matching one of the requirements.
|
|
56
|
+
// It's an error to include more than one kind of credential in a single
|
|
57
|
+
// request.
|
|
58
|
+
//
|
|
59
|
+
// If a method doesn't have any auth requirements, request credentials will be
|
|
60
|
+
// ignored.
|
|
61
|
+
message AuthenticationRule {
|
|
62
|
+
// Selects the methods to which this rule applies.
|
|
63
|
+
//
|
|
64
|
+
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
|
65
|
+
string selector = 1;
|
|
66
|
+
|
|
67
|
+
// The requirements for OAuth credentials.
|
|
68
|
+
OAuthRequirements oauth = 2;
|
|
69
|
+
|
|
70
|
+
// If true, the service accepts API keys without any other credential.
|
|
71
|
+
bool allow_without_credential = 5;
|
|
72
|
+
|
|
73
|
+
// Requirements for additional authentication providers.
|
|
74
|
+
repeated AuthRequirement requirements = 7;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Configuration for an anthentication provider, including support for
|
|
78
|
+
// [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
|
|
79
|
+
message AuthProvider {
|
|
80
|
+
// The unique identifier of the auth provider. It will be referred to by
|
|
81
|
+
// `AuthRequirement.provider_id`.
|
|
82
|
+
//
|
|
83
|
+
// Example: "bookstore_auth".
|
|
84
|
+
string id = 1;
|
|
85
|
+
|
|
86
|
+
// Identifies the principal that issued the JWT. See
|
|
87
|
+
// https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
|
|
88
|
+
// Usually a URL or an email address.
|
|
89
|
+
//
|
|
90
|
+
// Example: https://securetoken.google.com
|
|
91
|
+
// Example: 1234567-compute@developer.gserviceaccount.com
|
|
92
|
+
string issuer = 2;
|
|
93
|
+
|
|
94
|
+
// URL of the provider's public key set to validate signature of the JWT. See
|
|
95
|
+
// [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
|
|
96
|
+
// Optional if the key set document:
|
|
97
|
+
// - can be retrieved from
|
|
98
|
+
// [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
|
|
99
|
+
// of the issuer.
|
|
100
|
+
// - can be inferred from the email domain of the issuer (e.g. a Google service account).
|
|
101
|
+
//
|
|
102
|
+
// Example: https://www.googleapis.com/oauth2/v1/certs
|
|
103
|
+
string jwks_uri = 3;
|
|
104
|
+
|
|
105
|
+
// The list of JWT
|
|
106
|
+
// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
|
|
107
|
+
// that are allowed to access. A JWT containing any of these audiences will
|
|
108
|
+
// be accepted. When this setting is absent, only JWTs with audience
|
|
109
|
+
// "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
|
|
110
|
+
// will be accepted. For example, if no audiences are in the setting,
|
|
111
|
+
// LibraryService API will only accept JWTs with the following audience
|
|
112
|
+
// "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
|
|
113
|
+
//
|
|
114
|
+
// Example:
|
|
115
|
+
//
|
|
116
|
+
// audiences: bookstore_android.apps.googleusercontent.com,
|
|
117
|
+
// bookstore_web.apps.googleusercontent.com
|
|
118
|
+
string audiences = 4;
|
|
119
|
+
|
|
120
|
+
// Redirect URL if JWT token is required but no present or is expired.
|
|
121
|
+
// Implement authorizationUrl of securityDefinitions in OpenAPI spec.
|
|
122
|
+
string authorization_url = 5;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// OAuth scopes are a way to define data and permissions on data. For example,
|
|
126
|
+
// there are scopes defined for "Read-only access to Google Calendar" and
|
|
127
|
+
// "Access to Cloud Platform". Users can consent to a scope for an application,
|
|
128
|
+
// giving it permission to access that data on their behalf.
|
|
129
|
+
//
|
|
130
|
+
// OAuth scope specifications should be fairly coarse grained; a user will need
|
|
131
|
+
// to see and understand the text description of what your scope means.
|
|
132
|
+
//
|
|
133
|
+
// In most cases: use one or at most two OAuth scopes for an entire family of
|
|
134
|
+
// products. If your product has multiple APIs, you should probably be sharing
|
|
135
|
+
// the OAuth scope across all of those APIs.
|
|
136
|
+
//
|
|
137
|
+
// When you need finer grained OAuth consent screens: talk with your product
|
|
138
|
+
// management about how developers will use them in practice.
|
|
139
|
+
//
|
|
140
|
+
// Please note that even though each of the canonical scopes is enough for a
|
|
141
|
+
// request to be accepted and passed to the backend, a request can still fail
|
|
142
|
+
// due to the backend requiring additional scopes or permissions.
|
|
143
|
+
message OAuthRequirements {
|
|
144
|
+
// The list of publicly documented OAuth scopes that are allowed access. An
|
|
145
|
+
// OAuth token containing any of these scopes will be accepted.
|
|
146
|
+
//
|
|
147
|
+
// Example:
|
|
148
|
+
//
|
|
149
|
+
// canonical_scopes: https://www.googleapis.com/auth/calendar,
|
|
150
|
+
// https://www.googleapis.com/auth/calendar.read
|
|
151
|
+
string canonical_scopes = 1;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// User-defined authentication requirements, including support for
|
|
155
|
+
// [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
|
|
156
|
+
message AuthRequirement {
|
|
157
|
+
// [id][google.api.AuthProvider.id] from authentication provider.
|
|
158
|
+
//
|
|
159
|
+
// Example:
|
|
160
|
+
//
|
|
161
|
+
// provider_id: bookstore_auth
|
|
162
|
+
string provider_id = 1;
|
|
163
|
+
|
|
164
|
+
// NOTE: This will be deprecated soon, once AuthProvider.audiences is
|
|
165
|
+
// implemented and accepted in all the runtime components.
|
|
166
|
+
//
|
|
167
|
+
// The list of JWT
|
|
168
|
+
// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
|
|
169
|
+
// that are allowed to access. A JWT containing any of these audiences will
|
|
170
|
+
// be accepted. When this setting is absent, only JWTs with audience
|
|
171
|
+
// "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
|
|
172
|
+
// will be accepted. For example, if no audiences are in the setting,
|
|
173
|
+
// LibraryService API will only accept JWTs with the following audience
|
|
174
|
+
// "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
|
|
175
|
+
//
|
|
176
|
+
// Example:
|
|
177
|
+
//
|
|
178
|
+
// audiences: bookstore_android.apps.googleusercontent.com,
|
|
179
|
+
// bookstore_web.apps.googleusercontent.com
|
|
180
|
+
string audiences = 2;
|
|
181
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Copyright 2018 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.api;
|
|
18
|
+
|
|
19
|
+
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
|
20
|
+
option java_multiple_files = true;
|
|
21
|
+
option java_outer_classname = "BackendProto";
|
|
22
|
+
option java_package = "com.google.api";
|
|
23
|
+
option objc_class_prefix = "GAPI";
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
// `Backend` defines the backend configuration for a service.
|
|
27
|
+
message Backend {
|
|
28
|
+
// A list of API backend rules that apply to individual API methods.
|
|
29
|
+
//
|
|
30
|
+
// **NOTE:** All service configuration rules follow "last one wins" order.
|
|
31
|
+
repeated BackendRule rules = 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// A backend rule provides configuration for an individual API element.
|
|
35
|
+
message BackendRule {
|
|
36
|
+
// Selects the methods to which this rule applies.
|
|
37
|
+
//
|
|
38
|
+
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
|
39
|
+
string selector = 1;
|
|
40
|
+
|
|
41
|
+
// The address of the API backend.
|
|
42
|
+
string address = 2;
|
|
43
|
+
|
|
44
|
+
// The number of seconds to wait for a response from a request. The default
|
|
45
|
+
// deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.
|
|
46
|
+
double deadline = 3;
|
|
47
|
+
|
|
48
|
+
// Minimum deadline in seconds needed for this method. Calls having deadline
|
|
49
|
+
// value lower than this will be rejected.
|
|
50
|
+
double min_deadline = 4;
|
|
51
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Copyright 2018 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.api;
|
|
18
|
+
|
|
19
|
+
import "google/api/annotations.proto";
|
|
20
|
+
|
|
21
|
+
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
|
22
|
+
option java_multiple_files = true;
|
|
23
|
+
option java_outer_classname = "BillingProto";
|
|
24
|
+
option java_package = "com.google.api";
|
|
25
|
+
option objc_class_prefix = "GAPI";
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
// Billing related configuration of the service.
|
|
29
|
+
//
|
|
30
|
+
// The following example shows how to configure monitored resources and metrics
|
|
31
|
+
// for billing:
|
|
32
|
+
//
|
|
33
|
+
// monitored_resources:
|
|
34
|
+
// - type: library.googleapis.com/branch
|
|
35
|
+
// labels:
|
|
36
|
+
// - key: /city
|
|
37
|
+
// description: The city where the library branch is located in.
|
|
38
|
+
// - key: /name
|
|
39
|
+
// description: The name of the branch.
|
|
40
|
+
// metrics:
|
|
41
|
+
// - name: library.googleapis.com/book/borrowed_count
|
|
42
|
+
// metric_kind: DELTA
|
|
43
|
+
// value_type: INT64
|
|
44
|
+
// billing:
|
|
45
|
+
// consumer_destinations:
|
|
46
|
+
// - monitored_resource: library.googleapis.com/branch
|
|
47
|
+
// metrics:
|
|
48
|
+
// - library.googleapis.com/book/borrowed_count
|
|
49
|
+
message Billing {
|
|
50
|
+
// Configuration of a specific billing destination (Currently only support
|
|
51
|
+
// bill against consumer project).
|
|
52
|
+
message BillingDestination {
|
|
53
|
+
// The monitored resource type. The type must be defined in
|
|
54
|
+
// [Service.monitored_resources][google.api.Service.monitored_resources] section.
|
|
55
|
+
string monitored_resource = 1;
|
|
56
|
+
|
|
57
|
+
// Names of the metrics to report to this billing destination.
|
|
58
|
+
// Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
|
|
59
|
+
repeated string metrics = 2;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Billing configurations for sending metrics to the consumer project.
|
|
63
|
+
// There can be multiple consumer destinations per service, each one must have
|
|
64
|
+
// a different monitored resource type. A metric can be used in at most
|
|
65
|
+
// one consumer destination.
|
|
66
|
+
repeated BillingDestination consumer_destinations = 8;
|
|
67
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// Copyright 2020 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.api;
|
|
18
|
+
|
|
19
|
+
import "google/protobuf/descriptor.proto";
|
|
20
|
+
|
|
21
|
+
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
|
|
22
|
+
option java_multiple_files = true;
|
|
23
|
+
option java_outer_classname = "ClientProto";
|
|
24
|
+
option java_package = "com.google.api";
|
|
25
|
+
option objc_class_prefix = "GAPI";
|
|
26
|
+
|
|
27
|
+
extend google.protobuf.MethodOptions {
|
|
28
|
+
// A definition of a client library method signature.
|
|
29
|
+
//
|
|
30
|
+
// In client libraries, each proto RPC corresponds to one or more methods
|
|
31
|
+
// which the end user is able to call, and calls the underlying RPC.
|
|
32
|
+
// Normally, this method receives a single argument (a struct or instance
|
|
33
|
+
// corresponding to the RPC request object). Defining this field will
|
|
34
|
+
// add one or more overloads providing flattened or simpler method signatures
|
|
35
|
+
// in some languages.
|
|
36
|
+
//
|
|
37
|
+
// The fields on the method signature are provided as a comma-separated
|
|
38
|
+
// string.
|
|
39
|
+
//
|
|
40
|
+
// For example, the proto RPC and annotation:
|
|
41
|
+
//
|
|
42
|
+
// rpc CreateSubscription(CreateSubscriptionRequest)
|
|
43
|
+
// returns (Subscription) {
|
|
44
|
+
// option (google.api.method_signature) = "name,topic";
|
|
45
|
+
// }
|
|
46
|
+
//
|
|
47
|
+
// Would add the following Java overload (in addition to the method accepting
|
|
48
|
+
// the request object):
|
|
49
|
+
//
|
|
50
|
+
// public final Subscription createSubscription(String name, String topic)
|
|
51
|
+
//
|
|
52
|
+
// The following backwards-compatibility guidelines apply:
|
|
53
|
+
//
|
|
54
|
+
// * Adding this annotation to an unannotated method is backwards
|
|
55
|
+
// compatible.
|
|
56
|
+
// * Adding this annotation to a method which already has existing
|
|
57
|
+
// method signature annotations is backwards compatible if and only if
|
|
58
|
+
// the new method signature annotation is last in the sequence.
|
|
59
|
+
// * Modifying or removing an existing method signature annotation is
|
|
60
|
+
// a breaking change.
|
|
61
|
+
// * Re-ordering existing method signature annotations is a breaking
|
|
62
|
+
// change.
|
|
63
|
+
repeated string method_signature = 1051;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
extend google.protobuf.ServiceOptions {
|
|
67
|
+
// The hostname for this service.
|
|
68
|
+
// This should be specified with no prefix or protocol.
|
|
69
|
+
//
|
|
70
|
+
// Example:
|
|
71
|
+
//
|
|
72
|
+
// service Foo {
|
|
73
|
+
// option (google.api.default_host) = "foo.googleapi.com";
|
|
74
|
+
// ...
|
|
75
|
+
// }
|
|
76
|
+
string default_host = 1049;
|
|
77
|
+
|
|
78
|
+
// OAuth scopes needed for the client.
|
|
79
|
+
//
|
|
80
|
+
// Example:
|
|
81
|
+
//
|
|
82
|
+
// service Foo {
|
|
83
|
+
// option (google.api.oauth_scopes) = \
|
|
84
|
+
// "https://www.googleapis.com/auth/cloud-platform";
|
|
85
|
+
// ...
|
|
86
|
+
// }
|
|
87
|
+
//
|
|
88
|
+
// If there is more than one scope, use a comma-separated string:
|
|
89
|
+
//
|
|
90
|
+
// Example:
|
|
91
|
+
//
|
|
92
|
+
// service Foo {
|
|
93
|
+
// option (google.api.oauth_scopes) = \
|
|
94
|
+
// "https://www.googleapis.com/auth/cloud-platform,"
|
|
95
|
+
// "https://www.googleapis.com/auth/monitoring";
|
|
96
|
+
// ...
|
|
97
|
+
// }
|
|
98
|
+
string oauth_scopes = 1050;
|
|
99
|
+
}
|