|
| 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') |
0 commit comments