Skip to content

Commit 474efb1

Browse files
feat: [geocode] new module for geocode (#12343)
Generated by @diegomarquezp via [generate_new_client_hermetic_build.yaml](https://github.com/googleapis/google-cloud-java/actions/workflows/generate_new_client_hermetic_build.yaml) Command used: ``` python generation/new_client_hermetic_build/add-new-client-config.py add-new-library --api-shortname "geocode" --name-pretty "Geocoding API" --api-description "The Geocoding API is a service that accepts a place as an address, latitude and longitude coordinates, or Place ID." --proto-path "google/maps/geocode/v4" --product-docs "https://developers.google.com/maps/documentation/geocoding/overview" --library-name "maps-geocode" --distribution-name "com.google.maps:google-maps-geocode" ``` --------- Co-authored-by: Diego <diegomarquezp@google.com>
1 parent 50304c1 commit 474efb1

File tree

93 files changed

+47601
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+47601
-96
lines changed

generation_config.yaml

Lines changed: 182 additions & 96 deletions
Large diffs are not rendered by default.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2024 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+
16+
deep-remove-regex:
17+
- "/java-maps-geocode/grpc-google-.*/src"
18+
- "/java-maps-geocode/proto-google-.*/src"
19+
- "/java-maps-geocode/google-.*/src"
20+
- "/java-maps-geocode/samples/snippets/generated"
21+
22+
deep-preserve-regex:
23+
- "/java-maps-geocode/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java"
24+
- "/java-maps-geocode/google-.*/src/main/java/com/google/cloud/.*/v.*/stub/Version.java"
25+
26+
deep-copy-regex:
27+
- source: "/google/maps/geocode/(v.*)/.*-java/proto-google-.*/src"
28+
dest: "/owl-bot-staging/java-maps-geocode/$1/proto-google-maps-geocode-$1/src"
29+
- source: "/google/maps/geocode/(v.*)/.*-java/grpc-google-.*/src"
30+
dest: "/owl-bot-staging/java-maps-geocode/$1/grpc-google-maps-geocode-$1/src"
31+
- source: "/google/maps/geocode/(v.*)/.*-java/gapic-google-.*/src"
32+
dest: "/owl-bot-staging/java-maps-geocode/$1/google-maps-geocode/src"
33+
- source: "/google/maps/geocode/(v.*)/.*-java/samples/snippets/generated"
34+
dest: "/owl-bot-staging/java-maps-geocode/$1/samples/snippets/generated"
35+
36+
api-name: geocode
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"api_shortname": "geocode",
3+
"name_pretty": "Geocoding API",
4+
"product_documentation": "https://developers.google.com/maps/documentation/geocoding/overview",
5+
"api_description": "The Geocoding API is a service that accepts a place as an address, latitude and longitude coordinates, or Place ID.",
6+
"client_documentation": "https://cloud.google.com/java/docs/reference/google-maps-geocode/latest/overview",
7+
"release_level": "preview",
8+
"transport": "both",
9+
"language": "java",
10+
"repo": "googleapis/google-cloud-java",
11+
"repo_short": "java-maps-geocode",
12+
"distribution_name": "com.google.maps:google-maps-geocode",
13+
"api_id": "geocode.googleapis.com",
14+
"library_type": "GAPIC_AUTO",
15+
"requires_billing": true
16+
}

java-maps-geocode/README.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# Google Geocoding API Client for Java
2+
3+
Java idiomatic client for [Geocoding API][product-docs].
4+
5+
[![Maven][maven-version-image]][maven-version-link]
6+
![Stability][stability-image]
7+
8+
- [Product Documentation][product-docs]
9+
- [Client Library Documentation][javadocs]
10+
11+
> Note: This client is a work-in-progress, and may occasionally
12+
> make backwards-incompatible changes.
13+
14+
15+
## Quickstart
16+
17+
18+
If you are using Maven, add this to your pom.xml file:
19+
20+
21+
```xml
22+
<dependency>
23+
<groupId>com.google.maps</groupId>
24+
<artifactId>google-maps-geocode</artifactId>
25+
<version>0.0.0</version>
26+
</dependency>
27+
```
28+
29+
If you are using Gradle without BOM, add this to your dependencies:
30+
31+
```Groovy
32+
implementation 'com.google.maps:google-maps-geocode:0.0.0'
33+
```
34+
35+
If you are using SBT, add this to your dependencies:
36+
37+
```Scala
38+
libraryDependencies += "com.google.maps" % "google-maps-geocode" % "0.0.0"
39+
```
40+
41+
## Authentication
42+
43+
See the [Authentication][authentication] section in the base directory's README.
44+
45+
## Authorization
46+
47+
The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Geocoding API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Geocoding API API calls.
48+
49+
## Getting Started
50+
51+
### Prerequisites
52+
53+
You will need a [Google Cloud Platform Console][developer-console] project with the Geocoding API [API enabled][enable-api].
54+
You will need to [enable billing][enable-billing] to use Google Geocoding API.
55+
[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by
56+
[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line:
57+
`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
58+
59+
### Installation and setup
60+
61+
You'll need to obtain the `google-maps-geocode` library. See the [Quickstart](#quickstart) section
62+
to add `google-maps-geocode` as a dependency in your code.
63+
64+
## About Geocoding API
65+
66+
67+
[Geocoding API][product-docs] The Geocoding API is a service that accepts a place as an address, latitude and longitude coordinates, or Place ID.
68+
69+
See the [Geocoding API client library docs][javadocs] to learn how to
70+
use this Geocoding API Client Library.
71+
72+
73+
74+
75+
76+
77+
## Troubleshooting
78+
79+
To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting].
80+
81+
## Transport
82+
83+
Geocoding API uses both gRPC and HTTP/JSON for the transport layer.
84+
85+
## Supported Java Versions
86+
87+
Java 8 or above is required for using this client.
88+
89+
Google's Java client libraries,
90+
[Google Cloud Client Libraries][cloudlibs]
91+
and
92+
[Google Cloud API Libraries][apilibs],
93+
follow the
94+
[Oracle Java SE support roadmap][oracle]
95+
(see the Oracle Java SE Product Releases section).
96+
97+
### For new development
98+
99+
In general, new feature development occurs with support for the lowest Java
100+
LTS version covered by Oracle's Premier Support (which typically lasts 5 years
101+
from initial General Availability). If the minimum required JVM for a given
102+
library is changed, it is accompanied by a [semver][semver] major release.
103+
104+
Java 11 and (in September 2021) Java 17 are the best choices for new
105+
development.
106+
107+
### Keeping production systems current
108+
109+
Google tests its client libraries with all current LTS versions covered by
110+
Oracle's Extended Support (which typically lasts 8 years from initial
111+
General Availability).
112+
113+
#### Legacy support
114+
115+
Google's client libraries support legacy versions of Java runtimes with long
116+
term stable libraries that don't receive feature updates on a best efforts basis
117+
as it may not be possible to backport all patches.
118+
119+
Google provides updates on a best efforts basis to apps that continue to use
120+
Java 7, though apps might need to upgrade to current versions of the library
121+
that supports their JVM.
122+
123+
#### Where to find specific information
124+
125+
The latest versions and the supported Java versions are identified on
126+
the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME`
127+
and on [google-cloud-java][g-c-j].
128+
129+
## Versioning
130+
131+
132+
This library follows [Semantic Versioning](http://semver.org/).
133+
134+
135+
It is currently in major version zero (``0.y.z``), which means that anything may change at any time
136+
and the public API should not be considered stable.
137+
138+
139+
## Contributing
140+
141+
142+
Contributions to this library are always welcome and highly encouraged.
143+
144+
See [CONTRIBUTING][contributing] for more information how to get started.
145+
146+
Please note that this project is released with a Contributor Code of Conduct. By participating in
147+
this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more
148+
information.
149+
150+
151+
## License
152+
153+
Apache 2.0 - See [LICENSE][license] for more information.
154+
155+
Java is a registered trademark of Oracle and/or its affiliates.
156+
157+
[product-docs]: https://developers.google.com/maps/documentation/geocoding/overview
158+
[javadocs]: https://cloud.google.com/java/docs/reference/google-maps-geocode/latest/overview
159+
[stability-image]: https://img.shields.io/badge/stability-preview-yellow
160+
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.maps/google-maps-geocode.svg
161+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-geocode/0.0.0
162+
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
163+
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
164+
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
165+
[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy
166+
[developer-console]: https://console.developers.google.com/
167+
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
168+
[cloud-cli]: https://cloud.google.com/cli
169+
[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md
170+
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
171+
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
172+
[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
173+
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
174+
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=geocode.googleapis.com
175+
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
176+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
177+
178+
[semver]: https://semver.org/
179+
[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained
180+
[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries
181+
[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html
182+
[g-c-j]: http://github.com/googleapis/google-cloud-java
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.google.maps</groupId>
5+
<artifactId>google-maps-geocode-bom</artifactId>
6+
<version>0.0.1-SNAPSHOT</version><!-- {x-version-update:google-maps-geocode:current} -->
7+
<packaging>pom</packaging>
8+
<parent>
9+
<groupId>com.google.cloud</groupId>
10+
<artifactId>google-cloud-pom-parent</artifactId>
11+
<version>1.83.0-SNAPSHOT</version><!-- {x-version-update:google-cloud-java:current} -->
12+
<relativePath>../../google-cloud-pom-parent/pom.xml</relativePath>
13+
</parent>
14+
15+
<name>Google Geocoding API BOM</name>
16+
<description>
17+
BOM for Geocoding API
18+
</description>
19+
20+
<properties>
21+
<maven.antrun.skip>true</maven.antrun.skip>
22+
</properties>
23+
24+
<dependencyManagement>
25+
<dependencies>
26+
<dependency>
27+
<groupId>com.google.maps</groupId>
28+
<artifactId>google-maps-geocode</artifactId>
29+
<version>0.0.1-SNAPSHOT</version><!-- {x-version-update:google-maps-geocode:current} -->
30+
</dependency>
31+
<dependency>
32+
<groupId>com.google.maps.api.grpc</groupId>
33+
<artifactId>grpc-google-maps-geocode-v4</artifactId>
34+
<version>0.0.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-maps-geocode-v4:current} -->
35+
</dependency>
36+
<dependency>
37+
<groupId>com.google.maps.api.grpc</groupId>
38+
<artifactId>proto-google-maps-geocode-v4</artifactId>
39+
<version>0.0.1-SNAPSHOT</version><!-- {x-version-update:proto-google-maps-geocode-v4:current} -->
40+
</dependency>
41+
</dependencies>
42+
</dependencyManagement>
43+
</project>
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.google.maps</groupId>
5+
<artifactId>google-maps-geocode</artifactId>
6+
<version>0.0.1-SNAPSHOT</version><!-- {x-version-update:google-maps-geocode:current} -->
7+
<packaging>jar</packaging>
8+
<name>Google Geocoding API</name>
9+
<description>Geocoding API The Geocoding API is a service that accepts a place as an address, latitude and longitude coordinates, or Place ID.</description>
10+
<parent>
11+
<groupId>com.google.maps</groupId>
12+
<artifactId>google-maps-geocode-parent</artifactId>
13+
<version>0.0.1-SNAPSHOT</version><!-- {x-version-update:google-maps-geocode:current} -->
14+
</parent>
15+
<properties>
16+
<site.installationModule>google-maps-geocode</site.installationModule>
17+
</properties>
18+
<dependencies>
19+
<dependency>
20+
<groupId>io.grpc</groupId>
21+
<artifactId>grpc-api</artifactId>
22+
</dependency>
23+
<dependency>
24+
<groupId>io.grpc</groupId>
25+
<artifactId>grpc-stub</artifactId>
26+
</dependency>
27+
<dependency>
28+
<groupId>io.grpc</groupId>
29+
<artifactId>grpc-protobuf</artifactId>
30+
</dependency>
31+
<dependency>
32+
<groupId>com.google.api</groupId>
33+
<artifactId>api-common</artifactId>
34+
</dependency>
35+
<dependency>
36+
<groupId>com.google.protobuf</groupId>
37+
<artifactId>protobuf-java</artifactId>
38+
</dependency>
39+
<dependency>
40+
<groupId>com.google.api.grpc</groupId>
41+
<artifactId>proto-google-common-protos</artifactId>
42+
</dependency>
43+
44+
<dependency>
45+
<groupId>com.google.maps.api.grpc</groupId>
46+
<artifactId>proto-google-maps-geocode-v4</artifactId>
47+
</dependency>
48+
<dependency>
49+
<groupId>com.google.guava</groupId>
50+
<artifactId>guava</artifactId>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.google.api</groupId>
54+
<artifactId>gax</artifactId>
55+
</dependency>
56+
<dependency>
57+
<groupId>com.google.api</groupId>
58+
<artifactId>gax-grpc</artifactId>
59+
</dependency>
60+
<dependency>
61+
<groupId>com.google.api</groupId>
62+
<artifactId>gax-httpjson</artifactId>
63+
</dependency>
64+
<dependency>
65+
<groupId>com.google.api.grpc</groupId>
66+
<artifactId>proto-google-iam-v1</artifactId>
67+
</dependency>
68+
<dependency>
69+
<groupId>org.threeten</groupId>
70+
<artifactId>threetenbp</artifactId>
71+
</dependency>
72+
73+
<!-- Test dependencies -->
74+
<dependency>
75+
<groupId>com.google.api.grpc</groupId>
76+
<artifactId>grpc-google-common-protos</artifactId>
77+
<scope>test</scope>
78+
</dependency>
79+
<dependency>
80+
<groupId>com.google.api.grpc</groupId>
81+
<artifactId>grpc-google-iam-v1</artifactId>
82+
<scope>test</scope>
83+
</dependency>
84+
<dependency>
85+
<groupId>junit</groupId>
86+
<artifactId>junit</artifactId>
87+
<scope>test</scope>
88+
</dependency>
89+
90+
<dependency>
91+
<groupId>com.google.maps.api.grpc</groupId>
92+
<artifactId>grpc-google-maps-geocode-v4</artifactId>
93+
<scope>test</scope>
94+
</dependency>
95+
<!-- Need testing utility classes for generated gRPC clients tests -->
96+
<dependency>
97+
<groupId>com.google.api</groupId>
98+
<artifactId>gax</artifactId>
99+
<classifier>testlib</classifier>
100+
<scope>test</scope>
101+
</dependency>
102+
<dependency>
103+
<groupId>com.google.api</groupId>
104+
<artifactId>gax-grpc</artifactId>
105+
<classifier>testlib</classifier>
106+
<scope>test</scope>
107+
</dependency>
108+
<dependency>
109+
<groupId>com.google.api</groupId>
110+
<artifactId>gax-httpjson</artifactId>
111+
<classifier>testlib</classifier>
112+
<scope>test</scope>
113+
</dependency>
114+
</dependencies>
115+
</project>

0 commit comments

Comments
 (0)