Constants
ApiKeys_CreateKey_FullMethodName, ApiKeys_ListKeys_FullMethodName, ApiKeys_GetKey_FullMethodName, ApiKeys_GetKeyString_FullMethodName, ApiKeys_UpdateKey_FullMethodName, ApiKeys_DeleteKey_FullMethodName, ApiKeys_UndeleteKey_FullMethodName, ApiKeys_LookupKey_FullMethodName
const (
ApiKeys_CreateKey_FullMethodName = "/google.api.apikeys.v2.ApiKeys/CreateKey"
ApiKeys_ListKeys_FullMethodName = "/google.api.apikeys.v2.ApiKeys/ListKeys"
ApiKeys_GetKey_FullMethodName = "/google.api.apikeys.v2.ApiKeys/GetKey"
ApiKeys_GetKeyString_FullMethodName = "/google.api.apikeys.v2.ApiKeys/GetKeyString"
ApiKeys_UpdateKey_FullMethodName = "/google.api.apikeys.v2.ApiKeys/UpdateKey"
ApiKeys_DeleteKey_FullMethodName = "/google.api.apikeys.v2.ApiKeys/DeleteKey"
ApiKeys_UndeleteKey_FullMethodName = "/google.api.apikeys.v2.ApiKeys/UndeleteKey"
ApiKeys_LookupKey_FullMethodName = "/google.api.apikeys.v2.ApiKeys/LookupKey"
)Variables
ApiKeys_ServiceDesc
var ApiKeys_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.api.apikeys.v2.ApiKeys",
HandlerType: (*ApiKeysServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateKey",
Handler: _ApiKeys_CreateKey_Handler,
},
{
MethodName: "ListKeys",
Handler: _ApiKeys_ListKeys_Handler,
},
{
MethodName: "GetKey",
Handler: _ApiKeys_GetKey_Handler,
},
{
MethodName: "GetKeyString",
Handler: _ApiKeys_GetKeyString_Handler,
},
{
MethodName: "UpdateKey",
Handler: _ApiKeys_UpdateKey_Handler,
},
{
MethodName: "DeleteKey",
Handler: _ApiKeys_DeleteKey_Handler,
},
{
MethodName: "UndeleteKey",
Handler: _ApiKeys_UndeleteKey_Handler,
},
{
MethodName: "LookupKey",
Handler: _ApiKeys_LookupKey_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/api/apikeys/v2/apikeys.proto",
}ApiKeys_ServiceDesc is the grpc.ServiceDesc for ApiKeys service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
File_google_api_apikeys_v2_apikeys_proto
var File_google_api_apikeys_v2_apikeys_proto protoreflect.FileDescriptorFile_google_api_apikeys_v2_resources_proto
var File_google_api_apikeys_v2_resources_proto protoreflect.FileDescriptorFunctions
func RegisterApiKeysServer
func RegisterApiKeysServer(s grpc.ServiceRegistrar, srv ApiKeysServer)AndroidApplication
type AndroidApplication struct {
// The SHA1 fingerprint of the application. For example, both sha1 formats are
// acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or
// DA39A3EE5E6B4B0D3255BFEF95601890AFD80709.
// Output format is the latter.
Sha1Fingerprint string `protobuf:"bytes,1,opt,name=sha1_fingerprint,json=sha1Fingerprint,proto3" json:"sha1_fingerprint,omitempty"`
// The package name of the application.
PackageName string `protobuf:"bytes,2,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"`
// contains filtered or unexported fields
}Identifier of an Android application for key use.
func (*AndroidApplication) Descriptor
func (*AndroidApplication) Descriptor() ([]byte, []int)Deprecated: Use AndroidApplication.ProtoReflect.Descriptor instead.
func (*AndroidApplication) GetPackageName
func (x *AndroidApplication) GetPackageName() stringfunc (*AndroidApplication) GetSha1Fingerprint
func (x *AndroidApplication) GetSha1Fingerprint() stringfunc (*AndroidApplication) ProtoMessage
func (*AndroidApplication) ProtoMessage()func (*AndroidApplication) ProtoReflect
func (x *AndroidApplication) ProtoReflect() protoreflect.Messagefunc (*AndroidApplication) Reset
func (x *AndroidApplication) Reset()func (*AndroidApplication) String
func (x *AndroidApplication) String() stringAndroidKeyRestrictions
type AndroidKeyRestrictions struct {
// A list of Android applications that are allowed to make API calls with
// this key.
AllowedApplications []*AndroidApplication `protobuf:"bytes,1,rep,name=allowed_applications,json=allowedApplications,proto3" json:"allowed_applications,omitempty"`
// contains filtered or unexported fields
}The Android apps that are allowed to use the key.
func (*AndroidKeyRestrictions) Descriptor
func (*AndroidKeyRestrictions) Descriptor() ([]byte, []int)Deprecated: Use AndroidKeyRestrictions.ProtoReflect.Descriptor instead.
func (*AndroidKeyRestrictions) GetAllowedApplications
func (x *AndroidKeyRestrictions) GetAllowedApplications() []*AndroidApplicationfunc (*AndroidKeyRestrictions) ProtoMessage
func (*AndroidKeyRestrictions) ProtoMessage()func (*AndroidKeyRestrictions) ProtoReflect
func (x *AndroidKeyRestrictions) ProtoReflect() protoreflect.Messagefunc (*AndroidKeyRestrictions) Reset
func (x *AndroidKeyRestrictions) Reset()func (*AndroidKeyRestrictions) String
func (x *AndroidKeyRestrictions) String() stringApiKeysClient
type ApiKeysClient interface {
// Creates a new API key.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
CreateKey(ctx context.Context, in *CreateKeyRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// Lists the API keys owned by a project. The key string of the API key
// isn't included in the response.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
ListKeys(ctx context.Context, in *ListKeysRequest, opts ...grpc.CallOption) (*ListKeysResponse, error)
// Gets the metadata for an API key. The key string of the API key
// isn't included in the response.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
GetKey(ctx context.Context, in *GetKeyRequest, opts ...grpc.CallOption) (*Key, error)
// Get the key string for an API key.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
GetKeyString(ctx context.Context, in *GetKeyStringRequest, opts ...grpc.CallOption) (*GetKeyStringResponse, error)
// Patches the modifiable fields of an API key.
// The key string of the API key isn't included in the response.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
UpdateKey(ctx context.Context, in *UpdateKeyRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// Deletes an API key. Deleted key can be retrieved within 30 days of
// deletion. Afterward, key will be purged from the project.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
DeleteKey(ctx context.Context, in *DeleteKeyRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// Undeletes an API key which was deleted within 30 days.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
UndeleteKey(ctx context.Context, in *UndeleteKeyRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// Find the parent project and resource name of the API
// key that matches the key string in the request. If the API key has been
// purged, resource name will not be set.
// The service account must have the `apikeys.keys.lookup` permission
// on the parent project.
LookupKey(ctx context.Context, in *LookupKeyRequest, opts ...grpc.CallOption) (*LookupKeyResponse, error)
}ApiKeysClient is the client API for ApiKeys service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewApiKeysClient
func NewApiKeysClient(cc grpc.ClientConnInterface) ApiKeysClientApiKeysServer
type ApiKeysServer interface {
// Creates a new API key.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
CreateKey(context.Context, *CreateKeyRequest) (*longrunningpb.Operation, error)
// Lists the API keys owned by a project. The key string of the API key
// isn't included in the response.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
ListKeys(context.Context, *ListKeysRequest) (*ListKeysResponse, error)
// Gets the metadata for an API key. The key string of the API key
// isn't included in the response.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
GetKey(context.Context, *GetKeyRequest) (*Key, error)
// Get the key string for an API key.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
GetKeyString(context.Context, *GetKeyStringRequest) (*GetKeyStringResponse, error)
// Patches the modifiable fields of an API key.
// The key string of the API key isn't included in the response.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
UpdateKey(context.Context, *UpdateKeyRequest) (*longrunningpb.Operation, error)
// Deletes an API key. Deleted key can be retrieved within 30 days of
// deletion. Afterward, key will be purged from the project.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
DeleteKey(context.Context, *DeleteKeyRequest) (*longrunningpb.Operation, error)
// Undeletes an API key which was deleted within 30 days.
//
// NOTE: Key is a global resource; hence the only supported value for
// location is `global`.
UndeleteKey(context.Context, *UndeleteKeyRequest) (*longrunningpb.Operation, error)
// Find the parent project and resource name of the API
// key that matches the key string in the request. If the API key has been
// purged, resource name will not be set.
// The service account must have the `apikeys.keys.lookup` permission
// on the parent project.
LookupKey(context.Context, *LookupKeyRequest) (*LookupKeyResponse, error)
}ApiKeysServer is the server API for ApiKeys service. All implementations should embed UnimplementedApiKeysServer for forward compatibility
ApiTarget
type ApiTarget struct {
// The service for this restriction. It should be the canonical
// service name, for example: `translate.googleapis.com`.
// You can use [`gcloud services list`](/sdk/gcloud/reference/services/list)
// to get a list of services that are enabled in the project.
Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
// Optional. List of one or more methods that can be called.
// If empty, all methods for the service are allowed. A wildcard
// (*) can be used as the last symbol.
// Valid examples:
//
// `google.cloud.translate.v2.TranslateService.GetSupportedLanguage`
// `TranslateText`
// `Get*`
// `translate.googleapis.com.Get*`
Methods []string `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"`
// contains filtered or unexported fields
}A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.
func (*ApiTarget) Descriptor
Deprecated: Use ApiTarget.ProtoReflect.Descriptor instead.
func (*ApiTarget) GetMethods
func (*ApiTarget) GetService
func (*ApiTarget) ProtoMessage
func (*ApiTarget) ProtoMessage()func (*ApiTarget) ProtoReflect
func (x *ApiTarget) ProtoReflect() protoreflect.Messagefunc (*ApiTarget) Reset
func (x *ApiTarget) Reset()func (*ApiTarget) String
BrowserKeyRestrictions
type BrowserKeyRestrictions struct {
// A list of regular expressions for the referrer URLs that are allowed
// to make API calls with this key.
AllowedReferrers []string `protobuf:"bytes,1,rep,name=allowed_referrers,json=allowedReferrers,proto3" json:"allowed_referrers,omitempty"`
// contains filtered or unexported fields
}The HTTP referrers (websites) that are allowed to use the key.
func (*BrowserKeyRestrictions) Descriptor
func (*BrowserKeyRestrictions) Descriptor() ([]byte, []int)Deprecated: Use BrowserKeyRestrictions.ProtoReflect.Descriptor instead.
func (*BrowserKeyRestrictions) GetAllowedReferrers
func (x *BrowserKeyRestrictions) GetAllowedReferrers() []stringfunc (*BrowserKeyRestrictions) ProtoMessage
func (*BrowserKeyRestrictions) ProtoMessage()func (*BrowserKeyRestrictions) ProtoReflect
func (x *BrowserKeyRestrictions) ProtoReflect() protoreflect.Messagefunc (*BrowserKeyRestrictions) Reset
func (x *BrowserKeyRestrictions) Reset()func (*BrowserKeyRestrictions) String
func (x *BrowserKeyRestrictions) String() stringCreateKeyRequest
type CreateKeyRequest struct {
// Required. The project in which the API key is created.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The API key fields to set at creation time.
// You can configure only the `display_name`, `restrictions`, and
// `annotations` fields.
Key *Key `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// User specified key id (optional). If specified, it will become the final
// component of the key resource name.
//
// The id must be unique within the project, must conform with RFC-1034,
// is restricted to lower-cased letters, and has a maximum length of 63
// characters. In another word, the id must match the regular
// expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
//
// The id must NOT be a UUID-like string.
KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
// contains filtered or unexported fields
}Request message for CreateKey method.
func (*CreateKeyRequest) Descriptor
func (*CreateKeyRequest) Descriptor() ([]byte, []int)Deprecated: Use CreateKeyRequest.ProtoReflect.Descriptor instead.
func (*CreateKeyRequest) GetKey
func (x *CreateKeyRequest) GetKey() *Keyfunc (*CreateKeyRequest) GetKeyId
func (x *CreateKeyRequest) GetKeyId() stringfunc (*CreateKeyRequest) GetParent
func (x *CreateKeyRequest) GetParent() stringfunc (*CreateKeyRequest) ProtoMessage
func (*CreateKeyRequest) ProtoMessage()func (*CreateKeyRequest) ProtoReflect
func (x *CreateKeyRequest) ProtoReflect() protoreflect.Messagefunc (*CreateKeyRequest) Reset
func (x *CreateKeyRequest) Reset()func (*CreateKeyRequest) String
func (x *CreateKeyRequest) String() stringDeleteKeyRequest
type DeleteKeyRequest struct {
// Required. The resource name of the API key to be deleted.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. The etag known to the client for the expected state of the key.
// This is to be used for optimistic concurrency.
Etag string `protobuf:"bytes,2,opt,name=etag,proto3" json:"etag,omitempty"`
// contains filtered or unexported fields
}Request message for DeleteKey method.
func (*DeleteKeyRequest) Descriptor
func (*DeleteKeyRequest) Descriptor() ([]byte, []int)Deprecated: Use DeleteKeyRequest.ProtoReflect.Descriptor instead.
func (*DeleteKeyRequest) GetEtag
func (x *DeleteKeyRequest) GetEtag() stringfunc (*DeleteKeyRequest) GetName
func (x *DeleteKeyRequest) GetName() stringfunc (*DeleteKeyRequest) ProtoMessage
func (*DeleteKeyRequest) ProtoMessage()func (*DeleteKeyRequest) ProtoReflect
func (x *DeleteKeyRequest) ProtoReflect() protoreflect.Messagefunc (*DeleteKeyRequest) Reset
func (x *DeleteKeyRequest) Reset()func (*DeleteKeyRequest) String
func (x *DeleteKeyRequest) String() stringGetKeyRequest
type GetKeyRequest struct {
// Required. The resource name of the API key to get.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for GetKey method.
func (*GetKeyRequest) Descriptor
func (*GetKeyRequest) Descriptor() ([]byte, []int)Deprecated: Use GetKeyRequest.ProtoReflect.Descriptor instead.
func (*GetKeyRequest) GetName
func (x *GetKeyRequest) GetName() stringfunc (*GetKeyRequest) ProtoMessage
func (*GetKeyRequest) ProtoMessage()func (*GetKeyRequest) ProtoReflect
func (x *GetKeyRequest) ProtoReflect() protoreflect.Messagefunc (*GetKeyRequest) Reset
func (x *GetKeyRequest) Reset()func (*GetKeyRequest) String
func (x *GetKeyRequest) String() stringGetKeyStringRequest
type GetKeyStringRequest struct {
// Required. The resource name of the API key to be retrieved.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for GetKeyString method.
func (*GetKeyStringRequest) Descriptor
func (*GetKeyStringRequest) Descriptor() ([]byte, []int)Deprecated: Use GetKeyStringRequest.ProtoReflect.Descriptor instead.
func (*GetKeyStringRequest) GetName
func (x *GetKeyStringRequest) GetName() stringfunc (*GetKeyStringRequest) ProtoMessage
func (*GetKeyStringRequest) ProtoMessage()func (*GetKeyStringRequest) ProtoReflect
func (x *GetKeyStringRequest) ProtoReflect() protoreflect.Messagefunc (*GetKeyStringRequest) Reset
func (x *GetKeyStringRequest) Reset()func (*GetKeyStringRequest) String
func (x *GetKeyStringRequest) String() stringGetKeyStringResponse
type GetKeyStringResponse struct {
// An encrypted and signed value of the key.
KeyString string `protobuf:"bytes,1,opt,name=key_string,json=keyString,proto3" json:"key_string,omitempty"`
// contains filtered or unexported fields
}Response message for GetKeyString method.
func (*GetKeyStringResponse) Descriptor
func (*GetKeyStringResponse) Descriptor() ([]byte, []int)Deprecated: Use GetKeyStringResponse.ProtoReflect.Descriptor instead.
func (*GetKeyStringResponse) GetKeyString
func (x *GetKeyStringResponse) GetKeyString() stringfunc (*GetKeyStringResponse) ProtoMessage
func (*GetKeyStringResponse) ProtoMessage()func (*GetKeyStringResponse) ProtoReflect
func (x *GetKeyStringResponse) ProtoReflect() protoreflect.Messagefunc (*GetKeyStringResponse) Reset
func (x *GetKeyStringResponse) Reset()func (*GetKeyStringResponse) String
func (x *GetKeyStringResponse) String() stringIosKeyRestrictions
type IosKeyRestrictions struct {
// A list of bundle IDs that are allowed when making API calls with this key.
AllowedBundleIds []string `protobuf:"bytes,1,rep,name=allowed_bundle_ids,json=allowedBundleIds,proto3" json:"allowed_bundle_ids,omitempty"`
// contains filtered or unexported fields
}The iOS apps that are allowed to use the key.
func (*IosKeyRestrictions) Descriptor
func (*IosKeyRestrictions) Descriptor() ([]byte, []int)Deprecated: Use IosKeyRestrictions.ProtoReflect.Descriptor instead.
func (*IosKeyRestrictions) GetAllowedBundleIds
func (x *IosKeyRestrictions) GetAllowedBundleIds() []stringfunc (*IosKeyRestrictions) ProtoMessage
func (*IosKeyRestrictions) ProtoMessage()func (*IosKeyRestrictions) ProtoReflect
func (x *IosKeyRestrictions) ProtoReflect() protoreflect.Messagefunc (*IosKeyRestrictions) Reset
func (x *IosKeyRestrictions) Reset()func (*IosKeyRestrictions) String
func (x *IosKeyRestrictions) String() stringKey
type Key struct {
// Output only. The resource name of the key.
// The `name` has the form:
// `projects/The representation of a key managed by the API Keys API.
func (*Key) Descriptor
Deprecated: Use Key.ProtoReflect.Descriptor instead.
func (*Key) GetAnnotations
func (*Key) GetCreateTime
func (x *Key) GetCreateTime() *timestamppb.Timestampfunc (*Key) GetDeleteTime
func (x *Key) GetDeleteTime() *timestamppb.Timestampfunc (*Key) GetDisplayName
func (*Key) GetEtag
func (*Key) GetKeyString
func (*Key) GetName
func (*Key) GetRestrictions
func (x *Key) GetRestrictions() *Restrictionsfunc (*Key) GetUid
func (*Key) GetUpdateTime
func (x *Key) GetUpdateTime() *timestamppb.Timestampfunc (*Key) ProtoMessage
func (*Key) ProtoMessage()func (*Key) ProtoReflect
func (x *Key) ProtoReflect() protoreflect.Messagefunc (*Key) Reset
func (x *Key) Reset()func (*Key) String
ListKeysRequest
type ListKeysRequest struct {
// Required. Lists all API keys associated with this project.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. Specifies the maximum number of results to be returned at a time.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. Requests a specific page of results.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// Optional. Indicate that keys deleted in the past 30 days should also be
// returned.
ShowDeleted bool `protobuf:"varint,6,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`
// contains filtered or unexported fields
}Request message for ListKeys method.
func (*ListKeysRequest) Descriptor
func (*ListKeysRequest) Descriptor() ([]byte, []int)Deprecated: Use ListKeysRequest.ProtoReflect.Descriptor instead.
func (*ListKeysRequest) GetPageSize
func (x *ListKeysRequest) GetPageSize() int32func (*ListKeysRequest) GetPageToken
func (x *ListKeysRequest) GetPageToken() stringfunc (*ListKeysRequest) GetParent
func (x *ListKeysRequest) GetParent() stringfunc (*ListKeysRequest) GetShowDeleted
func (x *ListKeysRequest) GetShowDeleted() boolfunc (*ListKeysRequest) ProtoMessage
func (*ListKeysRequest) ProtoMessage()func (*ListKeysRequest) ProtoReflect
func (x *ListKeysRequest) ProtoReflect() protoreflect.Messagefunc (*ListKeysRequest) Reset
func (x *ListKeysRequest) Reset()func (*ListKeysRequest) String
func (x *ListKeysRequest) String() stringListKeysResponse
type ListKeysResponse struct {
// A list of API keys.
Keys []*Key `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
// The pagination token for the next page of results.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// contains filtered or unexported fields
}Response message for ListKeys method.
func (*ListKeysResponse) Descriptor
func (*ListKeysResponse) Descriptor() ([]byte, []int)Deprecated: Use ListKeysResponse.ProtoReflect.Descriptor instead.
func (*ListKeysResponse) GetKeys
func (x *ListKeysResponse) GetKeys() []*Keyfunc (*ListKeysResponse) GetNextPageToken
func (x *ListKeysResponse) GetNextPageToken() stringfunc (*ListKeysResponse) ProtoMessage
func (*ListKeysResponse) ProtoMessage()func (*ListKeysResponse) ProtoReflect
func (x *ListKeysResponse) ProtoReflect() protoreflect.Messagefunc (*ListKeysResponse) Reset
func (x *ListKeysResponse) Reset()func (*ListKeysResponse) String
func (x *ListKeysResponse) String() stringLookupKeyRequest
type LookupKeyRequest struct {
// Required. Finds the project that owns the key string value.
KeyString string `protobuf:"bytes,1,opt,name=key_string,json=keyString,proto3" json:"key_string,omitempty"`
// contains filtered or unexported fields
}Request message for LookupKey method.
func (*LookupKeyRequest) Descriptor
func (*LookupKeyRequest) Descriptor() ([]byte, []int)Deprecated: Use LookupKeyRequest.ProtoReflect.Descriptor instead.
func (*LookupKeyRequest) GetKeyString
func (x *LookupKeyRequest) GetKeyString() stringfunc (*LookupKeyRequest) ProtoMessage
func (*LookupKeyRequest) ProtoMessage()func (*LookupKeyRequest) ProtoReflect
func (x *LookupKeyRequest) ProtoReflect() protoreflect.Messagefunc (*LookupKeyRequest) Reset
func (x *LookupKeyRequest) Reset()func (*LookupKeyRequest) String
func (x *LookupKeyRequest) String() stringLookupKeyResponse
type LookupKeyResponse struct {
// The project that owns the key with the value specified in the request.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The resource name of the API key. If the API key has been purged,
// resource name is empty.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Response message for LookupKey method.
func (*LookupKeyResponse) Descriptor
func (*LookupKeyResponse) Descriptor() ([]byte, []int)Deprecated: Use LookupKeyResponse.ProtoReflect.Descriptor instead.
func (*LookupKeyResponse) GetName
func (x *LookupKeyResponse) GetName() stringfunc (*LookupKeyResponse) GetParent
func (x *LookupKeyResponse) GetParent() stringfunc (*LookupKeyResponse) ProtoMessage
func (*LookupKeyResponse) ProtoMessage()func (*LookupKeyResponse) ProtoReflect
func (x *LookupKeyResponse) ProtoReflect() protoreflect.Messagefunc (*LookupKeyResponse) Reset
func (x *LookupKeyResponse) Reset()func (*LookupKeyResponse) String
func (x *LookupKeyResponse) String() stringRestrictions
type Restrictions struct {
// The websites, IP addresses, Android apps, or iOS apps (the clients) that
// are allowed to use the key. You can specify only one type of client
// restrictions per key.
//
// Types that are valid to be assigned to ClientRestrictions:
//
// *Restrictions_BrowserKeyRestrictions
// *Restrictions_ServerKeyRestrictions
// *Restrictions_AndroidKeyRestrictions
// *Restrictions_IosKeyRestrictions
ClientRestrictions isRestrictions_ClientRestrictions `protobuf_oneof:"client_restrictions"`
// A restriction for a specific service and optionally one or
// more specific methods. Requests are allowed if they
// match any of these restrictions. If no restrictions are
// specified, all targets are allowed.
ApiTargets []*ApiTarget `protobuf:"bytes,5,rep,name=api_targets,json=apiTargets,proto3" json:"api_targets,omitempty"`
// contains filtered or unexported fields
}Describes the restrictions on the key.
func (*Restrictions) Descriptor
func (*Restrictions) Descriptor() ([]byte, []int)Deprecated: Use Restrictions.ProtoReflect.Descriptor instead.
func (*Restrictions) GetAndroidKeyRestrictions
func (x *Restrictions) GetAndroidKeyRestrictions() *AndroidKeyRestrictionsfunc (*Restrictions) GetApiTargets
func (x *Restrictions) GetApiTargets() []*ApiTargetfunc (*Restrictions) GetBrowserKeyRestrictions
func (x *Restrictions) GetBrowserKeyRestrictions() *BrowserKeyRestrictionsfunc (*Restrictions) GetClientRestrictions
func (x *Restrictions) GetClientRestrictions() isRestrictions_ClientRestrictionsfunc (*Restrictions) GetIosKeyRestrictions
func (x *Restrictions) GetIosKeyRestrictions() *IosKeyRestrictionsfunc (*Restrictions) GetServerKeyRestrictions
func (x *Restrictions) GetServerKeyRestrictions() *ServerKeyRestrictionsfunc (*Restrictions) ProtoMessage
func (*Restrictions) ProtoMessage()func (*Restrictions) ProtoReflect
func (x *Restrictions) ProtoReflect() protoreflect.Messagefunc (*Restrictions) Reset
func (x *Restrictions) Reset()func (*Restrictions) String
func (x *Restrictions) String() stringRestrictions_AndroidKeyRestrictions
type Restrictions_AndroidKeyRestrictions struct {
// The Android apps that are allowed to use the key.
AndroidKeyRestrictions *AndroidKeyRestrictions `protobuf:"bytes,3,opt,name=android_key_restrictions,json=androidKeyRestrictions,proto3,oneof"`
}Restrictions_BrowserKeyRestrictions
type Restrictions_BrowserKeyRestrictions struct {
// The HTTP referrers (websites) that are allowed to use the key.
BrowserKeyRestrictions *BrowserKeyRestrictions `protobuf:"bytes,1,opt,name=browser_key_restrictions,json=browserKeyRestrictions,proto3,oneof"`
}Restrictions_IosKeyRestrictions
type Restrictions_IosKeyRestrictions struct {
// The iOS apps that are allowed to use the key.
IosKeyRestrictions *IosKeyRestrictions `protobuf:"bytes,4,opt,name=ios_key_restrictions,json=iosKeyRestrictions,proto3,oneof"`
}Restrictions_ServerKeyRestrictions
type Restrictions_ServerKeyRestrictions struct {
// The IP addresses of callers that are allowed to use the key.
ServerKeyRestrictions *ServerKeyRestrictions `protobuf:"bytes,2,opt,name=server_key_restrictions,json=serverKeyRestrictions,proto3,oneof"`
}ServerKeyRestrictions
type ServerKeyRestrictions struct {
// A list of the caller IP addresses that are allowed to make API calls
// with this key.
AllowedIps []string `protobuf:"bytes,1,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`
// contains filtered or unexported fields
}The IP addresses of callers that are allowed to use the key.
func (*ServerKeyRestrictions) Descriptor
func (*ServerKeyRestrictions) Descriptor() ([]byte, []int)Deprecated: Use ServerKeyRestrictions.ProtoReflect.Descriptor instead.
func (*ServerKeyRestrictions) GetAllowedIps
func (x *ServerKeyRestrictions) GetAllowedIps() []stringfunc (*ServerKeyRestrictions) ProtoMessage
func (*ServerKeyRestrictions) ProtoMessage()func (*ServerKeyRestrictions) ProtoReflect
func (x *ServerKeyRestrictions) ProtoReflect() protoreflect.Messagefunc (*ServerKeyRestrictions) Reset
func (x *ServerKeyRestrictions) Reset()func (*ServerKeyRestrictions) String
func (x *ServerKeyRestrictions) String() stringUndeleteKeyRequest
type UndeleteKeyRequest struct {
// Required. The resource name of the API key to be undeleted.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for UndeleteKey method.
func (*UndeleteKeyRequest) Descriptor
func (*UndeleteKeyRequest) Descriptor() ([]byte, []int)Deprecated: Use UndeleteKeyRequest.ProtoReflect.Descriptor instead.
func (*UndeleteKeyRequest) GetName
func (x *UndeleteKeyRequest) GetName() stringfunc (*UndeleteKeyRequest) ProtoMessage
func (*UndeleteKeyRequest) ProtoMessage()func (*UndeleteKeyRequest) ProtoReflect
func (x *UndeleteKeyRequest) ProtoReflect() protoreflect.Messagefunc (*UndeleteKeyRequest) Reset
func (x *UndeleteKeyRequest) Reset()func (*UndeleteKeyRequest) String
func (x *UndeleteKeyRequest) String() stringUnimplementedApiKeysServer
type UnimplementedApiKeysServer struct {
}UnimplementedApiKeysServer should be embedded to have forward compatible implementations.
func (UnimplementedApiKeysServer) CreateKey
func (UnimplementedApiKeysServer) CreateKey(context.Context, *CreateKeyRequest) (*longrunningpb.Operation, error)func (UnimplementedApiKeysServer) DeleteKey
func (UnimplementedApiKeysServer) DeleteKey(context.Context, *DeleteKeyRequest) (*longrunningpb.Operation, error)func (UnimplementedApiKeysServer) GetKey
func (UnimplementedApiKeysServer) GetKey(context.Context, *GetKeyRequest) (*Key, error)func (UnimplementedApiKeysServer) GetKeyString
func (UnimplementedApiKeysServer) GetKeyString(context.Context, *GetKeyStringRequest) (*GetKeyStringResponse, error)func (UnimplementedApiKeysServer) ListKeys
func (UnimplementedApiKeysServer) ListKeys(context.Context, *ListKeysRequest) (*ListKeysResponse, error)func (UnimplementedApiKeysServer) LookupKey
func (UnimplementedApiKeysServer) LookupKey(context.Context, *LookupKeyRequest) (*LookupKeyResponse, error)func (UnimplementedApiKeysServer) UndeleteKey
func (UnimplementedApiKeysServer) UndeleteKey(context.Context, *UndeleteKeyRequest) (*longrunningpb.Operation, error)func (UnimplementedApiKeysServer) UpdateKey
func (UnimplementedApiKeysServer) UpdateKey(context.Context, *UpdateKeyRequest) (*longrunningpb.Operation, error)UnsafeApiKeysServer
type UnsafeApiKeysServer interface {
// contains filtered or unexported methods
}UnsafeApiKeysServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ApiKeysServer will result in compilation errors.
UpdateKeyRequest
type UpdateKeyRequest struct {
// Required. Set the `name` field to the resource name of the API key to be
// updated. You can update only the `display_name`, `restrictions`, and
// `annotations` fields.
Key *Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// The field mask specifies which fields to be updated as part of this
// request. All other fields are ignored.
// Mutable fields are: `display_name`, `restrictions`, and `annotations`.
// If an update mask is not provided, the service treats it as an implied mask
// equivalent to all allowed fields that are set on the wire. If the field
// mask has a special value "*", the service treats it equivalent to replace
// all allowed mutable fields.
UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
// contains filtered or unexported fields
}Request message for UpdateKey method.
func (*UpdateKeyRequest) Descriptor
func (*UpdateKeyRequest) Descriptor() ([]byte, []int)Deprecated: Use UpdateKeyRequest.ProtoReflect.Descriptor instead.
func (*UpdateKeyRequest) GetKey
func (x *UpdateKeyRequest) GetKey() *Keyfunc (*UpdateKeyRequest) GetUpdateMask
func (x *UpdateKeyRequest) GetUpdateMask() *fieldmaskpb.FieldMaskfunc (*UpdateKeyRequest) ProtoMessage
func (*UpdateKeyRequest) ProtoMessage()func (*UpdateKeyRequest) ProtoReflect
func (x *UpdateKeyRequest) ProtoReflect() protoreflect.Messagefunc (*UpdateKeyRequest) Reset
func (x *UpdateKeyRequest) Reset()func (*UpdateKeyRequest) String
func (x *UpdateKeyRequest) String() string