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
- 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 ¶
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 ¶
type ProjectsLocationsCloudLocationsGetCall ¶
type ProjectsLocationsCloudLocationsGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsCloudLocationsGetCall) Context ¶
func (c *ProjectsLocationsCloudLocationsGetCall) Context(ctx context.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 check whether 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. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*ProjectsLocationsCloudLocationsGetCall) Header ¶
func (c *ProjectsLocationsCloudLocationsGetCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*ProjectsLocationsCloudLocationsGetCall) IfNoneMatch ¶
func (c *ProjectsLocationsCloudLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudLocationsGetCall
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 ¶
func (c *ProjectsLocationsCloudLocationsListCall) Context(ctx context.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 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 ¶
func (c *ProjectsLocationsCloudLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudLocationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*ProjectsLocationsCloudLocationsListCall) Filter ¶
func (c *ProjectsLocationsCloudLocationsListCall) Filter(filter string) *ProjectsLocationsCloudLocationsListCall
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 ¶
func (c *ProjectsLocationsCloudLocationsListCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*ProjectsLocationsCloudLocationsListCall) IfNoneMatch ¶
func (c *ProjectsLocationsCloudLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudLocationsListCall
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 ¶
func (c *ProjectsLocationsCloudLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsCloudLocationsListCall
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 ¶
func (c *ProjectsLocationsCloudLocationsListCall) PageToken(pageToken string) *ProjectsLocationsCloudLocationsListCall
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 ¶
func (c *ProjectsLocationsCloudLocationsListCall) Pages(ctx context.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.
type ProjectsLocationsCloudLocationsSearchCall ¶
type ProjectsLocationsCloudLocationsSearchCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsCloudLocationsSearchCall) Context ¶
func (c *ProjectsLocationsCloudLocationsSearchCall) Context(ctx context.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 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 ¶
func (c *ProjectsLocationsCloudLocationsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudLocationsSearchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*ProjectsLocationsCloudLocationsSearchCall) Header ¶
func (c *ProjectsLocationsCloudLocationsSearchCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*ProjectsLocationsCloudLocationsSearchCall) IfNoneMatch ¶
func (c *ProjectsLocationsCloudLocationsSearchCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudLocationsSearchCall
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 ¶
func (c *ProjectsLocationsCloudLocationsSearchCall) PageSize(pageSize int64) *ProjectsLocationsCloudLocationsSearchCall
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 ¶
func (c *ProjectsLocationsCloudLocationsSearchCall) PageToken(pageToken string) *ProjectsLocationsCloudLocationsSearchCall
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 ¶
func (c *ProjectsLocationsCloudLocationsSearchCall) Pages(ctx context.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(query string) *ProjectsLocationsCloudLocationsSearchCall
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 ¶
func (c *ProjectsLocationsCloudLocationsSearchCall) SourceCloudLocation(sourceCloudLocation string) *ProjectsLocationsCloudLocationsSearchCall
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 ¶
func (r *ProjectsLocationsCloudLocationsService) Get(name string) *ProjectsLocationsCloudLocationsGetCall
Get: Retrieves a resource containing information about a cloud location.
- name: Name of the resource.
func (*ProjectsLocationsCloudLocationsService) List ¶
func (r *ProjectsLocationsCloudLocationsService) List(parent string) *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(parent string) *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}.
type ProjectsLocationsGetCall ¶
type ProjectsLocationsGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsGetCall) Context ¶
func (c *ProjectsLocationsGetCall) Context(ctx context.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) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether 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. 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 ¶
func (c *ProjectsLocationsListCall) Context(ctx context.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 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 ¶
func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*ProjectsLocationsListCall) Filter ¶
func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall
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 ¶
func (c *ProjectsLocationsListCall) Header() http.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 ¶
func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall
PageSize sets the optional parameter "pageSize": The maximum number of results to return. If not set, the service selects a default.
func (*ProjectsLocationsListCall) PageToken ¶
func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall
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 ¶
func (c *ProjectsLocationsListCall) Pages(ctx context.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.
type ProjectsLocationsService ¶
type ProjectsLocationsService struct { CloudLocations *ProjectsLocationsCloudLocationsService // contains filtered or unexported fields }
func NewProjectsLocationsService ¶
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService
func (*ProjectsLocationsService) Get ¶
func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall
Get: Gets information about a location.
- name: Resource name for the location.
func (*ProjectsLocationsService) List ¶
func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall
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
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 ¶
NewService creates a new Service.