Skip to content

Commit 211bfad

Browse files
authored
Add synthtool scripts (#3765)
* Add assets synth script * Add automl synth script * Add BigQueryDataTransfer synth * Add BigTable synth * Add BigTableAdmin synth * Add container synth * Add containeranalysis synth * Add dataproc synth * Add datastore synth * Add dialogflow synth * Add dlp synth * Add errorreporting synth * Add firestore synth * Add iot synth * Add kms synth * Add language synth * Add logging synth * Add monitoring synth * Add oslogin synth * Add pubsub synth * Add redis synth * Add spanner synth * Add speech synth * Add tasks synth * Add texttospeech synth * Add trace synth * Add videointelligence synth * Add vision synth * Add websecurityscanner synth * Add compute synth * Remove unnecessary import * Remove compute synth and remove excess logging statements
1 parent 4813432 commit 211bfad

File tree

29 files changed

+942
-0
lines changed

29 files changed

+942
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
# tasks has two product names, and a poorly named artman yaml
24+
v1beta1_library = gapic.java_library(
25+
service='asset',
26+
version='v1beta1',
27+
config_path='artman_cloudasset_v1beta1.yaml',
28+
artman_output_name='')
29+
30+
s.copy(v1beta1_library / 'gapic-google-cloud-asset-v1beta1/src', 'src')
31+
s.copy(v1beta1_library / 'grpc-google-cloud-asset-v1beta1/src', '../../google-api-grpc/grpc-google-cloud-asset-v1beta1/src')
32+
s.copy(v1beta1_library / 'proto-google-cloud-asset-v1beta1/src', '../../google-api-grpc/proto-google-cloud-asset-v1beta1/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
library = gapic.java_library(
24+
service='automl',
25+
version='v1beta1',
26+
config_path='artman_automl_v1beta1.yaml',
27+
artman_output_name='')
28+
29+
s.copy(library / 'gapic-google-cloud-automl-v1beta1/src', 'src')
30+
s.copy(library / 'grpc-google-cloud-automl-v1beta1/src', '../../google-api-grpc/grpc-google-cloud-automl-v1beta1/src')
31+
s.copy(library / 'proto-google-cloud-automl-v1beta1/src', '../../google-api-grpc/proto-google-cloud-automl-v1beta1/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
library = gapic.java_library(
24+
service='bigquerydatatransfer',
25+
version='v1',
26+
config_path='/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml',
27+
artman_output_name='google-cloud-bigquerydatatransfer-v1')
28+
29+
s.copy(library / 'gapic-google-cloud-bigquerydatatransfer-v1/src', 'src')
30+
s.copy(library / 'grpc-google-cloud-bigquerydatatransfer-v1/src', '../../google-api-grpc/grpc-google-cloud-bigquerydatatransfer-v1/src')
31+
s.copy(library / 'proto-google-cloud-bigquerydatatransfer-v1/src', '../../google-api-grpc/proto-google-cloud-bigquerydatatransfer-v1/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
library = gapic.java_library(
24+
service='bigtable-admin',
25+
version='v2',
26+
config_path='/google/bigtable/admin/artman_bigtableadmin.yaml',
27+
artman_output_name='')
28+
29+
s.copy(library / 'gapic-google-cloud-bigtable-admin-v2/src', 'src')
30+
s.copy(library / 'grpc-google-cloud-bigtable-admin-v2/src', '../../google-api-grpc/grpc-google-cloud-bigtable-admin-v2/src')
31+
s.copy(library / 'proto-google-cloud-bigtable-admin-v2/src', '../../google-api-grpc/proto-google-cloud-bigtable-admin-v2/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
library = gapic.java_library(
24+
service='bigtable',
25+
version='v2',
26+
config_path='/google/bigtable/artman_bigtable.yaml',
27+
artman_output_name='')
28+
29+
s.copy(library / 'gapic-google-cloud-bigtable-v2/src', 'src')
30+
s.copy(library / 'grpc-google-cloud-bigtable-v2/src', '../../google-api-grpc/grpc-google-cloud-bigtable-v2/src')
31+
s.copy(library / 'proto-google-cloud-bigtable-v2/src', '../../google-api-grpc/proto-google-cloud-bigtable-v2/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
library = gapic.java_library(
24+
service='container',
25+
version='v1',
26+
config_path='/google/container/artman_container.yaml',
27+
artman_output_name='')
28+
29+
s.copy(library / 'gapic-google-cloud-container-v1/src', 'src')
30+
s.copy(library / 'grpc-google-cloud-container-v1/src', '../../google-api-grpc/grpc-google-cloud-container-v1/src')
31+
s.copy(library / 'proto-google-cloud-container-v1/src', '../../google-api-grpc/proto-google-cloud-container-v1/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
library = gapic.java_library(
24+
service='container',
25+
version='v1beta1',
26+
config_path='/google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml',
27+
artman_output_name='')
28+
29+
s.copy(library / 'gapic-google-cloud-containeranalysis-v1beta1/src', 'src')
30+
s.copy(library / 'grpc-google-cloud-containeranalysis-v1beta1/src', '../../google-api-grpc/grpc-google-cloud-containeranalysis-v1beta1/src')
31+
s.copy(library / 'proto-google-cloud-containeranalysis-v1beta1/src', '../../google-api-grpc/proto-google-cloud-containeranalysis-v1beta1/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
for version in ["v1", "v1beta2"]:
24+
library = gapic.java_library(
25+
service='dataproc',
26+
version=version,
27+
config_path=f'/google/cloud/dataproc/artman_dataproc_{version}.yaml',
28+
artman_output_name='')
29+
30+
s.copy(library / f'gapic-google-cloud-dataproc-{version}/src', 'src')
31+
s.copy(library / f'grpc-google-cloud-dataproc-{version}/src', f'../../google-api-grpc/grpc-google-cloud-dataproc-{version}/src')
32+
s.copy(library / f'proto-google-cloud-dataproc-{version}/src', f'../../google-api-grpc/proto-google-cloud-dataproc-{version}/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
library = gapic.java_library(
24+
service='datastore',
25+
version='v1',
26+
config_path='/google/datastore/artman_datastore.yaml',
27+
artman_output_name='')
28+
29+
# Datastore only generates protos
30+
#s.copy(library / 'gapic-google-cloud-datastore-v1/src', 'src')
31+
#s.copy(library / 'grpc-google-cloud-datastore-v1/src', '../../google-api-grpc/grpc-google-cloud-datastore-v1/src')
32+
s.copy(library / 'proto-google-cloud-datastore-v1/src', '../../google-api-grpc/proto-google-cloud-datastore-v1/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
library = gapic.java_library(
24+
service='dialogflow',
25+
version='v2',
26+
config_path=f'/google/cloud/dialogflow/artman_dialogflow_v2.yaml',
27+
artman_output_name='')
28+
29+
s.copy(library / f'gapic-google-cloud-dialogflow-v2/src', 'src')
30+
s.copy(library / f'grpc-google-cloud-dialogflow-v2/src', f'../../google-api-grpc/grpc-google-cloud-dialogflow-v2/src')
31+
s.copy(library / f'proto-google-cloud-dialogflow-v2/src', f'../../google-api-grpc/proto-google-cloud-dialogflow-v2/src')
32+
33+
# v2beta1 has a weird config name
34+
library = gapic.java_library(
35+
service='dialogflow',
36+
version='v2beta1',
37+
config_path=f'/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml',
38+
artman_output_name='')
39+
40+
s.copy(library / f'gapic-google-cloud-dialogflow-v2beta1/src', 'src')
41+
s.copy(library / f'grpc-google-cloud-dialogflow-v2beta1/src', f'../../google-api-grpc/grpc-google-cloud-dialogflow-v2beta1/src')
42+
s.copy(library / f'proto-google-cloud-dialogflow-v2beta1/src', f'../../google-api-grpc/proto-google-cloud-dialogflow-v2beta1/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
library = gapic.java_library(
24+
service='dlp',
25+
version='v2',
26+
config_path='/google/privacy/dlp/artman_dlp_v2.yaml',
27+
artman_output_name='')
28+
29+
s.copy(library / 'gapic-google-cloud-dlp-v2/src', 'src')
30+
s.copy(library / 'grpc-google-cloud-dlp-v2/src', '../../google-api-grpc/grpc-google-cloud-dlp-v2/src')
31+
s.copy(library / 'proto-google-cloud-dlp-v2/src', '../../google-api-grpc/proto-google-cloud-dlp-v2/src')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated parts of this library."""
16+
17+
import synthtool as s
18+
import synthtool.gcp as gcp
19+
20+
gapic = gcp.GAPICGenerator()
21+
common_templates = gcp.CommonTemplates()
22+
23+
library = gapic.java_library(
24+
service='errorreporting',
25+
version='v1beta1',
26+
config_path='/google/devtools/clouderrorreporting/artman_errorreporting.yaml',
27+
artman_output_name='')
28+
29+
s.copy(library / 'gapic-google-cloud-error-reporting-v1beta1/src', 'src')
30+
s.copy(library / 'grpc-google-cloud-error-reporting-v1beta1/src', '../../google-api-grpc/grpc-google-cloud-error-reporting-v1beta1/src')
31+
s.copy(library / 'proto-google-cloud-error-reporting-v1beta1/src', '../../google-api-grpc/proto-google-cloud-error-reporting-v1beta1/src')

0 commit comments

Comments
 (0)