cloudlocationfinder package - google.golang.org/api/cloudlocationfinder/v1alpha - Go Packages | Latest TMZ Celebrity News & Gossip | Watch TMZ Live

cloudlocationfinder

package
v0.240.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2025 License: BSD-3-Clause Imports: 18 Imported by: 0

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, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any 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/v1alpha"
...
ctx := context.Background()
cloudlocationfinderService, err := cloudlocationfinder.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use google.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 OAuth flow, use google.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
cloudlocationfinderService, err := cloudlocationfinder.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See google.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
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

type CloudLocation

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.
	CarbonFreeEnergyPercentage float64 `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.
	CloudLocationType string `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.
	CloudProvider string `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.
	ContainingCloudLocation string `json:"containingCloudLocation,omitempty"`
	// DisplayName: Optional. The human-readable name of the cloud location.
	// Example: us-east-2, us-east1.
	DisplayName string `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}`
	Name string `json:"name,omitempty"`
	// TerritoryCode: Optional. The two-letter ISO 3166-1 alpha-2 code of the cloud
	// location. Examples: US, JP, KR.
	TerritoryCode string `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 (s CloudLocation) MarshalJSON() ([]byte, error)

func (*CloudLocation) UnmarshalJSON

func (s *CloudLocation) UnmarshalJSON(data []byte) error

type ListCloudLocationsResponse

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.
	NextPageToken string `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 (s ListCloudLocationsResponse) MarshalJSON() ([]byte, error)

type ListLocationsResponse

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.
	NextPageToken string `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 (s ListLocationsResponse) MarshalJSON() ([]byte, error)

type Location

type Location struct {
	// DisplayName: The friendly name for this location, typically a nearby city
	// name. For example, "Tokyo".
	DisplayName string `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".
	LocationId string `json:"locationId,omitempty"`
	// Metadata: Service-specific metadata. For example the available capacity at
	// the given location.
	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
	// Name: Resource name for the location, which may vary between
	// implementations. For example:
	// "projects/example-project/locations/us-east1"
	Name string `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

func (s Location) MarshalJSON() ([]byte, error)

type ProjectsLocationsCloudLocationsGetCall

type ProjectsLocationsCloudLocationsGetCall struct {
	// contains filtered or unexported fields
}

func (*ProjectsLocationsCloudLocationsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*ProjectsLocationsCloudLocationsGetCall) Do

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 check whether the returned error was because http.StatusNotModified was returned.

func (*ProjectsLocationsCloudLocationsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ProjectsLocationsCloudLocationsGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*ProjectsLocationsCloudLocationsGetCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type ProjectsLocationsCloudLocationsListCall

type ProjectsLocationsCloudLocationsListCall struct {
	// contains filtered or unexported fields
}

func (*ProjectsLocationsCloudLocationsListCall) Context

Context sets the context to be used in this call's Do method.

func (*ProjectsLocationsCloudLocationsListCall) Do

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 was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProjectsLocationsCloudLocationsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ProjectsLocationsCloudLocationsListCall) Filter

Filter sets the optional parameter "filter": 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.

func (*ProjectsLocationsCloudLocationsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*ProjectsLocationsCloudLocationsListCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*ProjectsLocationsCloudLocationsListCall) PageSize

PageSize sets the optional parameter "pageSize": 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.

func (*ProjectsLocationsCloudLocationsListCall) PageToken

PageToken sets the optional parameter "pageToken": 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.

func (*ProjectsLocationsCloudLocationsListCall) Pages

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.

type ProjectsLocationsCloudLocationsSearchCall

type ProjectsLocationsCloudLocationsSearchCall struct {
	// contains filtered or unexported fields
}

func (*ProjectsLocationsCloudLocationsSearchCall) Context

Context sets the context to be used in this call's Do method.

func (*ProjectsLocationsCloudLocationsSearchCall) Do

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 was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProjectsLocationsCloudLocationsSearchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ProjectsLocationsCloudLocationsSearchCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*ProjectsLocationsCloudLocationsSearchCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*ProjectsLocationsCloudLocationsSearchCall) PageSize

PageSize sets the optional parameter "pageSize": 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.

func (*ProjectsLocationsCloudLocationsSearchCall) PageToken

PageToken sets the optional parameter "pageToken": 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.

func (*ProjectsLocationsCloudLocationsSearchCall) Pages

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

Query sets the optional parameter "query": 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.

func (*ProjectsLocationsCloudLocationsSearchCall) SourceCloudLocation

SourceCloudLocation sets the optional parameter "sourceCloudLocation": Required. The source cloud location to search from. Example search can be searching nearby cloud locations from the source cloud location by latency.

type ProjectsLocationsCloudLocationsService

type ProjectsLocationsCloudLocationsService struct {
	// contains filtered or unexported fields
}

func NewProjectsLocationsCloudLocationsService

func NewProjectsLocationsCloudLocationsService(s *Service) *ProjectsLocationsCloudLocationsService

func (*ProjectsLocationsCloudLocationsService) Get

Get: Retrieves a resource containing information about a cloud location.

- name: Name of the resource.

func (*ProjectsLocationsCloudLocationsService) List

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

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

type ProjectsLocationsGetCall

type ProjectsLocationsGetCall struct {
	// contains filtered or unexported fields
}

func (*ProjectsLocationsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*ProjectsLocationsGetCall) Do

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) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProjectsLocationsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ProjectsLocationsGetCall) Header

func (c *ProjectsLocationsGetCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*ProjectsLocationsGetCall) IfNoneMatch

func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type ProjectsLocationsListCall

type ProjectsLocationsListCall struct {
	// contains filtered or unexported fields
}

func (*ProjectsLocationsListCall) Context

Context sets the context to be used in this call's Do method.

func (*ProjectsLocationsListCall) Do

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 returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProjectsLocationsListCall) ExtraLocationTypes

func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall

ExtraLocationTypes sets the optional parameter "extraLocationTypes": A list of extra location types that should be used as conditions for controlling the visibility of the locations.

func (*ProjectsLocationsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ProjectsLocationsListCall) Filter

Filter sets the optional parameter "filter": 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 (https://google.aip.dev/160).

func (*ProjectsLocationsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*ProjectsLocationsListCall) IfNoneMatch

func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*ProjectsLocationsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of results to return. If not set, the service selects a default.

func (*ProjectsLocationsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.

func (*ProjectsLocationsListCall) Pages

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.

type ProjectsLocationsService

type ProjectsLocationsService struct {
	CloudLocations *ProjectsLocationsCloudLocationsService
	// contains filtered or unexported fields
}

func NewProjectsLocationsService

func NewProjectsLocationsService(s *Service) *ProjectsLocationsService

func (*ProjectsLocationsService) Get

Get: Gets information about a location.

- name: Resource name for the location.

func (*ProjectsLocationsService) List

List: Lists information about the supported locations for this service.

- name: The resource that owns the locations collection, if applicable.

type ProjectsService

type ProjectsService struct {
	Locations *ProjectsLocationsService
	// contains filtered or unexported fields
}

func NewProjectsService

func NewProjectsService(s *Service) *ProjectsService

type SearchCloudLocationsResponse

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.
	NextPageToken string `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 cloud locations.

func (SearchCloudLocationsResponse) MarshalJSON

func (s SearchCloudLocationsResponse) MarshalJSON() ([]byte, error)

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Projects *ProjectsService
	// contains filtered or unexported fields
}

func New deprecated

func New(client *http.Client) (*Service, error)

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.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.