Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit 760493a

Browse files
authored
chore: generate README from templates (#60)
1 parent 18c9119 commit 760493a

File tree

3 files changed

+120
-157
lines changed

3 files changed

+120
-157
lines changed

.repo-metadata.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
"name_pretty": "Google BigQuery Data Transfer Service",
44
"product_documentation": "https://cloud.google.com/bigquery/transfer/",
55
"client_documentation": "https://googleapis.dev/java/google-cloud-bigquerydatatransfer/latest",
6+
"api_description": "transfers data from partner SaaS applications to Google BigQuery on a scheduled, managed basis.",
67
"issue_tracker": "https://issuetracker.google.com/savedsearches/559654",
78
"release_level": "beta",
89
"language": "java",
910
"repo": "googleapis/java-bigquerydatatransfer",
1011
"repo_short": "java-bigquerydatatransfer",
1112
"distribution_name": "com.google.cloud:google-cloud-bigquerydatatransfer",
12-
"api_id": "bigquerydatatransfer.googleapis.com"
13+
"api_id": "bigquerydatatransfer.googleapis.com",
14+
"transport": "grpc",
15+
"requires_billing": true
1316
}

README.md

Lines changed: 111 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,51 @@
1-
Google Cloud Java Client for Bigquery Data Transfer
2-
====================================
1+
# Google Google BigQuery Data Transfer Service Client for Java
32

4-
Java idiomatic client for [Google Cloud Bigquery Data
5-
Transfer][cloud-bigquerydatatransfer].
3+
Java idiomatic client for [Google BigQuery Data Transfer Service][product-docs].
64

7-
[![Kokoro CI](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.svg)](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.html)
8-
[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquerydatatransfer.svg)]( https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquerydatatransfer.svg)
9-
[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java)
5+
[![Maven][maven-version-image]][maven-version-link]
6+
![Stability][stability-image]
107

11-
- [Product Documentation][bigquerydatatransfer-product-docs]
12-
- [Client Library Documentation][bigquerydatatransfer-client-lib-docs]
8+
- [Product Documentation][product-docs]
9+
- [Client Library Documentation][javadocs]
1310

1411
> Note: This client is a work-in-progress, and may occasionally
1512
> make backwards-incompatible changes.
1613
17-
Quickstart
18-
----------
14+
## Quickstart
1915

20-
[//]: # ({x-version-update-start:google-cloud-bigquerydatatransfer:released})
21-
If you are using Maven with Bom, Add this to your pom.xml file.
16+
If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
2217
```xml
23-
<dependencyManagement>
24-
<dependencies>
25-
<dependency>
26-
<groupId>com.google.cloud</groupId>
27-
<artifactId>libraries-bom</artifactId>
28-
<version>0.123.0-beta</version>
29-
<type>pom</type>
30-
<scope>import</scope>
31-
</dependency>
32-
</dependencies>
33-
</dependencyManagement>
34-
18+
<dependencyManagement>
19+
<dependencies>
20+
<dependency>
21+
<groupId>com.google.cloud</groupId>
22+
<artifactId>libraries-bom</artifactId>
23+
<version>4.1.1</version>
24+
<type>pom</type>
25+
<scope>import</scope>
26+
</dependency>
27+
</dependencies>
28+
</dependencyManagement>
29+
<dependencies>
3530
<dependency>
3631
<groupId>com.google.cloud</groupId>
3732
<artifactId>google-cloud-bigquerydatatransfer</artifactId>
3833
</dependency>
34+
</dependencies>
3935
```
40-
If you are using Maven without Bom, Add this to your dependencies.
36+
37+
[//]: # ({x-version-update-start:google-cloud-bigquerydatatransfer:released})
38+
39+
If you are using Maven without BOM, add this to your dependencies:
40+
4141
```xml
42-
<dependency>
43-
<groupId>com.google.cloud</groupId>
44-
<artifactId>google-cloud-bigquerydatatransfer</artifactId>
45-
<version>0.123.0-beta</version>
46-
</dependency>
42+
<dependency>
43+
<groupId>com.google.cloud</groupId>
44+
<artifactId>google-cloud-bigquerydatatransfer</artifactId>
45+
<version>0.123.0-beta</version>
46+
</dependency>
4747
```
48+
4849
If you are using Gradle, add this to your dependencies
4950
```Groovy
5051
compile 'com.google.cloud:google-cloud-bigquerydatatransfer:0.123.0-beta'
@@ -55,81 +56,108 @@ libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer"
5556
```
5657
[//]: # ({x-version-update-end})
5758

58-
Authentication
59-
--------------
60-
61-
See the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) section in the base directory's README.
59+
## Authentication
6260

63-
About Google Cloud Bigquery Data Transfer
64-
--------------------------
61+
See the [Authentication][authentication] section in the base directory's README.
6562

66-
[Google Cloud Bigquery Data Transfer API][cloud-bigquerydatatransfer] transfers data from partner
67-
SaaS applications to Google BigQuery on a scheduled, managed basis.
63+
## Getting Started
6864

69-
See the [Bigquery Data Transfer client library docs][bigquerydatatransfer-client-lib-docs] to learn how to interact with the
70-
Cloud Bigquery Data Transfer using this Client Library.
65+
### Prerequisites
7166

72-
Getting Started
73-
---------------
74-
#### Prerequisites
75-
For this tutorial, you will need a
76-
[Google Developers Console](https://console.developers.google.com/) project with the Bigquery Data Transfer API
77-
enabled. You will need to [enable billing](https://support.google.com/cloud/answer/6158867?hl=en) to
78-
use Google Cloud Bigquery Data Transfer.
79-
[Follow these instructions](https://cloud.google.com/resource-manager/docs/creating-managing-projects) to get your
80-
project set up. You will also need to set up the local development environment by [installing the
81-
Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line:
67+
You will need a [Google Cloud Platform Console][developer-console] project with the Google BigQuery Data Transfer Service [API enabled][enable-api].
68+
You will need to [enable billing][enable-billing] to use Google Google BigQuery Data Transfer Service.
69+
[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by
70+
[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line:
8271
`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
8372

84-
#### Installation and setup
73+
### Installation and setup
74+
8575
You'll need to obtain the `google-cloud-bigquerydatatransfer` library. See the [Quickstart](#quickstart) section
8676
to add `google-cloud-bigquerydatatransfer` as a dependency in your code.
8777

88-
Transport
89-
---------
90-
Bigquery Data Transfer uses gRPC for the transport layer.
78+
## About Google BigQuery Data Transfer Service
9179

92-
Java Versions
93-
-------------
9480

95-
Java 7 or above is required for using this client.
81+
[Google BigQuery Data Transfer Service][product-docs] transfers data from partner SaaS applications to Google BigQuery on a scheduled, managed basis.
9682

97-
Testing
98-
-------
83+
See the [Google BigQuery Data Transfer Service client library docs][javadocs] to learn how to
84+
use this Google BigQuery Data Transfer Service Client Library.
9985

100-
This library has tools to help make tests for code using Cloud Bigquery Data Transfer.
10186

102-
See [TESTING] to read more about testing.
10387

104-
Versioning
105-
----------
10688

107-
This library follows [Semantic Versioning](http://semver.org/).
10889

109-
It is currently in major version zero (``0.y.z``), which means that anything
110-
may change at any time and the public API should not be considered
111-
stable.
11290

113-
Contributing
114-
------------
91+
## Troubleshooting
11592

116-
Contributions to this library are always welcome and highly encouraged.
93+
To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting].
94+
95+
## Transport
96+
97+
Google BigQuery Data Transfer Service uses gRPC for the transport layer.
98+
99+
## Java Versions
100+
101+
Java 7 or above is required for using this client.
102+
103+
## Versioning
104+
105+
This library follows [Semantic Versioning](http://semver.org/).
117106

118-
See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/googleapis/google-cloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started.
119107

120-
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information.
108+
It is currently in major version zero (``0.y.z``), which means that anything may change at any time
109+
and the public API should not be considered stable.
121110

122-
License
123-
-------
124111

125-
Apache 2.0 - See [LICENSE] for more information.
112+
## Contributing
126113

127114

128-
[CONTRIBUTING]:https://github.com/googleapis/google-cloud-java/blob/master/CONTRIBUTING.md
129-
[code-of-conduct]:https://github.com/googleapis/google-cloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct
130-
[LICENSE]: https://github.com/googleapis/google-cloud-java/blob/master/LICENSE
131-
[TESTING]: https://github.com/googleapis/google-cloud-java/blob/master/TESTING.md#testing-code-that-uses-bigquerydatatransfer
115+
Contributions to this library are always welcome and highly encouraged.
132116

133-
[cloud-bigquerydatatransfer]: https://cloud.google.com/bigquery/docs/transfer-service-overview
134-
[bigquerydatatransfer-product-docs]: https://cloud.google.com/bigquery/docs/transfer-service-overview
135-
[bigquerydatatransfer-client-lib-docs]: https://googleapis.dev/java/google-cloud-clients/latest/index.html?com/google/cloud/bigquery/datatransfer/v1/package-summary.html
117+
See [CONTRIBUTING][contributing] for more information how to get started.
118+
119+
Please note that this project is released with a Contributor Code of Conduct. By participating in
120+
this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more
121+
information.
122+
123+
## License
124+
125+
Apache 2.0 - See [LICENSE][license] for more information.
126+
127+
## CI Status
128+
129+
Java Version | Status
130+
------------ | ------
131+
Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1]
132+
Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2]
133+
Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3]
134+
Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4]
135+
Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5]
136+
137+
[product-docs]: https://cloud.google.com/bigquery/transfer/
138+
[javadocs]: https://googleapis.dev/java/google-cloud-bigquerydatatransfer/latest
139+
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerydatatransfer/java7.svg
140+
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerydatatransfer/java7.html
141+
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerydatatransfer/java8.svg
142+
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerydatatransfer/java8.html
143+
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerydatatransfer/java8-osx.svg
144+
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerydatatransfer/java8-osx.html
145+
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerydatatransfer/java8-win.svg
146+
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerydatatransfer/java8-win.html
147+
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerydatatransfer/java11.svg
148+
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerydatatransfer/java11.html
149+
[stability-image]: https://img.shields.io/badge/stability-beta-yellow
150+
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquerydatatransfer.svg
151+
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bigquerydatatransfer&core=gav
152+
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
153+
[developer-console]: https://console.developers.google.com/
154+
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
155+
[cloud-sdk]: https://cloud.google.com/sdk/
156+
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting
157+
[contributing]: https://github.com/googleapis/java-bigquerydatatransfer/blob/master/CONTRIBUTING.md
158+
[code-of-conduct]: https://github.com/googleapis/java-bigquerydatatransfer/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct
159+
[license]: https://github.com/googleapis/java-bigquerydatatransfer/blob/master/LICENSE
160+
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
161+
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=bigquerydatatransfer.googleapis.com
162+
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
163+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png

synth.py

Lines changed: 5 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -20,84 +20,16 @@
2020

2121
gapic = gcp.GAPICGenerator()
2222

23-
protobuf_header = "// Generated by the protocol buffer compiler. DO NOT EDIT!"
24-
# License header
25-
license_header = """/*
26-
* Copyright 2019 Google LLC
27-
*
28-
* Licensed under the Apache License, Version 2.0 (the "License");
29-
* you may not use this file except in compliance with the License.
30-
* You may obtain a copy of the License at
31-
*
32-
* https://www.apache.org/licenses/LICENSE-2.0
33-
*
34-
* Unless required by applicable law or agreed to in writing, software
35-
* distributed under the License is distributed on an "AS IS" BASIS,
36-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37-
* See the License for the specific language governing permissions and
38-
* limitations under the License.
39-
*/
40-
"""
41-
bad_license_header = """/\\*
42-
\\* Copyright 2018 Google LLC
43-
\\*
44-
\\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except
45-
\\* in compliance with the License. You may obtain a copy of the License at
46-
\\*
47-
\\* http://www.apache.org/licenses/LICENSE-2.0
48-
\\*
49-
\\* Unless required by applicable law or agreed to in writing, software distributed under the License
50-
\\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
51-
\\* or implied. See the License for the specific language governing permissions and limitations under
52-
\\* the License.
53-
\\*/
54-
"""
55-
5623
service = 'bigquerydatatransfer'
5724
versions = ['v1']
58-
config_pattern = '/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml'
59-
package = 'com.google.cloud.bigquery.datatransfer.v1'
6025

6126
for version in versions:
62-
library = gapic.java_library(
27+
java.gapic_library(
6328
service=service,
6429
version=version,
65-
config_path=config_pattern.format(version=version),
66-
artman_output_name='')
67-
68-
s.replace(
69-
library / f'proto-google-cloud-{service}-{version}/src/**/*.java',
70-
protobuf_header,
71-
f'{license_header}{protobuf_header}'
72-
)
73-
74-
s.replace(
75-
library / f'grpc-google-cloud-{service}-{version}/src/**/*.java',
76-
bad_license_header,
77-
license_header
78-
)
79-
s.replace(
80-
library / f'proto-google-cloud-{service}-{version}/src/**/*.java',
81-
bad_license_header,
82-
license_header
30+
config_pattern='/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml',
31+
package_pattern='com.google.cloud.bigquery.datatransfer.{version}',
32+
gapic=gapic,
8333
)
8434

85-
s.replace(
86-
library / f'grpc-google-cloud-{service}-{version}/src/**/*.java',
87-
f'package {package};',
88-
f'{license_header}package {package};'
89-
)
90-
91-
s.copy(library / f'gapic-google-cloud-{service}-{version}/src', f'google-cloud-{service}/src')
92-
s.copy(library / f'grpc-google-cloud-{service}-{version}/src', f'grpc-google-cloud-{service}-{version}/src')
93-
s.copy(library / f'proto-google-cloud-{service}-{version}/src', f'proto-google-cloud-{service}-{version}/src')
94-
95-
java.format_code(f'google-cloud-{service}/src')
96-
java.format_code(f'grpc-google-cloud-{service}-{version}/src')
97-
java.format_code(f'proto-google-cloud-{service}-{version}/src')
98-
99-
common_templates = gcp.CommonTemplates()
100-
templates = common_templates.java_library()
101-
s.copy(templates, excludes=[
102-
'README.md',
103-
])
35+
java.common_templates()

0 commit comments

Comments
 (0)