cloudlocationfinder
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package cloudlocationfinder provides access to the Cloud Location Finder API.
For product documentation, see:https://cloud.google.com/location-finder/docs
Library status¶
These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.
When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.
Creating a client¶
Usage example:
import "google.golang.org/api/cloudlocationfinder/v1"...ctx := context.Background()cloudlocationfinderService, err := cloudlocationfinder.NewService(ctx)
In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:
cloudlocationfinderService, err := cloudlocationfinder.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)cloudlocationfinderService, err := cloudlocationfinder.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seegoogle.golang.org/api/option.ClientOption for details on options.
Index¶
- Constants
- type CloudLocation
- type ListCloudLocationsResponse
- type ListLocationsResponse
- type Location
- type ProjectsLocationsCloudLocationsGetCall
- func (c *ProjectsLocationsCloudLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsCloudLocationsGetCall
- func (c *ProjectsLocationsCloudLocationsGetCall) Do(opts ...googleapi.CallOption) (*CloudLocation, error)
- func (c *ProjectsLocationsCloudLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudLocationsGetCall
- func (c *ProjectsLocationsCloudLocationsGetCall) Header() http.Header
- func (c *ProjectsLocationsCloudLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudLocationsGetCall
- type ProjectsLocationsCloudLocationsListCall
- func (c *ProjectsLocationsCloudLocationsListCall) Context(ctx context.Context) *ProjectsLocationsCloudLocationsListCall
- func (c *ProjectsLocationsCloudLocationsListCall) Do(opts ...googleapi.CallOption) (*ListCloudLocationsResponse, error)
- func (c *ProjectsLocationsCloudLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudLocationsListCall
- func (c *ProjectsLocationsCloudLocationsListCall) Filter(filter string) *ProjectsLocationsCloudLocationsListCall
- func (c *ProjectsLocationsCloudLocationsListCall) Header() http.Header
- func (c *ProjectsLocationsCloudLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudLocationsListCall
- func (c *ProjectsLocationsCloudLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsCloudLocationsListCall
- func (c *ProjectsLocationsCloudLocationsListCall) PageToken(pageToken string) *ProjectsLocationsCloudLocationsListCall
- func (c *ProjectsLocationsCloudLocationsListCall) Pages(ctx context.Context, f func(*ListCloudLocationsResponse) error) error
- type ProjectsLocationsCloudLocationsSearchCall
- func (c *ProjectsLocationsCloudLocationsSearchCall) Context(ctx context.Context) *ProjectsLocationsCloudLocationsSearchCall
- func (c *ProjectsLocationsCloudLocationsSearchCall) Do(opts ...googleapi.CallOption) (*SearchCloudLocationsResponse, error)
- func (c *ProjectsLocationsCloudLocationsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudLocationsSearchCall
- func (c *ProjectsLocationsCloudLocationsSearchCall) Header() http.Header
- func (c *ProjectsLocationsCloudLocationsSearchCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudLocationsSearchCall
- func (c *ProjectsLocationsCloudLocationsSearchCall) PageSize(pageSize int64) *ProjectsLocationsCloudLocationsSearchCall
- func (c *ProjectsLocationsCloudLocationsSearchCall) PageToken(pageToken string) *ProjectsLocationsCloudLocationsSearchCall
- func (c *ProjectsLocationsCloudLocationsSearchCall) Pages(ctx context.Context, f func(*SearchCloudLocationsResponse) error) error
- func (c *ProjectsLocationsCloudLocationsSearchCall) Query(query string) *ProjectsLocationsCloudLocationsSearchCall
- func (c *ProjectsLocationsCloudLocationsSearchCall) SourceCloudLocation(sourceCloudLocation string) *ProjectsLocationsCloudLocationsSearchCall
- type ProjectsLocationsCloudLocationsService
- func (r *ProjectsLocationsCloudLocationsService) Get(name string) *ProjectsLocationsCloudLocationsGetCall
- func (r *ProjectsLocationsCloudLocationsService) List(parent string) *ProjectsLocationsCloudLocationsListCall
- func (r *ProjectsLocationsCloudLocationsService) Search(parent string) *ProjectsLocationsCloudLocationsSearchCall
- type ProjectsLocationsGetCall
- func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall
- func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error)
- func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall
- func (c *ProjectsLocationsGetCall) Header() http.Header
- func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall
- type ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error)
- func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Header() http.Header
- func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error
- type ProjectsLocationsService
- type ProjectsService
- type SearchCloudLocationsResponse
- type Service
Constants¶
const (// See, edit, configure, and delete your Google Cloud data and see the email// address for your Google Account.CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform")
OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeCloudLocation¶
type CloudLocation struct {// CarbonFreeEnergyPercentage: Optional. The carbon free energy percentage of// the cloud location. This represents the average percentage of time// customers' application will be running on carbon-free energy. See//https://cloud.google.com/sustainability/region-carbon for more details.// There is a difference between default value 0 and unset value. 0 means the// carbon free energy percentage is 0%, while unset value means the carbon// footprint data is not available.CarbonFreeEnergyPercentagefloat64 `json:"carbonFreeEnergyPercentage,omitempty"`// CloudLocationType: Optional. The type of the cloud location.//// Possible values:// "CLOUD_LOCATION_TYPE_UNSPECIFIED" - Unspecified type.// "CLOUD_LOCATION_TYPE_REGION" - CloudLocation type for region.// "CLOUD_LOCATION_TYPE_ZONE" - CloudLocation type for zone.// "CLOUD_LOCATION_TYPE_REGION_EXTENSION" - CloudLocation type for region// extension.// "CLOUD_LOCATION_TYPE_GDCC_ZONE" - CloudLocation type for Google// Distributed Cloud Connected Zone.CloudLocationTypestring `json:"cloudLocationType,omitempty"`// CloudProvider: Optional. The provider of the cloud location. Values can be// Google Cloud or third-party providers, including AWS, Azure, or Oracle Cloud// Infrastructure.//// Possible values:// "CLOUD_PROVIDER_UNSPECIFIED" - Unspecified type.// "CLOUD_PROVIDER_GCP" - Cloud provider type for Google Cloud.// "CLOUD_PROVIDER_AWS" - Cloud provider type for AWS.// "CLOUD_PROVIDER_AZURE" - Cloud provider type for Azure.// "CLOUD_PROVIDER_OCI" - Cloud provider type for OCI.CloudProviderstring `json:"cloudProvider,omitempty"`// ContainingCloudLocation: Output only. The containing cloud location in the// strict nesting hierarchy. For example, the containing cloud location of a// zone is a region.ContainingCloudLocationstring `json:"containingCloudLocation,omitempty"`// DisplayName: Optional. The human-readable name of the cloud location.// Example: us-east-2, us-east1.DisplayNamestring `json:"displayName,omitempty"`// Name: Identifier. Name of the cloud location. Unique name of the cloud// location including project and location using the form:// `projects/{project_id}/locations/{location}/cloudLocations/{cloud_location}`Namestring `json:"name,omitempty"`// TerritoryCode: Optional. The two-letter ISO 3166-1 alpha-2 code of the cloud// location. Examples: US, JP, KR.TerritoryCodestring `json:"territoryCode,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CarbonFreeEnergyPercentage")// to unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CarbonFreeEnergyPercentage") to// include in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}CloudLocation: Represents resource cloud locations.
func (CloudLocation)MarshalJSON¶
func (sCloudLocation) MarshalJSON() ([]byte,error)
func (*CloudLocation)UnmarshalJSON¶
func (s *CloudLocation) UnmarshalJSON(data []byte)error
typeListCloudLocationsResponse¶
type ListCloudLocationsResponse struct {// CloudLocations: Output only. List of cloud locations.CloudLocations []*CloudLocation `json:"cloudLocations,omitempty"`// NextPageToken: Output only. The continuation token, used to page through// large result sets. Provide this value in a subsequent request as page_token// in subsequent requests to retrieve the next page. If this field is not// present, there are no subsequent results.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CloudLocations") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CloudLocations") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListCloudLocationsResponse: Message for response to listing cloud locations.
func (ListCloudLocationsResponse)MarshalJSON¶
func (sListCloudLocationsResponse) MarshalJSON() ([]byte,error)
typeListLocationsResponse¶
type ListLocationsResponse struct {// Locations: A list of locations that matches the specified filter in the// request.Locations []*Location `json:"locations,omitempty"`// NextPageToken: The standard List next-page token.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Locations") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Locations") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListLocationsResponse: The response message for Locations.ListLocations.
func (ListLocationsResponse)MarshalJSON¶
func (sListLocationsResponse) MarshalJSON() ([]byte,error)
typeLocation¶
type Location struct {// DisplayName: The friendly name for this location, typically a nearby city// name. For example, "Tokyo".DisplayNamestring `json:"displayName,omitempty"`// Labels: Cross-service attributes for the location. For example// {"cloud.googleapis.com/region": "us-east1"}Labels map[string]string `json:"labels,omitempty"`// LocationId: The canonical id for this location. For example: "us-east1".LocationIdstring `json:"locationId,omitempty"`// Metadata: Service-specific metadata. For example the available capacity at// the given location.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Name: Resource name for the location, which may vary between// implementations. For example:// "projects/example-project/locations/us-east1"Namestring `json:"name,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "DisplayName") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DisplayName") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Location: A resource that represents a Google Cloud location.
func (Location)MarshalJSON¶
typeProjectsLocationsCloudLocationsGetCall¶
type ProjectsLocationsCloudLocationsGetCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsCloudLocationsGetCall)Context¶
func (c *ProjectsLocationsCloudLocationsGetCall) Context(ctxcontext.Context) *ProjectsLocationsCloudLocationsGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsCloudLocationsGetCall)Do¶
func (c *ProjectsLocationsCloudLocationsGetCall) Do(opts ...googleapi.CallOption) (*CloudLocation,error)
Do executes the "cloudlocationfinder.projects.locations.cloudLocations.get" call.Any non-2xx status code is an error. Response headers are in either*CloudLocation.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsCloudLocationsGetCall)Fields¶
func (c *ProjectsLocationsCloudLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudLocationsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsCloudLocationsGetCall)Header¶
func (c *ProjectsLocationsCloudLocationsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsCloudLocationsGetCall)IfNoneMatch¶
func (c *ProjectsLocationsCloudLocationsGetCall) IfNoneMatch(entityTagstring) *ProjectsLocationsCloudLocationsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsLocationsCloudLocationsListCall¶
type ProjectsLocationsCloudLocationsListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsCloudLocationsListCall)Context¶
func (c *ProjectsLocationsCloudLocationsListCall) Context(ctxcontext.Context) *ProjectsLocationsCloudLocationsListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsCloudLocationsListCall)Do¶
func (c *ProjectsLocationsCloudLocationsListCall) Do(opts ...googleapi.CallOption) (*ListCloudLocationsResponse,error)
Do executes the "cloudlocationfinder.projects.locations.cloudLocations.list" call.Any non-2xx status code is an error. Response headers are in either*ListCloudLocationsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsLocationsCloudLocationsListCall)Fields¶
func (c *ProjectsLocationsCloudLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudLocationsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsCloudLocationsListCall)Filter¶
func (c *ProjectsLocationsCloudLocationsListCall) Filter(filterstring) *ProjectsLocationsCloudLocationsListCall
Filter sets the optional parameter "filter": A filter expression thatfilters resources listed in the response. The expression is in the form offield=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"' Bydefault, each expression is an AND expression. However, you can include ANDand OR expressions explicitly.
func (*ProjectsLocationsCloudLocationsListCall)Header¶
func (c *ProjectsLocationsCloudLocationsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsCloudLocationsListCall)IfNoneMatch¶
func (c *ProjectsLocationsCloudLocationsListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsCloudLocationsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsCloudLocationsListCall)PageSize¶
func (c *ProjectsLocationsCloudLocationsListCall) PageSize(pageSizeint64) *ProjectsLocationsCloudLocationsListCall
PageSize sets the optional parameter "pageSize": The maximum number of cloudlocations to return per page. The service might return fewer cloud locationsthan this value. If unspecified, server will pick an appropriate default.
func (*ProjectsLocationsCloudLocationsListCall)PageToken¶
func (c *ProjectsLocationsCloudLocationsListCall) PageToken(pageTokenstring) *ProjectsLocationsCloudLocationsListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Provide page token returned by aprevious 'ListCloudLocations' call to retrieve the next page of results.When paginating, all other parameters provided to 'ListCloudLocations' mustmatch the call that provided the page token.
func (*ProjectsLocationsCloudLocationsListCall)Pages¶
func (c *ProjectsLocationsCloudLocationsListCall) Pages(ctxcontext.Context, f func(*ListCloudLocationsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsCloudLocationsSearchCall¶
type ProjectsLocationsCloudLocationsSearchCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsCloudLocationsSearchCall)Context¶
func (c *ProjectsLocationsCloudLocationsSearchCall) Context(ctxcontext.Context) *ProjectsLocationsCloudLocationsSearchCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsCloudLocationsSearchCall)Do¶
func (c *ProjectsLocationsCloudLocationsSearchCall) Do(opts ...googleapi.CallOption) (*SearchCloudLocationsResponse,error)
Do executes the "cloudlocationfinder.projects.locations.cloudLocations.search" call.Any non-2xx status code is an error. Response headers are in either*SearchCloudLocationsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ProjectsLocationsCloudLocationsSearchCall)Fields¶
func (c *ProjectsLocationsCloudLocationsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudLocationsSearchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsCloudLocationsSearchCall)Header¶
func (c *ProjectsLocationsCloudLocationsSearchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsCloudLocationsSearchCall)IfNoneMatch¶
func (c *ProjectsLocationsCloudLocationsSearchCall) IfNoneMatch(entityTagstring) *ProjectsLocationsCloudLocationsSearchCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsCloudLocationsSearchCall)PageSize¶
func (c *ProjectsLocationsCloudLocationsSearchCall) PageSize(pageSizeint64) *ProjectsLocationsCloudLocationsSearchCall
PageSize sets the optional parameter "pageSize": The maximum number of cloudlocations to return. The service might return fewer cloud locations thanthis value. If unspecified, server will pick an appropriate default.
func (*ProjectsLocationsCloudLocationsSearchCall)PageToken¶
func (c *ProjectsLocationsCloudLocationsSearchCall) PageToken(pageTokenstring) *ProjectsLocationsCloudLocationsSearchCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Provide Page token returned by aprevious 'ListCloudLocations' call to retrieve the next page of results.When paginating, all other parameters provided to 'ListCloudLocations' mustmatch the call that provided the page token.
func (*ProjectsLocationsCloudLocationsSearchCall)Pages¶
func (c *ProjectsLocationsCloudLocationsSearchCall) Pages(ctxcontext.Context, f func(*SearchCloudLocationsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*ProjectsLocationsCloudLocationsSearchCall)Query¶
func (c *ProjectsLocationsCloudLocationsSearchCall) Query(querystring) *ProjectsLocationsCloudLocationsSearchCall
Query sets the optional parameter "query": The query string in search querysyntax. While filter is used to filter the search results by attributes,query is used to specify the search requirements.
func (*ProjectsLocationsCloudLocationsSearchCall)SourceCloudLocation¶
func (c *ProjectsLocationsCloudLocationsSearchCall) SourceCloudLocation(sourceCloudLocationstring) *ProjectsLocationsCloudLocationsSearchCall
SourceCloudLocation sets the optional parameter "sourceCloudLocation":Required. The source cloud location to search from. Example search can besearching nearby cloud locations from the source cloud location by latency.
typeProjectsLocationsCloudLocationsService¶
type ProjectsLocationsCloudLocationsService struct {// contains filtered or unexported fields}funcNewProjectsLocationsCloudLocationsService¶
func NewProjectsLocationsCloudLocationsService(s *Service) *ProjectsLocationsCloudLocationsService
func (*ProjectsLocationsCloudLocationsService)Get¶
func (r *ProjectsLocationsCloudLocationsService) Get(namestring) *ProjectsLocationsCloudLocationsGetCall
Get: Retrieves a resource containing information about a cloud location.
- name: Name of the resource.
func (*ProjectsLocationsCloudLocationsService)List¶
func (r *ProjectsLocationsCloudLocationsService) List(parentstring) *ProjectsLocationsCloudLocationsListCall
List: Lists cloud locations under a given project and location.
- parent: The parent, which owns this collection of cloud locations. Format:projects/{project}/locations/{location}.
func (*ProjectsLocationsCloudLocationsService)Search¶
func (r *ProjectsLocationsCloudLocationsService) Search(parentstring) *ProjectsLocationsCloudLocationsSearchCall
Search: Searches for cloud locations from a given source location.
- parent: The parent, which owns this collection of cloud locations. Format:projects/{project}/locations/{location}.
typeProjectsLocationsGetCall¶
type ProjectsLocationsGetCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsGetCall)Context¶
func (c *ProjectsLocationsGetCall) Context(ctxcontext.Context) *ProjectsLocationsGetCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsGetCall)Do¶
func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location,error)
Do executes the "cloudlocationfinder.projects.locations.get" call.Any non-2xx status code is an error. Response headers are in either*Location.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGetCall)Fields¶
func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsGetCall)Header¶
func (c *ProjectsLocationsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsGetCall)IfNoneMatch¶
func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTagstring) *ProjectsLocationsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeProjectsLocationsListCall¶
type ProjectsLocationsListCall struct {// contains filtered or unexported fields}func (*ProjectsLocationsListCall)Context¶
func (c *ProjectsLocationsListCall) Context(ctxcontext.Context) *ProjectsLocationsListCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsListCall)Do¶
func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse,error)
Do executes the "cloudlocationfinder.projects.locations.list" call.Any non-2xx status code is an error. Response headers are in either*ListLocationsResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ProjectsLocationsListCall)ExtraLocationTypes¶
func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall
ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do notuse this field. It is unsupported and is ignored unless explicitlydocumented otherwise. This is primarily for internal usage.
func (*ProjectsLocationsListCall)Fields¶
func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ProjectsLocationsListCall)Filter¶
func (c *ProjectsLocationsListCall) Filter(filterstring) *ProjectsLocationsListCall
Filter sets the optional parameter "filter": A filter to narrow down resultsto a preferred subset. The filtering language accepts strings like"displayName=tokyo", and is documented in more detail in AIP-160(https://google.aip.dev/160).
func (*ProjectsLocationsListCall)Header¶
func (c *ProjectsLocationsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ProjectsLocationsListCall)IfNoneMatch¶
func (c *ProjectsLocationsListCall) IfNoneMatch(entityTagstring) *ProjectsLocationsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ProjectsLocationsListCall)PageSize¶
func (c *ProjectsLocationsListCall) PageSize(pageSizeint64) *ProjectsLocationsListCall
PageSize sets the optional parameter "pageSize": The maximum number ofresults to return. If not set, the service selects a default.
func (*ProjectsLocationsListCall)PageToken¶
func (c *ProjectsLocationsListCall) PageToken(pageTokenstring) *ProjectsLocationsListCall
PageToken sets the optional parameter "pageToken": A page token receivedfrom the `next_page_token` field in the response. Send that page token toreceive the subsequent page.
func (*ProjectsLocationsListCall)Pages¶
func (c *ProjectsLocationsListCall) Pages(ctxcontext.Context, f func(*ListLocationsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeProjectsLocationsService¶
type ProjectsLocationsService struct {CloudLocations *ProjectsLocationsCloudLocationsService// contains filtered or unexported fields}funcNewProjectsLocationsService¶
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService
func (*ProjectsLocationsService)Get¶
func (r *ProjectsLocationsService) Get(namestring) *ProjectsLocationsGetCall
Get: Gets information about a location.
- name: Resource name for the location.
func (*ProjectsLocationsService)List¶
func (r *ProjectsLocationsService) List(namestring) *ProjectsLocationsListCall
List: Lists information about the supported locations for this service.
- name: The resource that owns the locations collection, if applicable.
typeProjectsService¶
type ProjectsService struct {Locations *ProjectsLocationsService// contains filtered or unexported fields}funcNewProjectsService¶
func NewProjectsService(s *Service) *ProjectsService
typeSearchCloudLocationsResponse¶
type SearchCloudLocationsResponse struct {// CloudLocations: Output only. List of cloud locations.CloudLocations []*CloudLocation `json:"cloudLocations,omitempty"`// NextPageToken: Output only. The continuation token, used to page through// large result sets. Provide this value in a subsequent request as page_token// in subsequent requests to retrieve the next page. If this field is not// present, there are no subsequent results.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CloudLocations") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CloudLocations") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}SearchCloudLocationsResponse: Message for response to searching cloudlocations.
func (SearchCloudLocationsResponse)MarshalJSON¶
func (sSearchCloudLocationsResponse) MarshalJSON() ([]byte,error)
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentProjects *ProjectsService// contains filtered or unexported fields} funcNewdeprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
funcNewService¶
NewService creates a new Service.