Synchronize new proto/yaml changes.

PiperOrigin-RevId: 273381131
This commit is contained in:
Google APIs 2019-10-07 14:47:59 -07:00 committed by Copybara-Service
parent 23c0700472
commit 122bdbf877
4 changed files with 549 additions and 0 deletions

View File

@ -0,0 +1,34 @@
common:
api_name: bigqueryconnection
api_version: v1beta1
organization_name: google-cloud
proto_deps:
- name: google-common-protos
src_proto_paths:
- .
service_yaml: bigqueryconnection_v1beta1.yaml
gapic_yaml: bigqueryconnection_gapic.yaml
artifacts:
- name: gapic_config
type: GAPIC_CONFIG
- name: java_gapic
type: GAPIC
language: JAVA
- name: python_gapic
type: GAPIC
language: PYTHON
- name: nodejs_gapic
type: GAPIC
language: NODEJS
- name: php_gapic
type: GAPIC
language: PHP
- name: go_gapic
type: GAPIC
language: GO
- name: ruby_gapic
type: GAPIC
language: RUBY
- name: csharp_gapic
type: GAPIC
language: CSHARP

View File

@ -0,0 +1,235 @@
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.bigquery.connection.v1beta1
python:
package_name: google.cloud.bigquery.connection_v1beta1.gapic
go:
package_name: cloud.google.com/go/bigquery/connection/apiv1beta1
csharp:
package_name: Google.Cloud.Bigquery.Connection.V1beta1
ruby:
package_name: Google::Cloud::Bigquery::Connection::V1beta1
php:
package_name: Google\Cloud\Bigquery\Connection\V1beta1
nodejs:
package_name: connection.v1beta1
# A list of API interface configurations.
interfaces:
# The fully qualified name of the API interface.
- name: google.cloud.bigquery.connection.v1beta1.ConnectionService
# 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:
- name_pattern: projects/{project}/locations/{location}
entity_name: location
- name_pattern: projects/{project}/locations/{location}/connections/{connection}
entity_name: connection
- name_pattern: projects/{project}/locations/{location}/connections/{connection}/credential
entity_name: connection_credential
# 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: CreateConnection
flattening:
groups:
- parameters:
- parent
- connection_id
- connection
required_fields:
- parent
- connection_id
- connection
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
parent: location
timeout_millis: 60000
- name: GetConnection
flattening:
groups:
- parameters:
- name
required_fields:
- name
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
name: connection
timeout_millis: 60000
- name: ListConnections
flattening:
groups:
- parameters:
- parent
- max_results
required_fields:
- parent
- max_results
page_streaming:
request:
token_field: page_token
response:
token_field: next_page_token
resources_field: connections
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
parent: location
timeout_millis: 60000
- name: UpdateConnection
flattening:
groups:
- parameters:
- name
- connection
- update_mask
required_fields:
- name
- connection
- update_mask
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
name: connection
timeout_millis: 60000
- name: UpdateConnectionCredential
flattening:
groups:
- parameters:
- name
- credential
required_fields:
- name
- credential
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
name: connection_credential
timeout_millis: 60000
- name: DeleteConnection
flattening:
groups:
- parameters:
- name
required_fields:
- name
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
name: connection
timeout_millis: 60000
- name: GetIamPolicy
flattening:
groups:
- parameters:
- resource
- options
required_fields:
- resource
- options
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
resource: connection
timeout_millis: 60000
- name: SetIamPolicy
flattening:
groups:
- parameters:
- resource
- policy
required_fields:
- resource
- policy
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
resource: connection
timeout_millis: 60000
- name: TestIamPermissions
flattening:
groups:
- parameters:
- resource
- permissions
required_fields:
- resource
- permissions
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
resource: connection
timeout_millis: 60000

View File

@ -0,0 +1,18 @@
type: google.api.Service
config_version: 3
name: bigqueryconnection.googleapis.com
title: BigQuery Connection API
apis:
- name: google.cloud.bigquery.connection.v1beta1.ConnectionService
documentation:
summary: Allows users to manage BigQuery connections to external data sources.
authentication:
rules:
- selector: 'google.cloud.bigquery.connection.v1beta1.ConnectionService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/bigquery,
https://www.googleapis.com/auth/cloud-platform

View File

@ -0,0 +1,262 @@
// Copyright 2019 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.bigquery.connection.v1beta1;
import "google/api/annotations.proto";
import "google/iam/v1/iam_policy.proto";
import "google/iam/v1/policy.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/wrappers.proto";
import "google/api/client.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/connection/v1beta1;connection";
option java_outer_classname = "ConnectionProto";
option java_package = "com.google.cloud.bigquery.connection.v1beta1";
// Manages external data source connections and credentials.
service ConnectionService {
option (google.api.default_host) = "bigqueryconnection.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/bigquery,"
"https://www.googleapis.com/auth/cloud-platform";
// Creates a new connection.
rpc CreateConnection(CreateConnectionRequest) returns (Connection) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/connections"
body: "connection"
};
}
// Returns specified connection.
rpc GetConnection(GetConnectionRequest) returns (Connection) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/connections/*}"
};
}
// Returns a list of connections in the given project.
rpc ListConnections(ListConnectionsRequest) returns (ListConnectionsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*}/connections"
};
}
// Updates the specified connection. For security reasons, also resets
// credential if connection properties are in the update field mask.
rpc UpdateConnection(UpdateConnectionRequest) returns (Connection) {
option (google.api.http) = {
patch: "/v1beta1/{name=projects/*/locations/*/connections/*}"
body: "connection"
};
}
// Sets the credential for the specified connection.
rpc UpdateConnectionCredential(UpdateConnectionCredentialRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
patch: "/v1beta1/{name=projects/*/locations/*/connections/*/credential}"
body: "credential"
};
}
// Deletes connection and associated credential.
rpc DeleteConnection(DeleteConnectionRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/connections/*}"
};
}
// Gets the access control policy for a resource.
// Returns an empty policy if the resource exists and does not have a policy
// set.
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v1beta1/{resource=projects/*/locations/*/connections/*}:getIamPolicy"
body: "*"
};
}
// Sets the access control policy on the specified resource. Replaces any
// existing policy.
//
// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v1beta1/{resource=projects/*/locations/*/connections/*}:setIamPolicy"
body: "*"
};
}
// Returns permissions that a caller has on the specified resource.
// If the resource does not exist, this will return an empty set of
// permissions, not a NOT_FOUND error.
//
// Note: This operation is designed to be used for building permission-aware
// UIs and command-line tools, not for authorization checking. This operation
// may "fail open" without warning.
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
option (google.api.http) = {
post: "/v1beta1/{resource=projects/*/locations/*/connections/*}:testIamPermissions"
body: "*"
};
}
}
// The request for [ConnectionService.CreateConnection][google.cloud.bigquery.connection.v1beta1.ConnectionService.CreateConnection].
message CreateConnectionRequest {
// Parent resource name.
// Must be in the format `projects/{project_id}/locations/{location_id}`
string parent = 1;
// Optional connection id that should be assigned to the created connection.
string connection_id = 2;
// Connection to create.
Connection connection = 3;
}
// The request for [ConnectionService.GetConnection][google.cloud.bigquery.connection.v1beta1.ConnectionService.GetConnection].
message GetConnectionRequest {
// Name of the requested connection, for example:
// `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
string name = 1;
}
// The request for [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1beta1.ConnectionService.ListConnections].
message ListConnectionsRequest {
// Parent resource name.
// Must be in the form: `projects/{project_id}/locations/{location_id}`
string parent = 1;
// Maximum number of results per page.
google.protobuf.UInt32Value max_results = 2;
// Page token.
string page_token = 3;
}
// The response for [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1beta1.ConnectionService.ListConnections].
message ListConnectionsResponse {
// Next page token.
string next_page_token = 1;
// List of connections.
repeated Connection connections = 2;
}
// The request for [ConnectionService.UpdateConnection][google.cloud.bigquery.connection.v1beta1.ConnectionService.UpdateConnection].
message UpdateConnectionRequest {
// Name of the connection to update, for example:
// `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
string name = 1;
// Connection containing the updated fields.
Connection connection = 2;
// Update mask for the connection fields to be updated.
google.protobuf.FieldMask update_mask = 3;
}
// The request for [ConnectionService.UpdateConnectionCredential][google.cloud.bigquery.connection.v1beta1.ConnectionService.UpdateConnectionCredential].
message UpdateConnectionCredentialRequest {
// Name of the connection, for example:
// `projects/{project_id}/locations/{location_id}/connections/{connection_id}/credential`
string name = 1;
// Credential to use with the connection.
ConnectionCredential credential = 2;
}
// The request for [ConnectionService.DeleteConnectionRequest][].
message DeleteConnectionRequest {
// Name of the deleted connection, for example:
// `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
string name = 1;
}
// Configuration parameters to establish connection with an external data
// source, except the credential attributes.
message Connection {
// The resource name of the connection in the form of:
// `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
string name = 1;
// User provided display name for the connection.
string friendly_name = 2;
// User provided description.
string description = 3;
// Properties specific to the underlying data source.
oneof properties {
// Cloud SQL properties.
CloudSqlProperties cloud_sql = 4;
}
// Output only. The creation timestamp of the connection.
int64 creation_time = 5;
// Output only. The last update timestamp of the connection.
int64 last_modified_time = 6;
// Output only. True, if credential is configured for this connection.
bool has_credential = 7;
}
// Credential to use with a connection.
message ConnectionCredential {
// Credential specific to the underlying data source.
oneof credential {
// Credential for Cloud SQL database.
CloudSqlCredential cloud_sql = 1;
}
}
// Connection properties specific to the Cloud SQL.
message CloudSqlProperties {
// Supported Cloud SQL database types.
enum DatabaseType {
// Unspecified database type.
DATABASE_TYPE_UNSPECIFIED = 0;
// Cloud SQL for PostgreSQL.
POSTGRES = 1;
// Cloud SQL for MySQL.
MYSQL = 2;
}
// Cloud SQL instance ID in the form `project:location:instance`.
string instance_id = 1;
// Database name.
string database = 2;
// Type of the Cloud SQL database.
DatabaseType type = 3;
}
// Credential info for the Cloud SQL.
message CloudSqlCredential {
// The username for the credential.
string username = 1;
// The password for the credential.
string password = 2;
}