Skip to content

Commit

Permalink
feat: Initial generation of google-maps-fleet_engine-delivery-v1 (#25840
Browse files Browse the repository at this point in the history
)
  • Loading branch information
yoshi-code-bot authored May 2, 2024
1 parent 40f0b35 commit c8d25f3
Show file tree
Hide file tree
Showing 70 changed files with 11,595 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,8 @@
"google-identity-access_context_manager+FILLER": "0.0.0",
"google-identity-access_context_manager-v1": "0.8.0",
"google-identity-access_context_manager-v1+FILLER": "0.0.0",
"google-maps-fleet_engine-delivery-v1": "0.0.1",
"google-maps-fleet_engine-delivery-v1+FILLER": "0.0.0",
"google-maps-fleet_engine-v1": "0.0.1",
"google-maps-fleet_engine-v1+FILLER": "0.0.0",
"google-shopping-merchant-conversions": "0.1.0",
Expand Down
3 changes: 3 additions & 0 deletions google-maps-fleet_engine-delivery-v1/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
deep-copy-regex:
- source: /google/maps/fleetengine/delivery/v1/[^/]+-ruby/(.*)
dest: /owl-bot-staging/google-maps-fleet_engine-delivery-v1/$1
22 changes: 22 additions & 0 deletions google-maps-fleet_engine-delivery-v1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Ignore bundler lockfiles
Gemfile.lock
gems.locked

# Ignore documentation output
doc/*
.yardoc/*

# Ignore test output
coverage/*

# Ignore build artifacts
pkg/*

# Ignore files commonly present in certain dev environments
.vagrant
.DS_STORE
.idea
*.iml

# Ignore synth output
__pycache__
73 changes: 73 additions & 0 deletions google-maps-fleet_engine-delivery-v1/.owlbot-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"generated": [
".gitignore",
".repo-metadata.json",
".rubocop.yml",
".toys.rb",
".yardopts",
"AUTHENTICATION.md",
"CHANGELOG.md",
"Gemfile",
"LICENSE.md",
"README.md",
"Rakefile",
"gapic_metadata.json",
"google-maps-fleet_engine-delivery-v1.gemspec",
"lib/google-maps-fleet_engine-delivery-v1.rb",
"lib/google/maps/fleet_engine/delivery/v1.rb",
"lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb",
"lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb",
"lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb",
"lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb",
"lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb",
"lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb",
"lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb",
"lib/google/maps/fleet_engine/delivery/v1/rest.rb",
"lib/google/maps/fleet_engine/delivery/v1/version.rb",
"lib/google/maps/fleetengine/delivery/v1/common_pb.rb",
"lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb",
"lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb",
"lib/google/maps/fleetengine/delivery/v1/delivery_vehicles_pb.rb",
"lib/google/maps/fleetengine/delivery/v1/header_pb.rb",
"lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb",
"lib/google/maps/fleetengine/delivery/v1/tasks_pb.rb",
"proto_docs/README.md",
"proto_docs/google/api/client.rb",
"proto_docs/google/api/field_behavior.rb",
"proto_docs/google/api/launch_stage.rb",
"proto_docs/google/api/resource.rb",
"proto_docs/google/api/routing.rb",
"proto_docs/google/geo/type/viewport.rb",
"proto_docs/google/maps/fleetengine/delivery/v1/common.rb",
"proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb",
"proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb",
"proto_docs/google/maps/fleetengine/delivery/v1/header.rb",
"proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb",
"proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb",
"proto_docs/google/protobuf/duration.rb",
"proto_docs/google/protobuf/field_mask.rb",
"proto_docs/google/protobuf/timestamp.rb",
"proto_docs/google/protobuf/wrappers.rb",
"proto_docs/google/type/latlng.rb",
"snippets/Gemfile",
"snippets/delivery_service/batch_create_tasks.rb",
"snippets/delivery_service/create_delivery_vehicle.rb",
"snippets/delivery_service/create_task.rb",
"snippets/delivery_service/get_delivery_vehicle.rb",
"snippets/delivery_service/get_task.rb",
"snippets/delivery_service/get_task_tracking_info.rb",
"snippets/delivery_service/list_delivery_vehicles.rb",
"snippets/delivery_service/list_tasks.rb",
"snippets/delivery_service/search_tasks.rb",
"snippets/delivery_service/update_delivery_vehicle.rb",
"snippets/delivery_service/update_task.rb",
"snippets/snippet_metadata_maps.fleetengine.delivery.v1.json",
"test/google/maps/fleet_engine/delivery/v1/delivery_service_paths_test.rb",
"test/google/maps/fleet_engine/delivery/v1/delivery_service_rest_test.rb",
"test/google/maps/fleet_engine/delivery/v1/delivery_service_test.rb",
"test/helper.rb"
],
"static": [
".OwlBot.yaml"
]
}
17 changes: 17 additions & 0 deletions google-maps-fleet_engine-delivery-v1/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"api_id": "fleetengine.googleapis.com",
"api_shortname": "fleetengine-delivery",
"client_documentation": "https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1",
"distribution_name": "google-maps-fleet_engine-delivery-v1",
"is_cloud": false,
"language": "ruby",
"name": "fleetengine-delivery",
"name_pretty": "Last Mile Fleet Solution Delivery V1 API",
"product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility",
"release_level": "unreleased",
"repo": "googleapis/google-cloud-ruby",
"requires_billing": true,
"ruby-cloud-description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. Note that google-maps-fleet_engine-delivery-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-maps-fleet_engine-delivery instead. See the readme for more details.",
"ruby-cloud-product-url": "https://developers.google.com/maps/documentation/transportation-logistics/mobility",
"library_type": "GAPIC_AUTO"
}
33 changes: 33 additions & 0 deletions google-maps-fleet_engine-delivery-v1/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
inherit_gem:
google-style: google-style.yml

AllCops:
Exclude:
- "google-maps-fleet_engine-delivery-v1.gemspec"
- "lib/**/*_pb.rb"
- "proto_docs/**/*"
- "test/**/*"
- "acceptance/**/*"
- "samples/acceptance/**/*"
- "Rakefile"

Layout/LineLength:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Naming/AccessorMethodName:
Exclude:
- "snippets/**/*.rb"
Naming/FileName:
Exclude:
- "lib/google-maps-fleet_engine-delivery-v1.rb"
28 changes: 28 additions & 0 deletions google-maps-fleet_engine-delivery-v1/.toys.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# frozen_string_literal: true

# Copyright 2024 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
#
# https://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.

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!

toys_version! ">= 0.15.3"

if ENV["RUBY_COMMON_TOOLS"]
common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"]
load File.join(common_tools_dir, "toys", "gapic")
else
load_git remote: "https://github.com/googleapis/ruby-common-tools.git",
path: "toys/gapic",
update: true
end
12 changes: 12 additions & 0 deletions google-maps-fleet_engine-delivery-v1/.yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--no-private
--title="Last Mile Fleet Solution Delivery V1 API"
--exclude _pb\.rb$
--markup markdown
--markup-provider redcarpet

./lib/**/*.rb
./proto_docs/**/*.rb
-
README.md
LICENSE.md
AUTHENTICATION.md
122 changes: 122 additions & 0 deletions google-maps-fleet_engine-delivery-v1/AUTHENTICATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Authentication

The recommended way to authenticate to the google-maps-fleet_engine-delivery-v1 library is to use
[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials).
To review all of your authentication options, see [Credentials lookup](#credential-lookup).

## Quickstart

The following example shows how to set up authentication for a local development
environment with your user credentials.

**NOTE:** This method is _not_ recommended for running in production. User credentials
should be used only during development.

1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk).
2. Set up a local ADC file with your user credentials:

```sh
gcloud auth application-default login
```

3. Write code as if already authenticated.

For more information about setting up authentication for a local development environment, see
[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev).

## Credential Lookup

The google-maps-fleet_engine-delivery-v1 library provides several mechanisms to configure your system.
Generally, using Application Default Credentials to facilitate automatic
credentials discovery is the easist method. But if you need to explicitly specify
credentials, there are several methods available to you.

Credentials are accepted in the following ways, in the following order or precedence:

1. Credentials specified in method arguments
2. Credentials specified in configuration
3. Credentials pointed to or included in environment variables
4. Credentials found in local ADC file
5. Credentials returned by the metadata server for the attached service account (GCP)

### Configuration

You can configure a path to a JSON credentials file, either for an individual client object or
globally, for all client objects. The JSON file can contain credentials created for
[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation),
[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a
[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key).

Note: Service account keys are a security risk if not managed correctly. You should
[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree)
whenever possible.

To configure a credentials file for an individual client initialization:

```ruby
require "google/maps/fleet_engine/delivery/v1"

client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new do |config|
config.credentials = "path/to/credentialfile.json"
end
```

To configure a credentials file globally for all clients:

```ruby
require "google/maps/fleet_engine/delivery/v1"

::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.configure do |config|
config.credentials = "path/to/credentialfile.json"
end

client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new
```

### Environment Variables

You can also use an environment variable to provide a JSON credentials file.
The environment variable can contain a path to the credentials file or, for
environments such as Docker containers where writing files is not encouraged,
you can include the credentials file itself.

The JSON file can contain credentials created for
[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation),
[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a
[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key).

Note: Service account keys are a security risk if not managed correctly. You should
[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree)
whenever possible.

The environment variables that google-maps-fleet_engine-delivery-v1
checks for credentials are:

* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file

```ruby
require "google/maps/fleet_engine/delivery/v1"

ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"

client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Client.new
```

### Local ADC file

You can set up a local ADC file with your user credentials for authentication during
development. If credentials are not provided in code or in environment variables,
then the local ADC credentials are discovered.

Follow the steps in [Quickstart](#quickstart) to set up a local ADC file.

### Google Cloud Platform environments

When running on Google Cloud Platform (GCP), including Google Compute Engine
(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud
Functions (GCF) and Cloud Run, credentials are retrieved from the attached
service account automatically. Code should be written as if already authenticated.

For more information, see
[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa).
2 changes: 2 additions & 0 deletions google-maps-fleet_engine-delivery-v1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Release History

11 changes: 11 additions & 0 deletions google-maps-fleet_engine-delivery-v1/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
source "https://rubygems.org"

gemspec

gem "google-style", "~> 1.27.1"
gem "minitest", "~> 5.22"
gem "minitest-focus", "~> 1.4"
gem "minitest-rg", "~> 5.3"
gem "rake", ">= 13.0"
gem "redcarpet", "~> 3.6"
gem "yard", "~> 0.9"
Loading

0 comments on commit c8d25f3

Please sign in to comment.