forked from googleapis/google-cloud-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add synthtool scripts (googleapis#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
- Loading branch information
Showing
29 changed files
with
942 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
# tasks has two product names, and a poorly named artman yaml | ||
v1beta1_library = gapic.java_library( | ||
service='asset', | ||
version='v1beta1', | ||
config_path='artman_cloudasset_v1beta1.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(v1beta1_library / 'gapic-google-cloud-asset-v1beta1/src', 'src') | ||
s.copy(v1beta1_library / 'grpc-google-cloud-asset-v1beta1/src', '../../google-api-grpc/grpc-google-cloud-asset-v1beta1/src') | ||
s.copy(v1beta1_library / 'proto-google-cloud-asset-v1beta1/src', '../../google-api-grpc/proto-google-cloud-asset-v1beta1/src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
library = gapic.java_library( | ||
service='automl', | ||
version='v1beta1', | ||
config_path='artman_automl_v1beta1.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(library / 'gapic-google-cloud-automl-v1beta1/src', 'src') | ||
s.copy(library / 'grpc-google-cloud-automl-v1beta1/src', '../../google-api-grpc/grpc-google-cloud-automl-v1beta1/src') | ||
s.copy(library / 'proto-google-cloud-automl-v1beta1/src', '../../google-api-grpc/proto-google-cloud-automl-v1beta1/src') |
31 changes: 31 additions & 0 deletions
31
google-cloud-clients/google-cloud-bigquerydatatransfer/synth.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
library = gapic.java_library( | ||
service='bigquerydatatransfer', | ||
version='v1', | ||
config_path='/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml', | ||
artman_output_name='google-cloud-bigquerydatatransfer-v1') | ||
|
||
s.copy(library / 'gapic-google-cloud-bigquerydatatransfer-v1/src', 'src') | ||
s.copy(library / 'grpc-google-cloud-bigquerydatatransfer-v1/src', '../../google-api-grpc/grpc-google-cloud-bigquerydatatransfer-v1/src') | ||
s.copy(library / 'proto-google-cloud-bigquerydatatransfer-v1/src', '../../google-api-grpc/proto-google-cloud-bigquerydatatransfer-v1/src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
library = gapic.java_library( | ||
service='bigtable-admin', | ||
version='v2', | ||
config_path='/google/bigtable/admin/artman_bigtableadmin.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(library / 'gapic-google-cloud-bigtable-admin-v2/src', 'src') | ||
s.copy(library / 'grpc-google-cloud-bigtable-admin-v2/src', '../../google-api-grpc/grpc-google-cloud-bigtable-admin-v2/src') | ||
s.copy(library / 'proto-google-cloud-bigtable-admin-v2/src', '../../google-api-grpc/proto-google-cloud-bigtable-admin-v2/src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
library = gapic.java_library( | ||
service='bigtable', | ||
version='v2', | ||
config_path='/google/bigtable/artman_bigtable.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(library / 'gapic-google-cloud-bigtable-v2/src', 'src') | ||
s.copy(library / 'grpc-google-cloud-bigtable-v2/src', '../../google-api-grpc/grpc-google-cloud-bigtable-v2/src') | ||
s.copy(library / 'proto-google-cloud-bigtable-v2/src', '../../google-api-grpc/proto-google-cloud-bigtable-v2/src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
library = gapic.java_library( | ||
service='container', | ||
version='v1', | ||
config_path='/google/container/artman_container.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(library / 'gapic-google-cloud-container-v1/src', 'src') | ||
s.copy(library / 'grpc-google-cloud-container-v1/src', '../../google-api-grpc/grpc-google-cloud-container-v1/src') | ||
s.copy(library / 'proto-google-cloud-container-v1/src', '../../google-api-grpc/proto-google-cloud-container-v1/src') |
31 changes: 31 additions & 0 deletions
31
google-cloud-clients/google-cloud-containeranalysis/synth.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
library = gapic.java_library( | ||
service='container', | ||
version='v1beta1', | ||
config_path='/google/devtools/containeranalysis/artman_containeranalysis_v1beta1.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(library / 'gapic-google-cloud-containeranalysis-v1beta1/src', 'src') | ||
s.copy(library / 'grpc-google-cloud-containeranalysis-v1beta1/src', '../../google-api-grpc/grpc-google-cloud-containeranalysis-v1beta1/src') | ||
s.copy(library / 'proto-google-cloud-containeranalysis-v1beta1/src', '../../google-api-grpc/proto-google-cloud-containeranalysis-v1beta1/src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
for version in ["v1", "v1beta2"]: | ||
library = gapic.java_library( | ||
service='dataproc', | ||
version=version, | ||
config_path=f'/google/cloud/dataproc/artman_dataproc_{version}.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(library / f'gapic-google-cloud-dataproc-{version}/src', 'src') | ||
s.copy(library / f'grpc-google-cloud-dataproc-{version}/src', f'../../google-api-grpc/grpc-google-cloud-dataproc-{version}/src') | ||
s.copy(library / f'proto-google-cloud-dataproc-{version}/src', f'../../google-api-grpc/proto-google-cloud-dataproc-{version}/src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
library = gapic.java_library( | ||
service='datastore', | ||
version='v1', | ||
config_path='/google/datastore/artman_datastore.yaml', | ||
artman_output_name='') | ||
|
||
# Datastore only generates protos | ||
#s.copy(library / 'gapic-google-cloud-datastore-v1/src', 'src') | ||
#s.copy(library / 'grpc-google-cloud-datastore-v1/src', '../../google-api-grpc/grpc-google-cloud-datastore-v1/src') | ||
s.copy(library / 'proto-google-cloud-datastore-v1/src', '../../google-api-grpc/proto-google-cloud-datastore-v1/src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
library = gapic.java_library( | ||
service='dialogflow', | ||
version='v2', | ||
config_path=f'/google/cloud/dialogflow/artman_dialogflow_v2.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(library / f'gapic-google-cloud-dialogflow-v2/src', 'src') | ||
s.copy(library / f'grpc-google-cloud-dialogflow-v2/src', f'../../google-api-grpc/grpc-google-cloud-dialogflow-v2/src') | ||
s.copy(library / f'proto-google-cloud-dialogflow-v2/src', f'../../google-api-grpc/proto-google-cloud-dialogflow-v2/src') | ||
|
||
# v2beta1 has a weird config name | ||
library = gapic.java_library( | ||
service='dialogflow', | ||
version='v2beta1', | ||
config_path=f'/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(library / f'gapic-google-cloud-dialogflow-v2beta1/src', 'src') | ||
s.copy(library / f'grpc-google-cloud-dialogflow-v2beta1/src', f'../../google-api-grpc/grpc-google-cloud-dialogflow-v2beta1/src') | ||
s.copy(library / f'proto-google-cloud-dialogflow-v2beta1/src', f'../../google-api-grpc/proto-google-cloud-dialogflow-v2beta1/src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
library = gapic.java_library( | ||
service='dlp', | ||
version='v2', | ||
config_path='/google/privacy/dlp/artman_dlp_v2.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(library / 'gapic-google-cloud-dlp-v2/src', 'src') | ||
s.copy(library / 'grpc-google-cloud-dlp-v2/src', '../../google-api-grpc/grpc-google-cloud-dlp-v2/src') | ||
s.copy(library / 'proto-google-cloud-dlp-v2/src', '../../google-api-grpc/proto-google-cloud-dlp-v2/src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2018 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. | ||
|
||
"""This script is used to synthesize generated parts of this library.""" | ||
|
||
import synthtool as s | ||
import synthtool.gcp as gcp | ||
|
||
gapic = gcp.GAPICGenerator() | ||
common_templates = gcp.CommonTemplates() | ||
|
||
library = gapic.java_library( | ||
service='errorreporting', | ||
version='v1beta1', | ||
config_path='/google/devtools/clouderrorreporting/artman_errorreporting.yaml', | ||
artman_output_name='') | ||
|
||
s.copy(library / 'gapic-google-cloud-error-reporting-v1beta1/src', 'src') | ||
s.copy(library / 'grpc-google-cloud-error-reporting-v1beta1/src', '../../google-api-grpc/grpc-google-cloud-error-reporting-v1beta1/src') | ||
s.copy(library / 'proto-google-cloud-error-reporting-v1beta1/src', '../../google-api-grpc/proto-google-cloud-error-reporting-v1beta1/src') |
Oops, something went wrong.