Import refactored library. See MIGRATING.MD for details

This commit is contained in:
Steven Bazyl committed 2015-06-23 15:15:14 -07:00
1 parent 9b7809174d
commit f584a2cec8
373 files changed
+255715 -474

No files matched your search

@@ -0,0 +1,505 @@
# Copyright 2015 Google Inc.
#
# 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module LoggingV1beta3
# Result returned from ListLogs.
class ListLogsResponse
include Google::Apis::Core::Hashable
# A list of log resources.
# Corresponds to the JSON property `logs`
# @return [Array<Google::Apis::LoggingV1beta3::Log>]
attr_accessor :logs
# If there are more results, then `nextPageToken` is returned in the response.
# To get the next batch of logs, use the value of `nextPageToken` as `pageToken`
# in the next call of `ListLogs`. If `nextPageToken` is empty, then there are no
# more results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@logs = args[:logs] unless args[:logs].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# A log object.
class Log
include Google::Apis::Core::Hashable
# REQUIRED: The log's name name. Example: `"compute.googleapis.com/activity_log"`
# .
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Name used when displaying the log to the user (for example, in a UI). Example:
# `"activity_log"`
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Type URL describing the expected payload type for the log.
# Corresponds to the JSON property `payloadType`
# @return [String]
attr_accessor :payload_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] unless args[:name].nil?
@display_name = args[:display_name] unless args[:display_name].nil?
@payload_type = args[:payload_type] unless args[:payload_type].nil?
end
end
# A generic empty message that you can re-use to avoid defining duplicated empty
# messages in your APIs. A typical example is to use it as the request or the
# response type of an API method. For instance: service Foo ` rpc Bar(google.
# protobuf.Empty) returns (google.protobuf.Empty); `
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# The parameters to WriteLogEntries.
class WriteLogEntriesRequest
include Google::Apis::Core::Hashable
# Metadata labels that apply to all entries in this request. If one of the log
# entries contains a (key, value) with the same key that is in `commonLabels`,
# then the entry's (key, value) overrides the one in `commonLabels`.
# Corresponds to the JSON property `commonLabels`
# @return [Hash<String,String>]
attr_accessor :common_labels
# Log entries to insert.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::LoggingV1beta3::LogEntry>]
attr_accessor :entries
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@common_labels = args[:common_labels] unless args[:common_labels].nil?
@entries = args[:entries] unless args[:entries].nil?
end
end
# An individual entry in a log.
class LogEntry
include Google::Apis::Core::Hashable
# Additional data that is associated with a log entry, set by the service
# creating the log entry.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::LoggingV1beta3::LogEntryMetadata]
attr_accessor :metadata
# The log entry payload, represented as a protocol buffer that is expressed as a
# JSON object. You can only pass `protoPayload` values that belong to a set of
# approved types.
# Corresponds to the JSON property `protoPayload`
# @return [Hash<String,Object>]
attr_accessor :proto_payload
# The log entry payload, represented as a text string.
# Corresponds to the JSON property `textPayload`
# @return [String]
attr_accessor :text_payload
# The log entry payload, represented as a structure that is expressed as a JSON
# object.
# Corresponds to the JSON property `structPayload`
# @return [Hash<String,Object>]
attr_accessor :struct_payload
# A unique ID for the log entry. If you provide this field, the logging service
# considers other log entries in the same log with the same ID as duplicates
# which can be removed.
# Corresponds to the JSON property `insertId`
# @return [String]
attr_accessor :insert_id
# The log to which this entry belongs. When a log entry is ingested, the value
# of this field is set by the logging system.
# Corresponds to the JSON property `log`
# @return [String]
attr_accessor :log
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metadata = args[:metadata] unless args[:metadata].nil?
@proto_payload = args[:proto_payload] unless args[:proto_payload].nil?
@text_payload = args[:text_payload] unless args[:text_payload].nil?
@struct_payload = args[:struct_payload] unless args[:struct_payload].nil?
@insert_id = args[:insert_id] unless args[:insert_id].nil?
@log = args[:log] unless args[:log].nil?
end
end
# Additional data that is associated with a log entry, set by the service
# creating the log entry.
class LogEntryMetadata
include Google::Apis::Core::Hashable
# The time the event described by the log entry occurred. Timestamps must be
# later than January 1, 1970.
# Corresponds to the JSON property `timestamp`
# @return [String]
attr_accessor :timestamp
# The severity of the log entry.
# Corresponds to the JSON property `severity`
# @return [String]
attr_accessor :severity
# The project ID of the Google Cloud Platform service that created the log entry.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# The API name of the Google Cloud Platform service that created the log entry.
# For example, `"compute.googleapis.com"`.
# Corresponds to the JSON property `serviceName`
# @return [String]
attr_accessor :service_name
# The region name of the Google Cloud Platform service that created the log
# entry. For example, `"us-central1"`.
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
# The zone of the Google Cloud Platform service that created the log entry. For
# example, `"us-central1-a"`.
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
# The fully-qualified email address of the authenticated user that performed or
# requested the action represented by the log entry. If the log entry does not
# apply to an action taken by an authenticated user, then the field should be
# empty.
# Corresponds to the JSON property `userId`
# @return [String]
attr_accessor :user_id
# A set of (key, value) data that provides additional information about the log
# entry. If the log entry is from one of the Google Cloud Platform sources
# listed below, the indicated (key, value) information must be provided: Google
# App Engine, service_name `appengine.googleapis.com`: "appengine.googleapis.com/
# module_id", "appengine.googleapis.com/version_id", and one of: "appengine.
# googleapis.com/replica_index", "appengine.googleapis.com/clone_id", or else
# provide the following Compute Engine labels: Google Compute Engine,
# service_name `compute.googleapis.com`: "compute.googleapis.com/resource_type",
# "instance" "compute.googleapis.com/resource_id",
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@timestamp = args[:timestamp] unless args[:timestamp].nil?
@severity = args[:severity] unless args[:severity].nil?
@project_id = args[:project_id] unless args[:project_id].nil?
@service_name = args[:service_name] unless args[:service_name].nil?
@region = args[:region] unless args[:region].nil?
@zone = args[:zone] unless args[:zone].nil?
@user_id = args[:user_id] unless args[:user_id].nil?
@labels = args[:labels] unless args[:labels].nil?
end
end
# Result returned from WriteLogEntries. empty
class WriteLogEntriesResponse
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Result returned from `ListLogServicesRequest`.
class ListLogServicesResponse
include Google::Apis::Core::Hashable
# A list of log services.
# Corresponds to the JSON property `logServices`
# @return [Array<Google::Apis::LoggingV1beta3::LogService>]
attr_accessor :log_services
# If there are more results, then `nextPageToken` is returned in the response.
# To get the next batch of services, use the value of `nextPageToken` as `
# pageToken` in the next call of `ListLogServices`. If `nextPageToken` is empty,
# then there are no more results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@log_services = args[:log_services] unless args[:log_services].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# A log service object.
class LogService
include Google::Apis::Core::Hashable
# The service's name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Label keys used when labeling log entries for this service. The order of the
# keys is significant, with higher priority keys coming earlier in the list.
# Corresponds to the JSON property `indexKeys`
# @return [Array<String>]
attr_accessor :index_keys
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] unless args[:name].nil?
@index_keys = args[:index_keys] unless args[:index_keys].nil?
end
end
# Result returned from ListLogServiceIndexesRequest.
class ListLogServiceIndexesResponse
include Google::Apis::Core::Hashable
# A list of log service index prefixes.
# Corresponds to the JSON property `serviceIndexPrefixes`
# @return [Array<String>]
attr_accessor :service_index_prefixes
# If there are more results, then `nextPageToken` is returned in the response.
# To get the next batch of indexes, use the value of `nextPageToken` as `
# pageToken` in the next call of `ListLogServiceIndexess`. If `nextPageToken` is
# empty, then there are no more results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@service_index_prefixes = args[:service_index_prefixes] unless args[:service_index_prefixes].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# Result returned from `ListLogSinks`.
class ListLogSinksResponse
include Google::Apis::Core::Hashable
# The requested log sinks. If any of the returned `LogSink` objects have an
# empty `destination` field, then call `logServices.sinks.get` to retrieve the
# complete `LogSink` object.
# Corresponds to the JSON property `sinks`
# @return [Array<Google::Apis::LoggingV1beta3::LogSink>]
attr_accessor :sinks
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@sinks = args[:sinks] unless args[:sinks].nil?
end
end
# An object that describes where a log may be written.
class LogSink
include Google::Apis::Core::Hashable
# The name of this sink. This is a client-assigned identifier for the resource.
# This is ignored by UpdateLogSink and UpdateLogServicesSink.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The resource to send log entries to. The supported sink resource types are: +
# Google Cloud Storage: `storage.googleapis.com/BUCKET` or `BUCKET.storage.
# googleapis.com/` + Google BigQuery: `bigquery.googleapis.com/projects/PROJECT/
# datasets/DATASET` Currently the Cloud Logging API supports at most one sink
# for each resource type per log or log service resource.
# Corresponds to the JSON property `destination`
# @return [String]
attr_accessor :destination
# _Output only._ All active errors found for this sink.
# Corresponds to the JSON property `errors`
# @return [Array<Google::Apis::LoggingV1beta3::LogError>]
attr_accessor :errors
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] unless args[:name].nil?
@destination = args[:destination] unless args[:destination].nil?
@errors = args[:errors] unless args[:errors].nil?
end
end
# A problem in a sink or the sink's configuration.
class LogError
include Google::Apis::Core::Hashable
# The resource associated with the error. It may be different from the sink
# destination. For example, the sink may point to a BigQuery dataset, but the
# error may refer to a table resource inside the dataset.
# Corresponds to the JSON property `resource`
# @return [String]
attr_accessor :resource
# Represents the RPC error status for Google APIs. See http://go/errormodel for
# details.
# Corresponds to the JSON property `status`
# @return [Google::Apis::LoggingV1beta3::Status]
attr_accessor :status
# The last time the error was observed, in nanoseconds since the Unix epoch.
# Corresponds to the JSON property `timeNanos`
# @return [String]
attr_accessor :time_nanos
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resource = args[:resource] unless args[:resource].nil?
@status = args[:status] unless args[:status].nil?
@time_nanos = args[:time_nanos] unless args[:time_nanos].nil?
end
end
# Represents the RPC error status for Google APIs. See http://go/errormodel for
# details.
class Status
include Google::Apis::Core::Hashable
# The status code, which should be an enum value of [google.rpc.Code][].
# Corresponds to the JSON property `code`
# @return [Fixnum]
attr_accessor :code
# A developer-facing error message, which should be in English. The user-facing
# error message should be localized and stored in the [google.rpc.Status.details]
# [google.rpc.Status.details] field.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
# A list of messages that carry the error details. There will be a common set of
# message types for APIs to use.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@message = args[:message] unless args[:message].nil?
@details = args[:details] unless args[:details].nil?
end
end
# Result returned from `ListLogServiceSinks`.
class ListLogServiceSinksResponse
include Google::Apis::Core::Hashable
# The requested log service sinks. If any of the returned `LogSink` objects have
# an empty `destination` field, then call `logServices.sinks.get` to retrieve
# the complete `LogSink` object.
# Corresponds to the JSON property `sinks`
# @return [Array<Google::Apis::LoggingV1beta3::LogSink>]
attr_accessor :sinks
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@sinks = args[:sinks] unless args[:sinks].nil?
end
end
end
end
end
@@ -0,0 +1,222 @@
# Copyright 2015 Google Inc.
#
# 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module LoggingV1beta3
class ListLogsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Log
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class WriteLogEntriesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class LogEntry
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class LogEntryMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class WriteLogEntriesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListLogServicesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class LogService
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListLogServiceIndexesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListLogSinksResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class LogSink
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class LogError
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Status
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListLogServiceSinksResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class ListLogsResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :logs, as: 'logs', class: Google::Apis::LoggingV1beta3::Log, decorator: Google::Apis::LoggingV1beta3::Log::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class Log
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :display_name, as: 'displayName'
property :payload_type, as: 'payloadType'
end
end
# @private
class Empty
class Representation < Google::Apis::Core::JsonRepresentation
end
end
# @private
class WriteLogEntriesRequest
class Representation < Google::Apis::Core::JsonRepresentation
hash :common_labels, as: 'commonLabels'
collection :entries, as: 'entries', class: Google::Apis::LoggingV1beta3::LogEntry, decorator: Google::Apis::LoggingV1beta3::LogEntry::Representation
end
end
# @private
class LogEntry
class Representation < Google::Apis::Core::JsonRepresentation
property :metadata, as: 'metadata', class: Google::Apis::LoggingV1beta3::LogEntryMetadata, decorator: Google::Apis::LoggingV1beta3::LogEntryMetadata::Representation
hash :proto_payload, as: 'protoPayload'
property :text_payload, as: 'textPayload'
hash :struct_payload, as: 'structPayload'
property :insert_id, as: 'insertId'
property :log, as: 'log'
end
end
# @private
class LogEntryMetadata
class Representation < Google::Apis::Core::JsonRepresentation
property :timestamp, as: 'timestamp'
property :severity, as: 'severity'
property :project_id, as: 'projectId'
property :service_name, as: 'serviceName'
property :region, as: 'region'
property :zone, as: 'zone'
property :user_id, as: 'userId'
hash :labels, as: 'labels'
end
end
# @private
class WriteLogEntriesResponse
class Representation < Google::Apis::Core::JsonRepresentation
end
end
# @private
class ListLogServicesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :log_services, as: 'logServices', class: Google::Apis::LoggingV1beta3::LogService, decorator: Google::Apis::LoggingV1beta3::LogService::Representation
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class LogService
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
collection :index_keys, as: 'indexKeys'
end
end
# @private
class ListLogServiceIndexesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :service_index_prefixes, as: 'serviceIndexPrefixes'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class ListLogSinksResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :sinks, as: 'sinks', class: Google::Apis::LoggingV1beta3::LogSink, decorator: Google::Apis::LoggingV1beta3::LogSink::Representation
end
end
# @private
class LogSink
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :destination, as: 'destination'
collection :errors, as: 'errors', class: Google::Apis::LoggingV1beta3::LogError, decorator: Google::Apis::LoggingV1beta3::LogError::Representation
end
end
# @private
class LogError
class Representation < Google::Apis::Core::JsonRepresentation
property :resource, as: 'resource'
property :status, as: 'status', class: Google::Apis::LoggingV1beta3::Status, decorator: Google::Apis::LoggingV1beta3::Status::Representation
property :time_nanos, as: 'timeNanos'
end
end
# @private
class Status
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :message, as: 'message'
collection :details, as: 'details'
end
end
# @private
class ListLogServiceSinksResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :sinks, as: 'sinks', class: Google::Apis::LoggingV1beta3::LogSink, decorator: Google::Apis::LoggingV1beta3::LogSink::Representation
end
end
end
end
end
@@ -0,0 +1,670 @@
# Copyright 2015 Google Inc.
#
# 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.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module LoggingV1beta3
# Google Cloud Logging API
#
# Google Cloud Logging API lets you create logs, ingest log entries, and manage
# log sinks.
#
# @example
# require 'google/apis/logging_v1beta3'
#
# Logging = Google::Apis::LoggingV1beta3 # Alias the module
# service = Logging::LoggingService.new
#
# @see
class LoggingService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# 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.
attr_accessor :quota_user
def initialize
super('https://logging.googleapis.com/', '')
end
# Lists log resources belonging to the specified project.
# @param [String] projects_id
# Part of `projectName`. The project name for which to list the log resources.
# @param [String] service_name
# A service name for which to list logs. Only logs containing entries whose
# metadata includes this service name are returned. If `serviceName` and `
# serviceIndexPrefix` are both empty, then all log names are returned. To list
# all log names, regardless of service, leave both the `serviceName` and `
# serviceIndexPrefix` empty. To list log names containing entries with a
# particular service name (or explicitly empty service name) set `serviceName`
# to the desired value and `serviceIndexPrefix` to `"/"`.
# @param [String] service_index_prefix
# A log service index prefix for which to list logs. Only logs containing
# entries whose metadata that includes these label values (associated with index
# keys) are returned. The prefix is a slash separated list of values, and need
# not specify all index labels. An empty index (or a single slash) matches all
# log service indexes.
# @param [Fixnum] page_size
# The maximum number of results to return.
# @param [String] page_token
# An opaque token, returned as `nextPageToken` by a prior `ListLogs` operation.
# If `pageToken` is supplied, then the other fields of this request are ignored,
# and instead the previous `ListLogs` operation is continued.
# @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::LoggingV1beta3::ListLogsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::ListLogsResponse]
#
# @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_logs(projects_id, service_name: nil, service_index_prefix: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logs'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::LoggingV1beta3::ListLogsResponse::Representation
command.response_class = Google::Apis::LoggingV1beta3::ListLogsResponse
command.params['projectsId'] = projects_id unless projects_id.nil?
command.query['serviceName'] = service_name unless service_name.nil?
command.query['serviceIndexPrefix'] = service_index_prefix unless service_index_prefix.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
# Deletes the specified log resource and all log entries contained in it.
# @param [String] projects_id
# Part of `logName`. The log resource to delete.
# @param [String] logs_id
# Part of `logName`. See documentation of `projectsId`.
# @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::LoggingV1beta3::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::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_log(projects_id, logs_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logs/{logsId}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation
command.response_class = Google::Apis::LoggingV1beta3::Empty
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logsId'] = logs_id unless logs_id.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 one or more log entries in a log. You must supply a list of `LogEntry`
# objects, named `entries`. Each `LogEntry` object must contain a payload object
# and a `LogEntryMetadata` object that describes the entry. You must fill in all
# the fields of the entry, metadata, and payload. You can also supply a map, `
# commonLabels`, that supplies default (key, value) data for the `entries[].
# metadata.labels` maps, saving you the trouble of creating identical copies for
# each entry.
# @param [String] projects_id
# Part of `logName`. The name of the log resource into which to insert the log
# entries.
# @param [String] logs_id
# Part of `logName`. See documentation of `projectsId`.
# @param [Google::Apis::LoggingV1beta3::WriteLogEntriesRequest] write_log_entries_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::LoggingV1beta3::WriteLogEntriesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::WriteLogEntriesResponse]
#
# @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 write_log_entries(projects_id, logs_id, write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logs/{logsId}/entries:write'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::LoggingV1beta3::WriteLogEntriesRequest::Representation
command.request_object = write_log_entries_request_object
command.response_representation = Google::Apis::LoggingV1beta3::WriteLogEntriesResponse::Representation
command.response_class = Google::Apis::LoggingV1beta3::WriteLogEntriesResponse
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logsId'] = logs_id unless logs_id.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 log sinks associated with the specified log.
# @param [String] projects_id
# Part of `logName`. The log for which to list sinks.
# @param [String] logs_id
# Part of `logName`. See documentation of `projectsId`.
# @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::LoggingV1beta3::ListLogSinksResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::ListLogSinksResponse]
#
# @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_log_sinks(projects_id, logs_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::LoggingV1beta3::ListLogSinksResponse::Representation
command.response_class = Google::Apis::LoggingV1beta3::ListLogSinksResponse
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logsId'] = logs_id unless logs_id.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 specified log sink resource.
# @param [String] projects_id
# Part of `sinkName`. The name of the sink resource to return.
# @param [String] logs_id
# Part of `sinkName`. See documentation of `projectsId`.
# @param [String] sinks_id
# Part of `sinkName`. See documentation of `projectsId`.
# @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::LoggingV1beta3::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::LogSink]
#
# @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_log_sink(projects_id, logs_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks/{sinksId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
command.response_class = Google::Apis::LoggingV1beta3::LogSink
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logsId'] = logs_id unless logs_id.nil?
command.params['sinksId'] = sinks_id unless sinks_id.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 the specified log sink resource.
# @param [String] projects_id
# Part of `logName`. The log in which to create a sink resource.
# @param [String] logs_id
# Part of `logName`. See documentation of `projectsId`.
# @param [Google::Apis::LoggingV1beta3::LogSink] log_sink_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::LoggingV1beta3::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::LogSink]
#
# @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 create_log_sink(projects_id, logs_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
command.request_object = log_sink_object
command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
command.response_class = Google::Apis::LoggingV1beta3::LogSink
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logsId'] = logs_id unless logs_id.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 or updates the specified log sink resource.
# @param [String] projects_id
# Part of `sinkName`. The name of the sink to update.
# @param [String] logs_id
# Part of `sinkName`. See documentation of `projectsId`.
# @param [String] sinks_id
# Part of `sinkName`. See documentation of `projectsId`.
# @param [Google::Apis::LoggingV1beta3::LogSink] log_sink_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::LoggingV1beta3::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::LogSink]
#
# @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 update_log_sink(projects_id, logs_id, sinks_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks/{sinksId}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
command.request_object = log_sink_object
command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
command.response_class = Google::Apis::LoggingV1beta3::LogSink
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logsId'] = logs_id unless logs_id.nil?
command.params['sinksId'] = sinks_id unless sinks_id.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 the specified log sink resource.
# @param [String] projects_id
# Part of `sinkName`. The name of the sink to delete.
# @param [String] logs_id
# Part of `sinkName`. See documentation of `projectsId`.
# @param [String] sinks_id
# Part of `sinkName`. See documentation of `projectsId`.
# @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::LoggingV1beta3::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::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_log_sink(projects_id, logs_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks/{sinksId}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation
command.response_class = Google::Apis::LoggingV1beta3::Empty
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logsId'] = logs_id unless logs_id.nil?
command.params['sinksId'] = sinks_id unless sinks_id.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 log services associated with log entries ingested for a project.
# @param [String] projects_id
# Part of `projectName`. The project resource whose services are to be listed.
# @param [String] log
# The name of the log resource whose services are to be listed. log for which to
# list services. When empty, all services are listed.
# @param [Fixnum] page_size
# The maximum number of `LogService` objects to return in one operation.
# @param [String] page_token
# An opaque token, returned as `nextPageToken` by a prior `ListLogServices`
# operation. If `pageToken` is supplied, then the other fields of this request
# are ignored, and instead the previous `ListLogServices` operation is continued.
# @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::LoggingV1beta3::ListLogServicesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::ListLogServicesResponse]
#
# @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_log_services(projects_id, log: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logServices'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::LoggingV1beta3::ListLogServicesResponse::Representation
command.response_class = Google::Apis::LoggingV1beta3::ListLogServicesResponse
command.params['projectsId'] = projects_id unless projects_id.nil?
command.query['log'] = log unless log.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
# Lists log service indexes associated with a log service.
# @param [String] projects_id
# Part of `serviceName`. A log service resource of the form `/projects/*/
# logServices/*`. The service indexes of the log service are returned. Example: `
# "/projects/myProj/logServices/appengine.googleapis.com"`.
# @param [String] log_services_id
# Part of `serviceName`. See documentation of `projectsId`.
# @param [String] index_prefix
# Restricts the indexes returned to be those with a specified prefix. The prefix
# has the form `"/label_value/label_value/..."`, in order corresponding to the [`
# LogService indexKeys`][google.logging.v1.LogService.index_keys]. Non-empty
# prefixes must begin with `/` . Example prefixes: + `"/myModule/"` retrieves
# App Engine versions associated with `myModule`. The trailing slash terminates
# the value. + `"/myModule"` retrieves App Engine modules with names beginning
# with `myModule`. + `""` retrieves all indexes.
# @param [Fixnum] depth
# A limit to the number of levels of the index hierarchy that are expanded. If `
# depth` is 0, it defaults to the level specified by the prefix field (the
# number of slash separators). The default empty prefix implies a `depth` of 1.
# It is an error for `depth` to be any non-zero value less than the number of
# components in `indexPrefix`.
# @param [String] log
# A log resource like `/projects/project_id/logs/log_name`, identifying the log
# for which to list service indexes.
# @param [Fixnum] page_size
# The maximum number of log service index resources to return in one operation.
# @param [String] page_token
# An opaque token, returned as `nextPageToken` by a prior `ListLogServiceIndexes`
# operation. If `pageToken` is supplied, then the other fields of this request
# are ignored, and instead the previous `ListLogServiceIndexes` operation is
# continued.
# @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::LoggingV1beta3::ListLogServiceIndexesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::ListLogServiceIndexesResponse]
#
# @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_log_service_indexes(projects_id, log_services_id, index_prefix: nil, depth: nil, log: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/indexes'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::LoggingV1beta3::ListLogServiceIndexesResponse::Representation
command.response_class = Google::Apis::LoggingV1beta3::ListLogServiceIndexesResponse
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logServicesId'] = log_services_id unless log_services_id.nil?
command.query['indexPrefix'] = index_prefix unless index_prefix.nil?
command.query['depth'] = depth unless depth.nil?
command.query['log'] = log unless log.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
# Lists log service sinks associated with the specified service.
# @param [String] projects_id
# Part of `serviceName`. The name of the service for which to list sinks.
# @param [String] log_services_id
# Part of `serviceName`. See documentation of `projectsId`.
# @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::LoggingV1beta3::ListLogServiceSinksResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::ListLogServiceSinksResponse]
#
# @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_log_service_sinks(projects_id, log_services_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::LoggingV1beta3::ListLogServiceSinksResponse::Representation
command.response_class = Google::Apis::LoggingV1beta3::ListLogServiceSinksResponse
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logServicesId'] = log_services_id unless log_services_id.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 specified log service sink resource.
# @param [String] projects_id
# Part of `sinkName`. The name of the sink to return.
# @param [String] log_services_id
# Part of `sinkName`. See documentation of `projectsId`.
# @param [String] sinks_id
# Part of `sinkName`. See documentation of `projectsId`.
# @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::LoggingV1beta3::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::LogSink]
#
# @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_log_service_sink(projects_id, log_services_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks/{sinksId}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
command.response_class = Google::Apis::LoggingV1beta3::LogSink
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logServicesId'] = log_services_id unless log_services_id.nil?
command.params['sinksId'] = sinks_id unless sinks_id.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 the specified log service sink resource.
# @param [String] projects_id
# Part of `serviceName`. The name of the service in which to create a sink.
# @param [String] log_services_id
# Part of `serviceName`. See documentation of `projectsId`.
# @param [Google::Apis::LoggingV1beta3::LogSink] log_sink_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::LoggingV1beta3::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::LogSink]
#
# @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 create_log_service_sink(projects_id, log_services_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
command.request_object = log_sink_object
command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
command.response_class = Google::Apis::LoggingV1beta3::LogSink
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logServicesId'] = log_services_id unless log_services_id.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 or update the specified log service sink resource.
# @param [String] projects_id
# Part of `sinkName`. The name of the sink to update.
# @param [String] log_services_id
# Part of `sinkName`. See documentation of `projectsId`.
# @param [String] sinks_id
# Part of `sinkName`. See documentation of `projectsId`.
# @param [Google::Apis::LoggingV1beta3::LogSink] log_sink_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::LoggingV1beta3::LogSink] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::LogSink]
#
# @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 update_log_service_sink(projects_id, log_services_id, sinks_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks/{sinksId}'
command = make_simple_command(:put, path, options)
command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
command.request_object = log_sink_object
command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
command.response_class = Google::Apis::LoggingV1beta3::LogSink
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logServicesId'] = log_services_id unless log_services_id.nil?
command.params['sinksId'] = sinks_id unless sinks_id.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 the specified log service sink.
# @param [String] projects_id
# Part of `sinkName`. The name of the sink to delete.
# @param [String] log_services_id
# Part of `sinkName`. See documentation of `projectsId`.
# @param [String] sinks_id
# Part of `sinkName`. See documentation of `projectsId`.
# @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::LoggingV1beta3::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::LoggingV1beta3::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_log_service_sink(projects_id, log_services_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks/{sinksId}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation
command.response_class = Google::Apis::LoggingV1beta3::Empty
command.params['projectsId'] = projects_id unless projects_id.nil?
command.params['logServicesId'] = log_services_id unless log_services_id.nil?
command.params['sinksId'] = sinks_id unless sinks_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end