Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit b2cb5c2

Browse files
build(deps): [autoapprove] bump certifi from 2022.12.7 to 2023.7.22 (#175)
Source-Link: googleapis/synthtool@395d53a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6c1cbc75c74b8bdd71dada2fa1677e9d6d78a889e9a70ee75b93d1d0543f96e1 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 6efb65e commit b2cb5c2

File tree

6 files changed

+181
-8
lines changed

6 files changed

+181
-8
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:f8ca7655fa8a449cadcabcbce4054f593dcbae7aeeab34aa3fcc8b5cf7a93c9e
17-
# created: 2023-07-21T02:12:46.49799314Z
16+
digest: sha256:6c1cbc75c74b8bdd71dada2fa1677e9d6d78a889e9a70ee75b93d1d0543f96e1
17+
# created: 2023-07-25T21:01:10.396410762Z

.kokoro/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ cachetools==5.2.0 \
2020
--hash=sha256:6a94c6402995a99c3970cc7e4884bb60b4a8639938157eeed436098bf9831757 \
2121
--hash=sha256:f9f17d2aec496a9aa6b76f53e3b614c965223c061982d434d160f930c698a9db
2222
# via google-auth
23-
certifi==2022.12.7 \
24-
--hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \
25-
--hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18
23+
certifi==2023.7.22 \
24+
--hash=sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082 \
25+
--hash=sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9
2626
# via requests
2727
cffi==1.15.1 \
2828
--hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \

google/api/control.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ syntax = "proto3";
1616

1717
package google.api;
1818

19+
import "google/api/policy.proto";
20+
1921
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
2022
option java_multiple_files = true;
2123
option java_outer_classname = "ControlProto";
@@ -33,4 +35,7 @@ message Control {
3335
// feature (like quota and billing) will be enabled. The recommended value for
3436
// most services is servicecontrol.googleapis.com
3537
string environment = 1;
38+
39+
// Defines policies applying to the API methods of the service.
40+
repeated MethodPolicy method_policies = 4;
3641
}

google/api/control_pb2.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@
2828
_sym_db = _symbol_database.Default()
2929

3030

31+
from google.api import policy_pb2 as google_dot_api_dot_policy__pb2
32+
33+
3134
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
32-
b'\n\x18google/api/control.proto\x12\ngoogle.api"\x1e\n\x07\x43ontrol\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\tBn\n\x0e\x63om.google.apiB\x0c\x43ontrolProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3'
35+
b'\n\x18google/api/control.proto\x12\ngoogle.api\x1a\x17google/api/policy.proto"Q\n\x07\x43ontrol\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x31\n\x0fmethod_policies\x18\x04 \x03(\x0b\x32\x18.google.api.MethodPolicyBn\n\x0e\x63om.google.apiB\x0c\x43ontrolProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3'
3336
)
3437

3538

@@ -49,6 +52,6 @@
4952

5053
DESCRIPTOR._options = None
5154
DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\014ControlProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI"
52-
_CONTROL._serialized_start = 40
53-
_CONTROL._serialized_end = 70
55+
_CONTROL._serialized_start = 65
56+
_CONTROL._serialized_end = 146
5457
# @@protoc_insertion_point(module_scope)

google/api/policy.proto

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
// Copyright 2023 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 cc_enable_arenas = true;
22+
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "PolicyProto";
25+
option java_package = "com.google.api";
26+
option objc_class_prefix = "GAPI";
27+
28+
// Provides `google.api.field_policy` annotation at proto fields.
29+
extend google.protobuf.FieldOptions {
30+
// See [FieldPolicy][].
31+
FieldPolicy field_policy = 158361448;
32+
}
33+
34+
// Provides `google.api.method_policy` annotation at proto methods.
35+
extend google.protobuf.MethodOptions {
36+
// See [MethodPolicy][].
37+
MethodPolicy method_policy = 161893301;
38+
}
39+
40+
// Google API Policy Annotation
41+
//
42+
// This message defines a simple API policy annotation that can be used to
43+
// annotate API request and response message fields with applicable policies.
44+
// One field may have multiple applicable policies that must all be satisfied
45+
// before a request can be processed. This policy annotation is used to
46+
// generate the overall policy that will be used for automatic runtime
47+
// policy enforcement and documentation generation.
48+
message FieldPolicy {
49+
// Selects one or more request or response message fields to apply this
50+
// `FieldPolicy`.
51+
//
52+
// When a `FieldPolicy` is used in proto annotation, the selector must
53+
// be left as empty. The service config generator will automatically fill
54+
// the correct value.
55+
//
56+
// When a `FieldPolicy` is used in service config, the selector must be a
57+
// comma-separated string with valid request or response field paths,
58+
// such as "foo.bar" or "foo.bar,foo.baz".
59+
string selector = 1;
60+
61+
// Specifies the required permission(s) for the resource referred to by the
62+
// field. It requires the field contains a valid resource reference, and
63+
// the request must pass the permission checks to proceed. For example,
64+
// "resourcemanager.projects.get".
65+
string resource_permission = 2;
66+
67+
// Specifies the resource type for the resource referred to by the field.
68+
string resource_type = 3;
69+
}
70+
71+
// Defines policies applying to an RPC method.
72+
message MethodPolicy {
73+
// Selects a method to which these policies should be enforced, for example,
74+
// "google.pubsub.v1.Subscriber.CreateSubscription".
75+
//
76+
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
77+
// details.
78+
//
79+
// NOTE: This field must not be set in the proto annotation. It will be
80+
// automatically filled by the service config compiler .
81+
string selector = 9;
82+
83+
// Policies that are applicable to the request message.
84+
repeated FieldPolicy request_policies = 2;
85+
}

google/api/policy_pb2.py

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# -*- coding: utf-8 -*-
2+
3+
# Copyright 2020 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Generated by the protocol buffer compiler. DO NOT EDIT!
18+
# source: google/api/policy.proto
19+
"""Generated protocol buffer code."""
20+
from google.protobuf import descriptor as _descriptor
21+
from google.protobuf import descriptor_pool as _descriptor_pool
22+
from google.protobuf import message as _message
23+
from google.protobuf import reflection as _reflection
24+
from google.protobuf import symbol_database as _symbol_database
25+
26+
# @@protoc_insertion_point(imports)
27+
28+
_sym_db = _symbol_database.Default()
29+
30+
31+
from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
32+
33+
34+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
35+
b'\n\x17google/api/policy.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto"S\n\x0b\x46ieldPolicy\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\x1b\n\x13resource_permission\x18\x02 \x01(\t\x12\x15\n\rresource_type\x18\x03 \x01(\t"S\n\x0cMethodPolicy\x12\x10\n\x08selector\x18\t \x01(\t\x12\x31\n\x10request_policies\x18\x02 \x03(\x0b\x32\x17.google.api.FieldPolicy:O\n\x0c\x66ield_policy\x12\x1d.google.protobuf.FieldOptions\x18\xe8\xce\xc1K \x01(\x0b\x32\x17.google.api.FieldPolicy:R\n\rmethod_policy\x12\x1e.google.protobuf.MethodOptions\x18\xb5\x97\x99M \x01(\x0b\x32\x18.google.api.MethodPolicyBp\n\x0e\x63om.google.apiB\x0bPolicyProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3'
36+
)
37+
38+
39+
FIELD_POLICY_FIELD_NUMBER = 158361448
40+
field_policy = DESCRIPTOR.extensions_by_name["field_policy"]
41+
METHOD_POLICY_FIELD_NUMBER = 161893301
42+
method_policy = DESCRIPTOR.extensions_by_name["method_policy"]
43+
44+
_FIELDPOLICY = DESCRIPTOR.message_types_by_name["FieldPolicy"]
45+
_METHODPOLICY = DESCRIPTOR.message_types_by_name["MethodPolicy"]
46+
FieldPolicy = _reflection.GeneratedProtocolMessageType(
47+
"FieldPolicy",
48+
(_message.Message,),
49+
{
50+
"DESCRIPTOR": _FIELDPOLICY,
51+
"__module__": "google.api.policy_pb2"
52+
# @@protoc_insertion_point(class_scope:google.api.FieldPolicy)
53+
},
54+
)
55+
_sym_db.RegisterMessage(FieldPolicy)
56+
57+
MethodPolicy = _reflection.GeneratedProtocolMessageType(
58+
"MethodPolicy",
59+
(_message.Message,),
60+
{
61+
"DESCRIPTOR": _METHODPOLICY,
62+
"__module__": "google.api.policy_pb2"
63+
# @@protoc_insertion_point(class_scope:google.api.MethodPolicy)
64+
},
65+
)
66+
_sym_db.RegisterMessage(MethodPolicy)
67+
68+
if _descriptor._USE_C_DESCRIPTORS == False:
69+
google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(field_policy)
70+
google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(
71+
method_policy
72+
)
73+
74+
DESCRIPTOR._options = None
75+
DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\013PolicyProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\370\001\001\242\002\004GAPI"
76+
_FIELDPOLICY._serialized_start = 73
77+
_FIELDPOLICY._serialized_end = 156
78+
_METHODPOLICY._serialized_start = 158
79+
_METHODPOLICY._serialized_end = 241
80+
# @@protoc_insertion_point(module_scope)

0 commit comments

Comments
 (0)