regionlookup

package
v0.0.0-...-19429a9 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RegionIdentifier_PlaceType_name = map[int32]string{
		0:  "PLACE_TYPE_UNSPECIFIED",
		1:  "POSTAL_CODE",
		2:  "ADMINISTRATIVE_AREA_LEVEL_1",
		3:  "ADMINISTRATIVE_AREA_LEVEL_2",
		4:  "LOCALITY",
		5:  "NEIGHBORHOOD",
		6:  "COUNTRY",
		7:  "SUBLOCALITY",
		8:  "ADMINISTRATIVE_AREA_LEVEL_3",
		9:  "ADMINISTRATIVE_AREA_LEVEL_4",
		10: "SCHOOL_DISTRICT",
	}
	RegionIdentifier_PlaceType_value = map[string]int32{
		"PLACE_TYPE_UNSPECIFIED":      0,
		"POSTAL_CODE":                 1,
		"ADMINISTRATIVE_AREA_LEVEL_1": 2,
		"ADMINISTRATIVE_AREA_LEVEL_2": 3,
		"LOCALITY":                    4,
		"NEIGHBORHOOD":                5,
		"COUNTRY":                     6,
		"SUBLOCALITY":                 7,
		"ADMINISTRATIVE_AREA_LEVEL_3": 8,
		"ADMINISTRATIVE_AREA_LEVEL_4": 9,
		"SCHOOL_DISTRICT":             10,
	}
)

Enum value maps for RegionIdentifier_PlaceType.

View Source
var (
	RegionSearchValue_PlaceType_name = map[int32]string{
		0:  "PLACE_TYPE_UNSPECIFIED",
		1:  "POSTAL_CODE",
		2:  "ADMINISTRATIVE_AREA_LEVEL_1",
		3:  "ADMINISTRATIVE_AREA_LEVEL_2",
		4:  "LOCALITY",
		5:  "NEIGHBORHOOD",
		6:  "COUNTRY",
		7:  "SUBLOCALITY",
		8:  "ADMINISTRATIVE_AREA_LEVEL_3",
		9:  "ADMINISTRATIVE_AREA_LEVEL_4",
		10: "SCHOOL_DISTRICT",
	}
	RegionSearchValue_PlaceType_value = map[string]int32{
		"PLACE_TYPE_UNSPECIFIED":      0,
		"POSTAL_CODE":                 1,
		"ADMINISTRATIVE_AREA_LEVEL_1": 2,
		"ADMINISTRATIVE_AREA_LEVEL_2": 3,
		"LOCALITY":                    4,
		"NEIGHBORHOOD":                5,
		"COUNTRY":                     6,
		"SUBLOCALITY":                 7,
		"ADMINISTRATIVE_AREA_LEVEL_3": 8,
		"ADMINISTRATIVE_AREA_LEVEL_4": 9,
		"SCHOOL_DISTRICT":             10,
	}
)

Enum value maps for RegionSearchValue_PlaceType.

View Source
var File_google_maps_regionlookup_v1alpha_region_identifier_proto protoreflect.FileDescriptor
View Source
var File_google_maps_regionlookup_v1alpha_region_lookup_service_proto protoreflect.FileDescriptor
View Source
var File_google_maps_regionlookup_v1alpha_region_match_proto protoreflect.FileDescriptor
View Source
var File_google_maps_regionlookup_v1alpha_region_search_values_proto protoreflect.FileDescriptor

Functions

func RegisterRegionLookupServer

func RegisterRegionLookupServer(s *grpc.Server, srv RegionLookupServer)

Types

type LookupRegionRequest

type LookupRegionRequest struct {

	// Each `RegionIdentifier` represents the desired fields used to lookup a
	// single region. See `RegionIdentifier` proto for more details and examples.
	Identifiers []*RegionIdentifier `protobuf:"bytes,1,rep,name=identifiers,proto3" json:"identifiers,omitempty"`
	// The maximum number of matches to return. The service may return fewer than
	// this value.
	//
	// If unspecified, at most 50 matches will be returned. The maximum value is
	// 1000; values above 1000 will be coerced to 1000.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// A page token, received from a previous `LookupRegion` call. Provide this to
	// retrieve the subsequent page.
	//
	// When paginating, all other parameters provided to `LookupRegion` must match
	// the call that provided the page token.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Lookup Region Request.

Next available tag: 4

func (*LookupRegionRequest) Descriptor deprecated

func (*LookupRegionRequest) Descriptor() ([]byte, []int)

Deprecated: Use LookupRegionRequest.ProtoReflect.Descriptor instead.

func (*LookupRegionRequest) GetIdentifiers

func (x *LookupRegionRequest) GetIdentifiers() []*RegionIdentifier

func (*LookupRegionRequest) GetPageSize

func (x *LookupRegionRequest) GetPageSize() int32

func (*LookupRegionRequest) GetPageToken

func (x *LookupRegionRequest) GetPageToken() string

func (*LookupRegionRequest) ProtoMessage

func (*LookupRegionRequest) ProtoMessage()

func (*LookupRegionRequest) ProtoReflect

func (x *LookupRegionRequest) ProtoReflect() protoreflect.Message

func (*LookupRegionRequest) Reset

func (x *LookupRegionRequest) Reset()

func (*LookupRegionRequest) String

func (x *LookupRegionRequest) String() string

type LookupRegionResponse

type LookupRegionResponse struct {

	// Lookup region matches, one for each `RegionIdentifier` in
	// `LookupRegionRequest.identifiers`.
	Matches []*RegionMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"`
	// A token that can be sent as `page_token` to retrieve the next page.
	// If this field is omitted, there are no subsequent pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Lookup Region Response.

Next available tag: 3

func (*LookupRegionResponse) Descriptor deprecated

func (*LookupRegionResponse) Descriptor() ([]byte, []int)

Deprecated: Use LookupRegionResponse.ProtoReflect.Descriptor instead.

func (*LookupRegionResponse) GetMatches

func (x *LookupRegionResponse) GetMatches() []*RegionMatch

func (*LookupRegionResponse) GetNextPageToken

func (x *LookupRegionResponse) GetNextPageToken() string

func (*LookupRegionResponse) ProtoMessage

func (*LookupRegionResponse) ProtoMessage()

func (*LookupRegionResponse) ProtoReflect

func (x *LookupRegionResponse) ProtoReflect() protoreflect.Message

func (*LookupRegionResponse) Reset

func (x *LookupRegionResponse) Reset()

func (*LookupRegionResponse) String

func (x *LookupRegionResponse) String() string

type RegionIdentifier

type RegionIdentifier struct {

	// The location must be specified by one of the following:
	//
	// Types that are assignable to Location:
	//	*RegionIdentifier_Place
	//	*RegionIdentifier_UnitCode
	Location isRegionIdentifier_Location `protobuf_oneof:"location"`
	// Required. Place type to match.
	PlaceType RegionIdentifier_PlaceType `` /* 154-byte string literal not displayed */
	// The BCP-47 language code, such as "en-US" or "sr-Latn", corresponding to
	// the language in which the place name and address is requested. If none is
	// requested, then it defaults to English.
	LanguageCode string `protobuf:"bytes,7,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
	// Two-letter ISO-3166 country/region code for the location you're trying to
	// match. region_code is optional if place_type is "country".
	RegionCode string `protobuf:"bytes,8,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"`
	// contains filtered or unexported fields
}

Region Identifier.

Identifies a region to look up.

One of place or unit_code must be specified. If none is specified, an INVALID_ARGUMENT error is returned. region_code must also be specified except when place_type is "country".

place and unit_code specify a location to match a Place ID to. For example if place is "California" and region_code "US" the API returns the following matched_place_id results when the following place_types are specified:

place_type: matched_place_id results: administrative_area_level_1 Place ID for The State of California (All other supported types) No Match

If unit_code is "6" (FIPs code for California) and region_code is "US the API returns the following matched_place_id results when the following place_types are specified:

place type: matched_place_id results: administrative_area_level_1 Place ID for The State of California (All other supported types) No Match

or if unit_code is "US" the API returns the following results when the following place_types are specified:

place type: matched_place_id results: country Place ID for the United States (All other supported types) No Match

If no match is found, matched_place_id is not set.

Candidate Place IDs are returned when a lookup finds a region with a different place_type then the one requested. For example if place is "California" and place_type is "country" the Place ID for The State of California is returned as a candidate in the candidate_place_ids field.

Next available tag: 10

func (*RegionIdentifier) Descriptor deprecated

func (*RegionIdentifier) Descriptor() ([]byte, []int)

Deprecated: Use RegionIdentifier.ProtoReflect.Descriptor instead.

func (*RegionIdentifier) GetLanguageCode

func (x *RegionIdentifier) GetLanguageCode() string

func (*RegionIdentifier) GetLocation

func (m *RegionIdentifier) GetLocation() isRegionIdentifier_Location

func (*RegionIdentifier) GetPlace

func (x *RegionIdentifier) GetPlace() string

func (*RegionIdentifier) GetPlaceType

func (x *RegionIdentifier) GetPlaceType() RegionIdentifier_PlaceType

func (*RegionIdentifier) GetRegionCode

func (x *RegionIdentifier) GetRegionCode() string

func (*RegionIdentifier) GetUnitCode

func (x *RegionIdentifier) GetUnitCode() string

func (*RegionIdentifier) ProtoMessage

func (*RegionIdentifier) ProtoMessage()

func (*RegionIdentifier) ProtoReflect

func (x *RegionIdentifier) ProtoReflect() protoreflect.Message

func (*RegionIdentifier) Reset

func (x *RegionIdentifier) Reset()

func (*RegionIdentifier) String

func (x *RegionIdentifier) String() string

type RegionIdentifier_Place

type RegionIdentifier_Place struct {
	// The name of the region to match to a Place ID.
	//
	// The place field is used in combination with place_type to look up
	// the region Place ID.
	//
	// For example:
	// If place_type is "locality", a valid place can be "Palo Alto, CA".
	//
	// If place_type is "postal_code", a valid place can be "94109".
	//
	// If place_type is "country", a valid place can be "United States".
	// etc.
	//
	// region_code is required when place is specified except when
	// place_type is "country".
	Place string `protobuf:"bytes,4,opt,name=place,proto3,oneof"`
}

type RegionIdentifier_PlaceType

type RegionIdentifier_PlaceType int32

Possible place types to match to.

const (
	// Default value. This value is unused.
	RegionIdentifier_PLACE_TYPE_UNSPECIFIED RegionIdentifier_PlaceType = 0
	// Postal code.
	RegionIdentifier_POSTAL_CODE RegionIdentifier_PlaceType = 1
	// Administrative area level 1 (State in the US).
	RegionIdentifier_ADMINISTRATIVE_AREA_LEVEL_1 RegionIdentifier_PlaceType = 2
	// Administrative area level 2 (County in the US).
	RegionIdentifier_ADMINISTRATIVE_AREA_LEVEL_2 RegionIdentifier_PlaceType = 3
	// Locality (City).
	RegionIdentifier_LOCALITY RegionIdentifier_PlaceType = 4
	// Neighborhood.
	RegionIdentifier_NEIGHBORHOOD RegionIdentifier_PlaceType = 5
	// Country.
	RegionIdentifier_COUNTRY RegionIdentifier_PlaceType = 6
	// Sublocality.
	RegionIdentifier_SUBLOCALITY RegionIdentifier_PlaceType = 7
	// Administrative area level 3.
	RegionIdentifier_ADMINISTRATIVE_AREA_LEVEL_3 RegionIdentifier_PlaceType = 8
	// Administrative area level 4.
	RegionIdentifier_ADMINISTRATIVE_AREA_LEVEL_4 RegionIdentifier_PlaceType = 9
	// School district.
	RegionIdentifier_SCHOOL_DISTRICT RegionIdentifier_PlaceType = 10
)

func (RegionIdentifier_PlaceType) Descriptor

func (RegionIdentifier_PlaceType) Enum

func (RegionIdentifier_PlaceType) EnumDescriptor deprecated

func (RegionIdentifier_PlaceType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RegionIdentifier_PlaceType.Descriptor instead.

func (RegionIdentifier_PlaceType) Number

func (RegionIdentifier_PlaceType) String

func (RegionIdentifier_PlaceType) Type

type RegionIdentifier_UnitCode

type RegionIdentifier_UnitCode struct {
	// The FIPs state or county codes (US only) or ISO-3166-1 country code to be
	// matched.
	//
	// The unit_code field is used in combination with place_type to look up
	// the region Place ID.
	//
	// For example:
	// If place_type is "country", a valid unit_code can be "US" (ISO-3166-1
	// Alpha-2 code for United States) or "BR" (ISO-3166-1 Alpha-2 code for
	// Brazil).
	//
	// If place_type is "administrative_area_level_1" (state) and region_code is
	// "US", a valid unit_code can be "6" (FIPs code for California) or
	// "12"(FIPs code for Florida).
	//
	// If place_type is "administrative_area_level_2" (county) and region_code
	// is "US", a valid unit_code can be "6001" (FIPs code for Alameda County in
	// California) or "12086" (FIPs code for Miami-Dade County in Florida).
	//
	// region_code is required when specifying a FIPs code. region_code is
	// ignored for ISO-3166-1 country codes.
	UnitCode string `protobuf:"bytes,5,opt,name=unit_code,json=unitCode,proto3,oneof"`
}

type RegionLookupClient

type RegionLookupClient interface {
	// Lookup region RPC.
	//
	// Looks up a set of region Place IDs of types related to geographic
	// boundaries.
	//
	// The API looks up a region Place ID using the `RegionIdentifier` proto. See
	// `RegionIdentifier` for more details and examples.
	//
	// The following region place types are supported for look up: postal_code,
	// administrative_area_level_1, administrative_area_level_2, locality,
	// neighborhood, and country.
	LookupRegion(ctx context.Context, in *LookupRegionRequest, opts ...grpc.CallOption) (*LookupRegionResponse, error)
	// Search region RPC.
	//
	// Searches for a set of region Place IDs of types related to geographic
	// boundaries.
	//
	// Similar to `LookupRegion` RPC but instead of looking up Place IDs for the
	// given `RegionIdentifier`, the API searches for Region Place IDs by
	// considering all regions that are contained within a specified location. The
	// `RegionSearchValue` is used to specify the search values. See
	// `RegionSearchValue` for more details and examples.
	//
	// The following region place types are supported for searching: postal_code,
	// administrative_area_level_1, administrative_area_level_2, locality,
	// neighborhood, and country.
	SearchRegion(ctx context.Context, in *SearchRegionRequest, opts ...grpc.CallOption) (*SearchRegionResponse, error)
}

RegionLookupClient is the client API for RegionLookup service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type RegionLookupServer

type RegionLookupServer interface {
	// Lookup region RPC.
	//
	// Looks up a set of region Place IDs of types related to geographic
	// boundaries.
	//
	// The API looks up a region Place ID using the `RegionIdentifier` proto. See
	// `RegionIdentifier` for more details and examples.
	//
	// The following region place types are supported for look up: postal_code,
	// administrative_area_level_1, administrative_area_level_2, locality,
	// neighborhood, and country.
	LookupRegion(context.Context, *LookupRegionRequest) (*LookupRegionResponse, error)
	// Search region RPC.
	//
	// Searches for a set of region Place IDs of types related to geographic
	// boundaries.
	//
	// Similar to `LookupRegion` RPC but instead of looking up Place IDs for the
	// given `RegionIdentifier`, the API searches for Region Place IDs by
	// considering all regions that are contained within a specified location. The
	// `RegionSearchValue` is used to specify the search values. See
	// `RegionSearchValue` for more details and examples.
	//
	// The following region place types are supported for searching: postal_code,
	// administrative_area_level_1, administrative_area_level_2, locality,
	// neighborhood, and country.
	SearchRegion(context.Context, *SearchRegionRequest) (*SearchRegionResponse, error)
}

RegionLookupServer is the server API for RegionLookup service.

type RegionMatch

type RegionMatch struct {

	// Place ID of the region that is matched. If region is found, this field is
	// not set.
	MatchedPlaceId string `protobuf:"bytes,1,opt,name=matched_place_id,json=matchedPlaceId,proto3" json:"matched_place_id,omitempty"`
	// Region candidate IDs. Up to three candidates may be returned.
	CandidatePlaceIds []string `protobuf:"bytes,2,rep,name=candidate_place_ids,json=candidatePlaceIds,proto3" json:"candidate_place_ids,omitempty"`
	// Matching debug information for when no match is found.
	DebugInfo string `protobuf:"bytes,3,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
	// contains filtered or unexported fields
}

Region Match.

Next available tag: 5

func (*RegionMatch) Descriptor deprecated

func (*RegionMatch) Descriptor() ([]byte, []int)

Deprecated: Use RegionMatch.ProtoReflect.Descriptor instead.

func (*RegionMatch) GetCandidatePlaceIds

func (x *RegionMatch) GetCandidatePlaceIds() []string

func (*RegionMatch) GetDebugInfo

func (x *RegionMatch) GetDebugInfo() string

func (*RegionMatch) GetMatchedPlaceId

func (x *RegionMatch) GetMatchedPlaceId() string

func (*RegionMatch) ProtoMessage

func (*RegionMatch) ProtoMessage()

func (*RegionMatch) ProtoReflect

func (x *RegionMatch) ProtoReflect() protoreflect.Message

func (*RegionMatch) Reset

func (x *RegionMatch) Reset()

func (*RegionMatch) String

func (x *RegionMatch) String() string

type RegionSearchValue

type RegionSearchValue struct {

	// The location must be specified by one of the following:
	//
	// Types that are assignable to Location:
	//	*RegionSearchValue_Address
	//	*RegionSearchValue_Latlng
	//	*RegionSearchValue_PlaceId
	Location isRegionSearchValue_Location `protobuf_oneof:"location"`
	// Required. The type of the place to match.
	PlaceType RegionSearchValue_PlaceType `` /* 155-byte string literal not displayed */
	// The BCP-47 language code, such as "en-US" or "sr-Latn", corresponding to
	// the language in which the place name and address is requested. If none is
	// requested, then it defaults to English.
	LanguageCode string `protobuf:"bytes,7,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
	// Two-letter ISO-3166 country/region code for the location you're trying to
	// match. region_code is required when address is specified.
	RegionCode string `protobuf:"bytes,8,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"`
	// contains filtered or unexported fields
}

Region Search Values.

Desired search values of a single region.

Location must be specified by one of the following: address, latlng or place_id. If none is specified, an INVALID_ARGUMENT error is returned. region_code must also be provided when address is specified.

The fields address, latlng and place_id specify a location contained inside the region to match. For example if address is "1600 Amphitheatre Pkwy, Mountain View, CA 94043" the API returns the following matched_place_id results when the following place_types are specified:

place_type: matched_place_id results: postal_code Place ID for "94043" administrative_area_level_1 Place ID for The State of California administrative_area_level_2 Place ID for Santa Clara County etc.

More Examples:

If latlng is "latitude: 37.4220656 longitude: -122.0862784" and place_type is "locality", the result contains the Place ID (of type "locality") for that location (the Place ID of Mountain View, CA, in this case).

If place_id is "ChIJj61dQgK6j4AR4GeTYWZsKWw" (Place ID for Google office in Mountain view, CA) and place_type is "locality", the result contains the Place ID (of type "locality") for that location (the Place ID of Mountain View, CA, in this case).

If no match is found, matched_place_id is not set.

Candidates Place IDs are returned when a search finds multiple Place IDs for the location specified. For example if the API is searching for region Place IDs of type neighboorhood for a location that is contained within multiple neighboords. The Place Ids will be returned as candidates in the candidate_place_ids field.

Next available tag: 10

func (*RegionSearchValue) Descriptor deprecated

func (*RegionSearchValue) Descriptor() ([]byte, []int)

Deprecated: Use RegionSearchValue.ProtoReflect.Descriptor instead.

func (*RegionSearchValue) GetAddress

func (x *RegionSearchValue) GetAddress() string

func (*RegionSearchValue) GetLanguageCode

func (x *RegionSearchValue) GetLanguageCode() string

func (*RegionSearchValue) GetLatlng

func (x *RegionSearchValue) GetLatlng() *latlng.LatLng

func (*RegionSearchValue) GetLocation

func (m *RegionSearchValue) GetLocation() isRegionSearchValue_Location

func (*RegionSearchValue) GetPlaceId

func (x *RegionSearchValue) GetPlaceId() string

func (*RegionSearchValue) GetPlaceType

func (*RegionSearchValue) GetRegionCode

func (x *RegionSearchValue) GetRegionCode() string

func (*RegionSearchValue) ProtoMessage

func (*RegionSearchValue) ProtoMessage()

func (*RegionSearchValue) ProtoReflect

func (x *RegionSearchValue) ProtoReflect() protoreflect.Message

func (*RegionSearchValue) Reset

func (x *RegionSearchValue) Reset()

func (*RegionSearchValue) String

func (x *RegionSearchValue) String() string

type RegionSearchValue_Address

type RegionSearchValue_Address struct {
	// The unstructured street address that is contained inside a region to
	// match. region_code is required when address is specified.
	Address string `protobuf:"bytes,1,opt,name=address,proto3,oneof"`
}

type RegionSearchValue_Latlng

type RegionSearchValue_Latlng struct {
	// The latitude and longitude that is contained inside a region to match.
	Latlng *latlng.LatLng `protobuf:"bytes,2,opt,name=latlng,proto3,oneof"`
}

type RegionSearchValue_PlaceId

type RegionSearchValue_PlaceId struct {
	// The Place ID that is contained inside a region to match.
	PlaceId string `protobuf:"bytes,3,opt,name=place_id,json=placeId,proto3,oneof"`
}

type RegionSearchValue_PlaceType

type RegionSearchValue_PlaceType int32

Possible place types to match to.

const (
	// Default value. This value is unused.
	RegionSearchValue_PLACE_TYPE_UNSPECIFIED RegionSearchValue_PlaceType = 0
	// Postal code.
	RegionSearchValue_POSTAL_CODE RegionSearchValue_PlaceType = 1
	// Administrative area level 1 (State in the US).
	RegionSearchValue_ADMINISTRATIVE_AREA_LEVEL_1 RegionSearchValue_PlaceType = 2
	// Administrative area level 2 (County in the US).
	RegionSearchValue_ADMINISTRATIVE_AREA_LEVEL_2 RegionSearchValue_PlaceType = 3
	// Locality (City).
	RegionSearchValue_LOCALITY RegionSearchValue_PlaceType = 4
	// Neighborhood.
	RegionSearchValue_NEIGHBORHOOD RegionSearchValue_PlaceType = 5
	// Country.
	RegionSearchValue_COUNTRY RegionSearchValue_PlaceType = 6
	// Sublocality.
	RegionSearchValue_SUBLOCALITY RegionSearchValue_PlaceType = 7
	// Administrative area level 3.
	RegionSearchValue_ADMINISTRATIVE_AREA_LEVEL_3 RegionSearchValue_PlaceType = 8
	// Administrative area level 4.
	RegionSearchValue_ADMINISTRATIVE_AREA_LEVEL_4 RegionSearchValue_PlaceType = 9
	// School district.
	RegionSearchValue_SCHOOL_DISTRICT RegionSearchValue_PlaceType = 10
)

func (RegionSearchValue_PlaceType) Descriptor

func (RegionSearchValue_PlaceType) Enum

func (RegionSearchValue_PlaceType) EnumDescriptor deprecated

func (RegionSearchValue_PlaceType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RegionSearchValue_PlaceType.Descriptor instead.

func (RegionSearchValue_PlaceType) Number

func (RegionSearchValue_PlaceType) String

func (RegionSearchValue_PlaceType) Type

type SearchRegionRequest

type SearchRegionRequest struct {

	// Each value represents desired search values of a single region to match.
	// The API tries to match them to Place IDs. See `RegionSearchValue`
	// proto for more info and examples.
	SearchValues []*RegionSearchValue `protobuf:"bytes,1,rep,name=search_values,json=searchValues,proto3" json:"search_values,omitempty"`
	// The maximum number of matches to return. The service may return fewer than
	// this value.
	//
	// If unspecified, at most 50 matches will be returned. The maximum value is
	// 1000; values above 1000 will be coerced to 1000.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// A page token, received from a previous `SearchRegion` call. Provide this to
	// retrieve the subsequent page.
	//
	// When paginating, all other parameters provided to `LookupRegion` must match
	// the call that provided the page token.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Search Region Request.

Next available tag: 4

func (*SearchRegionRequest) Descriptor deprecated

func (*SearchRegionRequest) Descriptor() ([]byte, []int)

Deprecated: Use SearchRegionRequest.ProtoReflect.Descriptor instead.

func (*SearchRegionRequest) GetPageSize

func (x *SearchRegionRequest) GetPageSize() int32

func (*SearchRegionRequest) GetPageToken

func (x *SearchRegionRequest) GetPageToken() string

func (*SearchRegionRequest) GetSearchValues

func (x *SearchRegionRequest) GetSearchValues() []*RegionSearchValue

func (*SearchRegionRequest) ProtoMessage

func (*SearchRegionRequest) ProtoMessage()

func (*SearchRegionRequest) ProtoReflect

func (x *SearchRegionRequest) ProtoReflect() protoreflect.Message

func (*SearchRegionRequest) Reset

func (x *SearchRegionRequest) Reset()

func (*SearchRegionRequest) String

func (x *SearchRegionRequest) String() string

type SearchRegionResponse

type SearchRegionResponse struct {

	// Search region matches, one for each `RegionSearchValue` in
	// `SearchRegionRequest.search_values`.
	Matches []*RegionMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"`
	// A token that can be sent as `page_token` to retrieve the next page.
	// If this field is omitted, there are no subsequent pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Match Region Response.

Next available tag: 3

func (*SearchRegionResponse) Descriptor deprecated

func (*SearchRegionResponse) Descriptor() ([]byte, []int)

Deprecated: Use SearchRegionResponse.ProtoReflect.Descriptor instead.

func (*SearchRegionResponse) GetMatches

func (x *SearchRegionResponse) GetMatches() []*RegionMatch

func (*SearchRegionResponse) GetNextPageToken

func (x *SearchRegionResponse) GetNextPageToken() string

func (*SearchRegionResponse) ProtoMessage

func (*SearchRegionResponse) ProtoMessage()

func (*SearchRegionResponse) ProtoReflect

func (x *SearchRegionResponse) ProtoReflect() protoreflect.Message

func (*SearchRegionResponse) Reset

func (x *SearchRegionResponse) Reset()

func (*SearchRegionResponse) String

func (x *SearchRegionResponse) String() string

type UnimplementedRegionLookupServer

type UnimplementedRegionLookupServer struct {
}

UnimplementedRegionLookupServer can be embedded to have forward compatible implementations.

func (*UnimplementedRegionLookupServer) LookupRegion

func (*UnimplementedRegionLookupServer) SearchRegion

Jump to

Keyboard shortcuts

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