Skip to content

Commit

Permalink
feat: Automated regeneration of digitalassetlinks v1 client (#20578)
Browse files Browse the repository at this point in the history
Auto-created at 2024-11-17 09:44:48 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Nov 18, 2024
1 parent 05ea765 commit 45a0fab
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 217 deletions.
5 changes: 5 additions & 0 deletions generated/google-apis-digitalassetlinks_v1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release history for google-apis-digitalassetlinks_v1

### v0.18.0 (2024-11-17)

* Regenerated from discovery document revision 20241109
* Regenerated using generator version 0.15.1

### v0.17.0 (2024-05-26)

* Regenerated using generator version 0.15.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,97 +76,6 @@ def update!(**args)
end
end

# Message used to check for the existence of multiple digital asset links within
# a single RPC.
class BulkCheckRequest
include Google::Apis::Core::Hashable

# Same configuration as in Check request, all statements checks will use same
# configurations.
# Corresponds to the JSON property `allowGoogleInternalDataSources`
# @return [Boolean]
attr_accessor :allow_google_internal_data_sources
alias_method :allow_google_internal_data_sources?, :allow_google_internal_data_sources

# If specified, will be used in any given template statement that doesn’t
# specify a relation.
# Corresponds to the JSON property `defaultRelation`
# @return [String]
attr_accessor :default_relation

# Uniquely identifies an asset. A digital asset is an identifiable and
# addressable online entity that typically provides some service or content.
# Examples of assets are websites, Android apps, Twitter feeds, and Plus Pages.
# Corresponds to the JSON property `defaultSource`
# @return [Google::Apis::DigitalassetlinksV1::Asset]
attr_accessor :default_source

# Uniquely identifies an asset. A digital asset is an identifiable and
# addressable online entity that typically provides some service or content.
# Examples of assets are websites, Android apps, Twitter feeds, and Plus Pages.
# Corresponds to the JSON property `defaultTarget`
# @return [Google::Apis::DigitalassetlinksV1::Asset]
attr_accessor :default_target

# Same configuration as in Check request, all statements checks will use same
# configurations.
# Corresponds to the JSON property `skipCacheLookup`
# @return [Boolean]
attr_accessor :skip_cache_lookup
alias_method :skip_cache_lookup?, :skip_cache_lookup

# List of statements to check. For each statement, you can omit a field if the
# corresponding default_* field below was supplied. Minimum 1 statement; maximum
# 1,000 statements. Any additional statements will be ignored.
# Corresponds to the JSON property `statements`
# @return [Array<Google::Apis::DigitalassetlinksV1::StatementTemplate>]
attr_accessor :statements

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

# Update properties of this object
def update!(**args)
@allow_google_internal_data_sources = args[:allow_google_internal_data_sources] if args.key?(:allow_google_internal_data_sources)
@default_relation = args[:default_relation] if args.key?(:default_relation)
@default_source = args[:default_source] if args.key?(:default_source)
@default_target = args[:default_target] if args.key?(:default_target)
@skip_cache_lookup = args[:skip_cache_lookup] if args.key?(:skip_cache_lookup)
@statements = args[:statements] if args.key?(:statements)
end
end

# Response for BulkCheck call. Results are sent in a list in the same order in
# which they were sent. Individual check errors are described in the appropriate
# check_results entry. If the entire call fails, the response will include a
# bulk_error_code field describing the error.
class BulkCheckResponse
include Google::Apis::Core::Hashable

# Error code for the entire request. Present only if the entire request failed.
# Individual check errors will not trigger the presence of this field.
# Corresponds to the JSON property `bulkErrorCode`
# @return [String]
attr_accessor :bulk_error_code

# List of results for each check request. Results are returned in the same order
# in which they were sent in the request.
# Corresponds to the JSON property `checkResults`
# @return [Array<Google::Apis::DigitalassetlinksV1::CheckResponse>]
attr_accessor :check_results

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

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

# Describes an X509 certificate.
class CertificateInfo
include Google::Apis::Core::Hashable
Expand Down Expand Up @@ -334,43 +243,6 @@ def update!(**args)
end
end

# A single statement to check in a bulk call using BulkCheck. See CheckRequest
# for details about each field.
class StatementTemplate
include Google::Apis::Core::Hashable

# The relationship being asserted between the source and target. If omitted, you
# must specify a BulkCheckRequest.default_relation value to use here.
# Corresponds to the JSON property `relation`
# @return [String]
attr_accessor :relation

# Uniquely identifies an asset. A digital asset is an identifiable and
# addressable online entity that typically provides some service or content.
# Examples of assets are websites, Android apps, Twitter feeds, and Plus Pages.
# Corresponds to the JSON property `source`
# @return [Google::Apis::DigitalassetlinksV1::Asset]
attr_accessor :source

# Uniquely identifies an asset. A digital asset is an identifiable and
# addressable online entity that typically provides some service or content.
# Examples of assets are websites, Android apps, Twitter feeds, and Plus Pages.
# Corresponds to the JSON property `target`
# @return [Google::Apis::DigitalassetlinksV1::Asset]
attr_accessor :target

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

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

# Describes a web asset.
class WebAsset
include Google::Apis::Core::Hashable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ module Google
module Apis
module DigitalassetlinksV1
# Version of the google-apis-digitalassetlinks_v1 gem
GEM_VERSION = "0.17.0"
GEM_VERSION = "0.18.0"

# Version of the code generator used to generate this client
GENERATOR_VERSION = "0.15.0"
GENERATOR_VERSION = "0.15.1"

# Revision of the discovery document this client was generated from
REVISION = "20220122"
REVISION = "20241109"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,6 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

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

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

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

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

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

Expand All @@ -70,12 +58,6 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

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

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

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

Expand All @@ -101,30 +83,6 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class BulkCheckRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :allow_google_internal_data_sources, as: 'allowGoogleInternalDataSources'
property :default_relation, as: 'defaultRelation'
property :default_source, as: 'defaultSource', class: Google::Apis::DigitalassetlinksV1::Asset, decorator: Google::Apis::DigitalassetlinksV1::Asset::Representation

property :default_target, as: 'defaultTarget', class: Google::Apis::DigitalassetlinksV1::Asset, decorator: Google::Apis::DigitalassetlinksV1::Asset::Representation

property :skip_cache_lookup, as: 'skipCacheLookup'
collection :statements, as: 'statements', class: Google::Apis::DigitalassetlinksV1::StatementTemplate, decorator: Google::Apis::DigitalassetlinksV1::StatementTemplate::Representation

end
end

class BulkCheckResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bulk_error_code, as: 'bulkErrorCode'
collection :check_results, as: 'checkResults', class: Google::Apis::DigitalassetlinksV1::CheckResponse, decorator: Google::Apis::DigitalassetlinksV1::CheckResponse::Representation

end
end

class CertificateInfo
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down Expand Up @@ -164,17 +122,6 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class StatementTemplate
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :relation, as: 'relation'
property :source, as: 'source', class: Google::Apis::DigitalassetlinksV1::Asset, decorator: Google::Apis::DigitalassetlinksV1::Asset::Representation

property :target, as: 'target', class: Google::Apis::DigitalassetlinksV1::Asset, decorator: Google::Apis::DigitalassetlinksV1::Asset::Representation

end
end

class WebAsset
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,39 +51,6 @@ def initialize
@batch_path = 'batch'
end

# Send a bundle of statement checks in a single RPC to minimize latency and
# service load. Statements need not be all for the same source and/or target. We
# recommend using this method when you need to check more than one statement in
# a short period of time.
# @param [Google::Apis::DigitalassetlinksV1::BulkCheckRequest] bulk_check_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::DigitalassetlinksV1::BulkCheckResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DigitalassetlinksV1::BulkCheckResponse]
#
# @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 bulk_assetlink_check(bulk_check_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/assetlinks:bulkCheck', options)
command.request_representation = Google::Apis::DigitalassetlinksV1::BulkCheckRequest::Representation
command.request_object = bulk_check_request_object
command.response_representation = Google::Apis::DigitalassetlinksV1::BulkCheckResponse::Representation
command.response_class = Google::Apis::DigitalassetlinksV1::BulkCheckResponse
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end

# Determines whether the specified (directional) relationship exists between the
# specified source and target assets. The relation describes the intent of the
# link between the two assets as claimed by the source asset. An example for
Expand Down

0 comments on commit 45a0fab

Please sign in to comment.