Skip to content

Commit

Permalink
feat: Automated regeneration of serviceusage v1beta1 client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Oct 30, 2020
1 parent 4d5b98f commit adb1898
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 2 deletions.
5 changes: 5 additions & 0 deletions api_names_out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136708,6 +136708,9 @@
"/serviceusage:v1beta1/HttpRule/restCollection": rest_collection
"/serviceusage:v1beta1/HttpRule/restMethodName": rest_method_name
"/serviceusage:v1beta1/HttpRule/selector": selector
"/serviceusage:v1beta1/ImportAdminOverridesRequest": import_admin_overrides_request
"/serviceusage:v1beta1/ImportAdminOverridesRequest/force": force
"/serviceusage:v1beta1/ImportAdminOverridesRequest/inlineSource": inline_source
"/serviceusage:v1beta1/ImportAdminOverridesResponse": import_admin_overrides_response
"/serviceusage:v1beta1/ImportAdminOverridesResponse/overrides": overrides
"/serviceusage:v1beta1/ImportAdminOverridesResponse/overrides/override": override
Expand Down Expand Up @@ -136983,6 +136986,8 @@
"/serviceusage:v1beta1/serviceusage.services.consumerQuotaMetrics.get": get_service_consumer_quota_metric
"/serviceusage:v1beta1/serviceusage.services.consumerQuotaMetrics.get/name": name
"/serviceusage:v1beta1/serviceusage.services.consumerQuotaMetrics.get/view": view
"/serviceusage:v1beta1/serviceusage.services.consumerQuotaMetrics.importAdminOverrides": import_consumer_quota_metric_admin_overrides
"/serviceusage:v1beta1/serviceusage.services.consumerQuotaMetrics.importAdminOverrides/parent": parent
"/serviceusage:v1beta1/serviceusage.services.consumerQuotaMetrics.importConsumerOverrides": import_consumer_quota_metric_consumer_overrides
"/serviceusage:v1beta1/serviceusage.services.consumerQuotaMetrics.importConsumerOverrides/parent": parent
"/serviceusage:v1beta1/serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.create": create_service_consumer_quota_metric_limit_admin_override
Expand Down
2 changes: 1 addition & 1 deletion generated/google/apis/serviceusage_v1beta1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module Apis
# @see https://cloud.google.com/service-usage/
module ServiceusageV1beta1
VERSION = 'V1beta1'
REVISION = '20201021'
REVISION = '20201028'

# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
Expand Down
30 changes: 30 additions & 0 deletions generated/google/apis/serviceusage_v1beta1/classes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2193,6 +2193,36 @@ def update!(**args)
end
end

# Request message for ImportAdminOverrides
class ImportAdminOverridesRequest
include Google::Apis::Core::Hashable

# Whether to force the creation of the quota overrides. If creating an override
# would cause the effective quota for the consumer to decrease by more than 10
# percent, the call is rejected, as a safety measure to avoid accidentally
# decreasing quota too quickly. Setting the force parameter to true ignores this
# restriction.
# Corresponds to the JSON property `force`
# @return [Boolean]
attr_accessor :force
alias_method :force?, :force

# Import data embedded in the request message
# Corresponds to the JSON property `inlineSource`
# @return [Google::Apis::ServiceusageV1beta1::OverrideInlineSource]
attr_accessor :inline_source

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@force = args[:force] if args.key?(:force)
@inline_source = args[:inline_source] if args.key?(:inline_source)
end
end

# Response message for ImportAdminOverrides
class ImportAdminOverridesResponse
include Google::Apis::Core::Hashable
Expand Down
15 changes: 15 additions & 0 deletions generated/google/apis/serviceusage_v1beta1/representations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

class ImportAdminOverridesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class ImportAdminOverridesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end

Expand Down Expand Up @@ -1030,6 +1036,15 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class ImportAdminOverridesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :force, as: 'force'
property :inline_source, as: 'inlineSource', class: Google::Apis::ServiceusageV1beta1::OverrideInlineSource, decorator: Google::Apis::ServiceusageV1beta1::OverrideInlineSource::Representation

end
end

class ImportAdminOverridesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down
36 changes: 36 additions & 0 deletions generated/google/apis/serviceusage_v1beta1/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,42 @@ def get_service_consumer_quota_metric(name, view: nil, fields: nil, quota_user:
execute_or_queue_command(command, &block)
end

# Create or update multiple admin overrides atomically, all on the same consumer,
# but on many different metrics or limits. The name field in the quota override
# message should not be set.
# @param [String] parent
# The resource name of the consumer. An example name would be: `projects/123/
# services/compute.googleapis.com`
# @param [Google::Apis::ServiceusageV1beta1::ImportAdminOverridesRequest] import_admin_overrides_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::ServiceusageV1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ServiceusageV1beta1::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 import_consumer_quota_metric_admin_overrides(parent, import_admin_overrides_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/consumerQuotaMetrics:importAdminOverrides', options)
command.request_representation = Google::Apis::ServiceusageV1beta1::ImportAdminOverridesRequest::Representation
command.request_object = import_admin_overrides_request_object
command.response_representation = Google::Apis::ServiceusageV1beta1::Operation::Representation
command.response_class = Google::Apis::ServiceusageV1beta1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end

# Create or update multiple consumer overrides atomically, all on the same
# consumer, but on many different metrics or limits. The name field in the quota
# override message should not be set.
Expand Down
2 changes: 1 addition & 1 deletion generated/google/apis/serviceusage_v1beta1/synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
"sha": "d53bec90ed2ca3cdd76158f2fc018b05fe3d2027"
"sha": "4d5b98ffca7eaf905a28939051f53ff2881aaf64"
}
}
]
Expand Down

0 comments on commit adb1898

Please sign in to comment.