1
0
mirror of https://github.com/MarkParker5/STARK.git synced 2024-11-24 08:12:13 +02:00

upgrade to python3.8.5, fix bugs

This commit is contained in:
dQz6tMwk8rJqvDR 2020-07-30 03:25:38 +03:00
parent 9752fc7aa0
commit fffe061d23
543 changed files with 60 additions and 104771 deletions

View File

@ -9,7 +9,7 @@ from Command import Command # import parent class
class SmallTalk(Command):
def start(this, string): # main method
print('Hello, World!')
print(f'Hello, {string=}')
def confirm(this): # optional method
return True

View File

@ -20,7 +20,6 @@
from .SmallTalk import *
import datetime, time
import math
from Command import Command
################################################################################
def method(text):
return {
@ -118,7 +117,7 @@ ctime = SmallTalk('Current Time', keywords, patterns)
ctime.setStart(method)
################################################################################
# Only for tests
@Command.background(answer = 'Запуск фонового процесса', voice = 'Запускаю фоновый процесс')
@SmallTalk.background(answer = 'Запуск фонового процесса', voice = 'Запускаю фоновый процесс')
def method(text, finish_event):
time.sleep(10)
finish_event.set()

View File

@ -5,7 +5,7 @@ r = sr.Recognizer()
m = sr.Microphone(device_index=1)
class SpeechToText:
def __init__(this, device = 1, language = "ru-RU", pause_threshold = 0.4):
def __init__(this, device = 1, language = "ru-RU", pause_threshold = 0.5):
this.device = 1
this.language = language
this.m = sr.Microphone(device_index = this.device)

View File

@ -45,9 +45,24 @@ class Engine:
name = this._name,
ssml_gender = texttospeech.SsmlVoiceGender.FEMALE)
@staticmethod
def transliterate(name):
dict = {'а':'a','б':'b','в':'v','г':'g','д':'d','е':'e','ё':'e',
'ж':'zh','з':'z','и':'i','й':'i','к':'k','л':'l','м':'m','н':'n',
'о':'o','п':'p','р':'r','с':'s','т':'t','у':'u','ф':'f','х':'h',
'ц':'c','ч':'cz','ш':'sh','щ':'scz','ы':'y','э':'e',
'ю':'u','я':'ja'}
allowed = 'abcdefghijklmnopqrstuvxyz'
name = name.lower()
for i, letter in enumerate(name):
if letter in allowed: continue;
if letter in dict.keys(): name = name.replace(letter, dict[letter])
else: name = name.replace(letter, '_')
return name
def generate(this, text, standart = False):
dir = f'audio/{this._name}'
path = f'{dir}/{text}.mp3'
path = f'{dir}/{Engine.transliterate(text)[:100]}.mp3'
if( os.path.exists(path) ): return Speech(text, this._name, path, standart)
synthesis_input = texttospeech.SynthesisInput(text=text)
response = this._client.synthesize_speech(input = synthesis_input, voice = this._voice, audio_config = this._audio_config)

View File

@ -1,74 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/annotations.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import http_pb2 as google_dot_api_dot_http__pb2
from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/annotations.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\020AnnotationsProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\242\002\004GAPI",
serialized_pb=b'\n\x1cgoogle/api/annotations.proto\x12\ngoogle.api\x1a\x15google/api/http.proto\x1a google/protobuf/descriptor.proto:E\n\x04http\x12\x1e.google.protobuf.MethodOptions\x18\xb0\xca\xbc" \x01(\x0b\x32\x14.google.api.HttpRuleBn\n\x0e\x63om.google.apiB\x10\x41nnotationsProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3',
dependencies=[
google_dot_api_dot_http__pb2.DESCRIPTOR,
google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,
],
)
HTTP_FIELD_NUMBER = 72295728
http = _descriptor.FieldDescriptor(
name="http",
full_name="google.api.http",
index=0,
number=72295728,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=True,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
DESCRIPTOR.extensions_by_name["http"] = http
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
http.message_type = google_dot_api_dot_http__pb2._HTTPRULE
google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(http)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,467 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/auth.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/auth.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\tAuthProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x15google/api/auth.proto\x12\ngoogle.api\x1a\x1cgoogle/api/annotations.proto"l\n\x0e\x41uthentication\x12-\n\x05rules\x18\x03 \x03(\x0b\x32\x1e.google.api.AuthenticationRule\x12+\n\tproviders\x18\x04 \x03(\x0b\x32\x18.google.api.AuthProvider"\xa9\x01\n\x12\x41uthenticationRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12,\n\x05oauth\x18\x02 \x01(\x0b\x32\x1d.google.api.OAuthRequirements\x12 \n\x18\x61llow_without_credential\x18\x05 \x01(\x08\x12\x31\n\x0crequirements\x18\x07 \x03(\x0b\x32\x1b.google.api.AuthRequirement"j\n\x0c\x41uthProvider\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06issuer\x18\x02 \x01(\t\x12\x10\n\x08jwks_uri\x18\x03 \x01(\t\x12\x11\n\taudiences\x18\x04 \x01(\t\x12\x19\n\x11\x61uthorization_url\x18\x05 \x01(\t"-\n\x11OAuthRequirements\x12\x18\n\x10\x63\x61nonical_scopes\x18\x01 \x01(\t"9\n\x0f\x41uthRequirement\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x11\n\taudiences\x18\x02 \x01(\tBk\n\x0e\x63om.google.apiB\tAuthProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR],
)
_AUTHENTICATION = _descriptor.Descriptor(
name="Authentication",
full_name="google.api.Authentication",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="rules",
full_name="google.api.Authentication.rules",
index=0,
number=3,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="providers",
full_name="google.api.Authentication.providers",
index=1,
number=4,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=67,
serialized_end=175,
)
_AUTHENTICATIONRULE = _descriptor.Descriptor(
name="AuthenticationRule",
full_name="google.api.AuthenticationRule",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="selector",
full_name="google.api.AuthenticationRule.selector",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="oauth",
full_name="google.api.AuthenticationRule.oauth",
index=1,
number=2,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="allow_without_credential",
full_name="google.api.AuthenticationRule.allow_without_credential",
index=2,
number=5,
type=8,
cpp_type=7,
label=1,
has_default_value=False,
default_value=False,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="requirements",
full_name="google.api.AuthenticationRule.requirements",
index=3,
number=7,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=178,
serialized_end=347,
)
_AUTHPROVIDER = _descriptor.Descriptor(
name="AuthProvider",
full_name="google.api.AuthProvider",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="id",
full_name="google.api.AuthProvider.id",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="issuer",
full_name="google.api.AuthProvider.issuer",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="jwks_uri",
full_name="google.api.AuthProvider.jwks_uri",
index=2,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="audiences",
full_name="google.api.AuthProvider.audiences",
index=3,
number=4,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="authorization_url",
full_name="google.api.AuthProvider.authorization_url",
index=4,
number=5,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=349,
serialized_end=455,
)
_OAUTHREQUIREMENTS = _descriptor.Descriptor(
name="OAuthRequirements",
full_name="google.api.OAuthRequirements",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="canonical_scopes",
full_name="google.api.OAuthRequirements.canonical_scopes",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=457,
serialized_end=502,
)
_AUTHREQUIREMENT = _descriptor.Descriptor(
name="AuthRequirement",
full_name="google.api.AuthRequirement",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="provider_id",
full_name="google.api.AuthRequirement.provider_id",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="audiences",
full_name="google.api.AuthRequirement.audiences",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=504,
serialized_end=561,
)
_AUTHENTICATION.fields_by_name["rules"].message_type = _AUTHENTICATIONRULE
_AUTHENTICATION.fields_by_name["providers"].message_type = _AUTHPROVIDER
_AUTHENTICATIONRULE.fields_by_name["oauth"].message_type = _OAUTHREQUIREMENTS
_AUTHENTICATIONRULE.fields_by_name["requirements"].message_type = _AUTHREQUIREMENT
DESCRIPTOR.message_types_by_name["Authentication"] = _AUTHENTICATION
DESCRIPTOR.message_types_by_name["AuthenticationRule"] = _AUTHENTICATIONRULE
DESCRIPTOR.message_types_by_name["AuthProvider"] = _AUTHPROVIDER
DESCRIPTOR.message_types_by_name["OAuthRequirements"] = _OAUTHREQUIREMENTS
DESCRIPTOR.message_types_by_name["AuthRequirement"] = _AUTHREQUIREMENT
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Authentication = _reflection.GeneratedProtocolMessageType(
"Authentication",
(_message.Message,),
{
"DESCRIPTOR": _AUTHENTICATION,
"__module__": "google.api.auth_pb2"
# @@protoc_insertion_point(class_scope:google.api.Authentication)
},
)
_sym_db.RegisterMessage(Authentication)
AuthenticationRule = _reflection.GeneratedProtocolMessageType(
"AuthenticationRule",
(_message.Message,),
{
"DESCRIPTOR": _AUTHENTICATIONRULE,
"__module__": "google.api.auth_pb2"
# @@protoc_insertion_point(class_scope:google.api.AuthenticationRule)
},
)
_sym_db.RegisterMessage(AuthenticationRule)
AuthProvider = _reflection.GeneratedProtocolMessageType(
"AuthProvider",
(_message.Message,),
{
"DESCRIPTOR": _AUTHPROVIDER,
"__module__": "google.api.auth_pb2"
# @@protoc_insertion_point(class_scope:google.api.AuthProvider)
},
)
_sym_db.RegisterMessage(AuthProvider)
OAuthRequirements = _reflection.GeneratedProtocolMessageType(
"OAuthRequirements",
(_message.Message,),
{
"DESCRIPTOR": _OAUTHREQUIREMENTS,
"__module__": "google.api.auth_pb2"
# @@protoc_insertion_point(class_scope:google.api.OAuthRequirements)
},
)
_sym_db.RegisterMessage(OAuthRequirements)
AuthRequirement = _reflection.GeneratedProtocolMessageType(
"AuthRequirement",
(_message.Message,),
{
"DESCRIPTOR": _AUTHREQUIREMENT,
"__module__": "google.api.auth_pb2"
# @@protoc_insertion_point(class_scope:google.api.AuthRequirement)
},
)
_sym_db.RegisterMessage(AuthRequirement)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,199 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/backend.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/backend.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\014BackendProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x18google/api/backend.proto\x12\ngoogle.api"1\n\x07\x42\x61\x63kend\x12&\n\x05rules\x18\x01 \x03(\x0b\x32\x17.google.api.BackendRule"X\n\x0b\x42\x61\x63kendRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x10\n\x08\x64\x65\x61\x64line\x18\x03 \x01(\x01\x12\x14\n\x0cmin_deadline\x18\x04 \x01(\x01\x42n\n\x0e\x63om.google.apiB\x0c\x42\x61\x63kendProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
)
_BACKEND = _descriptor.Descriptor(
name="Backend",
full_name="google.api.Backend",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="rules",
full_name="google.api.Backend.rules",
index=0,
number=1,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=40,
serialized_end=89,
)
_BACKENDRULE = _descriptor.Descriptor(
name="BackendRule",
full_name="google.api.BackendRule",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="selector",
full_name="google.api.BackendRule.selector",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="address",
full_name="google.api.BackendRule.address",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="deadline",
full_name="google.api.BackendRule.deadline",
index=2,
number=3,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="min_deadline",
full_name="google.api.BackendRule.min_deadline",
index=3,
number=4,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=91,
serialized_end=179,
)
_BACKEND.fields_by_name["rules"].message_type = _BACKENDRULE
DESCRIPTOR.message_types_by_name["Backend"] = _BACKEND
DESCRIPTOR.message_types_by_name["BackendRule"] = _BACKENDRULE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Backend = _reflection.GeneratedProtocolMessageType(
"Backend",
(_message.Message,),
{
"DESCRIPTOR": _BACKEND,
"__module__": "google.api.backend_pb2"
# @@protoc_insertion_point(class_scope:google.api.Backend)
},
)
_sym_db.RegisterMessage(Backend)
BackendRule = _reflection.GeneratedProtocolMessageType(
"BackendRule",
(_message.Message,),
{
"DESCRIPTOR": _BACKENDRULE,
"__module__": "google.api.backend_pb2"
# @@protoc_insertion_point(class_scope:google.api.BackendRule)
},
)
_sym_db.RegisterMessage(BackendRule)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,167 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/billing.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/billing.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\014BillingProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x18google/api/billing.proto\x12\ngoogle.api\x1a\x1cgoogle/api/annotations.proto"\x93\x01\n\x07\x42illing\x12\x45\n\x15\x63onsumer_destinations\x18\x08 \x03(\x0b\x32&.google.api.Billing.BillingDestination\x1a\x41\n\x12\x42illingDestination\x12\x1a\n\x12monitored_resource\x18\x01 \x01(\t\x12\x0f\n\x07metrics\x18\x02 \x03(\tBn\n\x0e\x63om.google.apiB\x0c\x42illingProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR],
)
_BILLING_BILLINGDESTINATION = _descriptor.Descriptor(
name="BillingDestination",
full_name="google.api.Billing.BillingDestination",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="monitored_resource",
full_name="google.api.Billing.BillingDestination.monitored_resource",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="metrics",
full_name="google.api.Billing.BillingDestination.metrics",
index=1,
number=2,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=153,
serialized_end=218,
)
_BILLING = _descriptor.Descriptor(
name="Billing",
full_name="google.api.Billing",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="consumer_destinations",
full_name="google.api.Billing.consumer_destinations",
index=0,
number=8,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
],
extensions=[],
nested_types=[_BILLING_BILLINGDESTINATION],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=71,
serialized_end=218,
)
_BILLING_BILLINGDESTINATION.containing_type = _BILLING
_BILLING.fields_by_name[
"consumer_destinations"
].message_type = _BILLING_BILLINGDESTINATION
DESCRIPTOR.message_types_by_name["Billing"] = _BILLING
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Billing = _reflection.GeneratedProtocolMessageType(
"Billing",
(_message.Message,),
{
"BillingDestination": _reflection.GeneratedProtocolMessageType(
"BillingDestination",
(_message.Message,),
{
"DESCRIPTOR": _BILLING_BILLINGDESTINATION,
"__module__": "google.api.billing_pb2"
# @@protoc_insertion_point(class_scope:google.api.Billing.BillingDestination)
},
),
"DESCRIPTOR": _BILLING,
"__module__": "google.api.billing_pb2"
# @@protoc_insertion_point(class_scope:google.api.Billing)
},
)
_sym_db.RegisterMessage(Billing)
_sym_db.RegisterMessage(Billing.BillingDestination)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,113 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/client.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/client.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\013ClientProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\242\002\004GAPI",
serialized_pb=b"\n\x17google/api/client.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto:6\n\x0c\x64\x65\x66\x61ult_host\x12\x1f.google.protobuf.ServiceOptions\x18\x99\x08 \x01(\t:6\n\x0coauth_scopes\x12\x1f.google.protobuf.ServiceOptions\x18\x9a\x08 \x01(\t:9\n\x10method_signature\x12\x1e.google.protobuf.MethodOptions\x18\x9b\x08 \x03(\tBi\n\x0e\x63om.google.apiB\x0b\x43lientProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3",
dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR],
)
DEFAULT_HOST_FIELD_NUMBER = 1049
default_host = _descriptor.FieldDescriptor(
name="default_host",
full_name="google.api.default_host",
index=0,
number=1049,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=True,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
OAUTH_SCOPES_FIELD_NUMBER = 1050
oauth_scopes = _descriptor.FieldDescriptor(
name="oauth_scopes",
full_name="google.api.oauth_scopes",
index=1,
number=1050,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=True,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
METHOD_SIGNATURE_FIELD_NUMBER = 1051
method_signature = _descriptor.FieldDescriptor(
name="method_signature",
full_name="google.api.method_signature",
index=2,
number=1051,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=True,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
DESCRIPTOR.extensions_by_name["default_host"] = default_host
DESCRIPTOR.extensions_by_name["oauth_scopes"] = oauth_scopes
DESCRIPTOR.extensions_by_name["method_signature"] = method_signature
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
google_dot_protobuf_dot_descriptor__pb2.ServiceOptions.RegisterExtension(default_host)
google_dot_protobuf_dot_descriptor__pb2.ServiceOptions.RegisterExtension(oauth_scopes)
google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(
method_signature
)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,256 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/config_change.proto
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/config_change.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\021ConfigChangeProtoP\001ZCgoogle.golang.org/genproto/googleapis/api/configchange;configchange\242\002\004GAPI",
serialized_pb=b'\n\x1egoogle/api/config_change.proto\x12\ngoogle.api"\x97\x01\n\x0c\x43onfigChange\x12\x0f\n\x07\x65lement\x18\x01 \x01(\t\x12\x11\n\told_value\x18\x02 \x01(\t\x12\x11\n\tnew_value\x18\x03 \x01(\t\x12+\n\x0b\x63hange_type\x18\x04 \x01(\x0e\x32\x16.google.api.ChangeType\x12#\n\x07\x61\x64vices\x18\x05 \x03(\x0b\x32\x12.google.api.Advice"\x1d\n\x06\x41\x64vice\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t*O\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x01\x12\x0b\n\x07REMOVED\x10\x02\x12\x0c\n\x08MODIFIED\x10\x03\x42q\n\x0e\x63om.google.apiB\x11\x43onfigChangeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/configchange;configchange\xa2\x02\x04GAPIb\x06proto3',
)
_CHANGETYPE = _descriptor.EnumDescriptor(
name="ChangeType",
full_name="google.api.ChangeType",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="CHANGE_TYPE_UNSPECIFIED",
index=0,
number=0,
serialized_options=None,
type=None,
),
_descriptor.EnumValueDescriptor(
name="ADDED", index=1, number=1, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="REMOVED", index=2, number=2, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="MODIFIED", index=3, number=3, serialized_options=None, type=None
),
],
containing_type=None,
serialized_options=None,
serialized_start=231,
serialized_end=310,
)
_sym_db.RegisterEnumDescriptor(_CHANGETYPE)
ChangeType = enum_type_wrapper.EnumTypeWrapper(_CHANGETYPE)
CHANGE_TYPE_UNSPECIFIED = 0
ADDED = 1
REMOVED = 2
MODIFIED = 3
_CONFIGCHANGE = _descriptor.Descriptor(
name="ConfigChange",
full_name="google.api.ConfigChange",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="element",
full_name="google.api.ConfigChange.element",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="old_value",
full_name="google.api.ConfigChange.old_value",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="new_value",
full_name="google.api.ConfigChange.new_value",
index=2,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="change_type",
full_name="google.api.ConfigChange.change_type",
index=3,
number=4,
type=14,
cpp_type=8,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="advices",
full_name="google.api.ConfigChange.advices",
index=4,
number=5,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=47,
serialized_end=198,
)
_ADVICE = _descriptor.Descriptor(
name="Advice",
full_name="google.api.Advice",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="description",
full_name="google.api.Advice.description",
index=0,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=200,
serialized_end=229,
)
_CONFIGCHANGE.fields_by_name["change_type"].enum_type = _CHANGETYPE
_CONFIGCHANGE.fields_by_name["advices"].message_type = _ADVICE
DESCRIPTOR.message_types_by_name["ConfigChange"] = _CONFIGCHANGE
DESCRIPTOR.message_types_by_name["Advice"] = _ADVICE
DESCRIPTOR.enum_types_by_name["ChangeType"] = _CHANGETYPE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
ConfigChange = _reflection.GeneratedProtocolMessageType(
"ConfigChange",
(_message.Message,),
{
"DESCRIPTOR": _CONFIGCHANGE,
"__module__": "google.api.config_change_pb2"
# @@protoc_insertion_point(class_scope:google.api.ConfigChange)
},
)
_sym_db.RegisterMessage(ConfigChange)
Advice = _reflection.GeneratedProtocolMessageType(
"Advice",
(_message.Message,),
{
"DESCRIPTOR": _ADVICE,
"__module__": "google.api.config_change_pb2"
# @@protoc_insertion_point(class_scope:google.api.Advice)
},
)
_sym_db.RegisterMessage(Advice)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,213 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/consumer.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/consumer.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\rConsumerProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig",
serialized_pb=b'\n\x19google/api/consumer.proto\x12\ngoogle.api"=\n\x11ProjectProperties\x12(\n\nproperties\x18\x01 \x03(\x0b\x32\x14.google.api.Property"\xac\x01\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.api.Property.PropertyType\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t"L\n\x0cPropertyType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05INT64\x10\x01\x12\x08\n\x04\x42OOL\x10\x02\x12\n\n\x06STRING\x10\x03\x12\n\n\x06\x44OUBLE\x10\x04\x42h\n\x0e\x63om.google.apiB\rConsumerProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigb\x06proto3',
)
_PROPERTY_PROPERTYTYPE = _descriptor.EnumDescriptor(
name="PropertyType",
full_name="google.api.Property.PropertyType",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="UNSPECIFIED", index=0, number=0, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="INT64", index=1, number=1, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="BOOL", index=2, number=2, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="STRING", index=3, number=3, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="DOUBLE", index=4, number=4, serialized_options=None, type=None
),
],
containing_type=None,
serialized_options=None,
serialized_start=201,
serialized_end=277,
)
_sym_db.RegisterEnumDescriptor(_PROPERTY_PROPERTYTYPE)
_PROJECTPROPERTIES = _descriptor.Descriptor(
name="ProjectProperties",
full_name="google.api.ProjectProperties",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="properties",
full_name="google.api.ProjectProperties.properties",
index=0,
number=1,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=41,
serialized_end=102,
)
_PROPERTY = _descriptor.Descriptor(
name="Property",
full_name="google.api.Property",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="name",
full_name="google.api.Property.name",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="type",
full_name="google.api.Property.type",
index=1,
number=2,
type=14,
cpp_type=8,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="description",
full_name="google.api.Property.description",
index=2,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[_PROPERTY_PROPERTYTYPE],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=105,
serialized_end=277,
)
_PROJECTPROPERTIES.fields_by_name["properties"].message_type = _PROPERTY
_PROPERTY.fields_by_name["type"].enum_type = _PROPERTY_PROPERTYTYPE
_PROPERTY_PROPERTYTYPE.containing_type = _PROPERTY
DESCRIPTOR.message_types_by_name["ProjectProperties"] = _PROJECTPROPERTIES
DESCRIPTOR.message_types_by_name["Property"] = _PROPERTY
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
ProjectProperties = _reflection.GeneratedProtocolMessageType(
"ProjectProperties",
(_message.Message,),
{
"DESCRIPTOR": _PROJECTPROPERTIES,
"__module__": "google.api.consumer_pb2"
# @@protoc_insertion_point(class_scope:google.api.ProjectProperties)
},
)
_sym_db.RegisterMessage(ProjectProperties)
Property = _reflection.GeneratedProtocolMessageType(
"Property",
(_message.Message,),
{
"DESCRIPTOR": _PROPERTY,
"__module__": "google.api.consumer_pb2"
# @@protoc_insertion_point(class_scope:google.api.Property)
},
)
_sym_db.RegisterMessage(Property)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,181 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/context.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/context.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\014ContextProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x18google/api/context.proto\x12\ngoogle.api"1\n\x07\x43ontext\x12&\n\x05rules\x18\x01 \x03(\x0b\x32\x17.google.api.ContextRule"D\n\x0b\x43ontextRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\x11\n\trequested\x18\x02 \x03(\t\x12\x10\n\x08provided\x18\x03 \x03(\tBn\n\x0e\x63om.google.apiB\x0c\x43ontextProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
)
_CONTEXT = _descriptor.Descriptor(
name="Context",
full_name="google.api.Context",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="rules",
full_name="google.api.Context.rules",
index=0,
number=1,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=40,
serialized_end=89,
)
_CONTEXTRULE = _descriptor.Descriptor(
name="ContextRule",
full_name="google.api.ContextRule",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="selector",
full_name="google.api.ContextRule.selector",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="requested",
full_name="google.api.ContextRule.requested",
index=1,
number=2,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="provided",
full_name="google.api.ContextRule.provided",
index=2,
number=3,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=91,
serialized_end=159,
)
_CONTEXT.fields_by_name["rules"].message_type = _CONTEXTRULE
DESCRIPTOR.message_types_by_name["Context"] = _CONTEXT
DESCRIPTOR.message_types_by_name["ContextRule"] = _CONTEXTRULE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Context = _reflection.GeneratedProtocolMessageType(
"Context",
(_message.Message,),
{
"DESCRIPTOR": _CONTEXT,
"__module__": "google.api.context_pb2"
# @@protoc_insertion_point(class_scope:google.api.Context)
},
)
_sym_db.RegisterMessage(Context)
ContextRule = _reflection.GeneratedProtocolMessageType(
"ContextRule",
(_message.Message,),
{
"DESCRIPTOR": _CONTEXTRULE,
"__module__": "google.api.context_pb2"
# @@protoc_insertion_point(class_scope:google.api.ContextRule)
},
)
_sym_db.RegisterMessage(ContextRule)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,93 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/control.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/control.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\014ControlProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=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',
)
_CONTROL = _descriptor.Descriptor(
name="Control",
full_name="google.api.Control",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="environment",
full_name="google.api.Control.environment",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=40,
serialized_end=70,
)
DESCRIPTOR.message_types_by_name["Control"] = _CONTROL
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Control = _reflection.GeneratedProtocolMessageType(
"Control",
(_message.Message,),
{
"DESCRIPTOR": _CONTROL,
"__module__": "google.api.control_pb2"
# @@protoc_insertion_point(class_scope:google.api.Control)
},
)
_sym_db.RegisterMessage(Control)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,719 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/distribution.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/distribution.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\021DistributionProtoP\001ZCgoogle.golang.org/genproto/googleapis/api/distribution;distribution\242\002\004GAPI",
serialized_pb=b'\n\x1dgoogle/api/distribution.proto\x12\ngoogle.api\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xd9\x06\n\x0c\x44istribution\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x0c\n\x04mean\x18\x02 \x01(\x01\x12 \n\x18sum_of_squared_deviation\x18\x03 \x01(\x01\x12-\n\x05range\x18\x04 \x01(\x0b\x32\x1e.google.api.Distribution.Range\x12>\n\x0e\x62ucket_options\x18\x06 \x01(\x0b\x32&.google.api.Distribution.BucketOptions\x12\x15\n\rbucket_counts\x18\x07 \x03(\x03\x12\x34\n\texemplars\x18\n \x03(\x0b\x32!.google.api.Distribution.Exemplar\x1a!\n\x05Range\x12\x0b\n\x03min\x18\x01 \x01(\x01\x12\x0b\n\x03max\x18\x02 \x01(\x01\x1a\xb5\x03\n\rBucketOptions\x12G\n\x0elinear_buckets\x18\x01 \x01(\x0b\x32-.google.api.Distribution.BucketOptions.LinearH\x00\x12Q\n\x13\x65xponential_buckets\x18\x02 \x01(\x0b\x32\x32.google.api.Distribution.BucketOptions.ExponentialH\x00\x12K\n\x10\x65xplicit_buckets\x18\x03 \x01(\x0b\x32/.google.api.Distribution.BucketOptions.ExplicitH\x00\x1a\x43\n\x06Linear\x12\x1a\n\x12num_finite_buckets\x18\x01 \x01(\x05\x12\r\n\x05width\x18\x02 \x01(\x01\x12\x0e\n\x06offset\x18\x03 \x01(\x01\x1aO\n\x0b\x45xponential\x12\x1a\n\x12num_finite_buckets\x18\x01 \x01(\x05\x12\x15\n\rgrowth_factor\x18\x02 \x01(\x01\x12\r\n\x05scale\x18\x03 \x01(\x01\x1a\x1a\n\x08\x45xplicit\x12\x0e\n\x06\x62ounds\x18\x01 \x03(\x01\x42\t\n\x07options\x1as\n\x08\x45xemplar\x12\r\n\x05value\x18\x01 \x01(\x01\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\x0b\x61ttachments\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyBq\n\x0e\x63om.google.apiB\x11\x44istributionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/distribution;distribution\xa2\x02\x04GAPIb\x06proto3',
dependencies=[
google_dot_protobuf_dot_any__pb2.DESCRIPTOR,
google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,
],
)
_DISTRIBUTION_RANGE = _descriptor.Descriptor(
name="Range",
full_name="google.api.Distribution.Range",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="min",
full_name="google.api.Distribution.Range.min",
index=0,
number=1,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="max",
full_name="google.api.Distribution.Range.max",
index=1,
number=2,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=373,
serialized_end=406,
)
_DISTRIBUTION_BUCKETOPTIONS_LINEAR = _descriptor.Descriptor(
name="Linear",
full_name="google.api.Distribution.BucketOptions.Linear",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="num_finite_buckets",
full_name="google.api.Distribution.BucketOptions.Linear.num_finite_buckets",
index=0,
number=1,
type=5,
cpp_type=1,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="width",
full_name="google.api.Distribution.BucketOptions.Linear.width",
index=1,
number=2,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="offset",
full_name="google.api.Distribution.BucketOptions.Linear.offset",
index=2,
number=3,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=659,
serialized_end=726,
)
_DISTRIBUTION_BUCKETOPTIONS_EXPONENTIAL = _descriptor.Descriptor(
name="Exponential",
full_name="google.api.Distribution.BucketOptions.Exponential",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="num_finite_buckets",
full_name="google.api.Distribution.BucketOptions.Exponential.num_finite_buckets",
index=0,
number=1,
type=5,
cpp_type=1,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="growth_factor",
full_name="google.api.Distribution.BucketOptions.Exponential.growth_factor",
index=1,
number=2,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="scale",
full_name="google.api.Distribution.BucketOptions.Exponential.scale",
index=2,
number=3,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=728,
serialized_end=807,
)
_DISTRIBUTION_BUCKETOPTIONS_EXPLICIT = _descriptor.Descriptor(
name="Explicit",
full_name="google.api.Distribution.BucketOptions.Explicit",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="bounds",
full_name="google.api.Distribution.BucketOptions.Explicit.bounds",
index=0,
number=1,
type=1,
cpp_type=5,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=809,
serialized_end=835,
)
_DISTRIBUTION_BUCKETOPTIONS = _descriptor.Descriptor(
name="BucketOptions",
full_name="google.api.Distribution.BucketOptions",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="linear_buckets",
full_name="google.api.Distribution.BucketOptions.linear_buckets",
index=0,
number=1,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="exponential_buckets",
full_name="google.api.Distribution.BucketOptions.exponential_buckets",
index=1,
number=2,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="explicit_buckets",
full_name="google.api.Distribution.BucketOptions.explicit_buckets",
index=2,
number=3,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[
_DISTRIBUTION_BUCKETOPTIONS_LINEAR,
_DISTRIBUTION_BUCKETOPTIONS_EXPONENTIAL,
_DISTRIBUTION_BUCKETOPTIONS_EXPLICIT,
],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name="options",
full_name="google.api.Distribution.BucketOptions.options",
index=0,
containing_type=None,
fields=[],
)
],
serialized_start=409,
serialized_end=846,
)
_DISTRIBUTION_EXEMPLAR = _descriptor.Descriptor(
name="Exemplar",
full_name="google.api.Distribution.Exemplar",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="value",
full_name="google.api.Distribution.Exemplar.value",
index=0,
number=1,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="timestamp",
full_name="google.api.Distribution.Exemplar.timestamp",
index=1,
number=2,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="attachments",
full_name="google.api.Distribution.Exemplar.attachments",
index=2,
number=3,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=848,
serialized_end=963,
)
_DISTRIBUTION = _descriptor.Descriptor(
name="Distribution",
full_name="google.api.Distribution",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="count",
full_name="google.api.Distribution.count",
index=0,
number=1,
type=3,
cpp_type=2,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="mean",
full_name="google.api.Distribution.mean",
index=1,
number=2,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="sum_of_squared_deviation",
full_name="google.api.Distribution.sum_of_squared_deviation",
index=2,
number=3,
type=1,
cpp_type=5,
label=1,
has_default_value=False,
default_value=float(0),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="range",
full_name="google.api.Distribution.range",
index=3,
number=4,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="bucket_options",
full_name="google.api.Distribution.bucket_options",
index=4,
number=6,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="bucket_counts",
full_name="google.api.Distribution.bucket_counts",
index=5,
number=7,
type=3,
cpp_type=2,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="exemplars",
full_name="google.api.Distribution.exemplars",
index=6,
number=10,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[
_DISTRIBUTION_RANGE,
_DISTRIBUTION_BUCKETOPTIONS,
_DISTRIBUTION_EXEMPLAR,
],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=106,
serialized_end=963,
)
_DISTRIBUTION_RANGE.containing_type = _DISTRIBUTION
_DISTRIBUTION_BUCKETOPTIONS_LINEAR.containing_type = _DISTRIBUTION_BUCKETOPTIONS
_DISTRIBUTION_BUCKETOPTIONS_EXPONENTIAL.containing_type = _DISTRIBUTION_BUCKETOPTIONS
_DISTRIBUTION_BUCKETOPTIONS_EXPLICIT.containing_type = _DISTRIBUTION_BUCKETOPTIONS
_DISTRIBUTION_BUCKETOPTIONS.fields_by_name[
"linear_buckets"
].message_type = _DISTRIBUTION_BUCKETOPTIONS_LINEAR
_DISTRIBUTION_BUCKETOPTIONS.fields_by_name[
"exponential_buckets"
].message_type = _DISTRIBUTION_BUCKETOPTIONS_EXPONENTIAL
_DISTRIBUTION_BUCKETOPTIONS.fields_by_name[
"explicit_buckets"
].message_type = _DISTRIBUTION_BUCKETOPTIONS_EXPLICIT
_DISTRIBUTION_BUCKETOPTIONS.containing_type = _DISTRIBUTION
_DISTRIBUTION_BUCKETOPTIONS.oneofs_by_name["options"].fields.append(
_DISTRIBUTION_BUCKETOPTIONS.fields_by_name["linear_buckets"]
)
_DISTRIBUTION_BUCKETOPTIONS.fields_by_name[
"linear_buckets"
].containing_oneof = _DISTRIBUTION_BUCKETOPTIONS.oneofs_by_name["options"]
_DISTRIBUTION_BUCKETOPTIONS.oneofs_by_name["options"].fields.append(
_DISTRIBUTION_BUCKETOPTIONS.fields_by_name["exponential_buckets"]
)
_DISTRIBUTION_BUCKETOPTIONS.fields_by_name[
"exponential_buckets"
].containing_oneof = _DISTRIBUTION_BUCKETOPTIONS.oneofs_by_name["options"]
_DISTRIBUTION_BUCKETOPTIONS.oneofs_by_name["options"].fields.append(
_DISTRIBUTION_BUCKETOPTIONS.fields_by_name["explicit_buckets"]
)
_DISTRIBUTION_BUCKETOPTIONS.fields_by_name[
"explicit_buckets"
].containing_oneof = _DISTRIBUTION_BUCKETOPTIONS.oneofs_by_name["options"]
_DISTRIBUTION_EXEMPLAR.fields_by_name[
"timestamp"
].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
_DISTRIBUTION_EXEMPLAR.fields_by_name[
"attachments"
].message_type = google_dot_protobuf_dot_any__pb2._ANY
_DISTRIBUTION_EXEMPLAR.containing_type = _DISTRIBUTION
_DISTRIBUTION.fields_by_name["range"].message_type = _DISTRIBUTION_RANGE
_DISTRIBUTION.fields_by_name[
"bucket_options"
].message_type = _DISTRIBUTION_BUCKETOPTIONS
_DISTRIBUTION.fields_by_name["exemplars"].message_type = _DISTRIBUTION_EXEMPLAR
DESCRIPTOR.message_types_by_name["Distribution"] = _DISTRIBUTION
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Distribution = _reflection.GeneratedProtocolMessageType(
"Distribution",
(_message.Message,),
{
"Range": _reflection.GeneratedProtocolMessageType(
"Range",
(_message.Message,),
{
"DESCRIPTOR": _DISTRIBUTION_RANGE,
"__module__": "google.api.distribution_pb2"
# @@protoc_insertion_point(class_scope:google.api.Distribution.Range)
},
),
"BucketOptions": _reflection.GeneratedProtocolMessageType(
"BucketOptions",
(_message.Message,),
{
"Linear": _reflection.GeneratedProtocolMessageType(
"Linear",
(_message.Message,),
{
"DESCRIPTOR": _DISTRIBUTION_BUCKETOPTIONS_LINEAR,
"__module__": "google.api.distribution_pb2"
# @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Linear)
},
),
"Exponential": _reflection.GeneratedProtocolMessageType(
"Exponential",
(_message.Message,),
{
"DESCRIPTOR": _DISTRIBUTION_BUCKETOPTIONS_EXPONENTIAL,
"__module__": "google.api.distribution_pb2"
# @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Exponential)
},
),
"Explicit": _reflection.GeneratedProtocolMessageType(
"Explicit",
(_message.Message,),
{
"DESCRIPTOR": _DISTRIBUTION_BUCKETOPTIONS_EXPLICIT,
"__module__": "google.api.distribution_pb2"
# @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Explicit)
},
),
"DESCRIPTOR": _DISTRIBUTION_BUCKETOPTIONS,
"__module__": "google.api.distribution_pb2"
# @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions)
},
),
"Exemplar": _reflection.GeneratedProtocolMessageType(
"Exemplar",
(_message.Message,),
{
"DESCRIPTOR": _DISTRIBUTION_EXEMPLAR,
"__module__": "google.api.distribution_pb2"
# @@protoc_insertion_point(class_scope:google.api.Distribution.Exemplar)
},
),
"DESCRIPTOR": _DISTRIBUTION,
"__module__": "google.api.distribution_pb2"
# @@protoc_insertion_point(class_scope:google.api.Distribution)
},
)
_sym_db.RegisterMessage(Distribution)
_sym_db.RegisterMessage(Distribution.Range)
_sym_db.RegisterMessage(Distribution.BucketOptions)
_sym_db.RegisterMessage(Distribution.BucketOptions.Linear)
_sym_db.RegisterMessage(Distribution.BucketOptions.Exponential)
_sym_db.RegisterMessage(Distribution.BucketOptions.Explicit)
_sym_db.RegisterMessage(Distribution.Exemplar)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,342 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/documentation.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/documentation.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\022DocumentationProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x1egoogle/api/documentation.proto\x12\ngoogle.api"\xa1\x01\n\rDocumentation\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12\x1f\n\x05pages\x18\x05 \x03(\x0b\x32\x10.google.api.Page\x12,\n\x05rules\x18\x03 \x03(\x0b\x32\x1d.google.api.DocumentationRule\x12\x1e\n\x16\x64ocumentation_root_url\x18\x04 \x01(\t\x12\x10\n\x08overview\x18\x02 \x01(\t"[\n\x11\x44ocumentationRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1f\n\x17\x64\x65precation_description\x18\x03 \x01(\t"I\n\x04Page\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12"\n\x08subpages\x18\x03 \x03(\x0b\x32\x10.google.api.PageBt\n\x0e\x63om.google.apiB\x12\x44ocumentationProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
)
_DOCUMENTATION = _descriptor.Descriptor(
name="Documentation",
full_name="google.api.Documentation",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="summary",
full_name="google.api.Documentation.summary",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="pages",
full_name="google.api.Documentation.pages",
index=1,
number=5,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="rules",
full_name="google.api.Documentation.rules",
index=2,
number=3,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="documentation_root_url",
full_name="google.api.Documentation.documentation_root_url",
index=3,
number=4,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="overview",
full_name="google.api.Documentation.overview",
index=4,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=47,
serialized_end=208,
)
_DOCUMENTATIONRULE = _descriptor.Descriptor(
name="DocumentationRule",
full_name="google.api.DocumentationRule",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="selector",
full_name="google.api.DocumentationRule.selector",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="description",
full_name="google.api.DocumentationRule.description",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="deprecation_description",
full_name="google.api.DocumentationRule.deprecation_description",
index=2,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=210,
serialized_end=301,
)
_PAGE = _descriptor.Descriptor(
name="Page",
full_name="google.api.Page",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="name",
full_name="google.api.Page.name",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="content",
full_name="google.api.Page.content",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="subpages",
full_name="google.api.Page.subpages",
index=2,
number=3,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=303,
serialized_end=376,
)
_DOCUMENTATION.fields_by_name["pages"].message_type = _PAGE
_DOCUMENTATION.fields_by_name["rules"].message_type = _DOCUMENTATIONRULE
_PAGE.fields_by_name["subpages"].message_type = _PAGE
DESCRIPTOR.message_types_by_name["Documentation"] = _DOCUMENTATION
DESCRIPTOR.message_types_by_name["DocumentationRule"] = _DOCUMENTATIONRULE
DESCRIPTOR.message_types_by_name["Page"] = _PAGE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Documentation = _reflection.GeneratedProtocolMessageType(
"Documentation",
(_message.Message,),
{
"DESCRIPTOR": _DOCUMENTATION,
"__module__": "google.api.documentation_pb2"
# @@protoc_insertion_point(class_scope:google.api.Documentation)
},
)
_sym_db.RegisterMessage(Documentation)
DocumentationRule = _reflection.GeneratedProtocolMessageType(
"DocumentationRule",
(_message.Message,),
{
"DESCRIPTOR": _DOCUMENTATIONRULE,
"__module__": "google.api.documentation_pb2"
# @@protoc_insertion_point(class_scope:google.api.DocumentationRule)
},
)
_sym_db.RegisterMessage(DocumentationRule)
Page = _reflection.GeneratedProtocolMessageType(
"Page",
(_message.Message,),
{
"DESCRIPTOR": _PAGE,
"__module__": "google.api.documentation_pb2"
# @@protoc_insertion_point(class_scope:google.api.Page)
},
)
_sym_db.RegisterMessage(Page)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,169 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/endpoint.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/endpoint.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\rEndpointProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x19google/api/endpoint.proto\x12\ngoogle.api\x1a\x1cgoogle/api/annotations.proto"_\n\x08\x45ndpoint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x61liases\x18\x02 \x03(\t\x12\x10\n\x08\x66\x65\x61tures\x18\x04 \x03(\t\x12\x0e\n\x06target\x18\x65 \x01(\t\x12\x12\n\nallow_cors\x18\x05 \x01(\x08\x42o\n\x0e\x63om.google.apiB\rEndpointProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR],
)
_ENDPOINT = _descriptor.Descriptor(
name="Endpoint",
full_name="google.api.Endpoint",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="name",
full_name="google.api.Endpoint.name",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="aliases",
full_name="google.api.Endpoint.aliases",
index=1,
number=2,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="features",
full_name="google.api.Endpoint.features",
index=2,
number=4,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="target",
full_name="google.api.Endpoint.target",
index=3,
number=101,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="allow_cors",
full_name="google.api.Endpoint.allow_cors",
index=4,
number=5,
type=8,
cpp_type=7,
label=1,
has_default_value=False,
default_value=False,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=71,
serialized_end=166,
)
DESCRIPTOR.message_types_by_name["Endpoint"] = _ENDPOINT
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Endpoint = _reflection.GeneratedProtocolMessageType(
"Endpoint",
(_message.Message,),
{
"DESCRIPTOR": _ENDPOINT,
"__module__": "google.api.endpoint_pb2"
# @@protoc_insertion_point(class_scope:google.api.Endpoint)
},
)
_sym_db.RegisterMessage(Endpoint)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,115 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/field_behavior.proto
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/field_behavior.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\022FieldBehaviorProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\242\002\004GAPI",
serialized_pb=b"\n\x1fgoogle/api/field_behavior.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto*{\n\rFieldBehavior\x12\x1e\n\x1a\x46IELD_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08OPTIONAL\x10\x01\x12\x0c\n\x08REQUIRED\x10\x02\x12\x0f\n\x0bOUTPUT_ONLY\x10\x03\x12\x0e\n\nINPUT_ONLY\x10\x04\x12\r\n\tIMMUTABLE\x10\x05:Q\n\x0e\x66ield_behavior\x12\x1d.google.protobuf.FieldOptions\x18\x9c\x08 \x03(\x0e\x32\x19.google.api.FieldBehaviorBp\n\x0e\x63om.google.apiB\x12\x46ieldBehaviorProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3",
dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR],
)
_FIELDBEHAVIOR = _descriptor.EnumDescriptor(
name="FieldBehavior",
full_name="google.api.FieldBehavior",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="FIELD_BEHAVIOR_UNSPECIFIED",
index=0,
number=0,
serialized_options=None,
type=None,
),
_descriptor.EnumValueDescriptor(
name="OPTIONAL", index=1, number=1, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="REQUIRED", index=2, number=2, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="OUTPUT_ONLY", index=3, number=3, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="INPUT_ONLY", index=4, number=4, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="IMMUTABLE", index=5, number=5, serialized_options=None, type=None
),
],
containing_type=None,
serialized_options=None,
serialized_start=81,
serialized_end=204,
)
_sym_db.RegisterEnumDescriptor(_FIELDBEHAVIOR)
FieldBehavior = enum_type_wrapper.EnumTypeWrapper(_FIELDBEHAVIOR)
FIELD_BEHAVIOR_UNSPECIFIED = 0
OPTIONAL = 1
REQUIRED = 2
OUTPUT_ONLY = 3
INPUT_ONLY = 4
IMMUTABLE = 5
FIELD_BEHAVIOR_FIELD_NUMBER = 1052
field_behavior = _descriptor.FieldDescriptor(
name="field_behavior",
full_name="google.api.field_behavior",
index=0,
number=1052,
type=14,
cpp_type=8,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=True,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
DESCRIPTOR.enum_types_by_name["FieldBehavior"] = _FIELDBEHAVIOR
DESCRIPTOR.extensions_by_name["field_behavior"] = field_behavior
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
field_behavior.enum_type = _FIELDBEHAVIOR
google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(field_behavior)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,420 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/http.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/http.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\tHttpProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\370\001\001\242\002\004GAPI",
serialized_pb=b'\n\x15google/api/http.proto\x12\ngoogle.api"T\n\x04Http\x12#\n\x05rules\x18\x01 \x03(\x0b\x32\x14.google.api.HttpRule\x12\'\n\x1f\x66ully_decode_reserved_expansion\x18\x02 \x01(\x08"\x81\x02\n\x08HttpRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\r\n\x03get\x18\x02 \x01(\tH\x00\x12\r\n\x03put\x18\x03 \x01(\tH\x00\x12\x0e\n\x04post\x18\x04 \x01(\tH\x00\x12\x10\n\x06\x64\x65lete\x18\x05 \x01(\tH\x00\x12\x0f\n\x05patch\x18\x06 \x01(\tH\x00\x12/\n\x06\x63ustom\x18\x08 \x01(\x0b\x32\x1d.google.api.CustomHttpPatternH\x00\x12\x0c\n\x04\x62ody\x18\x07 \x01(\t\x12\x15\n\rresponse_body\x18\x0c \x01(\t\x12\x31\n\x13\x61\x64\x64itional_bindings\x18\x0b \x03(\x0b\x32\x14.google.api.HttpRuleB\t\n\x07pattern"/\n\x11\x43ustomHttpPattern\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\tBj\n\x0e\x63om.google.apiB\tHttpProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3',
)
_HTTP = _descriptor.Descriptor(
name="Http",
full_name="google.api.Http",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="rules",
full_name="google.api.Http.rules",
index=0,
number=1,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="fully_decode_reserved_expansion",
full_name="google.api.Http.fully_decode_reserved_expansion",
index=1,
number=2,
type=8,
cpp_type=7,
label=1,
has_default_value=False,
default_value=False,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=37,
serialized_end=121,
)
_HTTPRULE = _descriptor.Descriptor(
name="HttpRule",
full_name="google.api.HttpRule",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="selector",
full_name="google.api.HttpRule.selector",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="get",
full_name="google.api.HttpRule.get",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="put",
full_name="google.api.HttpRule.put",
index=2,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="post",
full_name="google.api.HttpRule.post",
index=3,
number=4,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="delete",
full_name="google.api.HttpRule.delete",
index=4,
number=5,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="patch",
full_name="google.api.HttpRule.patch",
index=5,
number=6,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="custom",
full_name="google.api.HttpRule.custom",
index=6,
number=8,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="body",
full_name="google.api.HttpRule.body",
index=7,
number=7,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="response_body",
full_name="google.api.HttpRule.response_body",
index=8,
number=12,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="additional_bindings",
full_name="google.api.HttpRule.additional_bindings",
index=9,
number=11,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name="pattern",
full_name="google.api.HttpRule.pattern",
index=0,
containing_type=None,
fields=[],
)
],
serialized_start=124,
serialized_end=381,
)
_CUSTOMHTTPPATTERN = _descriptor.Descriptor(
name="CustomHttpPattern",
full_name="google.api.CustomHttpPattern",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="kind",
full_name="google.api.CustomHttpPattern.kind",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="path",
full_name="google.api.CustomHttpPattern.path",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=383,
serialized_end=430,
)
_HTTP.fields_by_name["rules"].message_type = _HTTPRULE
_HTTPRULE.fields_by_name["custom"].message_type = _CUSTOMHTTPPATTERN
_HTTPRULE.fields_by_name["additional_bindings"].message_type = _HTTPRULE
_HTTPRULE.oneofs_by_name["pattern"].fields.append(_HTTPRULE.fields_by_name["get"])
_HTTPRULE.fields_by_name["get"].containing_oneof = _HTTPRULE.oneofs_by_name["pattern"]
_HTTPRULE.oneofs_by_name["pattern"].fields.append(_HTTPRULE.fields_by_name["put"])
_HTTPRULE.fields_by_name["put"].containing_oneof = _HTTPRULE.oneofs_by_name["pattern"]
_HTTPRULE.oneofs_by_name["pattern"].fields.append(_HTTPRULE.fields_by_name["post"])
_HTTPRULE.fields_by_name["post"].containing_oneof = _HTTPRULE.oneofs_by_name["pattern"]
_HTTPRULE.oneofs_by_name["pattern"].fields.append(_HTTPRULE.fields_by_name["delete"])
_HTTPRULE.fields_by_name["delete"].containing_oneof = _HTTPRULE.oneofs_by_name[
"pattern"
]
_HTTPRULE.oneofs_by_name["pattern"].fields.append(_HTTPRULE.fields_by_name["patch"])
_HTTPRULE.fields_by_name["patch"].containing_oneof = _HTTPRULE.oneofs_by_name["pattern"]
_HTTPRULE.oneofs_by_name["pattern"].fields.append(_HTTPRULE.fields_by_name["custom"])
_HTTPRULE.fields_by_name["custom"].containing_oneof = _HTTPRULE.oneofs_by_name[
"pattern"
]
DESCRIPTOR.message_types_by_name["Http"] = _HTTP
DESCRIPTOR.message_types_by_name["HttpRule"] = _HTTPRULE
DESCRIPTOR.message_types_by_name["CustomHttpPattern"] = _CUSTOMHTTPPATTERN
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Http = _reflection.GeneratedProtocolMessageType(
"Http",
(_message.Message,),
{
"DESCRIPTOR": _HTTP,
"__module__": "google.api.http_pb2"
# @@protoc_insertion_point(class_scope:google.api.Http)
},
)
_sym_db.RegisterMessage(Http)
HttpRule = _reflection.GeneratedProtocolMessageType(
"HttpRule",
(_message.Message,),
{
"DESCRIPTOR": _HTTPRULE,
"__module__": "google.api.http_pb2"
# @@protoc_insertion_point(class_scope:google.api.HttpRule)
},
)
_sym_db.RegisterMessage(HttpRule)
CustomHttpPattern = _reflection.GeneratedProtocolMessageType(
"CustomHttpPattern",
(_message.Message,),
{
"DESCRIPTOR": _CUSTOMHTTPPATTERN,
"__module__": "google.api.http_pb2"
# @@protoc_insertion_point(class_scope:google.api.CustomHttpPattern)
},
)
_sym_db.RegisterMessage(CustomHttpPattern)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,136 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/httpbody.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/httpbody.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\rHttpBodyProtoP\001Z;google.golang.org/genproto/googleapis/api/httpbody;httpbody\242\002\004GAPI",
serialized_pb=b'\n\x19google/api/httpbody.proto\x12\ngoogle.api\x1a\x19google/protobuf/any.proto"X\n\x08HttpBody\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12(\n\nextensions\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyBe\n\x0e\x63om.google.apiB\rHttpBodyProtoP\x01Z;google.golang.org/genproto/googleapis/api/httpbody;httpbody\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR],
)
_HTTPBODY = _descriptor.Descriptor(
name="HttpBody",
full_name="google.api.HttpBody",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="content_type",
full_name="google.api.HttpBody.content_type",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="data",
full_name="google.api.HttpBody.data",
index=1,
number=2,
type=12,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"",
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="extensions",
full_name="google.api.HttpBody.extensions",
index=2,
number=3,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=68,
serialized_end=156,
)
_HTTPBODY.fields_by_name[
"extensions"
].message_type = google_dot_protobuf_dot_any__pb2._ANY
DESCRIPTOR.message_types_by_name["HttpBody"] = _HTTPBODY
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
HttpBody = _reflection.GeneratedProtocolMessageType(
"HttpBody",
(_message.Message,),
{
"DESCRIPTOR": _HTTPBODY,
"__module__": "google.api.httpbody_pb2"
# @@protoc_insertion_point(class_scope:google.api.HttpBody)
},
)
_sym_db.RegisterMessage(HttpBody)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,155 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/label.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/label.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\nLabelProtoP\001Z5google.golang.org/genproto/googleapis/api/label;label\370\001\001\242\002\004GAPI",
serialized_pb=b'\n\x16google/api/label.proto\x12\ngoogle.api"\x9c\x01\n\x0fLabelDescriptor\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\nvalue_type\x18\x02 \x01(\x0e\x32%.google.api.LabelDescriptor.ValueType\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t",\n\tValueType\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x42_\n\x0e\x63om.google.apiB\nLabelProtoP\x01Z5google.golang.org/genproto/googleapis/api/label;label\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3',
)
_LABELDESCRIPTOR_VALUETYPE = _descriptor.EnumDescriptor(
name="ValueType",
full_name="google.api.LabelDescriptor.ValueType",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="STRING", index=0, number=0, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="BOOL", index=1, number=1, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="INT64", index=2, number=2, serialized_options=None, type=None
),
],
containing_type=None,
serialized_options=None,
serialized_start=151,
serialized_end=195,
)
_sym_db.RegisterEnumDescriptor(_LABELDESCRIPTOR_VALUETYPE)
_LABELDESCRIPTOR = _descriptor.Descriptor(
name="LabelDescriptor",
full_name="google.api.LabelDescriptor",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="key",
full_name="google.api.LabelDescriptor.key",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="value_type",
full_name="google.api.LabelDescriptor.value_type",
index=1,
number=2,
type=14,
cpp_type=8,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="description",
full_name="google.api.LabelDescriptor.description",
index=2,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[_LABELDESCRIPTOR_VALUETYPE],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=39,
serialized_end=195,
)
_LABELDESCRIPTOR.fields_by_name["value_type"].enum_type = _LABELDESCRIPTOR_VALUETYPE
_LABELDESCRIPTOR_VALUETYPE.containing_type = _LABELDESCRIPTOR
DESCRIPTOR.message_types_by_name["LabelDescriptor"] = _LABELDESCRIPTOR
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
LabelDescriptor = _reflection.GeneratedProtocolMessageType(
"LabelDescriptor",
(_message.Message,),
{
"DESCRIPTOR": _LABELDESCRIPTOR,
"__module__": "google.api.label_pb2"
# @@protoc_insertion_point(class_scope:google.api.LabelDescriptor)
},
)
_sym_db.RegisterMessage(LabelDescriptor)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,89 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/launch_stage.proto
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/launch_stage.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\020LaunchStageProtoP\001Z-google.golang.org/genproto/googleapis/api;api\242\002\004GAPI",
serialized_pb=b"\n\x1dgoogle/api/launch_stage.proto\x12\ngoogle.api*j\n\x0bLaunchStage\x12\x1c\n\x18LAUNCH_STAGE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x45\x41RLY_ACCESS\x10\x01\x12\t\n\x05\x41LPHA\x10\x02\x12\x08\n\x04\x42\x45TA\x10\x03\x12\x06\n\x02GA\x10\x04\x12\x0e\n\nDEPRECATED\x10\x05\x42Z\n\x0e\x63om.google.apiB\x10LaunchStageProtoP\x01Z-google.golang.org/genproto/googleapis/api;api\xa2\x02\x04GAPIb\x06proto3",
)
_LAUNCHSTAGE = _descriptor.EnumDescriptor(
name="LaunchStage",
full_name="google.api.LaunchStage",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="LAUNCH_STAGE_UNSPECIFIED",
index=0,
number=0,
serialized_options=None,
type=None,
),
_descriptor.EnumValueDescriptor(
name="EARLY_ACCESS", index=1, number=1, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="ALPHA", index=2, number=2, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="BETA", index=3, number=3, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="GA", index=4, number=4, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="DEPRECATED", index=5, number=5, serialized_options=None, type=None
),
],
containing_type=None,
serialized_options=None,
serialized_start=45,
serialized_end=151,
)
_sym_db.RegisterEnumDescriptor(_LAUNCHSTAGE)
LaunchStage = enum_type_wrapper.EnumTypeWrapper(_LAUNCHSTAGE)
LAUNCH_STAGE_UNSPECIFIED = 0
EARLY_ACCESS = 1
ALPHA = 2
BETA = 3
GA = 4
DEPRECATED = 5
DESCRIPTOR.enum_types_by_name["LaunchStage"] = _LAUNCHSTAGE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,154 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/log.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import label_pb2 as google_dot_api_dot_label__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/log.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\010LogProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x14google/api/log.proto\x12\ngoogle.api\x1a\x16google/api/label.proto"u\n\rLogDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x06labels\x18\x02 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\tBj\n\x0e\x63om.google.apiB\x08LogProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_api_dot_label__pb2.DESCRIPTOR],
)
_LOGDESCRIPTOR = _descriptor.Descriptor(
name="LogDescriptor",
full_name="google.api.LogDescriptor",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="name",
full_name="google.api.LogDescriptor.name",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="labels",
full_name="google.api.LogDescriptor.labels",
index=1,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="description",
full_name="google.api.LogDescriptor.description",
index=2,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="display_name",
full_name="google.api.LogDescriptor.display_name",
index=3,
number=4,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=60,
serialized_end=177,
)
_LOGDESCRIPTOR.fields_by_name[
"labels"
].message_type = google_dot_api_dot_label__pb2._LABELDESCRIPTOR
DESCRIPTOR.message_types_by_name["LogDescriptor"] = _LOGDESCRIPTOR
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
LogDescriptor = _reflection.GeneratedProtocolMessageType(
"LogDescriptor",
(_message.Message,),
{
"DESCRIPTOR": _LOGDESCRIPTOR,
"__module__": "google.api.log_pb2"
# @@protoc_insertion_point(class_scope:google.api.LogDescriptor)
},
)
_sym_db.RegisterMessage(LogDescriptor)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,188 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/logging.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/logging.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\014LoggingProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x18google/api/logging.proto\x12\ngoogle.api\x1a\x1cgoogle/api/annotations.proto"\xd7\x01\n\x07Logging\x12\x45\n\x15producer_destinations\x18\x01 \x03(\x0b\x32&.google.api.Logging.LoggingDestination\x12\x45\n\x15\x63onsumer_destinations\x18\x02 \x03(\x0b\x32&.google.api.Logging.LoggingDestination\x1a>\n\x12LoggingDestination\x12\x1a\n\x12monitored_resource\x18\x03 \x01(\t\x12\x0c\n\x04logs\x18\x01 \x03(\tBn\n\x0e\x63om.google.apiB\x0cLoggingProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR],
)
_LOGGING_LOGGINGDESTINATION = _descriptor.Descriptor(
name="LoggingDestination",
full_name="google.api.Logging.LoggingDestination",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="monitored_resource",
full_name="google.api.Logging.LoggingDestination.monitored_resource",
index=0,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="logs",
full_name="google.api.Logging.LoggingDestination.logs",
index=1,
number=1,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=224,
serialized_end=286,
)
_LOGGING = _descriptor.Descriptor(
name="Logging",
full_name="google.api.Logging",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="producer_destinations",
full_name="google.api.Logging.producer_destinations",
index=0,
number=1,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="consumer_destinations",
full_name="google.api.Logging.consumer_destinations",
index=1,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[_LOGGING_LOGGINGDESTINATION],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=71,
serialized_end=286,
)
_LOGGING_LOGGINGDESTINATION.containing_type = _LOGGING
_LOGGING.fields_by_name[
"producer_destinations"
].message_type = _LOGGING_LOGGINGDESTINATION
_LOGGING.fields_by_name[
"consumer_destinations"
].message_type = _LOGGING_LOGGINGDESTINATION
DESCRIPTOR.message_types_by_name["Logging"] = _LOGGING
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Logging = _reflection.GeneratedProtocolMessageType(
"Logging",
(_message.Message,),
{
"LoggingDestination": _reflection.GeneratedProtocolMessageType(
"LoggingDestination",
(_message.Message,),
{
"DESCRIPTOR": _LOGGING_LOGGINGDESTINATION,
"__module__": "google.api.logging_pb2"
# @@protoc_insertion_point(class_scope:google.api.Logging.LoggingDestination)
},
),
"DESCRIPTOR": _LOGGING,
"__module__": "google.api.logging_pb2"
# @@protoc_insertion_point(class_scope:google.api.Logging)
},
)
_sym_db.RegisterMessage(Logging)
_sym_db.RegisterMessage(Logging.LoggingDestination)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,438 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/metric.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import label_pb2 as google_dot_api_dot_label__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/metric.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\013MetricProtoP\001Z7google.golang.org/genproto/googleapis/api/metric;metric\242\002\004GAPI",
serialized_pb=b'\n\x17google/api/metric.proto\x12\ngoogle.api\x1a\x16google/api/label.proto"\xd2\x03\n\x10MetricDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x08 \x01(\t\x12+\n\x06labels\x18\x02 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12<\n\x0bmetric_kind\x18\x03 \x01(\x0e\x32\'.google.api.MetricDescriptor.MetricKind\x12:\n\nvalue_type\x18\x04 \x01(\x0e\x32&.google.api.MetricDescriptor.ValueType\x12\x0c\n\x04unit\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t"O\n\nMetricKind\x12\x1b\n\x17METRIC_KIND_UNSPECIFIED\x10\x00\x12\t\n\x05GAUGE\x10\x01\x12\t\n\x05\x44\x45LTA\x10\x02\x12\x0e\n\nCUMULATIVE\x10\x03"q\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\n\n\x06STRING\x10\x04\x12\x10\n\x0c\x44ISTRIBUTION\x10\x05\x12\t\n\x05MONEY\x10\x06"u\n\x06Metric\x12\x0c\n\x04type\x18\x03 \x01(\t\x12.\n\x06labels\x18\x02 \x03(\x0b\x32\x1e.google.api.Metric.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42_\n\x0e\x63om.google.apiB\x0bMetricProtoP\x01Z7google.golang.org/genproto/googleapis/api/metric;metric\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_api_dot_label__pb2.DESCRIPTOR],
)
_METRICDESCRIPTOR_METRICKIND = _descriptor.EnumDescriptor(
name="MetricKind",
full_name="google.api.MetricDescriptor.MetricKind",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="METRIC_KIND_UNSPECIFIED",
index=0,
number=0,
serialized_options=None,
type=None,
),
_descriptor.EnumValueDescriptor(
name="GAUGE", index=1, number=1, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="DELTA", index=2, number=2, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="CUMULATIVE", index=3, number=3, serialized_options=None, type=None
),
],
containing_type=None,
serialized_options=None,
serialized_start=336,
serialized_end=415,
)
_sym_db.RegisterEnumDescriptor(_METRICDESCRIPTOR_METRICKIND)
_METRICDESCRIPTOR_VALUETYPE = _descriptor.EnumDescriptor(
name="ValueType",
full_name="google.api.MetricDescriptor.ValueType",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="VALUE_TYPE_UNSPECIFIED",
index=0,
number=0,
serialized_options=None,
type=None,
),
_descriptor.EnumValueDescriptor(
name="BOOL", index=1, number=1, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="INT64", index=2, number=2, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="DOUBLE", index=3, number=3, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="STRING", index=4, number=4, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="DISTRIBUTION", index=5, number=5, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="MONEY", index=6, number=6, serialized_options=None, type=None
),
],
containing_type=None,
serialized_options=None,
serialized_start=417,
serialized_end=530,
)
_sym_db.RegisterEnumDescriptor(_METRICDESCRIPTOR_VALUETYPE)
_METRICDESCRIPTOR = _descriptor.Descriptor(
name="MetricDescriptor",
full_name="google.api.MetricDescriptor",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="name",
full_name="google.api.MetricDescriptor.name",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="type",
full_name="google.api.MetricDescriptor.type",
index=1,
number=8,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="labels",
full_name="google.api.MetricDescriptor.labels",
index=2,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="metric_kind",
full_name="google.api.MetricDescriptor.metric_kind",
index=3,
number=3,
type=14,
cpp_type=8,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="value_type",
full_name="google.api.MetricDescriptor.value_type",
index=4,
number=4,
type=14,
cpp_type=8,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="unit",
full_name="google.api.MetricDescriptor.unit",
index=5,
number=5,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="description",
full_name="google.api.MetricDescriptor.description",
index=6,
number=6,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="display_name",
full_name="google.api.MetricDescriptor.display_name",
index=7,
number=7,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[_METRICDESCRIPTOR_METRICKIND, _METRICDESCRIPTOR_VALUETYPE],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=64,
serialized_end=530,
)
_METRIC_LABELSENTRY = _descriptor.Descriptor(
name="LabelsEntry",
full_name="google.api.Metric.LabelsEntry",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="key",
full_name="google.api.Metric.LabelsEntry.key",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="value",
full_name="google.api.Metric.LabelsEntry.value",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=b"8\001",
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=604,
serialized_end=649,
)
_METRIC = _descriptor.Descriptor(
name="Metric",
full_name="google.api.Metric",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="type",
full_name="google.api.Metric.type",
index=0,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="labels",
full_name="google.api.Metric.labels",
index=1,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[_METRIC_LABELSENTRY],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=532,
serialized_end=649,
)
_METRICDESCRIPTOR.fields_by_name[
"labels"
].message_type = google_dot_api_dot_label__pb2._LABELDESCRIPTOR
_METRICDESCRIPTOR.fields_by_name["metric_kind"].enum_type = _METRICDESCRIPTOR_METRICKIND
_METRICDESCRIPTOR.fields_by_name["value_type"].enum_type = _METRICDESCRIPTOR_VALUETYPE
_METRICDESCRIPTOR_METRICKIND.containing_type = _METRICDESCRIPTOR
_METRICDESCRIPTOR_VALUETYPE.containing_type = _METRICDESCRIPTOR
_METRIC_LABELSENTRY.containing_type = _METRIC
_METRIC.fields_by_name["labels"].message_type = _METRIC_LABELSENTRY
DESCRIPTOR.message_types_by_name["MetricDescriptor"] = _METRICDESCRIPTOR
DESCRIPTOR.message_types_by_name["Metric"] = _METRIC
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
MetricDescriptor = _reflection.GeneratedProtocolMessageType(
"MetricDescriptor",
(_message.Message,),
{
"DESCRIPTOR": _METRICDESCRIPTOR,
"__module__": "google.api.metric_pb2"
# @@protoc_insertion_point(class_scope:google.api.MetricDescriptor)
},
)
_sym_db.RegisterMessage(MetricDescriptor)
Metric = _reflection.GeneratedProtocolMessageType(
"Metric",
(_message.Message,),
{
"LabelsEntry": _reflection.GeneratedProtocolMessageType(
"LabelsEntry",
(_message.Message,),
{
"DESCRIPTOR": _METRIC_LABELSENTRY,
"__module__": "google.api.metric_pb2"
# @@protoc_insertion_point(class_scope:google.api.Metric.LabelsEntry)
},
),
"DESCRIPTOR": _METRIC,
"__module__": "google.api.metric_pb2"
# @@protoc_insertion_point(class_scope:google.api.Metric)
},
)
_sym_db.RegisterMessage(Metric)
_sym_db.RegisterMessage(Metric.LabelsEntry)
DESCRIPTOR._options = None
_METRIC_LABELSENTRY._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,463 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/monitored_resource.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import label_pb2 as google_dot_api_dot_label__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/monitored_resource.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\026MonitoredResourceProtoP\001ZCgoogle.golang.org/genproto/googleapis/api/monitoredres;monitoredres\370\001\001\242\002\004GAPI",
serialized_pb=b'\n#google/api/monitored_resource.proto\x12\ngoogle.api\x1a\x16google/api/label.proto\x1a\x1cgoogle/protobuf/struct.proto"\x91\x01\n\x1bMonitoredResourceDescriptor\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x06labels\x18\x04 \x03(\x0b\x32\x1b.google.api.LabelDescriptor"\x8b\x01\n\x11MonitoredResource\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x39\n\x06labels\x18\x02 \x03(\x0b\x32).google.api.MonitoredResource.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xca\x01\n\x19MonitoredResourceMetadata\x12.\n\rsystem_labels\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12J\n\x0buser_labels\x18\x02 \x03(\x0b\x32\x35.google.api.MonitoredResourceMetadata.UserLabelsEntry\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42y\n\x0e\x63om.google.apiB\x16MonitoredResourceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/monitoredres;monitoredres\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3',
dependencies=[
google_dot_api_dot_label__pb2.DESCRIPTOR,
google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,
],
)
_MONITOREDRESOURCEDESCRIPTOR = _descriptor.Descriptor(
name="MonitoredResourceDescriptor",
full_name="google.api.MonitoredResourceDescriptor",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="name",
full_name="google.api.MonitoredResourceDescriptor.name",
index=0,
number=5,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="type",
full_name="google.api.MonitoredResourceDescriptor.type",
index=1,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="display_name",
full_name="google.api.MonitoredResourceDescriptor.display_name",
index=2,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="description",
full_name="google.api.MonitoredResourceDescriptor.description",
index=3,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="labels",
full_name="google.api.MonitoredResourceDescriptor.labels",
index=4,
number=4,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=106,
serialized_end=251,
)
_MONITOREDRESOURCE_LABELSENTRY = _descriptor.Descriptor(
name="LabelsEntry",
full_name="google.api.MonitoredResource.LabelsEntry",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="key",
full_name="google.api.MonitoredResource.LabelsEntry.key",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="value",
full_name="google.api.MonitoredResource.LabelsEntry.value",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=b"8\001",
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=348,
serialized_end=393,
)
_MONITOREDRESOURCE = _descriptor.Descriptor(
name="MonitoredResource",
full_name="google.api.MonitoredResource",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="type",
full_name="google.api.MonitoredResource.type",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="labels",
full_name="google.api.MonitoredResource.labels",
index=1,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[_MONITOREDRESOURCE_LABELSENTRY],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=254,
serialized_end=393,
)
_MONITOREDRESOURCEMETADATA_USERLABELSENTRY = _descriptor.Descriptor(
name="UserLabelsEntry",
full_name="google.api.MonitoredResourceMetadata.UserLabelsEntry",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="key",
full_name="google.api.MonitoredResourceMetadata.UserLabelsEntry.key",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="value",
full_name="google.api.MonitoredResourceMetadata.UserLabelsEntry.value",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=b"8\001",
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=549,
serialized_end=598,
)
_MONITOREDRESOURCEMETADATA = _descriptor.Descriptor(
name="MonitoredResourceMetadata",
full_name="google.api.MonitoredResourceMetadata",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="system_labels",
full_name="google.api.MonitoredResourceMetadata.system_labels",
index=0,
number=1,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="user_labels",
full_name="google.api.MonitoredResourceMetadata.user_labels",
index=1,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[_MONITOREDRESOURCEMETADATA_USERLABELSENTRY],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=396,
serialized_end=598,
)
_MONITOREDRESOURCEDESCRIPTOR.fields_by_name[
"labels"
].message_type = google_dot_api_dot_label__pb2._LABELDESCRIPTOR
_MONITOREDRESOURCE_LABELSENTRY.containing_type = _MONITOREDRESOURCE
_MONITOREDRESOURCE.fields_by_name[
"labels"
].message_type = _MONITOREDRESOURCE_LABELSENTRY
_MONITOREDRESOURCEMETADATA_USERLABELSENTRY.containing_type = _MONITOREDRESOURCEMETADATA
_MONITOREDRESOURCEMETADATA.fields_by_name[
"system_labels"
].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_MONITOREDRESOURCEMETADATA.fields_by_name[
"user_labels"
].message_type = _MONITOREDRESOURCEMETADATA_USERLABELSENTRY
DESCRIPTOR.message_types_by_name[
"MonitoredResourceDescriptor"
] = _MONITOREDRESOURCEDESCRIPTOR
DESCRIPTOR.message_types_by_name["MonitoredResource"] = _MONITOREDRESOURCE
DESCRIPTOR.message_types_by_name[
"MonitoredResourceMetadata"
] = _MONITOREDRESOURCEMETADATA
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
MonitoredResourceDescriptor = _reflection.GeneratedProtocolMessageType(
"MonitoredResourceDescriptor",
(_message.Message,),
{
"DESCRIPTOR": _MONITOREDRESOURCEDESCRIPTOR,
"__module__": "google.api.monitored_resource_pb2"
# @@protoc_insertion_point(class_scope:google.api.MonitoredResourceDescriptor)
},
)
_sym_db.RegisterMessage(MonitoredResourceDescriptor)
MonitoredResource = _reflection.GeneratedProtocolMessageType(
"MonitoredResource",
(_message.Message,),
{
"LabelsEntry": _reflection.GeneratedProtocolMessageType(
"LabelsEntry",
(_message.Message,),
{
"DESCRIPTOR": _MONITOREDRESOURCE_LABELSENTRY,
"__module__": "google.api.monitored_resource_pb2"
# @@protoc_insertion_point(class_scope:google.api.MonitoredResource.LabelsEntry)
},
),
"DESCRIPTOR": _MONITOREDRESOURCE,
"__module__": "google.api.monitored_resource_pb2"
# @@protoc_insertion_point(class_scope:google.api.MonitoredResource)
},
)
_sym_db.RegisterMessage(MonitoredResource)
_sym_db.RegisterMessage(MonitoredResource.LabelsEntry)
MonitoredResourceMetadata = _reflection.GeneratedProtocolMessageType(
"MonitoredResourceMetadata",
(_message.Message,),
{
"UserLabelsEntry": _reflection.GeneratedProtocolMessageType(
"UserLabelsEntry",
(_message.Message,),
{
"DESCRIPTOR": _MONITOREDRESOURCEMETADATA_USERLABELSENTRY,
"__module__": "google.api.monitored_resource_pb2"
# @@protoc_insertion_point(class_scope:google.api.MonitoredResourceMetadata.UserLabelsEntry)
},
),
"DESCRIPTOR": _MONITOREDRESOURCEMETADATA,
"__module__": "google.api.monitored_resource_pb2"
# @@protoc_insertion_point(class_scope:google.api.MonitoredResourceMetadata)
},
)
_sym_db.RegisterMessage(MonitoredResourceMetadata)
_sym_db.RegisterMessage(MonitoredResourceMetadata.UserLabelsEntry)
DESCRIPTOR._options = None
_MONITOREDRESOURCE_LABELSENTRY._options = None
_MONITOREDRESOURCEMETADATA_USERLABELSENTRY._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,188 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/monitoring.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/monitoring.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\017MonitoringProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x1bgoogle/api/monitoring.proto\x12\ngoogle.api\x1a\x1cgoogle/api/annotations.proto"\xec\x01\n\nMonitoring\x12K\n\x15producer_destinations\x18\x01 \x03(\x0b\x32,.google.api.Monitoring.MonitoringDestination\x12K\n\x15\x63onsumer_destinations\x18\x02 \x03(\x0b\x32,.google.api.Monitoring.MonitoringDestination\x1a\x44\n\x15MonitoringDestination\x12\x1a\n\x12monitored_resource\x18\x01 \x01(\t\x12\x0f\n\x07metrics\x18\x02 \x03(\tBq\n\x0e\x63om.google.apiB\x0fMonitoringProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR],
)
_MONITORING_MONITORINGDESTINATION = _descriptor.Descriptor(
name="MonitoringDestination",
full_name="google.api.Monitoring.MonitoringDestination",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="monitored_resource",
full_name="google.api.Monitoring.MonitoringDestination.monitored_resource",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="metrics",
full_name="google.api.Monitoring.MonitoringDestination.metrics",
index=1,
number=2,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=242,
serialized_end=310,
)
_MONITORING = _descriptor.Descriptor(
name="Monitoring",
full_name="google.api.Monitoring",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="producer_destinations",
full_name="google.api.Monitoring.producer_destinations",
index=0,
number=1,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="consumer_destinations",
full_name="google.api.Monitoring.consumer_destinations",
index=1,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[_MONITORING_MONITORINGDESTINATION],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=74,
serialized_end=310,
)
_MONITORING_MONITORINGDESTINATION.containing_type = _MONITORING
_MONITORING.fields_by_name[
"producer_destinations"
].message_type = _MONITORING_MONITORINGDESTINATION
_MONITORING.fields_by_name[
"consumer_destinations"
].message_type = _MONITORING_MONITORINGDESTINATION
DESCRIPTOR.message_types_by_name["Monitoring"] = _MONITORING
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Monitoring = _reflection.GeneratedProtocolMessageType(
"Monitoring",
(_message.Message,),
{
"MonitoringDestination": _reflection.GeneratedProtocolMessageType(
"MonitoringDestination",
(_message.Message,),
{
"DESCRIPTOR": _MONITORING_MONITORINGDESTINATION,
"__module__": "google.api.monitoring_pb2"
# @@protoc_insertion_point(class_scope:google.api.Monitoring.MonitoringDestination)
},
),
"DESCRIPTOR": _MONITORING,
"__module__": "google.api.monitoring_pb2"
# @@protoc_insertion_point(class_scope:google.api.Monitoring)
},
)
_sym_db.RegisterMessage(Monitoring)
_sym_db.RegisterMessage(Monitoring.MonitoringDestination)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,537 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/quota.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/quota.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\nQuotaProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x16google/api/quota.proto\x12\ngoogle.api\x1a\x1cgoogle/api/annotations.proto"]\n\x05Quota\x12&\n\x06limits\x18\x03 \x03(\x0b\x32\x16.google.api.QuotaLimit\x12,\n\x0cmetric_rules\x18\x04 \x03(\x0b\x32\x16.google.api.MetricRule"\x91\x01\n\nMetricRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12=\n\x0cmetric_costs\x18\x02 \x03(\x0b\x32\'.google.api.MetricRule.MetricCostsEntry\x1a\x32\n\x10MetricCostsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01"\x95\x02\n\nQuotaLimit\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rdefault_limit\x18\x03 \x01(\x03\x12\x11\n\tmax_limit\x18\x04 \x01(\x03\x12\x11\n\tfree_tier\x18\x07 \x01(\x03\x12\x10\n\x08\x64uration\x18\x05 \x01(\t\x12\x0e\n\x06metric\x18\x08 \x01(\t\x12\x0c\n\x04unit\x18\t \x01(\t\x12\x32\n\x06values\x18\n \x03(\x0b\x32".google.api.QuotaLimit.ValuesEntry\x12\x14\n\x0c\x64isplay_name\x18\x0c \x01(\t\x1a-\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x42l\n\x0e\x63om.google.apiB\nQuotaProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR],
)
_QUOTA = _descriptor.Descriptor(
name="Quota",
full_name="google.api.Quota",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="limits",
full_name="google.api.Quota.limits",
index=0,
number=3,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="metric_rules",
full_name="google.api.Quota.metric_rules",
index=1,
number=4,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=68,
serialized_end=161,
)
_METRICRULE_METRICCOSTSENTRY = _descriptor.Descriptor(
name="MetricCostsEntry",
full_name="google.api.MetricRule.MetricCostsEntry",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="key",
full_name="google.api.MetricRule.MetricCostsEntry.key",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="value",
full_name="google.api.MetricRule.MetricCostsEntry.value",
index=1,
number=2,
type=3,
cpp_type=2,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=b"8\001",
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=259,
serialized_end=309,
)
_METRICRULE = _descriptor.Descriptor(
name="MetricRule",
full_name="google.api.MetricRule",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="selector",
full_name="google.api.MetricRule.selector",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="metric_costs",
full_name="google.api.MetricRule.metric_costs",
index=1,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[_METRICRULE_METRICCOSTSENTRY],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=164,
serialized_end=309,
)
_QUOTALIMIT_VALUESENTRY = _descriptor.Descriptor(
name="ValuesEntry",
full_name="google.api.QuotaLimit.ValuesEntry",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="key",
full_name="google.api.QuotaLimit.ValuesEntry.key",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="value",
full_name="google.api.QuotaLimit.ValuesEntry.value",
index=1,
number=2,
type=3,
cpp_type=2,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=b"8\001",
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=544,
serialized_end=589,
)
_QUOTALIMIT = _descriptor.Descriptor(
name="QuotaLimit",
full_name="google.api.QuotaLimit",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="name",
full_name="google.api.QuotaLimit.name",
index=0,
number=6,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="description",
full_name="google.api.QuotaLimit.description",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="default_limit",
full_name="google.api.QuotaLimit.default_limit",
index=2,
number=3,
type=3,
cpp_type=2,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="max_limit",
full_name="google.api.QuotaLimit.max_limit",
index=3,
number=4,
type=3,
cpp_type=2,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="free_tier",
full_name="google.api.QuotaLimit.free_tier",
index=4,
number=7,
type=3,
cpp_type=2,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="duration",
full_name="google.api.QuotaLimit.duration",
index=5,
number=5,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="metric",
full_name="google.api.QuotaLimit.metric",
index=6,
number=8,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="unit",
full_name="google.api.QuotaLimit.unit",
index=7,
number=9,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="values",
full_name="google.api.QuotaLimit.values",
index=8,
number=10,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="display_name",
full_name="google.api.QuotaLimit.display_name",
index=9,
number=12,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[_QUOTALIMIT_VALUESENTRY],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=312,
serialized_end=589,
)
_QUOTA.fields_by_name["limits"].message_type = _QUOTALIMIT
_QUOTA.fields_by_name["metric_rules"].message_type = _METRICRULE
_METRICRULE_METRICCOSTSENTRY.containing_type = _METRICRULE
_METRICRULE.fields_by_name["metric_costs"].message_type = _METRICRULE_METRICCOSTSENTRY
_QUOTALIMIT_VALUESENTRY.containing_type = _QUOTALIMIT
_QUOTALIMIT.fields_by_name["values"].message_type = _QUOTALIMIT_VALUESENTRY
DESCRIPTOR.message_types_by_name["Quota"] = _QUOTA
DESCRIPTOR.message_types_by_name["MetricRule"] = _METRICRULE
DESCRIPTOR.message_types_by_name["QuotaLimit"] = _QUOTALIMIT
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Quota = _reflection.GeneratedProtocolMessageType(
"Quota",
(_message.Message,),
{
"DESCRIPTOR": _QUOTA,
"__module__": "google.api.quota_pb2"
# @@protoc_insertion_point(class_scope:google.api.Quota)
},
)
_sym_db.RegisterMessage(Quota)
MetricRule = _reflection.GeneratedProtocolMessageType(
"MetricRule",
(_message.Message,),
{
"MetricCostsEntry": _reflection.GeneratedProtocolMessageType(
"MetricCostsEntry",
(_message.Message,),
{
"DESCRIPTOR": _METRICRULE_METRICCOSTSENTRY,
"__module__": "google.api.quota_pb2"
# @@protoc_insertion_point(class_scope:google.api.MetricRule.MetricCostsEntry)
},
),
"DESCRIPTOR": _METRICRULE,
"__module__": "google.api.quota_pb2"
# @@protoc_insertion_point(class_scope:google.api.MetricRule)
},
)
_sym_db.RegisterMessage(MetricRule)
_sym_db.RegisterMessage(MetricRule.MetricCostsEntry)
QuotaLimit = _reflection.GeneratedProtocolMessageType(
"QuotaLimit",
(_message.Message,),
{
"ValuesEntry": _reflection.GeneratedProtocolMessageType(
"ValuesEntry",
(_message.Message,),
{
"DESCRIPTOR": _QUOTALIMIT_VALUESENTRY,
"__module__": "google.api.quota_pb2"
# @@protoc_insertion_point(class_scope:google.api.QuotaLimit.ValuesEntry)
},
),
"DESCRIPTOR": _QUOTALIMIT,
"__module__": "google.api.quota_pb2"
# @@protoc_insertion_point(class_scope:google.api.QuotaLimit)
},
)
_sym_db.RegisterMessage(QuotaLimit)
_sym_db.RegisterMessage(QuotaLimit.ValuesEntry)
DESCRIPTOR._options = None
_METRICRULE_METRICCOSTSENTRY._options = None
_QUOTALIMIT_VALUESENTRY._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,365 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/resource.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/resource.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\rResourceProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\370\001\001\242\002\004GAPI",
serialized_pb=b'\n\x19google/api/resource.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto"\xff\x01\n\x12ResourceDescriptor\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07pattern\x18\x02 \x03(\t\x12\x12\n\nname_field\x18\x03 \x01(\t\x12\x37\n\x07history\x18\x04 \x01(\x0e\x32&.google.api.ResourceDescriptor.History\x12\x0e\n\x06plural\x18\x05 \x01(\t\x12\x10\n\x08singular\x18\x06 \x01(\t"[\n\x07History\x12\x17\n\x13HISTORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19ORIGINALLY_SINGLE_PATTERN\x10\x01\x12\x18\n\x14\x46UTURE_MULTI_PATTERN\x10\x02"5\n\x11ResourceReference\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nchild_type\x18\x02 \x01(\t:Y\n\x12resource_reference\x12\x1d.google.protobuf.FieldOptions\x18\x9f\x08 \x01(\x0b\x32\x1d.google.api.ResourceReference:Z\n\x13resource_definition\x12\x1c.google.protobuf.FileOptions\x18\x9d\x08 \x03(\x0b\x32\x1e.google.api.ResourceDescriptor:R\n\x08resource\x12\x1f.google.protobuf.MessageOptions\x18\x9d\x08 \x01(\x0b\x32\x1e.google.api.ResourceDescriptorBn\n\x0e\x63om.google.apiB\rResourceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR],
)
RESOURCE_REFERENCE_FIELD_NUMBER = 1055
resource_reference = _descriptor.FieldDescriptor(
name="resource_reference",
full_name="google.api.resource_reference",
index=0,
number=1055,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=True,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
RESOURCE_DEFINITION_FIELD_NUMBER = 1053
resource_definition = _descriptor.FieldDescriptor(
name="resource_definition",
full_name="google.api.resource_definition",
index=1,
number=1053,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=True,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
RESOURCE_FIELD_NUMBER = 1053
resource = _descriptor.FieldDescriptor(
name="resource",
full_name="google.api.resource",
index=2,
number=1053,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=True,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
_RESOURCEDESCRIPTOR_HISTORY = _descriptor.EnumDescriptor(
name="History",
full_name="google.api.ResourceDescriptor.History",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="HISTORY_UNSPECIFIED",
index=0,
number=0,
serialized_options=None,
type=None,
),
_descriptor.EnumValueDescriptor(
name="ORIGINALLY_SINGLE_PATTERN",
index=1,
number=1,
serialized_options=None,
type=None,
),
_descriptor.EnumValueDescriptor(
name="FUTURE_MULTI_PATTERN",
index=2,
number=2,
serialized_options=None,
type=None,
),
],
containing_type=None,
serialized_options=None,
serialized_start=240,
serialized_end=331,
)
_sym_db.RegisterEnumDescriptor(_RESOURCEDESCRIPTOR_HISTORY)
_RESOURCEDESCRIPTOR = _descriptor.Descriptor(
name="ResourceDescriptor",
full_name="google.api.ResourceDescriptor",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="type",
full_name="google.api.ResourceDescriptor.type",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="pattern",
full_name="google.api.ResourceDescriptor.pattern",
index=1,
number=2,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="name_field",
full_name="google.api.ResourceDescriptor.name_field",
index=2,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="history",
full_name="google.api.ResourceDescriptor.history",
index=3,
number=4,
type=14,
cpp_type=8,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="plural",
full_name="google.api.ResourceDescriptor.plural",
index=4,
number=5,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="singular",
full_name="google.api.ResourceDescriptor.singular",
index=5,
number=6,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[_RESOURCEDESCRIPTOR_HISTORY],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=76,
serialized_end=331,
)
_RESOURCEREFERENCE = _descriptor.Descriptor(
name="ResourceReference",
full_name="google.api.ResourceReference",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="type",
full_name="google.api.ResourceReference.type",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="child_type",
full_name="google.api.ResourceReference.child_type",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=333,
serialized_end=386,
)
_RESOURCEDESCRIPTOR.fields_by_name["history"].enum_type = _RESOURCEDESCRIPTOR_HISTORY
_RESOURCEDESCRIPTOR_HISTORY.containing_type = _RESOURCEDESCRIPTOR
DESCRIPTOR.message_types_by_name["ResourceDescriptor"] = _RESOURCEDESCRIPTOR
DESCRIPTOR.message_types_by_name["ResourceReference"] = _RESOURCEREFERENCE
DESCRIPTOR.extensions_by_name["resource_reference"] = resource_reference
DESCRIPTOR.extensions_by_name["resource_definition"] = resource_definition
DESCRIPTOR.extensions_by_name["resource"] = resource
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
ResourceDescriptor = _reflection.GeneratedProtocolMessageType(
"ResourceDescriptor",
(_message.Message,),
{
"DESCRIPTOR": _RESOURCEDESCRIPTOR,
"__module__": "google.api.resource_pb2"
# @@protoc_insertion_point(class_scope:google.api.ResourceDescriptor)
},
)
_sym_db.RegisterMessage(ResourceDescriptor)
ResourceReference = _reflection.GeneratedProtocolMessageType(
"ResourceReference",
(_message.Message,),
{
"DESCRIPTOR": _RESOURCEREFERENCE,
"__module__": "google.api.resource_pb2"
# @@protoc_insertion_point(class_scope:google.api.ResourceReference)
},
)
_sym_db.RegisterMessage(ResourceReference)
resource_reference.message_type = _RESOURCEREFERENCE
google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(
resource_reference
)
resource_definition.message_type = _RESOURCEDESCRIPTOR
google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(
resource_definition
)
resource.message_type = _RESOURCEDESCRIPTOR
google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(resource)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,626 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/service.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from google.api import auth_pb2 as google_dot_api_dot_auth__pb2
from google.api import backend_pb2 as google_dot_api_dot_backend__pb2
from google.api import billing_pb2 as google_dot_api_dot_billing__pb2
from google.api import context_pb2 as google_dot_api_dot_context__pb2
from google.api import control_pb2 as google_dot_api_dot_control__pb2
from google.api import documentation_pb2 as google_dot_api_dot_documentation__pb2
from google.api import endpoint_pb2 as google_dot_api_dot_endpoint__pb2
from google.api import http_pb2 as google_dot_api_dot_http__pb2
from google.api import log_pb2 as google_dot_api_dot_log__pb2
from google.api import logging_pb2 as google_dot_api_dot_logging__pb2
from google.api import metric_pb2 as google_dot_api_dot_metric__pb2
from google.api import (
monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2,
)
from google.api import monitoring_pb2 as google_dot_api_dot_monitoring__pb2
from google.api import quota_pb2 as google_dot_api_dot_quota__pb2
from google.api import source_info_pb2 as google_dot_api_dot_source__info__pb2
from google.api import system_parameter_pb2 as google_dot_api_dot_system__parameter__pb2
from google.api import usage_pb2 as google_dot_api_dot_usage__pb2
from google.protobuf import api_pb2 as google_dot_protobuf_dot_api__pb2
from google.protobuf import type_pb2 as google_dot_protobuf_dot_type__pb2
from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/service.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\014ServiceProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b"\n\x18google/api/service.proto\x12\ngoogle.api\x1a\x1cgoogle/api/annotations.proto\x1a\x15google/api/auth.proto\x1a\x18google/api/backend.proto\x1a\x18google/api/billing.proto\x1a\x18google/api/context.proto\x1a\x18google/api/control.proto\x1a\x1egoogle/api/documentation.proto\x1a\x19google/api/endpoint.proto\x1a\x15google/api/http.proto\x1a\x14google/api/log.proto\x1a\x18google/api/logging.proto\x1a\x17google/api/metric.proto\x1a#google/api/monitored_resource.proto\x1a\x1bgoogle/api/monitoring.proto\x1a\x16google/api/quota.proto\x1a\x1cgoogle/api/source_info.proto\x1a!google/api/system_parameter.proto\x1a\x16google/api/usage.proto\x1a\x19google/protobuf/api.proto\x1a\x1agoogle/protobuf/type.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xdc\x07\n\x07Service\x12\x34\n\x0e\x63onfig_version\x18\x14 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18! \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x1b\n\x13producer_project_id\x18\x16 \x01(\t\x12\"\n\x04\x61pis\x18\x03 \x03(\x0b\x32\x14.google.protobuf.Api\x12$\n\x05types\x18\x04 \x03(\x0b\x32\x15.google.protobuf.Type\x12$\n\x05\x65nums\x18\x05 \x03(\x0b\x32\x15.google.protobuf.Enum\x12\x30\n\rdocumentation\x18\x06 \x01(\x0b\x32\x19.google.api.Documentation\x12$\n\x07\x62\x61\x63kend\x18\x08 \x01(\x0b\x32\x13.google.api.Backend\x12\x1e\n\x04http\x18\t \x01(\x0b\x32\x10.google.api.Http\x12 \n\x05quota\x18\n \x01(\x0b\x32\x11.google.api.Quota\x12\x32\n\x0e\x61uthentication\x18\x0b \x01(\x0b\x32\x1a.google.api.Authentication\x12$\n\x07\x63ontext\x18\x0c \x01(\x0b\x32\x13.google.api.Context\x12 \n\x05usage\x18\x0f \x01(\x0b\x32\x11.google.api.Usage\x12'\n\tendpoints\x18\x12 \x03(\x0b\x32\x14.google.api.Endpoint\x12$\n\x07\x63ontrol\x18\x15 \x01(\x0b\x32\x13.google.api.Control\x12'\n\x04logs\x18\x17 \x03(\x0b\x32\x19.google.api.LogDescriptor\x12-\n\x07metrics\x18\x18 \x03(\x0b\x32\x1c.google.api.MetricDescriptor\x12\x44\n\x13monitored_resources\x18\x19 \x03(\x0b\x32'.google.api.MonitoredResourceDescriptor\x12$\n\x07\x62illing\x18\x1a \x01(\x0b\x32\x13.google.api.Billing\x12$\n\x07logging\x18\x1b \x01(\x0b\x32\x13.google.api.Logging\x12*\n\nmonitoring\x18\x1c \x01(\x0b\x32\x16.google.api.Monitoring\x12\x37\n\x11system_parameters\x18\x1d \x01(\x0b\x32\x1c.google.api.SystemParameters\x12+\n\x0bsource_info\x18% \x01(\x0b\x32\x16.google.api.SourceInfoJ\x04\x08\x65\x10\x66\x42n\n\x0e\x63om.google.apiB\x0cServiceProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3",
dependencies=[
google_dot_api_dot_annotations__pb2.DESCRIPTOR,
google_dot_api_dot_auth__pb2.DESCRIPTOR,
google_dot_api_dot_backend__pb2.DESCRIPTOR,
google_dot_api_dot_billing__pb2.DESCRIPTOR,
google_dot_api_dot_context__pb2.DESCRIPTOR,
google_dot_api_dot_control__pb2.DESCRIPTOR,
google_dot_api_dot_documentation__pb2.DESCRIPTOR,
google_dot_api_dot_endpoint__pb2.DESCRIPTOR,
google_dot_api_dot_http__pb2.DESCRIPTOR,
google_dot_api_dot_log__pb2.DESCRIPTOR,
google_dot_api_dot_logging__pb2.DESCRIPTOR,
google_dot_api_dot_metric__pb2.DESCRIPTOR,
google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR,
google_dot_api_dot_monitoring__pb2.DESCRIPTOR,
google_dot_api_dot_quota__pb2.DESCRIPTOR,
google_dot_api_dot_source__info__pb2.DESCRIPTOR,
google_dot_api_dot_system__parameter__pb2.DESCRIPTOR,
google_dot_api_dot_usage__pb2.DESCRIPTOR,
google_dot_protobuf_dot_api__pb2.DESCRIPTOR,
google_dot_protobuf_dot_type__pb2.DESCRIPTOR,
google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,
],
)
_SERVICE = _descriptor.Descriptor(
name="Service",
full_name="google.api.Service",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="config_version",
full_name="google.api.Service.config_version",
index=0,
number=20,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="name",
full_name="google.api.Service.name",
index=1,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="id",
full_name="google.api.Service.id",
index=2,
number=33,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="title",
full_name="google.api.Service.title",
index=3,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="producer_project_id",
full_name="google.api.Service.producer_project_id",
index=4,
number=22,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="apis",
full_name="google.api.Service.apis",
index=5,
number=3,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="types",
full_name="google.api.Service.types",
index=6,
number=4,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="enums",
full_name="google.api.Service.enums",
index=7,
number=5,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="documentation",
full_name="google.api.Service.documentation",
index=8,
number=6,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="backend",
full_name="google.api.Service.backend",
index=9,
number=8,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="http",
full_name="google.api.Service.http",
index=10,
number=9,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="quota",
full_name="google.api.Service.quota",
index=11,
number=10,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="authentication",
full_name="google.api.Service.authentication",
index=12,
number=11,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="context",
full_name="google.api.Service.context",
index=13,
number=12,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="usage",
full_name="google.api.Service.usage",
index=14,
number=15,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="endpoints",
full_name="google.api.Service.endpoints",
index=15,
number=18,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="control",
full_name="google.api.Service.control",
index=16,
number=21,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="logs",
full_name="google.api.Service.logs",
index=17,
number=23,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="metrics",
full_name="google.api.Service.metrics",
index=18,
number=24,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="monitored_resources",
full_name="google.api.Service.monitored_resources",
index=19,
number=25,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="billing",
full_name="google.api.Service.billing",
index=20,
number=26,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="logging",
full_name="google.api.Service.logging",
index=21,
number=27,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="monitoring",
full_name="google.api.Service.monitoring",
index=22,
number=28,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="system_parameters",
full_name="google.api.Service.system_parameters",
index=23,
number=29,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="source_info",
full_name="google.api.Service.source_info",
index=24,
number=37,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=619,
serialized_end=1607,
)
_SERVICE.fields_by_name[
"config_version"
].message_type = google_dot_protobuf_dot_wrappers__pb2._UINT32VALUE
_SERVICE.fields_by_name["apis"].message_type = google_dot_protobuf_dot_api__pb2._API
_SERVICE.fields_by_name["types"].message_type = google_dot_protobuf_dot_type__pb2._TYPE
_SERVICE.fields_by_name["enums"].message_type = google_dot_protobuf_dot_type__pb2._ENUM
_SERVICE.fields_by_name[
"documentation"
].message_type = google_dot_api_dot_documentation__pb2._DOCUMENTATION
_SERVICE.fields_by_name[
"backend"
].message_type = google_dot_api_dot_backend__pb2._BACKEND
_SERVICE.fields_by_name["http"].message_type = google_dot_api_dot_http__pb2._HTTP
_SERVICE.fields_by_name["quota"].message_type = google_dot_api_dot_quota__pb2._QUOTA
_SERVICE.fields_by_name[
"authentication"
].message_type = google_dot_api_dot_auth__pb2._AUTHENTICATION
_SERVICE.fields_by_name[
"context"
].message_type = google_dot_api_dot_context__pb2._CONTEXT
_SERVICE.fields_by_name["usage"].message_type = google_dot_api_dot_usage__pb2._USAGE
_SERVICE.fields_by_name[
"endpoints"
].message_type = google_dot_api_dot_endpoint__pb2._ENDPOINT
_SERVICE.fields_by_name[
"control"
].message_type = google_dot_api_dot_control__pb2._CONTROL
_SERVICE.fields_by_name[
"logs"
].message_type = google_dot_api_dot_log__pb2._LOGDESCRIPTOR
_SERVICE.fields_by_name[
"metrics"
].message_type = google_dot_api_dot_metric__pb2._METRICDESCRIPTOR
_SERVICE.fields_by_name[
"monitored_resources"
].message_type = (
google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEDESCRIPTOR
)
_SERVICE.fields_by_name[
"billing"
].message_type = google_dot_api_dot_billing__pb2._BILLING
_SERVICE.fields_by_name[
"logging"
].message_type = google_dot_api_dot_logging__pb2._LOGGING
_SERVICE.fields_by_name[
"monitoring"
].message_type = google_dot_api_dot_monitoring__pb2._MONITORING
_SERVICE.fields_by_name[
"system_parameters"
].message_type = google_dot_api_dot_system__parameter__pb2._SYSTEMPARAMETERS
_SERVICE.fields_by_name[
"source_info"
].message_type = google_dot_api_dot_source__info__pb2._SOURCEINFO
DESCRIPTOR.message_types_by_name["Service"] = _SERVICE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Service = _reflection.GeneratedProtocolMessageType(
"Service",
(_message.Message,),
{
"DESCRIPTOR": _SERVICE,
"__module__": "google.api.service_pb2"
# @@protoc_insertion_point(class_scope:google.api.Service)
},
)
_sym_db.RegisterMessage(Service)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,100 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/source_info.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/source_info.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\017SourceInfoProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x1cgoogle/api/source_info.proto\x12\ngoogle.api\x1a\x19google/protobuf/any.proto"8\n\nSourceInfo\x12*\n\x0csource_files\x18\x01 \x03(\x0b\x32\x14.google.protobuf.AnyBq\n\x0e\x63om.google.apiB\x0fSourceInfoProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR],
)
_SOURCEINFO = _descriptor.Descriptor(
name="SourceInfo",
full_name="google.api.SourceInfo",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="source_files",
full_name="google.api.SourceInfo.source_files",
index=0,
number=1,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=71,
serialized_end=127,
)
_SOURCEINFO.fields_by_name[
"source_files"
].message_type = google_dot_protobuf_dot_any__pb2._ANY
DESCRIPTOR.message_types_by_name["SourceInfo"] = _SOURCEINFO
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
SourceInfo = _reflection.GeneratedProtocolMessageType(
"SourceInfo",
(_message.Message,),
{
"DESCRIPTOR": _SOURCEINFO,
"__module__": "google.api.source_info_pb2"
# @@protoc_insertion_point(class_scope:google.api.SourceInfo)
},
)
_sym_db.RegisterMessage(SourceInfo)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,251 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/system_parameter.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/system_parameter.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\024SystemParameterProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n!google/api/system_parameter.proto\x12\ngoogle.api"B\n\x10SystemParameters\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.api.SystemParameterRule"X\n\x13SystemParameterRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12/\n\nparameters\x18\x02 \x03(\x0b\x32\x1b.google.api.SystemParameter"Q\n\x0fSystemParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0bhttp_header\x18\x02 \x01(\t\x12\x1b\n\x13url_query_parameter\x18\x03 \x01(\tBv\n\x0e\x63om.google.apiB\x14SystemParameterProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
)
_SYSTEMPARAMETERS = _descriptor.Descriptor(
name="SystemParameters",
full_name="google.api.SystemParameters",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="rules",
full_name="google.api.SystemParameters.rules",
index=0,
number=1,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
)
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=49,
serialized_end=115,
)
_SYSTEMPARAMETERRULE = _descriptor.Descriptor(
name="SystemParameterRule",
full_name="google.api.SystemParameterRule",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="selector",
full_name="google.api.SystemParameterRule.selector",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="parameters",
full_name="google.api.SystemParameterRule.parameters",
index=1,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=117,
serialized_end=205,
)
_SYSTEMPARAMETER = _descriptor.Descriptor(
name="SystemParameter",
full_name="google.api.SystemParameter",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="name",
full_name="google.api.SystemParameter.name",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="http_header",
full_name="google.api.SystemParameter.http_header",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="url_query_parameter",
full_name="google.api.SystemParameter.url_query_parameter",
index=2,
number=3,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=207,
serialized_end=288,
)
_SYSTEMPARAMETERS.fields_by_name["rules"].message_type = _SYSTEMPARAMETERRULE
_SYSTEMPARAMETERRULE.fields_by_name["parameters"].message_type = _SYSTEMPARAMETER
DESCRIPTOR.message_types_by_name["SystemParameters"] = _SYSTEMPARAMETERS
DESCRIPTOR.message_types_by_name["SystemParameterRule"] = _SYSTEMPARAMETERRULE
DESCRIPTOR.message_types_by_name["SystemParameter"] = _SYSTEMPARAMETER
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
SystemParameters = _reflection.GeneratedProtocolMessageType(
"SystemParameters",
(_message.Message,),
{
"DESCRIPTOR": _SYSTEMPARAMETERS,
"__module__": "google.api.system_parameter_pb2"
# @@protoc_insertion_point(class_scope:google.api.SystemParameters)
},
)
_sym_db.RegisterMessage(SystemParameters)
SystemParameterRule = _reflection.GeneratedProtocolMessageType(
"SystemParameterRule",
(_message.Message,),
{
"DESCRIPTOR": _SYSTEMPARAMETERRULE,
"__module__": "google.api.system_parameter_pb2"
# @@protoc_insertion_point(class_scope:google.api.SystemParameterRule)
},
)
_sym_db.RegisterMessage(SystemParameterRule)
SystemParameter = _reflection.GeneratedProtocolMessageType(
"SystemParameter",
(_message.Message,),
{
"DESCRIPTOR": _SYSTEMPARAMETER,
"__module__": "google.api.system_parameter_pb2"
# @@protoc_insertion_point(class_scope:google.api.SystemParameter)
},
)
_sym_db.RegisterMessage(SystemParameter)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,221 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/usage.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name="google/api/usage.proto",
package="google.api",
syntax="proto3",
serialized_options=b"\n\016com.google.apiB\nUsageProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI",
serialized_pb=b'\n\x16google/api/usage.proto\x12\ngoogle.api\x1a\x1cgoogle/api/annotations.proto"j\n\x05Usage\x12\x14\n\x0crequirements\x18\x01 \x03(\t\x12$\n\x05rules\x18\x06 \x03(\x0b\x32\x15.google.api.UsageRule\x12%\n\x1dproducer_notification_channel\x18\x07 \x01(\t"]\n\tUsageRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12 \n\x18\x61llow_unregistered_calls\x18\x02 \x01(\x08\x12\x1c\n\x14skip_service_control\x18\x03 \x01(\x08\x42l\n\x0e\x63om.google.apiB\nUsageProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3',
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR],
)
_USAGE = _descriptor.Descriptor(
name="Usage",
full_name="google.api.Usage",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="requirements",
full_name="google.api.Usage.requirements",
index=0,
number=1,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="rules",
full_name="google.api.Usage.rules",
index=1,
number=6,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="producer_notification_channel",
full_name="google.api.Usage.producer_notification_channel",
index=2,
number=7,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=68,
serialized_end=174,
)
_USAGERULE = _descriptor.Descriptor(
name="UsageRule",
full_name="google.api.UsageRule",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="selector",
full_name="google.api.UsageRule.selector",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="allow_unregistered_calls",
full_name="google.api.UsageRule.allow_unregistered_calls",
index=1,
number=2,
type=8,
cpp_type=7,
label=1,
has_default_value=False,
default_value=False,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="skip_service_control",
full_name="google.api.UsageRule.skip_service_control",
index=2,
number=3,
type=8,
cpp_type=7,
label=1,
has_default_value=False,
default_value=False,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
serialized_start=176,
serialized_end=269,
)
_USAGE.fields_by_name["rules"].message_type = _USAGERULE
DESCRIPTOR.message_types_by_name["Usage"] = _USAGE
DESCRIPTOR.message_types_by_name["UsageRule"] = _USAGERULE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Usage = _reflection.GeneratedProtocolMessageType(
"Usage",
(_message.Message,),
{
"DESCRIPTOR": _USAGE,
"__module__": "google.api.usage_pb2"
# @@protoc_insertion_point(class_scope:google.api.Usage)
},
)
_sym_db.RegisterMessage(Usage)
UsageRule = _reflection.GeneratedProtocolMessageType(
"UsageRule",
(_message.Message,),
{
"DESCRIPTOR": _USAGERULE,
"__module__": "google.api.usage_pb2"
# @@protoc_insertion_point(class_scope:google.api.UsageRule)
},
)
_sym_db.RegisterMessage(UsageRule)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -1,23 +0,0 @@
# Copyright 2017 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Google API Core.
This package contains common code and utilties used by Google client libraries.
"""
from pkg_resources import get_distribution
__version__ = get_distribution("google-api-core").version

View File

@ -1,735 +0,0 @@
# Copyright 2017, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Bi-directional streaming RPC helpers."""
import collections
import datetime
import logging
import threading
import time
from six.moves import queue
from google.api_core import exceptions
_LOGGER = logging.getLogger(__name__)
_BIDIRECTIONAL_CONSUMER_NAME = "Thread-ConsumeBidirectionalStream"
class _RequestQueueGenerator(object):
"""A helper for sending requests to a gRPC stream from a Queue.
This generator takes requests off a given queue and yields them to gRPC.
This helper is useful when you have an indeterminate, indefinite, or
otherwise open-ended set of requests to send through a request-streaming
(or bidirectional) RPC.
The reason this is necessary is because gRPC takes an iterator as the
request for request-streaming RPCs. gRPC consumes this iterator in another
thread to allow it to block while generating requests for the stream.
However, if the generator blocks indefinitely gRPC will not be able to
clean up the thread as it'll be blocked on `next(iterator)` and not be able
to check the channel status to stop iterating. This helper mitigates that
by waiting on the queue with a timeout and checking the RPC state before
yielding.
Finally, it allows for retrying without swapping queues because if it does
pull an item off the queue when the RPC is inactive, it'll immediately put
it back and then exit. This is necessary because yielding the item in this
case will cause gRPC to discard it. In practice, this means that the order
of messages is not guaranteed. If such a thing is necessary it would be
easy to use a priority queue.
Example::
requests = request_queue_generator(q)
call = stub.StreamingRequest(iter(requests))
requests.call = call
for response in call:
print(response)
q.put(...)
Note that it is possible to accomplish this behavior without "spinning"
(using a queue timeout). One possible way would be to use more threads to
multiplex the grpc end event with the queue, another possible way is to
use selectors and a custom event/queue object. Both of these approaches
are significant from an engineering perspective for small benefit - the
CPU consumed by spinning is pretty minuscule.
Args:
queue (queue.Queue): The request queue.
period (float): The number of seconds to wait for items from the queue
before checking if the RPC is cancelled. In practice, this
determines the maximum amount of time the request consumption
thread will live after the RPC is cancelled.
initial_request (Union[protobuf.Message,
Callable[None, protobuf.Message]]): The initial request to
yield. This is done independently of the request queue to allow fo
easily restarting streams that require some initial configuration
request.
"""
def __init__(self, queue, period=1, initial_request=None):
self._queue = queue
self._period = period
self._initial_request = initial_request
self.call = None
def _is_active(self):
# Note: there is a possibility that this starts *before* the call
# property is set. So we have to check if self.call is set before
# seeing if it's active.
if self.call is not None and not self.call.is_active():
return False
else:
return True
def __iter__(self):
if self._initial_request is not None:
if callable(self._initial_request):
yield self._initial_request()
else:
yield self._initial_request
while True:
try:
item = self._queue.get(timeout=self._period)
except queue.Empty:
if not self._is_active():
_LOGGER.debug(
"Empty queue and inactive call, exiting request " "generator."
)
return
else:
# call is still active, keep waiting for queue items.
continue
# The consumer explicitly sent "None", indicating that the request
# should end.
if item is None:
_LOGGER.debug("Cleanly exiting request generator.")
return
if not self._is_active():
# We have an item, but the call is closed. We should put the
# item back on the queue so that the next call can consume it.
self._queue.put(item)
_LOGGER.debug(
"Inactive call, replacing item on queue and exiting "
"request generator."
)
return
yield item
class _Throttle(object):
"""A context manager limiting the total entries in a sliding time window.
If more than ``access_limit`` attempts are made to enter the context manager
instance in the last ``time window`` interval, the exceeding requests block
until enough time elapses.
The context manager instances are thread-safe and can be shared between
multiple threads. If multiple requests are blocked and waiting to enter,
the exact order in which they are allowed to proceed is not determined.
Example::
max_three_per_second = _Throttle(
access_limit=3, time_window=datetime.timedelta(seconds=1)
)
for i in range(5):
with max_three_per_second as time_waited:
print("{}: Waited {} seconds to enter".format(i, time_waited))
Args:
access_limit (int): the maximum number of entries allowed in the time window
time_window (datetime.timedelta): the width of the sliding time window
"""
def __init__(self, access_limit, time_window):
if access_limit < 1:
raise ValueError("access_limit argument must be positive")
if time_window <= datetime.timedelta(0):
raise ValueError("time_window argument must be a positive timedelta")
self._time_window = time_window
self._access_limit = access_limit
self._past_entries = collections.deque(
maxlen=access_limit
) # least recent first
self._entry_lock = threading.Lock()
def __enter__(self):
with self._entry_lock:
cutoff_time = datetime.datetime.now() - self._time_window
# drop the entries that are too old, as they are no longer relevant
while self._past_entries and self._past_entries[0] < cutoff_time:
self._past_entries.popleft()
if len(self._past_entries) < self._access_limit:
self._past_entries.append(datetime.datetime.now())
return 0.0 # no waiting was needed
to_wait = (self._past_entries[0] - cutoff_time).total_seconds()
time.sleep(to_wait)
self._past_entries.append(datetime.datetime.now())
return to_wait
def __exit__(self, *_):
pass
def __repr__(self):
return "{}(access_limit={}, time_window={})".format(
self.__class__.__name__, self._access_limit, repr(self._time_window)
)
class BidiRpc(object):
"""A helper for consuming a bi-directional streaming RPC.
This maps gRPC's built-in interface which uses a request iterator and a
response iterator into a socket-like :func:`send` and :func:`recv`. This
is a more useful pattern for long-running or asymmetric streams (streams
where there is not a direct correlation between the requests and
responses).
Example::
initial_request = example_pb2.StreamingRpcRequest(
setting='example')
rpc = BidiRpc(
stub.StreamingRpc,
initial_request=initial_request,
metadata=[('name', 'value')]
)
rpc.open()
while rpc.is_active():
print(rpc.recv())
rpc.send(example_pb2.StreamingRpcRequest(
data='example'))
This does *not* retry the stream on errors. See :class:`ResumableBidiRpc`.
Args:
start_rpc (grpc.StreamStreamMultiCallable): The gRPC method used to
start the RPC.
initial_request (Union[protobuf.Message,
Callable[None, protobuf.Message]]): The initial request to
yield. This is useful if an initial request is needed to start the
stream.
metadata (Sequence[Tuple(str, str)]): RPC metadata to include in
the request.
"""
def __init__(self, start_rpc, initial_request=None, metadata=None):
self._start_rpc = start_rpc
self._initial_request = initial_request
self._rpc_metadata = metadata
self._request_queue = queue.Queue()
self._request_generator = None
self._is_active = False
self._callbacks = []
self.call = None
def add_done_callback(self, callback):
"""Adds a callback that will be called when the RPC terminates.
This occurs when the RPC errors or is successfully terminated.
Args:
callback (Callable[[grpc.Future], None]): The callback to execute.
It will be provided with the same gRPC future as the underlying
stream which will also be a :class:`grpc.Call`.
"""
self._callbacks.append(callback)
def _on_call_done(self, future):
for callback in self._callbacks:
callback(future)
def open(self):
"""Opens the stream."""
if self.is_active:
raise ValueError("Can not open an already open stream.")
request_generator = _RequestQueueGenerator(
self._request_queue, initial_request=self._initial_request
)
call = self._start_rpc(iter(request_generator), metadata=self._rpc_metadata)
request_generator.call = call
# TODO: api_core should expose the future interface for wrapped
# callables as well.
if hasattr(call, "_wrapped"): # pragma: NO COVER
call._wrapped.add_done_callback(self._on_call_done)
else:
call.add_done_callback(self._on_call_done)
self._request_generator = request_generator
self.call = call
def close(self):
"""Closes the stream."""
if self.call is None:
return
self._request_queue.put(None)
self.call.cancel()
self._request_generator = None
# Don't set self.call to None. Keep it around so that send/recv can
# raise the error.
def send(self, request):
"""Queue a message to be sent on the stream.
Send is non-blocking.
If the underlying RPC has been closed, this will raise.
Args:
request (protobuf.Message): The request to send.
"""
if self.call is None:
raise ValueError("Can not send() on an RPC that has never been open()ed.")
# Don't use self.is_active(), as ResumableBidiRpc will overload it
# to mean something semantically different.
if self.call.is_active():
self._request_queue.put(request)
else:
# calling next should cause the call to raise.
next(self.call)
def recv(self):
"""Wait for a message to be returned from the stream.
Recv is blocking.
If the underlying RPC has been closed, this will raise.
Returns:
protobuf.Message: The received message.
"""
if self.call is None:
raise ValueError("Can not recv() on an RPC that has never been open()ed.")
return next(self.call)
@property
def is_active(self):
"""bool: True if this stream is currently open and active."""
return self.call is not None and self.call.is_active()
@property
def pending_requests(self):
"""int: Returns an estimate of the number of queued requests."""
return self._request_queue.qsize()
def _never_terminate(future_or_error):
"""By default, no errors cause BiDi termination."""
return False
class ResumableBidiRpc(BidiRpc):
"""A :class:`BidiRpc` that can automatically resume the stream on errors.
It uses the ``should_recover`` arg to determine if it should re-establish
the stream on error.
Example::
def should_recover(exc):
return (
isinstance(exc, grpc.RpcError) and
exc.code() == grpc.StatusCode.UNVAILABLE)
initial_request = example_pb2.StreamingRpcRequest(
setting='example')
metadata = [('header_name', 'value')]
rpc = ResumableBidiRpc(
stub.StreamingRpc,
should_recover=should_recover,
initial_request=initial_request,
metadata=metadata
)
rpc.open()
while rpc.is_active():
print(rpc.recv())
rpc.send(example_pb2.StreamingRpcRequest(
data='example'))
Args:
start_rpc (grpc.StreamStreamMultiCallable): The gRPC method used to
start the RPC.
initial_request (Union[protobuf.Message,
Callable[None, protobuf.Message]]): The initial request to
yield. This is useful if an initial request is needed to start the
stream.
should_recover (Callable[[Exception], bool]): A function that returns
True if the stream should be recovered. This will be called
whenever an error is encountered on the stream.
should_terminate (Callable[[Exception], bool]): A function that returns
True if the stream should be terminated. This will be called
whenever an error is encountered on the stream.
metadata Sequence[Tuple(str, str)]: RPC metadata to include in
the request.
throttle_reopen (bool): If ``True``, throttling will be applied to
stream reopen calls. Defaults to ``False``.
"""
def __init__(
self,
start_rpc,
should_recover,
should_terminate=_never_terminate,
initial_request=None,
metadata=None,
throttle_reopen=False,
):
super(ResumableBidiRpc, self).__init__(start_rpc, initial_request, metadata)
self._should_recover = should_recover
self._should_terminate = should_terminate
self._operational_lock = threading.RLock()
self._finalized = False
self._finalize_lock = threading.Lock()
if throttle_reopen:
self._reopen_throttle = _Throttle(
access_limit=5, time_window=datetime.timedelta(seconds=10)
)
else:
self._reopen_throttle = None
def _finalize(self, result):
with self._finalize_lock:
if self._finalized:
return
for callback in self._callbacks:
callback(result)
self._finalized = True
def _on_call_done(self, future):
# Unlike the base class, we only execute the callbacks on a terminal
# error, not for errors that we can recover from. Note that grpc's
# "future" here is also a grpc.RpcError.
with self._operational_lock:
if self._should_terminate(future):
self._finalize(future)
elif not self._should_recover(future):
self._finalize(future)
else:
_LOGGER.debug("Re-opening stream from gRPC callback.")
self._reopen()
def _reopen(self):
with self._operational_lock:
# Another thread already managed to re-open this stream.
if self.call is not None and self.call.is_active():
_LOGGER.debug("Stream was already re-established.")
return
self.call = None
# Request generator should exit cleanly since the RPC its bound to
# has exited.
self._request_generator = None
# Note: we do not currently do any sort of backoff here. The
# assumption is that re-establishing the stream under normal
# circumstances will happen in intervals greater than 60s.
# However, it is possible in a degenerative case that the server
# closes the stream rapidly which would lead to thrashing here,
# but hopefully in those cases the server would return a non-
# retryable error.
try:
if self._reopen_throttle:
with self._reopen_throttle:
self.open()
else:
self.open()
# If re-opening or re-calling the method fails for any reason,
# consider it a terminal error and finalize the stream.
except Exception as exc:
_LOGGER.debug("Failed to re-open stream due to %s", exc)
self._finalize(exc)
raise
_LOGGER.info("Re-established stream")
def _recoverable(self, method, *args, **kwargs):
"""Wraps a method to recover the stream and retry on error.
If a retryable error occurs while making the call, then the stream will
be re-opened and the method will be retried. This happens indefinitely
so long as the error is a retryable one. If an error occurs while
re-opening the stream, then this method will raise immediately and
trigger finalization of this object.
Args:
method (Callable[..., Any]): The method to call.
args: The args to pass to the method.
kwargs: The kwargs to pass to the method.
"""
while True:
try:
return method(*args, **kwargs)
except Exception as exc:
with self._operational_lock:
_LOGGER.debug("Call to retryable %r caused %s.", method, exc)
if self._should_terminate(exc):
self.close()
_LOGGER.debug("Terminating %r due to %s.", method, exc)
self._finalize(exc)
break
if not self._should_recover(exc):
self.close()
_LOGGER.debug("Not retrying %r due to %s.", method, exc)
self._finalize(exc)
raise exc
_LOGGER.debug("Re-opening stream from retryable %r.", method)
self._reopen()
def _send(self, request):
# Grab a reference to the RPC call. Because another thread (notably
# the gRPC error thread) can modify self.call (by invoking reopen),
# we should ensure our reference can not change underneath us.
# If self.call is modified (such as replaced with a new RPC call) then
# this will use the "old" RPC, which should result in the same
# exception passed into gRPC's error handler being raised here, which
# will be handled by the usual error handling in retryable.
with self._operational_lock:
call = self.call
if call is None:
raise ValueError("Can not send() on an RPC that has never been open()ed.")
# Don't use self.is_active(), as ResumableBidiRpc will overload it
# to mean something semantically different.
if call.is_active():
self._request_queue.put(request)
pass
else:
# calling next should cause the call to raise.
next(call)
def send(self, request):
return self._recoverable(self._send, request)
def _recv(self):
with self._operational_lock:
call = self.call
if call is None:
raise ValueError("Can not recv() on an RPC that has never been open()ed.")
return next(call)
def recv(self):
return self._recoverable(self._recv)
def close(self):
self._finalize(None)
super(ResumableBidiRpc, self).close()
@property
def is_active(self):
"""bool: True if this stream is currently open and active."""
# Use the operational lock. It's entirely possible for something
# to check the active state *while* the RPC is being retried.
# Also, use finalized to track the actual terminal state here.
# This is because if the stream is re-established by the gRPC thread
# it's technically possible to check this between when gRPC marks the
# RPC as inactive and when gRPC executes our callback that re-opens
# the stream.
with self._operational_lock:
return self.call is not None and not self._finalized
class BackgroundConsumer(object):
"""A bi-directional stream consumer that runs in a separate thread.
This maps the consumption of a stream into a callback-based model. It also
provides :func:`pause` and :func:`resume` to allow for flow-control.
Example::
def should_recover(exc):
return (
isinstance(exc, grpc.RpcError) and
exc.code() == grpc.StatusCode.UNVAILABLE)
initial_request = example_pb2.StreamingRpcRequest(
setting='example')
rpc = ResumeableBidiRpc(
stub.StreamingRpc,
initial_request=initial_request,
should_recover=should_recover)
def on_response(response):
print(response)
consumer = BackgroundConsumer(rpc, on_response)
consumer.start()
Note that error handling *must* be done by using the provided
``bidi_rpc``'s ``add_done_callback``. This helper will automatically exit
whenever the RPC itself exits and will not provide any error details.
Args:
bidi_rpc (BidiRpc): The RPC to consume. Should not have been
``open()``ed yet.
on_response (Callable[[protobuf.Message], None]): The callback to
be called for every response on the stream.
"""
def __init__(self, bidi_rpc, on_response):
self._bidi_rpc = bidi_rpc
self._on_response = on_response
self._paused = False
self._wake = threading.Condition()
self._thread = None
self._operational_lock = threading.Lock()
def _on_call_done(self, future):
# Resume the thread if it's paused, this prevents blocking forever
# when the RPC has terminated.
self.resume()
def _thread_main(self, ready):
try:
ready.set()
self._bidi_rpc.add_done_callback(self._on_call_done)
self._bidi_rpc.open()
while self._bidi_rpc.is_active:
# Do not allow the paused status to change at all during this
# section. There is a condition where we could be resumed
# between checking if we are paused and calling wake.wait(),
# which means that we will miss the notification to wake up
# (oops!) and wait for a notification that will never come.
# Keeping the lock throughout avoids that.
# In the future, we could use `Condition.wait_for` if we drop
# Python 2.7.
with self._wake:
while self._paused:
_LOGGER.debug("paused, waiting for waking.")
self._wake.wait()
_LOGGER.debug("woken.")
_LOGGER.debug("waiting for recv.")
response = self._bidi_rpc.recv()
_LOGGER.debug("recved response.")
self._on_response(response)
except exceptions.GoogleAPICallError as exc:
_LOGGER.debug(
"%s caught error %s and will exit. Generally this is due to "
"the RPC itself being cancelled and the error will be "
"surfaced to the calling code.",
_BIDIRECTIONAL_CONSUMER_NAME,
exc,
exc_info=True,
)
except Exception as exc:
_LOGGER.exception(
"%s caught unexpected exception %s and will exit.",
_BIDIRECTIONAL_CONSUMER_NAME,
exc,
)
_LOGGER.info("%s exiting", _BIDIRECTIONAL_CONSUMER_NAME)
def start(self):
"""Start the background thread and begin consuming the thread."""
with self._operational_lock:
ready = threading.Event()
thread = threading.Thread(
name=_BIDIRECTIONAL_CONSUMER_NAME,
target=self._thread_main,
args=(ready,),
)
thread.daemon = True
thread.start()
# Other parts of the code rely on `thread.is_alive` which
# isn't sufficient to know if a thread is active, just that it may
# soon be active. This can cause races. Further protect
# against races by using a ready event and wait on it to be set.
ready.wait()
self._thread = thread
_LOGGER.debug("Started helper thread %s", thread.name)
def stop(self):
"""Stop consuming the stream and shutdown the background thread."""
with self._operational_lock:
self._bidi_rpc.close()
if self._thread is not None:
# Resume the thread to wake it up in case it is sleeping.
self.resume()
# The daemonized thread may itself block, so don't wait
# for it longer than a second.
self._thread.join(1.0)
if self._thread.is_alive(): # pragma: NO COVER
_LOGGER.warning("Background thread did not exit.")
self._thread = None
@property
def is_active(self):
"""bool: True if the background thread is active."""
return self._thread is not None and self._thread.is_alive()
def pause(self):
"""Pauses the response stream.
This does *not* pause the request stream.
"""
with self._wake:
self._paused = True
def resume(self):
"""Resumes the response stream."""
with self._wake:
self._paused = False
self._wake.notifyAll()
@property
def is_paused(self):
"""bool: True if the response stream is paused."""
return self._paused

View File

@ -1,96 +0,0 @@
# Copyright 2017 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Helpers for providing client information.
Client information is used to send information about the calling client,
such as the library and Python version, to API services.
"""
import platform
import pkg_resources
_PY_VERSION = platform.python_version()
_API_CORE_VERSION = pkg_resources.get_distribution("google-api-core").version
try:
_GRPC_VERSION = pkg_resources.get_distribution("grpcio").version
except pkg_resources.DistributionNotFound: # pragma: NO COVER
_GRPC_VERSION = None
class ClientInfo(object):
"""Client information used to generate a user-agent for API calls.
This user-agent information is sent along with API calls to allow the
receiving service to do analytics on which versions of Python and Google
libraries are being used.
Args:
python_version (str): The Python interpreter version, for example,
``'2.7.13'``.
grpc_version (Optional[str]): The gRPC library version.
api_core_version (str): The google-api-core library version.
gapic_version (Optional[str]): The sversion of gapic-generated client
library, if the library was generated by gapic.
client_library_version (Optional[str]): The version of the client
library, generally used if the client library was not generated
by gapic or if additional functionality was built on top of
a gapic client library.
user_agent (Optional[str]): Prefix to the user agent header. This is
used to supply information such as application name or partner tool.
Recommended format: ``application-or-tool-ID/major.minor.version``.
"""
def __init__(
self,
python_version=_PY_VERSION,
grpc_version=_GRPC_VERSION,
api_core_version=_API_CORE_VERSION,
gapic_version=None,
client_library_version=None,
user_agent=None,
):
self.python_version = python_version
self.grpc_version = grpc_version
self.api_core_version = api_core_version
self.gapic_version = gapic_version
self.client_library_version = client_library_version
self.user_agent = user_agent
def to_user_agent(self):
"""Returns the user-agent string for this client info."""
# Note: the order here is important as the internal metrics system
# expects these items to be in specific locations.
ua = ""
if self.user_agent is not None:
ua += "{user_agent} "
ua += "gl-python/{python_version} "
if self.grpc_version is not None:
ua += "grpc/{grpc_version} "
ua += "gax/{api_core_version} "
if self.gapic_version is not None:
ua += "gapic/{gapic_version} "
if self.client_library_version is not None:
ua += "gccl/{client_library_version} "
return ua.format(**self.__dict__).strip()

View File

@ -1,116 +0,0 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Client options class.
Client options provide a consistent interface for user options to be defined
across clients.
You can pass a client options object to a client.
.. code-block:: python
from google.api_core.client_options import ClientOptions
from google.cloud.vision_v1 import ImageAnnotatorClient
def get_client_cert():
# code to load client certificate and private key.
return client_cert_bytes, client_private_key_bytes
options = ClientOptions(api_endpoint="foo.googleapis.com",
client_cert_source=get_client_cert)
client = ImageAnnotatorClient(client_options=options)
You can also pass a dictionary.
.. code-block:: python
from google.cloud.vision_v1 import ImageAnnotatorClient
client = ImageAnnotatorClient(
client_options={
"api_endpoint": "foo.googleapis.com",
"client_cert_source" : get_client_cert
})
"""
class ClientOptions(object):
"""Client Options used to set options on clients.
Args:
api_endpoint (Optional[str]): The desired API endpoint, e.g.,
compute.googleapis.com
client_cert_source (Optional[Callable[[], (bytes, bytes)]]): A callback
which returns client certificate bytes and private key bytes both in
PEM format. ``client_cert_source`` and ``client_encrypted_cert_source``
are mutually exclusive.
client_encrypted_cert_source (Optional[Callable[[], (str, str, bytes)]]):
A callback which returns client certificate file path, encrypted
private key file path, and the passphrase bytes.``client_cert_source``
and ``client_encrypted_cert_source`` are mutually exclusive.
quota_project_id (Optional[str]): A project name that a client's
quota belongs to.
credentials_file (Optional[str]): A path to a file storing credentials.
scopes (Optional[Sequence[str]]): OAuth access token override scopes.
Raises:
ValueError: If both ``client_cert_source`` and ``client_encrypted_cert_source``
are provided.
"""
def __init__(
self,
api_endpoint=None,
client_cert_source=None,
client_encrypted_cert_source=None,
quota_project_id=None,
credentials_file=None,
scopes=None,
):
if client_cert_source and client_encrypted_cert_source:
raise ValueError(
"client_cert_source and client_encrypted_cert_source are mutually exclusive"
)
self.api_endpoint = api_endpoint
self.client_cert_source = client_cert_source
self.client_encrypted_cert_source = client_encrypted_cert_source
self.quota_project_id = quota_project_id
self.credentials_file = credentials_file
self.scopes = scopes
def __repr__(self):
return "ClientOptions: " + repr(self.__dict__)
def from_dict(options):
"""Construct a client options object from a dictionary.
Args:
options (Dict[str, Any]): A dictionary with client options.
See the docstring for ClientOptions for details on valid arguments.
"""
client_options = ClientOptions()
for key, value in options.items():
if hasattr(client_options, key):
setattr(client_options, key, value)
else:
raise ValueError("ClientOptions does not accept an option '" + key + "'")
return client_options

View File

@ -1,296 +0,0 @@
# Copyright 2017 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Helpers for :mod:`datetime`."""
import calendar
import datetime
import re
import pytz
from google.protobuf import timestamp_pb2
_UTC_EPOCH = datetime.datetime.utcfromtimestamp(0).replace(tzinfo=pytz.utc)
_RFC3339_MICROS = "%Y-%m-%dT%H:%M:%S.%fZ"
_RFC3339_NO_FRACTION = "%Y-%m-%dT%H:%M:%S"
# datetime.strptime cannot handle nanosecond precision: parse w/ regex
_RFC3339_NANOS = re.compile(
r"""
(?P<no_fraction>
\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2} # YYYY-MM-DDTHH:MM:SS
)
( # Optional decimal part
\. # decimal point
(?P<nanos>\d{1,9}) # nanoseconds, maybe truncated
)?
Z # Zulu
""",
re.VERBOSE,
)
def utcnow():
"""A :meth:`datetime.datetime.utcnow()` alias to allow mocking in tests."""
return datetime.datetime.utcnow()
def to_milliseconds(value):
"""Convert a zone-aware datetime to milliseconds since the unix epoch.
Args:
value (datetime.datetime): The datetime to covert.
Returns:
int: Milliseconds since the unix epoch.
"""
micros = to_microseconds(value)
return micros // 1000
def from_microseconds(value):
"""Convert timestamp in microseconds since the unix epoch to datetime.
Args:
value (float): The timestamp to convert, in microseconds.
Returns:
datetime.datetime: The datetime object equivalent to the timestamp in
UTC.
"""
return _UTC_EPOCH + datetime.timedelta(microseconds=value)
def to_microseconds(value):
"""Convert a datetime to microseconds since the unix epoch.
Args:
value (datetime.datetime): The datetime to covert.
Returns:
int: Microseconds since the unix epoch.
"""
if not value.tzinfo:
value = value.replace(tzinfo=pytz.utc)
# Regardless of what timezone is on the value, convert it to UTC.
value = value.astimezone(pytz.utc)
# Convert the datetime to a microsecond timestamp.
return int(calendar.timegm(value.timetuple()) * 1e6) + value.microsecond
def from_iso8601_date(value):
"""Convert a ISO8601 date string to a date.
Args:
value (str): The ISO8601 date string.
Returns:
datetime.date: A date equivalent to the date string.
"""
return datetime.datetime.strptime(value, "%Y-%m-%d").date()
def from_iso8601_time(value):
"""Convert a zoneless ISO8601 time string to a time.
Args:
value (str): The ISO8601 time string.
Returns:
datetime.time: A time equivalent to the time string.
"""
return datetime.datetime.strptime(value, "%H:%M:%S").time()
def from_rfc3339(value):
"""Convert an RFC3339-format timestamp to a native datetime.
Supported formats include those without fractional seconds, or with
any fraction up to nanosecond precision.
.. note::
Python datetimes do not support nanosecond precision; this function
therefore truncates such values to microseconds.
Args:
value (str): The RFC3339 string to convert.
Returns:
datetime.datetime: The datetime object equivalent to the timestamp
in UTC.
Raises:
ValueError: If the timestamp does not match the RFC3339
regular expression.
"""
with_nanos = _RFC3339_NANOS.match(value)
if with_nanos is None:
raise ValueError(
"Timestamp: {!r}, does not match pattern: {!r}".format(
value, _RFC3339_NANOS.pattern
)
)
bare_seconds = datetime.datetime.strptime(
with_nanos.group("no_fraction"), _RFC3339_NO_FRACTION
)
fraction = with_nanos.group("nanos")
if fraction is None:
micros = 0
else:
scale = 9 - len(fraction)
nanos = int(fraction) * (10 ** scale)
micros = nanos // 1000
return bare_seconds.replace(microsecond=micros, tzinfo=pytz.utc)
from_rfc3339_nanos = from_rfc3339 # from_rfc3339_nanos method was deprecated.
def to_rfc3339(value, ignore_zone=True):
"""Convert a datetime to an RFC3339 timestamp string.
Args:
value (datetime.datetime):
The datetime object to be converted to a string.
ignore_zone (bool): If True, then the timezone (if any) of the
datetime object is ignored and the datetime is treated as UTC.
Returns:
str: The RFC3339 formated string representing the datetime.
"""
if not ignore_zone and value.tzinfo is not None:
# Convert to UTC and remove the time zone info.
value = value.replace(tzinfo=None) - value.utcoffset()
return value.strftime(_RFC3339_MICROS)
class DatetimeWithNanoseconds(datetime.datetime):
"""Track nanosecond in addition to normal datetime attrs.
Nanosecond can be passed only as a keyword argument.
"""
__slots__ = ("_nanosecond",)
# pylint: disable=arguments-differ
def __new__(cls, *args, **kw):
nanos = kw.pop("nanosecond", 0)
if nanos > 0:
if "microsecond" in kw:
raise TypeError("Specify only one of 'microsecond' or 'nanosecond'")
kw["microsecond"] = nanos // 1000
inst = datetime.datetime.__new__(cls, *args, **kw)
inst._nanosecond = nanos or 0
return inst
# pylint: disable=arguments-differ
@property
def nanosecond(self):
"""Read-only: nanosecond precision."""
return self._nanosecond
def rfc3339(self):
"""Return an RFC3339-compliant timestamp.
Returns:
(str): Timestamp string according to RFC3339 spec.
"""
if self._nanosecond == 0:
return to_rfc3339(self)
nanos = str(self._nanosecond).rjust(9, "0").rstrip("0")
return "{}.{}Z".format(self.strftime(_RFC3339_NO_FRACTION), nanos)
@classmethod
def from_rfc3339(cls, stamp):
"""Parse RFC3339-compliant timestamp, preserving nanoseconds.
Args:
stamp (str): RFC3339 stamp, with up to nanosecond precision
Returns:
:class:`DatetimeWithNanoseconds`:
an instance matching the timestamp string
Raises:
ValueError: if `stamp` does not match the expected format
"""
with_nanos = _RFC3339_NANOS.match(stamp)
if with_nanos is None:
raise ValueError(
"Timestamp: {}, does not match pattern: {}".format(
stamp, _RFC3339_NANOS.pattern
)
)
bare = datetime.datetime.strptime(
with_nanos.group("no_fraction"), _RFC3339_NO_FRACTION
)
fraction = with_nanos.group("nanos")
if fraction is None:
nanos = 0
else:
scale = 9 - len(fraction)
nanos = int(fraction) * (10 ** scale)
return cls(
bare.year,
bare.month,
bare.day,
bare.hour,
bare.minute,
bare.second,
nanosecond=nanos,
tzinfo=pytz.UTC,
)
def timestamp_pb(self):
"""Return a timestamp message.
Returns:
(:class:`~google.protobuf.timestamp_pb2.Timestamp`): Timestamp message
"""
inst = self if self.tzinfo is not None else self.replace(tzinfo=pytz.UTC)
delta = inst - _UTC_EPOCH
seconds = int(delta.total_seconds())
nanos = self._nanosecond or self.microsecond * 1000
return timestamp_pb2.Timestamp(seconds=seconds, nanos=nanos)
@classmethod
def from_timestamp_pb(cls, stamp):
"""Parse RFC3339-compliant timestamp, preserving nanoseconds.
Args:
stamp (:class:`~google.protobuf.timestamp_pb2.Timestamp`): timestamp message
Returns:
:class:`DatetimeWithNanoseconds`:
an instance matching the timestamp message
"""
microseconds = int(stamp.seconds * 1e6)
bare = from_microseconds(microseconds)
return cls(
bare.year,
bare.month,
bare.day,
bare.hour,
bare.minute,
bare.second,
nanosecond=stamp.nanos,
tzinfo=pytz.UTC,
)

View File

@ -1,474 +0,0 @@
# Copyright 2014 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Exceptions raised by Google API core & clients.
This module provides base classes for all errors raised by libraries based
on :mod:`google.api_core`, including both HTTP and gRPC clients.
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import six
from six.moves import http_client
try:
import grpc
except ImportError: # pragma: NO COVER
grpc = None
# Lookup tables for mapping exceptions from HTTP and gRPC transports.
# Populated by _APICallErrorMeta
_HTTP_CODE_TO_EXCEPTION = {}
_GRPC_CODE_TO_EXCEPTION = {}
class GoogleAPIError(Exception):
"""Base class for all exceptions raised by Google API Clients."""
pass
class DuplicateCredentialArgs(GoogleAPIError):
"""Raised when multiple credentials are passed."""
pass
@six.python_2_unicode_compatible
class RetryError(GoogleAPIError):
"""Raised when a function has exhausted all of its available retries.
Args:
message (str): The exception message.
cause (Exception): The last exception raised when retring the
function.
"""
def __init__(self, message, cause):
super(RetryError, self).__init__(message)
self.message = message
self._cause = cause
@property
def cause(self):
"""The last exception raised when retrying the function."""
return self._cause
def __str__(self):
return "{}, last exception: {}".format(self.message, self.cause)
class _GoogleAPICallErrorMeta(type):
"""Metaclass for registering GoogleAPICallError subclasses."""
def __new__(mcs, name, bases, class_dict):
cls = type.__new__(mcs, name, bases, class_dict)
if cls.code is not None:
_HTTP_CODE_TO_EXCEPTION.setdefault(cls.code, cls)
if cls.grpc_status_code is not None:
_GRPC_CODE_TO_EXCEPTION.setdefault(cls.grpc_status_code, cls)
return cls
@six.python_2_unicode_compatible
@six.add_metaclass(_GoogleAPICallErrorMeta)
class GoogleAPICallError(GoogleAPIError):
"""Base class for exceptions raised by calling API methods.
Args:
message (str): The exception message.
errors (Sequence[Any]): An optional list of error details.
response (Union[requests.Request, grpc.Call]): The response or
gRPC call metadata.
"""
code = None
"""Optional[int]: The HTTP status code associated with this error.
This may be ``None`` if the exception does not have a direct mapping
to an HTTP error.
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
"""
grpc_status_code = None
"""Optional[grpc.StatusCode]: The gRPC status code associated with this
error.
This may be ``None`` if the exception does not match up to a gRPC error.
"""
def __init__(self, message, errors=(), response=None):
super(GoogleAPICallError, self).__init__(message)
self.message = message
"""str: The exception message."""
self._errors = errors
self._response = response
def __str__(self):
return "{} {}".format(self.code, self.message)
@property
def errors(self):
"""Detailed error information.
Returns:
Sequence[Any]: A list of additional error details.
"""
return list(self._errors)
@property
def response(self):
"""Optional[Union[requests.Request, grpc.Call]]: The response or
gRPC call metadata."""
return self._response
class Redirection(GoogleAPICallError):
"""Base class for for all redirection (HTTP 3xx) responses."""
class MovedPermanently(Redirection):
"""Exception mapping a ``301 Moved Permanently`` response."""
code = http_client.MOVED_PERMANENTLY
class NotModified(Redirection):
"""Exception mapping a ``304 Not Modified`` response."""
code = http_client.NOT_MODIFIED
class TemporaryRedirect(Redirection):
"""Exception mapping a ``307 Temporary Redirect`` response."""
code = http_client.TEMPORARY_REDIRECT
class ResumeIncomplete(Redirection):
"""Exception mapping a ``308 Resume Incomplete`` response.
.. note:: :attr:`http_client.PERMANENT_REDIRECT` is ``308``, but Google
APIs differ in their use of this status code.
"""
code = 308
class ClientError(GoogleAPICallError):
"""Base class for all client error (HTTP 4xx) responses."""
class BadRequest(ClientError):
"""Exception mapping a ``400 Bad Request`` response."""
code = http_client.BAD_REQUEST
class InvalidArgument(BadRequest):
"""Exception mapping a :attr:`grpc.StatusCode.INVALID_ARGUMENT` error."""
grpc_status_code = grpc.StatusCode.INVALID_ARGUMENT if grpc is not None else None
class FailedPrecondition(BadRequest):
"""Exception mapping a :attr:`grpc.StatusCode.FAILED_PRECONDITION`
error."""
grpc_status_code = grpc.StatusCode.FAILED_PRECONDITION if grpc is not None else None
class OutOfRange(BadRequest):
"""Exception mapping a :attr:`grpc.StatusCode.OUT_OF_RANGE` error."""
grpc_status_code = grpc.StatusCode.OUT_OF_RANGE if grpc is not None else None
class Unauthorized(ClientError):
"""Exception mapping a ``401 Unauthorized`` response."""
code = http_client.UNAUTHORIZED
class Unauthenticated(Unauthorized):
"""Exception mapping a :attr:`grpc.StatusCode.UNAUTHENTICATED` error."""
grpc_status_code = grpc.StatusCode.UNAUTHENTICATED if grpc is not None else None
class Forbidden(ClientError):
"""Exception mapping a ``403 Forbidden`` response."""
code = http_client.FORBIDDEN
class PermissionDenied(Forbidden):
"""Exception mapping a :attr:`grpc.StatusCode.PERMISSION_DENIED` error."""
grpc_status_code = grpc.StatusCode.PERMISSION_DENIED if grpc is not None else None
class NotFound(ClientError):
"""Exception mapping a ``404 Not Found`` response or a
:attr:`grpc.StatusCode.NOT_FOUND` error."""
code = http_client.NOT_FOUND
grpc_status_code = grpc.StatusCode.NOT_FOUND if grpc is not None else None
class MethodNotAllowed(ClientError):
"""Exception mapping a ``405 Method Not Allowed`` response."""
code = http_client.METHOD_NOT_ALLOWED
class Conflict(ClientError):
"""Exception mapping a ``409 Conflict`` response."""
code = http_client.CONFLICT
class AlreadyExists(Conflict):
"""Exception mapping a :attr:`grpc.StatusCode.ALREADY_EXISTS` error."""
grpc_status_code = grpc.StatusCode.ALREADY_EXISTS if grpc is not None else None
class Aborted(Conflict):
"""Exception mapping a :attr:`grpc.StatusCode.ABORTED` error."""
grpc_status_code = grpc.StatusCode.ABORTED if grpc is not None else None
class LengthRequired(ClientError):
"""Exception mapping a ``411 Length Required`` response."""
code = http_client.LENGTH_REQUIRED
class PreconditionFailed(ClientError):
"""Exception mapping a ``412 Precondition Failed`` response."""
code = http_client.PRECONDITION_FAILED
class RequestRangeNotSatisfiable(ClientError):
"""Exception mapping a ``416 Request Range Not Satisfiable`` response."""
code = http_client.REQUESTED_RANGE_NOT_SATISFIABLE
class TooManyRequests(ClientError):
"""Exception mapping a ``429 Too Many Requests`` response."""
# http_client does not define a constant for this in Python 2.
code = 429
class ResourceExhausted(TooManyRequests):
"""Exception mapping a :attr:`grpc.StatusCode.RESOURCE_EXHAUSTED` error."""
grpc_status_code = grpc.StatusCode.RESOURCE_EXHAUSTED if grpc is not None else None
class Cancelled(ClientError):
"""Exception mapping a :attr:`grpc.StatusCode.CANCELLED` error."""
# This maps to HTTP status code 499. See
# https://github.com/googleapis/googleapis/blob/master/google/rpc\
# /code.proto
code = 499
grpc_status_code = grpc.StatusCode.CANCELLED if grpc is not None else None
class ServerError(GoogleAPICallError):
"""Base for 5xx responses."""
class InternalServerError(ServerError):
"""Exception mapping a ``500 Internal Server Error`` response. or a
:attr:`grpc.StatusCode.INTERNAL` error."""
code = http_client.INTERNAL_SERVER_ERROR
grpc_status_code = grpc.StatusCode.INTERNAL if grpc is not None else None
class Unknown(ServerError):
"""Exception mapping a :attr:`grpc.StatusCode.UNKNOWN` error."""
grpc_status_code = grpc.StatusCode.UNKNOWN if grpc is not None else None
class DataLoss(ServerError):
"""Exception mapping a :attr:`grpc.StatusCode.DATA_LOSS` error."""
grpc_status_code = grpc.StatusCode.DATA_LOSS if grpc is not None else None
class MethodNotImplemented(ServerError):
"""Exception mapping a ``501 Not Implemented`` response or a
:attr:`grpc.StatusCode.UNIMPLEMENTED` error."""
code = http_client.NOT_IMPLEMENTED
grpc_status_code = grpc.StatusCode.UNIMPLEMENTED if grpc is not None else None
class BadGateway(ServerError):
"""Exception mapping a ``502 Bad Gateway`` response."""
code = http_client.BAD_GATEWAY
class ServiceUnavailable(ServerError):
"""Exception mapping a ``503 Service Unavailable`` response or a
:attr:`grpc.StatusCode.UNAVAILABLE` error."""
code = http_client.SERVICE_UNAVAILABLE
grpc_status_code = grpc.StatusCode.UNAVAILABLE if grpc is not None else None
class GatewayTimeout(ServerError):
"""Exception mapping a ``504 Gateway Timeout`` response."""
code = http_client.GATEWAY_TIMEOUT
class DeadlineExceeded(GatewayTimeout):
"""Exception mapping a :attr:`grpc.StatusCode.DEADLINE_EXCEEDED` error."""
grpc_status_code = grpc.StatusCode.DEADLINE_EXCEEDED if grpc is not None else None
def exception_class_for_http_status(status_code):
"""Return the exception class for a specific HTTP status code.
Args:
status_code (int): The HTTP status code.
Returns:
:func:`type`: the appropriate subclass of :class:`GoogleAPICallError`.
"""
return _HTTP_CODE_TO_EXCEPTION.get(status_code, GoogleAPICallError)
def from_http_status(status_code, message, **kwargs):
"""Create a :class:`GoogleAPICallError` from an HTTP status code.
Args:
status_code (int): The HTTP status code.
message (str): The exception message.
kwargs: Additional arguments passed to the :class:`GoogleAPICallError`
constructor.
Returns:
GoogleAPICallError: An instance of the appropriate subclass of
:class:`GoogleAPICallError`.
"""
error_class = exception_class_for_http_status(status_code)
error = error_class(message, **kwargs)
if error.code is None:
error.code = status_code
return error
def from_http_response(response):
"""Create a :class:`GoogleAPICallError` from a :class:`requests.Response`.
Args:
response (requests.Response): The HTTP response.
Returns:
GoogleAPICallError: An instance of the appropriate subclass of
:class:`GoogleAPICallError`, with the message and errors populated
from the response.
"""
try:
payload = response.json()
except ValueError:
payload = {"error": {"message": response.text or "unknown error"}}
error_message = payload.get("error", {}).get("message", "unknown error")
errors = payload.get("error", {}).get("errors", ())
message = "{method} {url}: {error}".format(
method=response.request.method, url=response.request.url, error=error_message
)
exception = from_http_status(
response.status_code, message, errors=errors, response=response
)
return exception
def exception_class_for_grpc_status(status_code):
"""Return the exception class for a specific :class:`grpc.StatusCode`.
Args:
status_code (grpc.StatusCode): The gRPC status code.
Returns:
:func:`type`: the appropriate subclass of :class:`GoogleAPICallError`.
"""
return _GRPC_CODE_TO_EXCEPTION.get(status_code, GoogleAPICallError)
def from_grpc_status(status_code, message, **kwargs):
"""Create a :class:`GoogleAPICallError` from a :class:`grpc.StatusCode`.
Args:
status_code (grpc.StatusCode): The gRPC status code.
message (str): The exception message.
kwargs: Additional arguments passed to the :class:`GoogleAPICallError`
constructor.
Returns:
GoogleAPICallError: An instance of the appropriate subclass of
:class:`GoogleAPICallError`.
"""
error_class = exception_class_for_grpc_status(status_code)
error = error_class(message, **kwargs)
if error.grpc_status_code is None:
error.grpc_status_code = status_code
return error
def _is_informative_grpc_error(rpc_exc):
return hasattr(rpc_exc, "code") and hasattr(rpc_exc, "details")
def from_grpc_error(rpc_exc):
"""Create a :class:`GoogleAPICallError` from a :class:`grpc.RpcError`.
Args:
rpc_exc (grpc.RpcError): The gRPC error.
Returns:
GoogleAPICallError: An instance of the appropriate subclass of
:class:`GoogleAPICallError`.
"""
# NOTE(lidiz) All gRPC error shares the parent class grpc.RpcError.
# However, check for grpc.RpcError breaks backward compatibility.
if isinstance(rpc_exc, grpc.Call) or _is_informative_grpc_error(rpc_exc):
return from_grpc_status(
rpc_exc.code(), rpc_exc.details(), errors=(rpc_exc,), response=rpc_exc
)
else:
return GoogleAPICallError(str(rpc_exc), errors=(rpc_exc,), response=rpc_exc)

View File

@ -1,19 +0,0 @@
# Copyright 2017, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Futures for dealing with asynchronous operations."""
from google.api_core.future.base import Future
__all__ = ["Future"]

View File

@ -1,39 +0,0 @@
# Copyright 2017, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Private helpers for futures."""
import logging
import threading
_LOGGER = logging.getLogger(__name__)
def start_daemon_thread(*args, **kwargs):
"""Starts a thread and marks it as a daemon thread."""
thread = threading.Thread(*args, **kwargs)
thread.daemon = True
thread.start()
return thread
def safe_invoke_callback(callback, *args, **kwargs):
"""Invoke a callback, swallowing and logging any exceptions."""
# pylint: disable=bare-except
# We intentionally want to swallow all exceptions.
try:
return callback(*args, **kwargs)
except Exception:
_LOGGER.exception("Error while executing Future callback.")

View File

@ -1,157 +0,0 @@
# Copyright 2020, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""AsyncIO implementation of the abstract base Future class."""
import asyncio
from google.api_core import exceptions
from google.api_core import retry
from google.api_core import retry_async
from google.api_core.future import base
class _OperationNotComplete(Exception):
"""Private exception used for polling via retry."""
pass
RETRY_PREDICATE = retry.if_exception_type(
_OperationNotComplete,
exceptions.TooManyRequests,
exceptions.InternalServerError,
exceptions.BadGateway,
)
DEFAULT_RETRY = retry_async.AsyncRetry(predicate=RETRY_PREDICATE)
class AsyncFuture(base.Future):
"""A Future that polls peer service to self-update.
The :meth:`done` method should be implemented by subclasses. The polling
behavior will repeatedly call ``done`` until it returns True.
.. note: Privacy here is intended to prevent the final class from
overexposing, not to prevent subclasses from accessing methods.
Args:
retry (google.api_core.retry.Retry): The retry configuration used
when polling. This can be used to control how often :meth:`done`
is polled. Regardless of the retry's ``deadline``, it will be
overridden by the ``timeout`` argument to :meth:`result`.
"""
def __init__(self, retry=DEFAULT_RETRY):
super().__init__()
self._retry = retry
self._future = asyncio.get_event_loop().create_future()
self._background_task = None
async def done(self, retry=DEFAULT_RETRY):
"""Checks to see if the operation is complete.
Args:
retry (google.api_core.retry.Retry): (Optional) How to retry the RPC.
Returns:
bool: True if the operation is complete, False otherwise.
"""
# pylint: disable=redundant-returns-doc, missing-raises-doc
raise NotImplementedError()
async def _done_or_raise(self):
"""Check if the future is done and raise if it's not."""
result = await self.done()
if not result:
raise _OperationNotComplete()
async def running(self):
"""True if the operation is currently running."""
result = await self.done()
return not result
async def _blocking_poll(self, timeout=None):
"""Poll and await for the Future to be resolved.
Args:
timeout (int):
How long (in seconds) to wait for the operation to complete.
If None, wait indefinitely.
"""
if self._future.done():
return
retry_ = self._retry.with_deadline(timeout)
try:
await retry_(self._done_or_raise)()
except exceptions.RetryError:
raise asyncio.TimeoutError(
"Operation did not complete within the designated " "timeout."
)
async def result(self, timeout=None):
"""Get the result of the operation.
Args:
timeout (int):
How long (in seconds) to wait for the operation to complete.
If None, wait indefinitely.
Returns:
google.protobuf.Message: The Operation's result.
Raises:
google.api_core.GoogleAPICallError: If the operation errors or if
the timeout is reached before the operation completes.
"""
await self._blocking_poll(timeout=timeout)
return self._future.result()
async def exception(self, timeout=None):
"""Get the exception from the operation.
Args:
timeout (int): How long to wait for the operation to complete.
If None, wait indefinitely.
Returns:
Optional[google.api_core.GoogleAPICallError]: The operation's
error.
"""
await self._blocking_poll(timeout=timeout)
return self._future.exception()
def add_done_callback(self, fn):
"""Add a callback to be executed when the operation is complete.
If the operation is completed, the callback will be scheduled onto the
event loop. Otherwise, the callback will be stored and invoked when the
future is done.
Args:
fn (Callable[Future]): The callback to execute when the operation
is complete.
"""
if self._background_task is None:
self._background_task = asyncio.get_event_loop().create_task(self._blocking_poll())
self._future.add_done_callback(fn)
def set_result(self, result):
"""Set the Future's result."""
self._future.set_result(result)
def set_exception(self, exception):
"""Set the Future's exception."""
self._future.set_exception(exception)

View File

@ -1,67 +0,0 @@
# Copyright 2017, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Abstract and helper bases for Future implementations."""
import abc
import six
@six.add_metaclass(abc.ABCMeta)
class Future(object):
# pylint: disable=missing-docstring
# We inherit the interfaces here from concurrent.futures.
"""Future interface.
This interface is based on :class:`concurrent.futures.Future`.
"""
@abc.abstractmethod
def cancel(self):
raise NotImplementedError()
@abc.abstractmethod
def cancelled(self):
raise NotImplementedError()
@abc.abstractmethod
def running(self):
raise NotImplementedError()
@abc.abstractmethod
def done(self):
raise NotImplementedError()
@abc.abstractmethod
def result(self, timeout=None):
raise NotImplementedError()
@abc.abstractmethod
def exception(self, timeout=None):
raise NotImplementedError()
@abc.abstractmethod
def add_done_callback(self, fn):
# pylint: disable=invalid-name
raise NotImplementedError()
@abc.abstractmethod
def set_result(self, result):
raise NotImplementedError()
@abc.abstractmethod
def set_exception(self, exception):
raise NotImplementedError()

View File

@ -1,186 +0,0 @@
# Copyright 2017, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Abstract and helper bases for Future implementations."""
import abc
import concurrent.futures
from google.api_core import exceptions
from google.api_core import retry
from google.api_core.future import _helpers
from google.api_core.future import base
class _OperationNotComplete(Exception):
"""Private exception used for polling via retry."""
pass
RETRY_PREDICATE = retry.if_exception_type(
_OperationNotComplete,
exceptions.TooManyRequests,
exceptions.InternalServerError,
exceptions.BadGateway,
)
DEFAULT_RETRY = retry.Retry(predicate=RETRY_PREDICATE)
class PollingFuture(base.Future):
"""A Future that needs to poll some service to check its status.
The :meth:`done` method should be implemented by subclasses. The polling
behavior will repeatedly call ``done`` until it returns True.
.. note: Privacy here is intended to prevent the final class from
overexposing, not to prevent subclasses from accessing methods.
Args:
retry (google.api_core.retry.Retry): The retry configuration used
when polling. This can be used to control how often :meth:`done`
is polled. Regardless of the retry's ``deadline``, it will be
overridden by the ``timeout`` argument to :meth:`result`.
"""
def __init__(self, retry=DEFAULT_RETRY):
super(PollingFuture, self).__init__()
self._retry = retry
self._result = None
self._exception = None
self._result_set = False
"""bool: Set to True when the result has been set via set_result or
set_exception."""
self._polling_thread = None
self._done_callbacks = []
@abc.abstractmethod
def done(self, retry=DEFAULT_RETRY):
"""Checks to see if the operation is complete.
Args:
retry (google.api_core.retry.Retry): (Optional) How to retry the RPC.
Returns:
bool: True if the operation is complete, False otherwise.
"""
# pylint: disable=redundant-returns-doc, missing-raises-doc
raise NotImplementedError()
def _done_or_raise(self):
"""Check if the future is done and raise if it's not."""
if not self.done():
raise _OperationNotComplete()
def running(self):
"""True if the operation is currently running."""
return not self.done()
def _blocking_poll(self, timeout=None):
"""Poll and wait for the Future to be resolved.
Args:
timeout (int):
How long (in seconds) to wait for the operation to complete.
If None, wait indefinitely.
"""
if self._result_set:
return
retry_ = self._retry.with_deadline(timeout)
try:
retry_(self._done_or_raise)()
except exceptions.RetryError:
raise concurrent.futures.TimeoutError(
"Operation did not complete within the designated " "timeout."
)
def result(self, timeout=None):
"""Get the result of the operation, blocking if necessary.
Args:
timeout (int):
How long (in seconds) to wait for the operation to complete.
If None, wait indefinitely.
Returns:
google.protobuf.Message: The Operation's result.
Raises:
google.api_core.GoogleAPICallError: If the operation errors or if
the timeout is reached before the operation completes.
"""
self._blocking_poll(timeout=timeout)
if self._exception is not None:
# pylint: disable=raising-bad-type
# Pylint doesn't recognize that this is valid in this case.
raise self._exception
return self._result
def exception(self, timeout=None):
"""Get the exception from the operation, blocking if necessary.
Args:
timeout (int): How long to wait for the operation to complete.
If None, wait indefinitely.
Returns:
Optional[google.api_core.GoogleAPICallError]: The operation's
error.
"""
self._blocking_poll(timeout=timeout)
return self._exception
def add_done_callback(self, fn):
"""Add a callback to be executed when the operation is complete.
If the operation is not already complete, this will start a helper
thread to poll for the status of the operation in the background.
Args:
fn (Callable[Future]): The callback to execute when the operation
is complete.
"""
if self._result_set:
_helpers.safe_invoke_callback(fn, self)
return
self._done_callbacks.append(fn)
if self._polling_thread is None:
# The polling thread will exit on its own as soon as the operation
# is done.
self._polling_thread = _helpers.start_daemon_thread(
target=self._blocking_poll
)
def _invoke_callbacks(self, *args, **kwargs):
"""Invoke all done callbacks."""
for callback in self._done_callbacks:
_helpers.safe_invoke_callback(callback, *args, **kwargs)
def set_result(self, result):
"""Set the Future's result."""
self._result = result
self._result_set = True
self._invoke_callbacks(self)
def set_exception(self, exception):
"""Set the Future's exception."""
self._exception = exception
self._result_set = True
self._invoke_callbacks(self)

View File

@ -1,28 +0,0 @@
# Copyright 2017 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
from google.api_core.gapic_v1 import client_info
from google.api_core.gapic_v1 import config
from google.api_core.gapic_v1 import method
from google.api_core.gapic_v1 import routing_header
__all__ = ["client_info", "config", "method", "routing_header"]
if sys.version_info >= (3, 6):
from google.api_core.gapic_v1 import config_async # noqa: F401
from google.api_core.gapic_v1 import method_async # noqa: F401
__all__.append("config_async")
__all__.append("method_async")

Some files were not shown because too many files have changed in this diff Show More