Class: Google::Apis::CloudlocationfinderV1alpha::CloudLocationFinderService

Inherits:
Google::Apis::Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/cloudlocationfinder_v1alpha/service.rb

Overview

Cloud Location Finder API

Examples:

require 'google/apis/cloudlocationfinder_v1alpha'

Cloudlocationfinder = Google::Apis::CloudlocationfinderV1alpha # Alias the module
service = Cloudlocationfinder::CloudLocationFinderService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://cloudlocationfinder.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCloudLocationFinderService

Returns a new instance of CloudLocationFinderService.



47
48
49
50
51
52
# File 'lib/google/apis/cloudlocationfinder_v1alpha/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-cloudlocationfinder_v1alpha',
        client_version: Google::Apis::CloudlocationfinderV1alpha::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns 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.

Returns:

  • (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.



40
41
42
# File 'lib/google/apis/cloudlocationfinder_v1alpha/service.rb', line 40

def key
  @key
end

#quota_userString

Returns 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.

Returns:

  • (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.



45
46
47
# File 'lib/google/apis/cloudlocationfinder_v1alpha/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#get_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudlocationfinderV1alpha::Location

Gets information about a location.

Parameters:

  • name (String)

    Resource name for the location.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



74
75
76
77
78
79
80
81
82
# File 'lib/google/apis/cloudlocationfinder_v1alpha/service.rb', line 74

def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+name}', options)
  command.response_representation = Google::Apis::CloudlocationfinderV1alpha::Location::Representation
  command.response_class = Google::Apis::CloudlocationfinderV1alpha::Location
  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

#get_project_location_cloud_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudlocationfinderV1alpha::CloudLocation

Retrieves a resource containing information about a cloud location.

Parameters:

  • name (String)

    Required. Name of the resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



160
161
162
163
164
165
166
167
168
# File 'lib/google/apis/cloudlocationfinder_v1alpha/service.rb', line 160

def get_project_location_cloud_location(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+name}', options)
  command.response_representation = Google::Apis::CloudlocationfinderV1alpha::CloudLocation::Representation
  command.response_class = Google::Apis::CloudlocationfinderV1alpha::CloudLocation
  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

#list_project_location_cloud_locations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudlocationfinderV1alpha::ListCloudLocationsResponse

Lists cloud locations under a given project and location.

Parameters:

  • parent (String)

    Required. The parent, which owns this collection of cloud locations. Format: projects/project/locations/location

  • filter (String) (defaults to: nil)

    Optional. A filter expression that filters resources listed in the response. The expression is in the form of field=value. For example, ' cloud_location_type=CLOUD_LOCATION_TYPE_REGION'. Multiple filter queries are space-separated. For example, 'cloud_location_type=CLOUD_LOCATION_TYPE_REGION territory_code="US"' By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of cloud locations to return per page. The service might return fewer cloud locations than this value. If unspecified, server will pick an appropriate default.

  • page_token (String) (defaults to: nil)

    Optional. A token identifying a page of results the server should return. Provide page token returned by a previous 'ListCloudLocations' call to retrieve the next page of results. When paginating, all other parameters provided to 'ListCloudLocations' must match the call that provided the page token.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/google/apis/cloudlocationfinder_v1alpha/service.rb', line 208

def list_project_location_cloud_locations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+parent}/cloudLocations', options)
  command.response_representation = Google::Apis::CloudlocationfinderV1alpha::ListCloudLocationsResponse::Representation
  command.response_class = Google::Apis::CloudlocationfinderV1alpha::ListCloudLocationsResponse
  command.params['parent'] = parent unless parent.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

#list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudlocationfinderV1alpha::ListLocationsResponse

Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the [ ListLocationsRequest.name] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project- specific locations: If name follows the format projects/project`, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as thename` field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.

Parameters:

  • name (String)

    The resource that owns the locations collection, if applicable.

  • extra_location_types (Array<String>, String) (defaults to: nil)

    Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.

  • filter (String) (defaults to: nil)

    A filter to narrow down results to a preferred subset. The filtering language accepts strings like "displayName=tokyo", and is documented in more detail in AIP-160.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of results to return. If not set, the service selects a default.

  • page_token (String) (defaults to: nil)

    A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/google/apis/cloudlocationfinder_v1alpha/service.rb', line 126

def list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+name}/locations', options)
  command.response_representation = Google::Apis::CloudlocationfinderV1alpha::ListLocationsResponse::Representation
  command.response_class = Google::Apis::CloudlocationfinderV1alpha::ListLocationsResponse
  command.params['name'] = name unless name.nil?
  command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.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

#search_project_location_cloud_locations(parent, page_size: nil, page_token: nil, query: nil, source_cloud_location: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudlocationfinderV1alpha::SearchCloudLocationsResponse

Searches for cloud locations from a given source location.

Parameters:

  • parent (String)

    Required. The parent, which owns this collection of cloud locations. Format: projects/project/locations/location

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of cloud locations to return. The service might return fewer cloud locations than this value. If unspecified, server will pick an appropriate default.

  • page_token (String) (defaults to: nil)

    Optional. A token identifying a page of results the server should return. Provide Page token returned by a previous 'ListCloudLocations' call to retrieve the next page of results. When paginating, all other parameters provided to 'ListCloudLocations' must match the call that provided the page token.

  • query (String) (defaults to: nil)

    Optional. The query string in search query syntax. While filter is used to filter the search results by attributes, query is used to specify the search requirements.

  • source_cloud_location (String) (defaults to: nil)

    Required. The source cloud location to search from. Example search can be searching nearby cloud locations from the source cloud location by latency.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/google/apis/cloudlocationfinder_v1alpha/service.rb', line 259

def search_project_location_cloud_locations(parent, page_size: nil, page_token: nil, query: nil, source_cloud_location: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+parent}/cloudLocations:search', options)
  command.response_representation = Google::Apis::CloudlocationfinderV1alpha::SearchCloudLocationsResponse::Representation
  command.response_class = Google::Apis::CloudlocationfinderV1alpha::SearchCloudLocationsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['query'] = query unless query.nil?
  command.query['sourceCloudLocation'] = source_cloud_location unless source_cloud_location.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end