From b76d248bc38cead1de49f6c74025f428639e0597 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Sun, 24 Nov 2019 00:37:35 +0000 Subject: [PATCH] Autogenerated update (2019-11-24) Update: - logging_v2 - spanner_v1 --- generated/google/apis/logging_v2.rb | 2 +- generated/google/apis/logging_v2/classes.rb | 15 + .../google/apis/logging_v2/representations.rb | 2 + generated/google/apis/spanner_v1.rb | 2 +- generated/google/apis/spanner_v1/service.rb | 270 ++++++++++++++++++ 5 files changed, 289 insertions(+), 2 deletions(-) diff --git a/generated/google/apis/logging_v2.rb b/generated/google/apis/logging_v2.rb index a09d4b113..6885546f9 100644 --- a/generated/google/apis/logging_v2.rb +++ b/generated/google/apis/logging_v2.rb @@ -28,7 +28,7 @@ module Google # @see https://cloud.google.com/logging/docs/ module LoggingV2 VERSION = 'V2' - REVISION = '20191107' + REVISION = '20191115' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/logging_v2/classes.rb b/generated/google/apis/logging_v2/classes.rb index b36821cb2..e1ab88f74 100644 --- a/generated/google/apis/logging_v2/classes.rb +++ b/generated/google/apis/logging_v2/classes.rb @@ -1120,6 +1120,12 @@ module Google # @return [String] attr_accessor :create_time + # Optional. A description of this sink. The maximum length of the description is + # 8000 characters. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + # Required. The export destination: # "storage.googleapis.com/[GCS_BUCKET]" # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" @@ -1131,6 +1137,13 @@ module Google # @return [String] attr_accessor :destination + # Optional. If set to True, then this sink is disabled and it does not export + # any log entries. + # Corresponds to the JSON property `disabled` + # @return [Boolean] + attr_accessor :disabled + alias_method :disabled?, :disabled + # Do not use. This field is ignored. # Corresponds to the JSON property `endTime` # @return [String] @@ -1207,7 +1220,9 @@ module Google def update!(**args) @bigquery_options = args[:bigquery_options] if args.key?(:bigquery_options) @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) @destination = args[:destination] if args.key?(:destination) + @disabled = args[:disabled] if args.key?(:disabled) @end_time = args[:end_time] if args.key?(:end_time) @filter = args[:filter] if args.key?(:filter) @include_children = args[:include_children] if args.key?(:include_children) diff --git a/generated/google/apis/logging_v2/representations.rb b/generated/google/apis/logging_v2/representations.rb index 4988b30a1..96d82f570 100644 --- a/generated/google/apis/logging_v2/representations.rb +++ b/generated/google/apis/logging_v2/representations.rb @@ -453,7 +453,9 @@ module Google property :bigquery_options, as: 'bigqueryOptions', class: Google::Apis::LoggingV2::BigQueryOptions, decorator: Google::Apis::LoggingV2::BigQueryOptions::Representation property :create_time, as: 'createTime' + property :description, as: 'description' property :destination, as: 'destination' + property :disabled, as: 'disabled' property :end_time, as: 'endTime' property :filter, as: 'filter' property :include_children, as: 'includeChildren' diff --git a/generated/google/apis/spanner_v1.rb b/generated/google/apis/spanner_v1.rb index 66f4e7657..3a884d8aa 100644 --- a/generated/google/apis/spanner_v1.rb +++ b/generated/google/apis/spanner_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/spanner/ module SpannerV1 VERSION = 'V1' - REVISION = '20191107' + REVISION = '20191119' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/spanner_v1/service.rb b/generated/google/apis/spanner_v1/service.rb index ef53e7efe..199468c34 100644 --- a/generated/google/apis/spanner_v1/service.rb +++ b/generated/google/apis/spanner_v1/service.rb @@ -491,6 +491,276 @@ module Google execute_or_queue_command(command, &block) end + # Gets the access control policy for a database resource. + # Returns an empty policy if a database exists but does + # not have a policy set. + # Authorization requires `spanner.databases.getIamPolicy` permission on + # resource. + # @param [String] resource + # REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. + # The format is `projects//instances/` for instance + # resources and `projects//instances//databases/< + # database ID>` for database resources. + # @param [Google::Apis::SpannerV1::GetIamPolicyRequest] get_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_backup_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::SpannerV1::Policy::Representation + command.response_class = Google::Apis::SpannerV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on a database resource. + # Replaces any existing policy. + # Authorization requires `spanner.databases.setIamPolicy` + # permission on resource. + # @param [String] resource + # REQUIRED: The Cloud Spanner resource for which the policy is being set. The + # format is `projects//instances/` for instance + # resources and `projects//instances//databases/< + # database ID>` for databases resources. + # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_backup_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::SpannerV1::Policy::Representation + command.response_class = Google::Apis::SpannerV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that the caller has on the specified database resource. + # Attempting this RPC on a non-existent Cloud Spanner database will + # result in a NOT_FOUND error if the user has + # `spanner.databases.list` permission on the containing Cloud + # Spanner instance. Otherwise returns an empty set of permissions. + # @param [String] resource + # REQUIRED: The Cloud Spanner resource for which permissions are being tested. + # The format is `projects//instances/` for instance + # resources and `projects//instances//databases/< + # database ID>` for database resources. + # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_backup_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:cancel', options) + command.response_representation = Google::Apis::SpannerV1::Empty::Representation + command.response_class = Google::Apis::SpannerV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # @param [String] name + # The name of the operation resource to be deleted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::SpannerV1::Empty::Representation + command.response_class = Google::Apis::SpannerV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::SpannerV1::Operation::Representation + command.response_class = Google::Apis::SpannerV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_instance_backup_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::SpannerV1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates a new Cloud Spanner database and starts to prepare it for serving. # The returned long-running operation will # have a name of the format `/operations/` and