Adds gapic.yaml file and BUILD.bazel file.

PiperOrigin-RevId: 300554200
This commit is contained in:
Google APIs 2020-03-12 08:34:06 -07:00 committed by Copybara-Service
parent 836c196dc8
commit 83518e1865
3 changed files with 500 additions and 0 deletions

View File

@ -0,0 +1,375 @@
# This file was automatically generated by BuildFileGenerator
# 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 = "asset_proto",
srcs = [
"asset_service.proto",
"assets.proto",
],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/iam/v1:policy_proto",
"//google/longrunning:operations_proto",
"//google/rpc:code_proto",
"@com_google_protobuf//:duration_proto",
],
)
proto_library_with_info(
name = "asset_proto_with_info",
deps = [
":asset_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 = "asset_java_proto",
deps = [":asset_proto"],
)
java_grpc_library(
name = "asset_java_grpc",
srcs = [":asset_proto"],
deps = [":asset_java_proto"],
)
java_gapic_library(
name = "asset_java_gapic",
src = ":asset_proto_with_info",
gapic_yaml = "cloudasset_gapic.yaml",
package = "google.cloud.asset.v1p4beta1",
service_yaml = "cloudasset_v1p4beta1.yaml",
test_deps = [
":asset_java_grpc",
"//google/iam/v1:iam_java_grpc",
],
deps = [
":asset_java_proto",
"//google/iam/v1:iam_java_proto",
],
)
java_gapic_test(
name = "asset_java_gapic_test_suite",
test_classes = [
"com.google.cloud.asset.v1p4beta1.AssetServiceClientTest",
],
runtime_deps = [":asset_java_gapic_test"],
)
# Open Source Packages
java_gapic_assembly_gradle_pkg(
name = "google-cloud-asset-v1p4beta1-java",
deps = [
":asset_java_gapic",
":asset_java_grpc",
":asset_java_proto",
":asset_proto",
],
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
"go_gapic_library",
"go_proto_library",
"go_test",
)
go_proto_library(
name = "asset_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "google.golang.org/genproto/googleapis/cloud/asset/v1p4beta1",
protos = [":asset_proto"],
deps = [
"//google/api:annotations_go_proto",
"//google/iam/v1:iam_go_proto",
"//google/longrunning:longrunning_go_proto",
"//google/rpc:code_go_proto",
],
)
go_gapic_library(
name = "asset_go_gapic",
src = ":asset_proto_with_info",
gapic_yaml = "cloudasset_gapic.yaml",
importpath = "cloud.google.com/go/asset/apiv1p4beta1",
package = "google.cloud.asset.v1p4beta1",
service_yaml = "cloudasset_v1p4beta1.yaml",
deps = [
":asset_go_proto",
"//google/iam/v1:iam_go_proto",
"//google/longrunning:longrunning_go_gapic",
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go//longrunning:go_default_library",
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
],
)
go_test(
name = "asset_go_gapic_test",
srcs = [":asset_go_gapic_srcjar_test"],
embed = [":asset_go_gapic"],
importpath = "cloud.google.com/go/asset/apiv1p4beta1",
)
# Open Source Packages
go_gapic_assembly_pkg(
name = "gapi-cloud-asset-v1p4beta1-go",
deps = [
":asset_go_gapic",
":asset_go_gapic_srcjar-smoke-test.srcjar",
":asset_go_gapic_srcjar-test.srcjar",
":asset_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_gapic_assembly_pkg",
"py_gapic_library",
"py_grpc_library",
"py_proto_library",
)
moved_proto_library(
name = "asset_moved_proto",
srcs = [":asset_proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/iam/v1:policy_proto",
"//google/longrunning:operations_proto",
"//google/rpc:code_proto",
"@com_google_protobuf//:duration_proto",
],
)
py_proto_library(
name = "asset_py_proto",
plugin = "@protoc_docs_plugin//:docs_plugin",
deps = [":asset_moved_proto"],
)
py_grpc_library(
name = "asset_py_grpc",
srcs = [":asset_moved_proto"],
deps = [":asset_py_proto"],
)
py_gapic_library(
name = "asset_py_gapic",
src = ":asset_proto_with_info",
gapic_yaml = "cloudasset_gapic.yaml",
package = "google.cloud.asset.v1p4beta1",
service_yaml = "cloudasset_v1p4beta1.yaml",
deps = [
":asset_py_grpc",
":asset_py_proto",
],
)
# Open Source Packages
py_gapic_assembly_pkg(
name = "asset-v1p4beta1-py",
deps = [
":asset_py_gapic",
":asset_py_grpc",
":asset_py_proto",
],
)
##############################################################################
# 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 = "asset_php_proto",
deps = [":asset_proto"],
)
php_grpc_library(
name = "asset_php_grpc",
srcs = [":asset_proto"],
deps = [":asset_php_proto"],
)
php_gapic_library(
name = "asset_php_gapic",
src = ":asset_proto_with_info",
gapic_yaml = "cloudasset_gapic.yaml",
package = "google.cloud.asset.v1p4beta1",
service_yaml = "cloudasset_v1p4beta1.yaml",
deps = [
":asset_php_grpc",
":asset_php_proto",
],
)
# Open Source Packages
php_gapic_assembly_pkg(
name = "google-cloud-asset-v1p4beta1-php",
deps = [
":asset_php_gapic",
":asset_php_grpc",
":asset_php_proto",
],
)
##############################################################################
# Node.js
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
"nodejs_gapic_library",
)
nodejs_gapic_library(
name = "asset_nodejs_gapic",
src = ":asset_proto_with_info",
gapic_yaml = "cloudasset_gapic.yaml",
package = "google.cloud.asset.v1p4beta1",
service_yaml = "cloudasset_v1p4beta1.yaml",
deps = [],
)
nodejs_gapic_assembly_pkg(
name = "asset-v1p4beta1-nodejs",
deps = [
":asset_nodejs_gapic",
":asset_proto",
],
)
##############################################################################
# Ruby
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_gapic_assembly_pkg",
"ruby_gapic_library",
"ruby_grpc_library",
"ruby_proto_library",
)
ruby_proto_library(
name = "asset_ruby_proto",
deps = [":asset_proto"],
)
ruby_grpc_library(
name = "asset_ruby_grpc",
srcs = [":asset_proto"],
deps = [":asset_ruby_proto"],
)
ruby_gapic_library(
name = "asset_ruby_gapic",
src = ":asset_proto_with_info",
gapic_yaml = "cloudasset_gapic.yaml",
package = "google.cloud.asset.v1p4beta1",
service_yaml = "cloudasset_v1p4beta1.yaml",
deps = [
":asset_ruby_grpc",
":asset_ruby_proto",
],
)
# Open Source Packages
ruby_gapic_assembly_pkg(
name = "google-cloud-asset-v1p4beta1-ruby",
deps = [
":asset_ruby_gapic",
":asset_ruby_grpc",
":asset_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 = "asset_csharp_proto",
deps = [":asset_proto"],
)
csharp_grpc_library(
name = "asset_csharp_grpc",
srcs = [":asset_proto"],
deps = [":asset_csharp_proto"],
)
csharp_gapic_library(
name = "asset_csharp_gapic",
src = ":asset_proto_with_info",
gapic_yaml = "cloudasset_gapic.yaml",
package = "google.cloud.asset.v1p4beta1",
service_yaml = "cloudasset_v1p4beta1.yaml",
deps = [
":asset_csharp_grpc",
":asset_csharp_proto",
],
)
# Open Source Packages
csharp_gapic_assembly_pkg(
name = "google-cloud-asset-v1p4beta1-csharp",
deps = [
":asset_csharp_gapic",
":asset_csharp_grpc",
":asset_csharp_proto",
],
)
##############################################################################
# C++
##############################################################################
# Put your C++ rules here

View File

@ -333,3 +333,11 @@ message ExportIamPolicyAnalysisRequest {
// Required. Output configuration indicating where the results will be output to.
IamPolicyAnalysisOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED];
}
// The export IAM policy analysis response. This message is returned by the
// [google.longrunning.Operations.GetOperation][] method in the returned
// [google.longrunning.Operation.response][] field.
message ExportIamPolicyAnalysisResponse {
// Output configuration indicating where the results were output to.
IamPolicyAnalysisOutputConfig output_config = 1;
}

View File

@ -0,0 +1,117 @@
type: com.google.api.codegen.ConfigProto
config_schema_version: 1.0.0
# The settings of generated code in a specific language.
language_settings:
java:
package_name: com.google.cloud.asset.v1p4beta1
python:
package_name: google.cloud.asset_v1p4beta1.gapic
go:
package_name: cloud.google.com/go/asset/apiv1p4beta1
csharp:
package_name: Google.Cloud.Asset.V1p2beta1
ruby:
package_name: Google::Cloud::Asset::V1p2beta1
php:
package_name: Google\Cloud\Asset\V1p2beta1
nodejs:
package_name: asset.v1p4beta1
# A list of API interface configurations.
interfaces:
# The fully qualified name of the API interface.
- name: google.cloud.asset.v1p4beta1.AssetService
# A list of resource collection configurations.
# Consists of a name_pattern and an entity_name.
# The name_pattern is a pattern to describe the names of the resources of this
# collection, using the platform's conventions for URI patterns. A generator
# may use this to generate methods to compose and decompose such names. The
# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
# those will be taken as hints for the parameter names of the generated
# methods. If empty, no name methods are generated.
# The entity_name is the name to be used as a basis for generated methods and
# classes.
collections: []
# Definition for retryable codes.
retry_codes_def:
- name: idempotent
retry_codes:
- DEADLINE_EXCEEDED
- UNAVAILABLE
- name: non_idempotent
retry_codes: []
# Definition for retry/backoff parameters.
retry_params_def:
- name: default
initial_retry_delay_millis: 100
retry_delay_multiplier: 1.3
max_retry_delay_millis: 60000
initial_rpc_timeout_millis: 20000
rpc_timeout_multiplier: 1
max_rpc_timeout_millis: 20000
total_timeout_millis: 600000
# A list of method configurations.
# Common properties:
#
# name - The simple name of the method.
#
# flattening - Specifies the configuration for parameter flattening.
# Describes the parameter groups for which a generator should produce method
# overloads which allow a client to directly pass request message fields as
# method parameters. This information may or may not be used, depending on
# the target language.
# Consists of groups, which each represent a list of parameters to be
# flattened. Each parameter listed must be a field of the request message.
#
# required_fields - Fields that are always required for a request to be
# valid.
#
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a paging
# list RPC into a stream of resources.
# Consists of a request and a response.
# The request specifies request information of the list method. It defines
# which fields match the paging pattern in the request. The request consists
# of a page_size_field and a token_field. The page_size_field is the name of
# the optional field specifying the maximum number of elements to be
# returned in the response. The token_field is the name of the field in the
# request containing the page token.
# The response specifies response information of the list method. It defines
# which fields match the paging pattern in the response. The response
# consists of a token_field and a resources_field. The token_field is the
# name of the field in the response containing the next page token. The
# resources_field is the name of the field in the response containing the
# list of resources belonging to the page.
#
# retry_codes_name - Specifies the configuration for retryable codes. The
# name must be defined in interfaces.retry_codes_def.
#
# retry_params_name - Specifies the configuration for retry/backoff
# parameters. The name must be defined in interfaces.retry_params_def.
#
# field_name_patterns - Maps the field name of the request type to
# entity_name of interfaces.collections.
# Specifies the string pattern that the field must follow.
#
# timeout_millis - Specifies the default timeout for a non-retrying call. If
# the call is retrying, refer to retry_params_name instead.
methods:
- name: AnalyzeIamPolicy
required_fields:
- analysis_query
retry_codes_name: idempotent
retry_params_name: default
timeout_millis: 300000
- name: ExportIamPolicyAnalysis
required_fields:
- analysis_query
- output_config
retry_codes_name: non_idempotent
retry_params_name: default
long_running:
return_type: google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse
metadata_type: google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
total_poll_timeout_millis: 300000
timeout_millis: 300000