Skip to content

Commit 76c5b49

Browse files
fix: allow protobuf 5.x (#147)
* fix: allow protobuf 5.x * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test against python-logging * fix build * include dependencies needed for testing python-logging * include dependencies needed for testing python-logging * exclude generate_protos nox session --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 66e4d38 commit 76c5b49

File tree

5 files changed

+511
-1101
lines changed

5 files changed

+511
-1101
lines changed

packages/google-cloud-audit-log/google/cloud/audit/audit_log_pb2.py

Lines changed: 35 additions & 179 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
"""Generated protocol buffer code."""
2020
from google.protobuf import descriptor as _descriptor
2121
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
2422
from google.protobuf import symbol_database as _symbol_database
23+
from google.protobuf.internal import builder as _builder
2524

2625
# @@protoc_insertion_point(imports)
2726

@@ -41,159 +40,12 @@
4140
b'\n"google/cloud/audit/audit_log.proto\x12\x12google.cloud.audit\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a*google/rpc/context/attribute_context.proto\x1a\x17google/rpc/status.proto"\xc6\x05\n\x08\x41uditLog\x12\x14\n\x0cservice_name\x18\x07 \x01(\t\x12\x13\n\x0bmethod_name\x18\x08 \x01(\t\x12\x15\n\rresource_name\x18\x0b \x01(\t\x12?\n\x11resource_location\x18\x14 \x01(\x0b\x32$.google.cloud.audit.ResourceLocation\x12\x38\n\x17resource_original_state\x18\x13 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x1a\n\x12num_response_items\x18\x0c \x01(\x03\x12"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12\x43\n\x13\x61uthentication_info\x18\x03 \x01(\x0b\x32&.google.cloud.audit.AuthenticationInfo\x12\x41\n\x12\x61uthorization_info\x18\t \x03(\x0b\x32%.google.cloud.audit.AuthorizationInfo\x12\x46\n\x15policy_violation_info\x18\x19 \x01(\x0b\x32\'.google.cloud.audit.PolicyViolationInfo\x12=\n\x10request_metadata\x18\x04 \x01(\x0b\x32#.google.cloud.audit.RequestMetadata\x12(\n\x07request\x18\x10 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x08response\x18\x11 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x08metadata\x18\x12 \x01(\x0b\x32\x17.google.protobuf.Struct\x12.\n\x0cservice_data\x18\x0f \x01(\x0b\x32\x14.google.protobuf.AnyB\x02\x18\x01"\x99\x02\n\x12\x41uthenticationInfo\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x1a\n\x12\x61uthority_selector\x18\x02 \x01(\t\x12\x36\n\x15third_party_principal\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12 \n\x18service_account_key_name\x18\x05 \x01(\t\x12Y\n\x1fservice_account_delegation_info\x18\x06 \x03(\x0b\x32\x30.google.cloud.audit.ServiceAccountDelegationInfo\x12\x19\n\x11principal_subject\x18\x08 \x01(\t"\x96\x01\n\x11\x41uthorizationInfo\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x12\n\npermission\x18\x02 \x01(\t\x12\x0f\n\x07granted\x18\x03 \x01(\x08\x12J\n\x13resource_attributes\x18\x05 \x01(\x0b\x32-.google.rpc.context.AttributeContext.Resource"\xf5\x01\n\x0fRequestMetadata\x12\x11\n\tcaller_ip\x18\x01 \x01(\t\x12"\n\x1a\x63\x61ller_supplied_user_agent\x18\x02 \x01(\t\x12\x16\n\x0e\x63\x61ller_network\x18\x03 \x01(\t\x12H\n\x12request_attributes\x18\x07 \x01(\x0b\x32,.google.rpc.context.AttributeContext.Request\x12I\n\x16\x64\x65stination_attributes\x18\x08 \x01(\x0b\x32).google.rpc.context.AttributeContext.Peer"I\n\x10ResourceLocation\x12\x19\n\x11\x63urrent_locations\x18\x01 \x03(\t\x12\x1a\n\x12original_locations\x18\x02 \x03(\t"\xc3\x03\n\x1cServiceAccountDelegationInfo\x12\x19\n\x11principal_subject\x18\x03 \x01(\t\x12\x65\n\x15\x66irst_party_principal\x18\x01 \x01(\x0b\x32\x44.google.cloud.audit.ServiceAccountDelegationInfo.FirstPartyPrincipalH\x00\x12\x65\n\x15third_party_principal\x18\x02 \x01(\x0b\x32\x44.google.cloud.audit.ServiceAccountDelegationInfo.ThirdPartyPrincipalH\x00\x1a\x61\n\x13\x46irstPartyPrincipal\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x31\n\x10service_metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x1aJ\n\x13ThirdPartyPrincipal\x12\x33\n\x12third_party_claims\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructB\x0b\n\tAuthority"d\n\x13PolicyViolationInfo\x12M\n\x19org_policy_violation_info\x18\x01 \x01(\x0b\x32*.google.cloud.audit.OrgPolicyViolationInfo"\xb2\x02\n\x16OrgPolicyViolationInfo\x12-\n\x07payload\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12X\n\rresource_tags\x18\x03 \x03(\x0b\x32<.google.cloud.audit.OrgPolicyViolationInfo.ResourceTagsEntryB\x03\xe0\x41\x01\x12>\n\x0eviolation_info\x18\x04 \x03(\x0b\x32!.google.cloud.audit.ViolationInfoB\x03\xe0\x41\x01\x1a\x33\n\x11ResourceTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x97\x02\n\rViolationInfo\x12\x17\n\nconstraint\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rchecked_value\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x0bpolicy_type\x18\x04 \x01(\x0e\x32,.google.cloud.audit.ViolationInfo.PolicyTypeB\x03\xe0\x41\x01"m\n\nPolicyType\x12\x1b\n\x17POLICY_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42OOLEAN_CONSTRAINT\x10\x01\x12\x13\n\x0fLIST_CONSTRAINT\x10\x02\x12\x15\n\x11\x43USTOM_CONSTRAINT\x10\x03\x42\x65\n\x16\x63om.google.cloud.auditB\rAuditLogProtoP\x01Z7google.golang.org/genproto/googleapis/cloud/audit;audit\xf8\x01\x01\x62\x06proto3'
4241
)
4342

44-
45-
_AUDITLOG = DESCRIPTOR.message_types_by_name["AuditLog"]
46-
_AUTHENTICATIONINFO = DESCRIPTOR.message_types_by_name["AuthenticationInfo"]
47-
_AUTHORIZATIONINFO = DESCRIPTOR.message_types_by_name["AuthorizationInfo"]
48-
_REQUESTMETADATA = DESCRIPTOR.message_types_by_name["RequestMetadata"]
49-
_RESOURCELOCATION = DESCRIPTOR.message_types_by_name["ResourceLocation"]
50-
_SERVICEACCOUNTDELEGATIONINFO = DESCRIPTOR.message_types_by_name[
51-
"ServiceAccountDelegationInfo"
52-
]
53-
_SERVICEACCOUNTDELEGATIONINFO_FIRSTPARTYPRINCIPAL = _SERVICEACCOUNTDELEGATIONINFO.nested_types_by_name[
54-
"FirstPartyPrincipal"
55-
]
56-
_SERVICEACCOUNTDELEGATIONINFO_THIRDPARTYPRINCIPAL = _SERVICEACCOUNTDELEGATIONINFO.nested_types_by_name[
57-
"ThirdPartyPrincipal"
58-
]
59-
_POLICYVIOLATIONINFO = DESCRIPTOR.message_types_by_name["PolicyViolationInfo"]
60-
_ORGPOLICYVIOLATIONINFO = DESCRIPTOR.message_types_by_name["OrgPolicyViolationInfo"]
61-
_ORGPOLICYVIOLATIONINFO_RESOURCETAGSENTRY = _ORGPOLICYVIOLATIONINFO.nested_types_by_name[
62-
"ResourceTagsEntry"
63-
]
64-
_VIOLATIONINFO = DESCRIPTOR.message_types_by_name["ViolationInfo"]
65-
_VIOLATIONINFO_POLICYTYPE = _VIOLATIONINFO.enum_types_by_name["PolicyType"]
66-
AuditLog = _reflection.GeneratedProtocolMessageType(
67-
"AuditLog",
68-
(_message.Message,),
69-
{
70-
"DESCRIPTOR": _AUDITLOG,
71-
"__module__": "google.cloud.audit.audit_log_pb2"
72-
# @@protoc_insertion_point(class_scope:google.cloud.audit.AuditLog)
73-
},
74-
)
75-
_sym_db.RegisterMessage(AuditLog)
76-
77-
AuthenticationInfo = _reflection.GeneratedProtocolMessageType(
78-
"AuthenticationInfo",
79-
(_message.Message,),
80-
{
81-
"DESCRIPTOR": _AUTHENTICATIONINFO,
82-
"__module__": "google.cloud.audit.audit_log_pb2"
83-
# @@protoc_insertion_point(class_scope:google.cloud.audit.AuthenticationInfo)
84-
},
85-
)
86-
_sym_db.RegisterMessage(AuthenticationInfo)
87-
88-
AuthorizationInfo = _reflection.GeneratedProtocolMessageType(
89-
"AuthorizationInfo",
90-
(_message.Message,),
91-
{
92-
"DESCRIPTOR": _AUTHORIZATIONINFO,
93-
"__module__": "google.cloud.audit.audit_log_pb2"
94-
# @@protoc_insertion_point(class_scope:google.cloud.audit.AuthorizationInfo)
95-
},
43+
_globals = globals()
44+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
45+
_builder.BuildTopDescriptorsAndMessages(
46+
DESCRIPTOR, "google.cloud.audit.audit_log_pb2", _globals
9647
)
97-
_sym_db.RegisterMessage(AuthorizationInfo)
98-
99-
RequestMetadata = _reflection.GeneratedProtocolMessageType(
100-
"RequestMetadata",
101-
(_message.Message,),
102-
{
103-
"DESCRIPTOR": _REQUESTMETADATA,
104-
"__module__": "google.cloud.audit.audit_log_pb2"
105-
# @@protoc_insertion_point(class_scope:google.cloud.audit.RequestMetadata)
106-
},
107-
)
108-
_sym_db.RegisterMessage(RequestMetadata)
109-
110-
ResourceLocation = _reflection.GeneratedProtocolMessageType(
111-
"ResourceLocation",
112-
(_message.Message,),
113-
{
114-
"DESCRIPTOR": _RESOURCELOCATION,
115-
"__module__": "google.cloud.audit.audit_log_pb2"
116-
# @@protoc_insertion_point(class_scope:google.cloud.audit.ResourceLocation)
117-
},
118-
)
119-
_sym_db.RegisterMessage(ResourceLocation)
120-
121-
ServiceAccountDelegationInfo = _reflection.GeneratedProtocolMessageType(
122-
"ServiceAccountDelegationInfo",
123-
(_message.Message,),
124-
{
125-
"FirstPartyPrincipal": _reflection.GeneratedProtocolMessageType(
126-
"FirstPartyPrincipal",
127-
(_message.Message,),
128-
{
129-
"DESCRIPTOR": _SERVICEACCOUNTDELEGATIONINFO_FIRSTPARTYPRINCIPAL,
130-
"__module__": "google.cloud.audit.audit_log_pb2"
131-
# @@protoc_insertion_point(class_scope:google.cloud.audit.ServiceAccountDelegationInfo.FirstPartyPrincipal)
132-
},
133-
),
134-
"ThirdPartyPrincipal": _reflection.GeneratedProtocolMessageType(
135-
"ThirdPartyPrincipal",
136-
(_message.Message,),
137-
{
138-
"DESCRIPTOR": _SERVICEACCOUNTDELEGATIONINFO_THIRDPARTYPRINCIPAL,
139-
"__module__": "google.cloud.audit.audit_log_pb2"
140-
# @@protoc_insertion_point(class_scope:google.cloud.audit.ServiceAccountDelegationInfo.ThirdPartyPrincipal)
141-
},
142-
),
143-
"DESCRIPTOR": _SERVICEACCOUNTDELEGATIONINFO,
144-
"__module__": "google.cloud.audit.audit_log_pb2"
145-
# @@protoc_insertion_point(class_scope:google.cloud.audit.ServiceAccountDelegationInfo)
146-
},
147-
)
148-
_sym_db.RegisterMessage(ServiceAccountDelegationInfo)
149-
_sym_db.RegisterMessage(ServiceAccountDelegationInfo.FirstPartyPrincipal)
150-
_sym_db.RegisterMessage(ServiceAccountDelegationInfo.ThirdPartyPrincipal)
151-
152-
PolicyViolationInfo = _reflection.GeneratedProtocolMessageType(
153-
"PolicyViolationInfo",
154-
(_message.Message,),
155-
{
156-
"DESCRIPTOR": _POLICYVIOLATIONINFO,
157-
"__module__": "google.cloud.audit.audit_log_pb2"
158-
# @@protoc_insertion_point(class_scope:google.cloud.audit.PolicyViolationInfo)
159-
},
160-
)
161-
_sym_db.RegisterMessage(PolicyViolationInfo)
162-
163-
OrgPolicyViolationInfo = _reflection.GeneratedProtocolMessageType(
164-
"OrgPolicyViolationInfo",
165-
(_message.Message,),
166-
{
167-
"ResourceTagsEntry": _reflection.GeneratedProtocolMessageType(
168-
"ResourceTagsEntry",
169-
(_message.Message,),
170-
{
171-
"DESCRIPTOR": _ORGPOLICYVIOLATIONINFO_RESOURCETAGSENTRY,
172-
"__module__": "google.cloud.audit.audit_log_pb2"
173-
# @@protoc_insertion_point(class_scope:google.cloud.audit.OrgPolicyViolationInfo.ResourceTagsEntry)
174-
},
175-
),
176-
"DESCRIPTOR": _ORGPOLICYVIOLATIONINFO,
177-
"__module__": "google.cloud.audit.audit_log_pb2"
178-
# @@protoc_insertion_point(class_scope:google.cloud.audit.OrgPolicyViolationInfo)
179-
},
180-
)
181-
_sym_db.RegisterMessage(OrgPolicyViolationInfo)
182-
_sym_db.RegisterMessage(OrgPolicyViolationInfo.ResourceTagsEntry)
183-
184-
ViolationInfo = _reflection.GeneratedProtocolMessageType(
185-
"ViolationInfo",
186-
(_message.Message,),
187-
{
188-
"DESCRIPTOR": _VIOLATIONINFO,
189-
"__module__": "google.cloud.audit.audit_log_pb2"
190-
# @@protoc_insertion_point(class_scope:google.cloud.audit.ViolationInfo)
191-
},
192-
)
193-
_sym_db.RegisterMessage(ViolationInfo)
194-
19548
if _descriptor._USE_C_DESCRIPTORS == False:
196-
19749
DESCRIPTOR._options = None
19850
DESCRIPTOR._serialized_options = b"\n\026com.google.cloud.auditB\rAuditLogProtoP\001Z7google.golang.org/genproto/googleapis/cloud/audit;audit\370\001\001"
19951
_AUDITLOG.fields_by_name["service_data"]._options = None
@@ -222,30 +74,34 @@
22274
_VIOLATIONINFO.fields_by_name["checked_value"]._serialized_options = b"\340A\001"
22375
_VIOLATIONINFO.fields_by_name["policy_type"]._options = None
22476
_VIOLATIONINFO.fields_by_name["policy_type"]._serialized_options = b"\340A\001"
225-
_AUDITLOG._serialized_start = 218
226-
_AUDITLOG._serialized_end = 928
227-
_AUTHENTICATIONINFO._serialized_start = 931
228-
_AUTHENTICATIONINFO._serialized_end = 1212
229-
_AUTHORIZATIONINFO._serialized_start = 1215
230-
_AUTHORIZATIONINFO._serialized_end = 1365
231-
_REQUESTMETADATA._serialized_start = 1368
232-
_REQUESTMETADATA._serialized_end = 1613
233-
_RESOURCELOCATION._serialized_start = 1615
234-
_RESOURCELOCATION._serialized_end = 1688
235-
_SERVICEACCOUNTDELEGATIONINFO._serialized_start = 1691
236-
_SERVICEACCOUNTDELEGATIONINFO._serialized_end = 2142
237-
_SERVICEACCOUNTDELEGATIONINFO_FIRSTPARTYPRINCIPAL._serialized_start = 1956
238-
_SERVICEACCOUNTDELEGATIONINFO_FIRSTPARTYPRINCIPAL._serialized_end = 2053
239-
_SERVICEACCOUNTDELEGATIONINFO_THIRDPARTYPRINCIPAL._serialized_start = 2055
240-
_SERVICEACCOUNTDELEGATIONINFO_THIRDPARTYPRINCIPAL._serialized_end = 2129
241-
_POLICYVIOLATIONINFO._serialized_start = 2144
242-
_POLICYVIOLATIONINFO._serialized_end = 2244
243-
_ORGPOLICYVIOLATIONINFO._serialized_start = 2247
244-
_ORGPOLICYVIOLATIONINFO._serialized_end = 2553
245-
_ORGPOLICYVIOLATIONINFO_RESOURCETAGSENTRY._serialized_start = 2502
246-
_ORGPOLICYVIOLATIONINFO_RESOURCETAGSENTRY._serialized_end = 2553
247-
_VIOLATIONINFO._serialized_start = 2556
248-
_VIOLATIONINFO._serialized_end = 2835
249-
_VIOLATIONINFO_POLICYTYPE._serialized_start = 2726
250-
_VIOLATIONINFO_POLICYTYPE._serialized_end = 2835
77+
_globals["_AUDITLOG"]._serialized_start = 218
78+
_globals["_AUDITLOG"]._serialized_end = 928
79+
_globals["_AUTHENTICATIONINFO"]._serialized_start = 931
80+
_globals["_AUTHENTICATIONINFO"]._serialized_end = 1212
81+
_globals["_AUTHORIZATIONINFO"]._serialized_start = 1215
82+
_globals["_AUTHORIZATIONINFO"]._serialized_end = 1365
83+
_globals["_REQUESTMETADATA"]._serialized_start = 1368
84+
_globals["_REQUESTMETADATA"]._serialized_end = 1613
85+
_globals["_RESOURCELOCATION"]._serialized_start = 1615
86+
_globals["_RESOURCELOCATION"]._serialized_end = 1688
87+
_globals["_SERVICEACCOUNTDELEGATIONINFO"]._serialized_start = 1691
88+
_globals["_SERVICEACCOUNTDELEGATIONINFO"]._serialized_end = 2142
89+
_globals[
90+
"_SERVICEACCOUNTDELEGATIONINFO_FIRSTPARTYPRINCIPAL"
91+
]._serialized_start = 1956
92+
_globals["_SERVICEACCOUNTDELEGATIONINFO_FIRSTPARTYPRINCIPAL"]._serialized_end = 2053
93+
_globals[
94+
"_SERVICEACCOUNTDELEGATIONINFO_THIRDPARTYPRINCIPAL"
95+
]._serialized_start = 2055
96+
_globals["_SERVICEACCOUNTDELEGATIONINFO_THIRDPARTYPRINCIPAL"]._serialized_end = 2129
97+
_globals["_POLICYVIOLATIONINFO"]._serialized_start = 2144
98+
_globals["_POLICYVIOLATIONINFO"]._serialized_end = 2244
99+
_globals["_ORGPOLICYVIOLATIONINFO"]._serialized_start = 2247
100+
_globals["_ORGPOLICYVIOLATIONINFO"]._serialized_end = 2553
101+
_globals["_ORGPOLICYVIOLATIONINFO_RESOURCETAGSENTRY"]._serialized_start = 2502
102+
_globals["_ORGPOLICYVIOLATIONINFO_RESOURCETAGSENTRY"]._serialized_end = 2553
103+
_globals["_VIOLATIONINFO"]._serialized_start = 2556
104+
_globals["_VIOLATIONINFO"]._serialized_end = 2835
105+
_globals["_VIOLATIONINFO_POLICYTYPE"]._serialized_start = 2726
106+
_globals["_VIOLATIONINFO_POLICYTYPE"]._serialized_end = 2835
251107
# @@protoc_insertion_point(module_scope)

0 commit comments

Comments
 (0)