mirror of
https://github.com/googleapis/googleapis.git
synced 2026-08-20 13:27:47 +02:00
feat: Publish existing API surface to previews
PiperOrigin-RevId: 506927503
This commit is contained in:
parent
dd46ffb6dc
commit
9bea37f2db
6 changed files with 3422 additions and 0 deletions
394
google/cloud/optimization/v1/BUILD.bazel
Normal file
394
google/cloud/optimization/v1/BUILD.bazel
Normal file
|
|
@ -0,0 +1,394 @@
|
|||
# This file was automatically generated by BuildFileGenerator
|
||||
# https://github.com/googleapis/rules_gapic/tree/master/bazel
|
||||
|
||||
# Most of the manual changes to this file will be overwritten.
|
||||
# It's **only** allowed to change the following rule attribute values:
|
||||
# - names of *_gapic_assembly_* rules
|
||||
# - certain parameters of *_gapic_library rules, including but not limited to:
|
||||
# * extra_protoc_parameters
|
||||
# * extra_protoc_file_parameters
|
||||
# The complete list of preserved parameters can be found in the source code.
|
||||
|
||||
# This is an API workspace, having public visibility by default makes perfect sense.
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
##############################################################################
|
||||
# Common
|
||||
##############################################################################
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
|
||||
|
||||
proto_library(
|
||||
name = "optimization_proto",
|
||||
srcs = [
|
||||
"async_model.proto",
|
||||
"fleet_routing.proto",
|
||||
],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/api:resource_proto",
|
||||
"//google/longrunning:operations_proto",
|
||||
"//google/type:latlng_proto",
|
||||
"@com_google_protobuf//:duration_proto",
|
||||
"@com_google_protobuf//:timestamp_proto",
|
||||
],
|
||||
)
|
||||
|
||||
proto_library_with_info(
|
||||
name = "optimization_proto_with_info",
|
||||
deps = [
|
||||
":optimization_proto",
|
||||
"//google/cloud:common_resources_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Java
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"java_gapic_assembly_gradle_pkg",
|
||||
"java_gapic_library",
|
||||
"java_gapic_test",
|
||||
"java_grpc_library",
|
||||
"java_proto_library",
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "optimization_java_proto",
|
||||
deps = [":optimization_proto"],
|
||||
)
|
||||
|
||||
java_grpc_library(
|
||||
name = "optimization_java_grpc",
|
||||
srcs = [":optimization_proto"],
|
||||
deps = [":optimization_java_proto"],
|
||||
)
|
||||
|
||||
java_gapic_library(
|
||||
name = "optimization_java_gapic",
|
||||
srcs = [":optimization_proto_with_info"],
|
||||
gapic_yaml = None,
|
||||
grpc_service_config = "cloudoptimization_v1_grpc_service_config.json",
|
||||
rest_numeric_enums = True,
|
||||
service_yaml = "cloudoptimization_v1.yaml",
|
||||
test_deps = [
|
||||
":optimization_java_grpc",
|
||||
],
|
||||
transport = "grpc+rest",
|
||||
deps = [
|
||||
":optimization_java_proto",
|
||||
"//google/api:api_java_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_gapic_test(
|
||||
name = "optimization_java_gapic_test_suite",
|
||||
test_classes = [
|
||||
"com.google.cloud.optimization.v1.FleetRoutingClientHttpJsonTest",
|
||||
"com.google.cloud.optimization.v1.FleetRoutingClientTest",
|
||||
],
|
||||
runtime_deps = [":optimization_java_gapic_test"],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
java_gapic_assembly_gradle_pkg(
|
||||
name = "google-cloud-optimization-v1-java",
|
||||
transport = "grpc+rest",
|
||||
deps = [
|
||||
":optimization_java_gapic",
|
||||
":optimization_java_grpc",
|
||||
":optimization_java_proto",
|
||||
":optimization_proto",
|
||||
],
|
||||
include_samples = True,
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Go
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"go_gapic_assembly_pkg",
|
||||
"go_gapic_library",
|
||||
"go_proto_library",
|
||||
"go_test",
|
||||
)
|
||||
|
||||
go_proto_library(
|
||||
name = "optimization_go_proto",
|
||||
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
|
||||
importpath = "google.golang.org/genproto/googleapis/cloud/optimization/v1",
|
||||
protos = [":optimization_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_go_proto",
|
||||
"//google/longrunning:longrunning_go_proto",
|
||||
"//google/type:latlng_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
go_gapic_library(
|
||||
name = "optimization_go_gapic",
|
||||
srcs = [":optimization_proto_with_info"],
|
||||
grpc_service_config = "cloudoptimization_v1_grpc_service_config.json",
|
||||
importpath = "cloud.google.com/go/optimization/apiv1;optimization",
|
||||
metadata = True,
|
||||
release_level = "beta",
|
||||
rest_numeric_enums = True,
|
||||
service_yaml = "cloudoptimization_v1.yaml",
|
||||
transport = "grpc+rest",
|
||||
deps = [
|
||||
":optimization_go_proto",
|
||||
"//google/longrunning:longrunning_go_proto",
|
||||
"@com_google_cloud_go_longrunning//:go_default_library",
|
||||
"@com_google_cloud_go_longrunning//autogen:go_default_library",
|
||||
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "optimization_go_gapic_test",
|
||||
srcs = [":optimization_go_gapic_srcjar_test"],
|
||||
embed = [":optimization_go_gapic"],
|
||||
importpath = "cloud.google.com/go/optimization/apiv1",
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
go_gapic_assembly_pkg(
|
||||
name = "gapi-cloud-optimization-v1-go",
|
||||
deps = [
|
||||
":optimization_go_gapic",
|
||||
":optimization_go_gapic_srcjar-test.srcjar",
|
||||
":optimization_go_gapic_srcjar-metadata.srcjar",
|
||||
":optimization_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Python
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"py_gapic_assembly_pkg",
|
||||
"py_gapic_library",
|
||||
"py_test",
|
||||
)
|
||||
|
||||
py_gapic_library(
|
||||
name = "optimization_py_gapic",
|
||||
srcs = [":optimization_proto"],
|
||||
grpc_service_config = "cloudoptimization_v1_grpc_service_config.json",
|
||||
rest_numeric_enums = True,
|
||||
service_yaml = "cloudoptimization_v1.yaml",
|
||||
transport = "grpc+rest",
|
||||
deps = [
|
||||
],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "optimization_py_gapic_test",
|
||||
srcs = [
|
||||
"optimization_py_gapic_pytest.py",
|
||||
"optimization_py_gapic_test.py",
|
||||
],
|
||||
legacy_create_init = False,
|
||||
deps = [":optimization_py_gapic"],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
py_gapic_assembly_pkg(
|
||||
name = "optimization-v1-py",
|
||||
deps = [
|
||||
":optimization_py_gapic",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# PHP
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"php_gapic_assembly_pkg",
|
||||
"php_gapic_library",
|
||||
"php_grpc_library",
|
||||
"php_proto_library",
|
||||
)
|
||||
|
||||
php_proto_library(
|
||||
name = "optimization_php_proto",
|
||||
deps = [":optimization_proto"],
|
||||
)
|
||||
|
||||
php_grpc_library(
|
||||
name = "optimization_php_grpc",
|
||||
srcs = [":optimization_proto"],
|
||||
deps = [":optimization_php_proto"],
|
||||
)
|
||||
|
||||
php_gapic_library(
|
||||
name = "optimization_php_gapic",
|
||||
srcs = [":optimization_proto_with_info"],
|
||||
grpc_service_config = "cloudoptimization_v1_grpc_service_config.json",
|
||||
rest_numeric_enums = True,
|
||||
service_yaml = "cloudoptimization_v1.yaml",
|
||||
transport = "grpc+rest",
|
||||
deps = [
|
||||
":optimization_php_grpc",
|
||||
":optimization_php_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
php_gapic_assembly_pkg(
|
||||
name = "google-cloud-optimization-v1-php",
|
||||
deps = [
|
||||
":optimization_php_gapic",
|
||||
":optimization_php_grpc",
|
||||
":optimization_php_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Node.js
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"nodejs_gapic_assembly_pkg",
|
||||
"nodejs_gapic_library",
|
||||
)
|
||||
|
||||
nodejs_gapic_library(
|
||||
name = "optimization_nodejs_gapic",
|
||||
package_name = "@google-cloud/optimization",
|
||||
src = ":optimization_proto_with_info",
|
||||
extra_protoc_parameters = ["metadata"],
|
||||
grpc_service_config = "cloudoptimization_v1_grpc_service_config.json",
|
||||
package = "google.cloud.optimization.v1",
|
||||
rest_numeric_enums = True,
|
||||
service_yaml = "cloudoptimization_v1.yaml",
|
||||
transport = "grpc+rest",
|
||||
deps = [],
|
||||
)
|
||||
|
||||
nodejs_gapic_assembly_pkg(
|
||||
name = "optimization-v1-nodejs",
|
||||
deps = [
|
||||
":optimization_nodejs_gapic",
|
||||
":optimization_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Ruby
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"ruby_gapic_assembly_pkg",
|
||||
"ruby_cloud_gapic_library",
|
||||
"ruby_grpc_library",
|
||||
"ruby_proto_library",
|
||||
)
|
||||
|
||||
ruby_proto_library(
|
||||
name = "optimization_ruby_proto",
|
||||
deps = [":optimization_proto"],
|
||||
)
|
||||
|
||||
ruby_grpc_library(
|
||||
name = "optimization_ruby_grpc",
|
||||
srcs = [":optimization_proto"],
|
||||
deps = [":optimization_ruby_proto"],
|
||||
)
|
||||
|
||||
ruby_cloud_gapic_library(
|
||||
name = "optimization_ruby_gapic",
|
||||
srcs = [":optimization_proto_with_info"],
|
||||
extra_protoc_parameters = [
|
||||
"ruby-cloud-gem-name=google-cloud-optimization-v1",
|
||||
],
|
||||
grpc_service_config = "cloudoptimization_v1_grpc_service_config.json",
|
||||
rest_numeric_enums = True,
|
||||
service_yaml = "cloudoptimization_v1.yaml",
|
||||
deps = [
|
||||
":optimization_ruby_grpc",
|
||||
":optimization_ruby_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
ruby_gapic_assembly_pkg(
|
||||
name = "google-cloud-optimization-v1-ruby",
|
||||
deps = [
|
||||
":optimization_ruby_gapic",
|
||||
":optimization_ruby_grpc",
|
||||
":optimization_ruby_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C#
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"csharp_gapic_assembly_pkg",
|
||||
"csharp_gapic_library",
|
||||
"csharp_grpc_library",
|
||||
"csharp_proto_library",
|
||||
)
|
||||
|
||||
csharp_proto_library(
|
||||
name = "optimization_csharp_proto",
|
||||
deps = [":optimization_proto"],
|
||||
)
|
||||
|
||||
csharp_grpc_library(
|
||||
name = "optimization_csharp_grpc",
|
||||
srcs = [":optimization_proto"],
|
||||
deps = [":optimization_csharp_proto"],
|
||||
)
|
||||
|
||||
csharp_gapic_library(
|
||||
name = "optimization_csharp_gapic",
|
||||
srcs = [":optimization_proto_with_info"],
|
||||
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
|
||||
grpc_service_config = "cloudoptimization_v1_grpc_service_config.json",
|
||||
rest_numeric_enums = True,
|
||||
service_yaml = "cloudoptimization_v1.yaml",
|
||||
deps = [
|
||||
":optimization_csharp_grpc",
|
||||
":optimization_csharp_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
csharp_gapic_assembly_pkg(
|
||||
name = "google-cloud-optimization-v1-csharp",
|
||||
deps = [
|
||||
":optimization_csharp_gapic",
|
||||
":optimization_csharp_grpc",
|
||||
":optimization_csharp_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C++
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"cc_grpc_library",
|
||||
"cc_proto_library",
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "optimization_cc_proto",
|
||||
deps = [":optimization_proto"],
|
||||
)
|
||||
|
||||
cc_grpc_library(
|
||||
name = "optimization_cc_grpc",
|
||||
srcs = [":optimization_proto"],
|
||||
grpc_only = True,
|
||||
deps = [":optimization_cc_proto"],
|
||||
)
|
||||
110
google/cloud/optimization/v1/async_model.proto
Normal file
110
google/cloud/optimization/v1/async_model.proto
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
// Copyright 2022 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.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.optimization.v1;
|
||||
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/optimization/v1;optimization";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "AsyncModelProto";
|
||||
option java_package = "com.google.cloud.optimization.v1";
|
||||
|
||||
// The desired input location information.
|
||||
message InputConfig {
|
||||
// The location of the input model in cloud storage.
|
||||
// Required.
|
||||
oneof source {
|
||||
// The Google Cloud Storage location to read the input from. This must be a
|
||||
// single file.
|
||||
GcsSource gcs_source = 1;
|
||||
}
|
||||
|
||||
// The input data format that used to store the model in Cloud Storage.
|
||||
DataFormat data_format = 2;
|
||||
}
|
||||
|
||||
// The desired output location.
|
||||
message OutputConfig {
|
||||
// The location of the output result in cloud storage.
|
||||
// Required.
|
||||
oneof destination {
|
||||
// The Google Cloud Storage location to write the output to.
|
||||
GcsDestination gcs_destination = 1;
|
||||
}
|
||||
|
||||
// The output data format that used to store the results in Cloud Storage.
|
||||
DataFormat data_format = 2;
|
||||
}
|
||||
|
||||
// The Google Cloud Storage location where the input file will be read from.
|
||||
message GcsSource {
|
||||
// Required. URI of the Google Cloud Storage location.
|
||||
string uri = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// The Google Cloud Storage location where the output file will be written to.
|
||||
message GcsDestination {
|
||||
// Required. URI of the Google Cloud Storage location.
|
||||
string uri = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// The long running operation metadata for async model related methods.
|
||||
message AsyncModelMetadata {
|
||||
// Possible states of the operation.
|
||||
enum State {
|
||||
// The default value. This value is used if the state is omitted.
|
||||
STATE_UNSPECIFIED = 0;
|
||||
|
||||
// Request is being processed.
|
||||
RUNNING = 1;
|
||||
|
||||
// The operation completed successfully.
|
||||
SUCCEEDED = 2;
|
||||
|
||||
// The operation was cancelled.
|
||||
CANCELLED = 3;
|
||||
|
||||
// The operation has failed.
|
||||
FAILED = 4;
|
||||
}
|
||||
|
||||
// The state of the current operation.
|
||||
State state = 1;
|
||||
|
||||
// A message providing more details about the current state of the operation.
|
||||
// For example, the error message if the operation is failed.
|
||||
string state_message = 2;
|
||||
|
||||
// The creation time of the operation.
|
||||
google.protobuf.Timestamp create_time = 3;
|
||||
|
||||
// The last update time of the operation.
|
||||
google.protobuf.Timestamp update_time = 4;
|
||||
}
|
||||
|
||||
// Data formats for input and output files.
|
||||
enum DataFormat {
|
||||
// Default value.
|
||||
DATA_FORMAT_UNSPECIFIED = 0;
|
||||
|
||||
// Input data in json format.
|
||||
JSON = 1;
|
||||
|
||||
// Input data in string format.
|
||||
STRING = 2;
|
||||
}
|
||||
11
google/cloud/optimization/v1/cloudoptimization_gapic.yaml
Normal file
11
google/cloud/optimization/v1/cloudoptimization_gapic.yaml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
type: com.google.api.codegen.ConfigProto
|
||||
config_schema_version: 2.0.0
|
||||
interfaces:
|
||||
- name: google.cloud.optimization.v1.FleetRouting
|
||||
methods:
|
||||
- name: BatchOptimizeTours
|
||||
long_running:
|
||||
initial_poll_delay_millis: 30000 # 30 seconds.
|
||||
poll_delay_multiplier: 1.5
|
||||
max_poll_delay_millis: 120000 # 2 minutes.
|
||||
total_poll_timeout_millis: 3600000 # 60 minutes.
|
||||
40
google/cloud/optimization/v1/cloudoptimization_v1.yaml
Normal file
40
google/cloud/optimization/v1/cloudoptimization_v1.yaml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
type: google.api.Service
|
||||
config_version: 3
|
||||
name: cloudoptimization.googleapis.com
|
||||
title: Cloud Optimization API
|
||||
|
||||
apis:
|
||||
- name: google.cloud.optimization.v1.FleetRouting
|
||||
- name: google.longrunning.Operations
|
||||
|
||||
types:
|
||||
- name: google.cloud.optimization.v1.AsyncModelMetadata
|
||||
- name: google.cloud.optimization.v1.BatchOptimizeToursResponse
|
||||
|
||||
documentation:
|
||||
summary: |-
|
||||
Cloud Optimization API provides a portfolio of solvers to address common
|
||||
optimization use cases starting with optimal route planning for vehicle
|
||||
fleets.
|
||||
|
||||
http:
|
||||
rules:
|
||||
- selector: google.longrunning.Operations.GetOperation
|
||||
get: '/v1/{name=projects/*/operations/*}'
|
||||
additional_bindings:
|
||||
- get: '/v1/{name=projects/*/locations/*/operations/*}'
|
||||
|
||||
authentication:
|
||||
rules:
|
||||
- selector: google.cloud.optimization.v1.FleetRouting.BatchOptimizeTours
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.cloud.optimization.v1.FleetRouting.OptimizeTours
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.longrunning.Operations.GetOperation
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"methodConfig": [{
|
||||
"name": [
|
||||
{ "service": "google.cloud.optimization.v1.FleetRouting", "method": "OptimizeTours" }
|
||||
],
|
||||
"timeout": "3600s",
|
||||
"retryPolicy": {
|
||||
"maxAttempts": 5,
|
||||
"initialBackoff": "1s",
|
||||
"maxBackoff": "10s",
|
||||
"backoffMultiplier": 1.3,
|
||||
"retryableStatusCodes": ["UNAVAILABLE"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{ "service": "google.cloud.optimization.v1.FleetRouting", "method": "BatchOptimizeTours" }
|
||||
],
|
||||
"timeout": "60s",
|
||||
"retryPolicy": {
|
||||
"maxAttempts": 5,
|
||||
"initialBackoff": "1s",
|
||||
"maxBackoff": "10s",
|
||||
"backoffMultiplier": 1.3,
|
||||
"retryableStatusCodes": ["UNAVAILABLE"]
|
||||
}
|
||||
}]
|
||||
}
|
||||
2839
google/cloud/optimization/v1/fleet_routing.proto
Normal file
2839
google/cloud/optimization/v1/fleet_routing.proto
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue