structure saas with tools

This commit is contained in:
Davidson Gomes
2025-04-25 15:30:54 -03:00
commit 1aef473937
16434 changed files with 6584257 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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 warnings
from .types.encryption_config import EncryptionConfiguration
from .types.model import DeleteModelRequest
from .types.model import GetModelRequest
from .types.model import ListModelsRequest
from .types.model import ListModelsResponse
from .types.model import Model
from .types.model import PatchModelRequest
from .types.model_reference import ModelReference
from .types.standard_sql import StandardSqlDataType
from .types.standard_sql import StandardSqlField
from .types.standard_sql import StandardSqlStructType
from .types.standard_sql import StandardSqlTableType
from .types.table_reference import TableReference
_LEGACY_MSG = (
"Legacy proto-based types from bigquery_v2 are not maintained anymore, "
"use types defined in google.cloud.bigquery instead."
)
warnings.warn(_LEGACY_MSG, category=DeprecationWarning)
__all__ = (
"DeleteModelRequest",
"EncryptionConfiguration",
"GetModelRequest",
"ListModelsRequest",
"ListModelsResponse",
"Model",
"ModelReference",
"PatchModelRequest",
"StandardSqlDataType",
"StandardSqlField",
"StandardSqlStructType",
"StandardSqlTableType",
"TableReference",
)

View File

@@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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.
#
from .encryption_config import (
EncryptionConfiguration,
)
from .model import (
DeleteModelRequest,
GetModelRequest,
ListModelsRequest,
ListModelsResponse,
Model,
PatchModelRequest,
)
from .model_reference import (
ModelReference,
)
from .standard_sql import (
StandardSqlDataType,
StandardSqlField,
StandardSqlStructType,
StandardSqlTableType,
)
from .table_reference import (
TableReference,
)
__all__ = (
"EncryptionConfiguration",
"DeleteModelRequest",
"GetModelRequest",
"ListModelsRequest",
"ListModelsResponse",
"Model",
"PatchModelRequest",
"ModelReference",
"StandardSqlDataType",
"StandardSqlField",
"StandardSqlStructType",
"StandardSqlTableType",
"TableReference",
)

View File

@@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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 proto # type: ignore
from google.protobuf import wrappers_pb2 # type: ignore
__protobuf__ = proto.module(
package="google.cloud.bigquery.v2",
manifest={
"EncryptionConfiguration",
},
)
class EncryptionConfiguration(proto.Message):
r"""
Attributes:
kms_key_name (google.protobuf.wrappers_pb2.StringValue):
Optional. Describes the Cloud KMS encryption
key that will be used to protect destination
BigQuery table. The BigQuery Service Account
associated with your project requires access to
this encryption key.
"""
kms_key_name = proto.Field(
proto.MESSAGE,
number=1,
message=wrappers_pb2.StringValue,
)
__all__ = tuple(sorted(__protobuf__.manifest))

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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 proto # type: ignore
__protobuf__ = proto.module(
package="google.cloud.bigquery.v2",
manifest={
"ModelReference",
},
)
class ModelReference(proto.Message):
r"""Id path of a model.
Attributes:
project_id (str):
Required. The ID of the project containing
this model.
dataset_id (str):
Required. The ID of the dataset containing
this model.
model_id (str):
Required. The ID of the model. The ID must contain only
letters (a-z, A-Z), numbers (0-9), or underscores (_). The
maximum length is 1,024 characters.
"""
project_id = proto.Field(
proto.STRING,
number=1,
)
dataset_id = proto.Field(
proto.STRING,
number=2,
)
model_id = proto.Field(
proto.STRING,
number=3,
)
__all__ = tuple(sorted(__protobuf__.manifest))

View File

@@ -0,0 +1,156 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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 proto # type: ignore
__protobuf__ = proto.module(
package="google.cloud.bigquery.v2",
manifest={
"StandardSqlDataType",
"StandardSqlField",
"StandardSqlStructType",
"StandardSqlTableType",
},
)
class StandardSqlDataType(proto.Message):
r"""The type of a variable, e.g., a function argument. Examples: INT64:
{type_kind="INT64"} ARRAY: {type_kind="ARRAY",
array_element_type="STRING"} STRUCT<x STRING, y ARRAY>:
{type_kind="STRUCT", struct_type={fields=[ {name="x",
type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY",
array_element_type="DATE"}} ]}}
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
type_kind (google.cloud.bigquery_v2.types.StandardSqlDataType.TypeKind):
Required. The top level type of this field.
Can be any standard SQL data type (e.g.,
"INT64", "DATE", "ARRAY").
array_element_type (google.cloud.bigquery_v2.types.StandardSqlDataType):
The type of the array's elements, if type_kind = "ARRAY".
This field is a member of `oneof`_ ``sub_type``.
struct_type (google.cloud.bigquery_v2.types.StandardSqlStructType):
The fields of this struct, in order, if type_kind =
"STRUCT".
This field is a member of `oneof`_ ``sub_type``.
"""
class TypeKind(proto.Enum):
r""""""
TYPE_KIND_UNSPECIFIED = 0
INT64 = 2
BOOL = 5
FLOAT64 = 7
STRING = 8
BYTES = 9
TIMESTAMP = 19
DATE = 10
TIME = 20
DATETIME = 21
INTERVAL = 26
GEOGRAPHY = 22
NUMERIC = 23
BIGNUMERIC = 24
JSON = 25
ARRAY = 16
STRUCT = 17
type_kind = proto.Field(
proto.ENUM,
number=1,
enum=TypeKind,
)
array_element_type = proto.Field(
proto.MESSAGE,
number=2,
oneof="sub_type",
message="StandardSqlDataType",
)
struct_type = proto.Field(
proto.MESSAGE,
number=3,
oneof="sub_type",
message="StandardSqlStructType",
)
class StandardSqlField(proto.Message):
r"""A field or a column.
Attributes:
name (str):
Optional. The name of this field. Can be
absent for struct fields.
type (google.cloud.bigquery_v2.types.StandardSqlDataType):
Optional. The type of this parameter. Absent
if not explicitly specified (e.g., CREATE
FUNCTION statement can omit the return type; in
this case the output parameter does not have
this "type" field).
"""
name = proto.Field(
proto.STRING,
number=1,
)
type = proto.Field(
proto.MESSAGE,
number=2,
message="StandardSqlDataType",
)
class StandardSqlStructType(proto.Message):
r"""
Attributes:
fields (Sequence[google.cloud.bigquery_v2.types.StandardSqlField]):
"""
fields = proto.RepeatedField(
proto.MESSAGE,
number=1,
message="StandardSqlField",
)
class StandardSqlTableType(proto.Message):
r"""A table type
Attributes:
columns (Sequence[google.cloud.bigquery_v2.types.StandardSqlField]):
The columns in this table type
"""
columns = proto.RepeatedField(
proto.MESSAGE,
number=1,
message="StandardSqlField",
)
__all__ = tuple(sorted(__protobuf__.manifest))

View File

@@ -0,0 +1,80 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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 proto # type: ignore
__protobuf__ = proto.module(
package="google.cloud.bigquery.v2",
manifest={
"TableReference",
},
)
class TableReference(proto.Message):
r"""
Attributes:
project_id (str):
Required. The ID of the project containing
this table.
dataset_id (str):
Required. The ID of the dataset containing
this table.
table_id (str):
Required. The ID of the table. The ID must contain only
letters (a-z, A-Z), numbers (0-9), or underscores (_). The
maximum length is 1,024 characters. Certain operations allow
suffixing of the table ID with a partition decorator, such
as ``sample_table$20190123``.
project_id_alternative (Sequence[str]):
The alternative field that will be used when ESF is not able
to translate the received data to the project_id field.
dataset_id_alternative (Sequence[str]):
The alternative field that will be used when ESF is not able
to translate the received data to the project_id field.
table_id_alternative (Sequence[str]):
The alternative field that will be used when ESF is not able
to translate the received data to the project_id field.
"""
project_id = proto.Field(
proto.STRING,
number=1,
)
dataset_id = proto.Field(
proto.STRING,
number=2,
)
table_id = proto.Field(
proto.STRING,
number=3,
)
project_id_alternative = proto.RepeatedField(
proto.STRING,
number=4,
)
dataset_id_alternative = proto.RepeatedField(
proto.STRING,
number=5,
)
table_id_alternative = proto.RepeatedField(
proto.STRING,
number=6,
)
__all__ = tuple(sorted(__protobuf__.manifest))