API Keys API v2 - Package cloud.google.com/go/apikeys/apiv2/apikeyspb (v1.7.0)

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

File_google_api_apikeys_v2_resources_proto

var File_google_api_apikeys_v2_resources_proto protoreflect.FileDescriptor

Functions

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() string

func (*AndroidApplication) GetSha1Fingerprint

func (x *AndroidApplication) GetSha1Fingerprint() string

func (*AndroidApplication) ProtoMessage

func (*AndroidApplication) ProtoMessage()

func (*AndroidApplication) ProtoReflect

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

func (*AndroidApplication) Reset

func (x *AndroidApplication) Reset()

func (*AndroidApplication) String

func (x *AndroidApplication) String() string

AndroidKeyRestrictions

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() []*AndroidApplication

func (*AndroidKeyRestrictions) ProtoMessage

func (*AndroidKeyRestrictions) ProtoMessage()

func (*AndroidKeyRestrictions) ProtoReflect

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

func (*AndroidKeyRestrictions) Reset

func (x *AndroidKeyRestrictions) Reset()

func (*AndroidKeyRestrictions) String

func (x *AndroidKeyRestrictions) String() string

ApiKeysClient

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) ApiKeysClient

ApiKeysServer

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

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

Deprecated: Use ApiTarget.ProtoReflect.Descriptor instead.

func (*ApiTarget) GetMethods

func (x *ApiTarget) GetMethods() []string

func (*ApiTarget) GetService

func (x *ApiTarget) GetService() string

func (*ApiTarget) ProtoMessage

func (*ApiTarget) ProtoMessage()

func (*ApiTarget) ProtoReflect

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

func (*ApiTarget) Reset

func (x *ApiTarget) Reset()

func (*ApiTarget) String

func (x *ApiTarget) String() 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() []string

func (*BrowserKeyRestrictions) ProtoMessage

func (*BrowserKeyRestrictions) ProtoMessage()

func (*BrowserKeyRestrictions) ProtoReflect

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

func (*BrowserKeyRestrictions) Reset

func (x *BrowserKeyRestrictions) Reset()

func (*BrowserKeyRestrictions) String

func (x *BrowserKeyRestrictions) String() string

CreateKeyRequest

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() *Key

func (*CreateKeyRequest) GetKeyId

func (x *CreateKeyRequest) GetKeyId() string

func (*CreateKeyRequest) GetParent

func (x *CreateKeyRequest) GetParent() string

func (*CreateKeyRequest) ProtoMessage

func (*CreateKeyRequest) ProtoMessage()

func (*CreateKeyRequest) ProtoReflect

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

func (*CreateKeyRequest) Reset

func (x *CreateKeyRequest) Reset()

func (*CreateKeyRequest) String

func (x *CreateKeyRequest) String() string

DeleteKeyRequest

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() string

func (*DeleteKeyRequest) GetName

func (x *DeleteKeyRequest) GetName() string

func (*DeleteKeyRequest) ProtoMessage

func (*DeleteKeyRequest) ProtoMessage()

func (*DeleteKeyRequest) ProtoReflect

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

func (*DeleteKeyRequest) Reset

func (x *DeleteKeyRequest) Reset()

func (*DeleteKeyRequest) String

func (x *DeleteKeyRequest) String() string

GetKeyRequest

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() string

func (*GetKeyRequest) ProtoMessage

func (*GetKeyRequest) ProtoMessage()

func (*GetKeyRequest) ProtoReflect

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

func (*GetKeyRequest) Reset

func (x *GetKeyRequest) Reset()

func (*GetKeyRequest) String

func (x *GetKeyRequest) String() string

GetKeyStringRequest

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() string

func (*GetKeyStringRequest) ProtoMessage

func (*GetKeyStringRequest) ProtoMessage()

func (*GetKeyStringRequest) ProtoReflect

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

func (*GetKeyStringRequest) Reset

func (x *GetKeyStringRequest) Reset()

func (*GetKeyStringRequest) String

func (x *GetKeyStringRequest) String() string

GetKeyStringResponse

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() string

func (*GetKeyStringResponse) ProtoMessage

func (*GetKeyStringResponse) ProtoMessage()

func (*GetKeyStringResponse) ProtoReflect

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

func (*GetKeyStringResponse) Reset

func (x *GetKeyStringResponse) Reset()

func (*GetKeyStringResponse) String

func (x *GetKeyStringResponse) String() string

IosKeyRestrictions

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() []string

func (*IosKeyRestrictions) ProtoMessage

func (*IosKeyRestrictions) ProtoMessage()

func (*IosKeyRestrictions) ProtoReflect

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

func (*IosKeyRestrictions) Reset

func (x *IosKeyRestrictions) Reset()

func (*IosKeyRestrictions) String

func (x *IosKeyRestrictions) String() string

Key

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

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

Deprecated: Use Key.ProtoReflect.Descriptor instead.

func (*Key) GetAnnotations

func (x *Key) GetAnnotations() map[string]string

func (*Key) GetCreateTime

func (x *Key) GetCreateTime() *timestamppb.Timestamp

func (*Key) GetDeleteTime

func (x *Key) GetDeleteTime() *timestamppb.Timestamp

func (*Key) GetDisplayName

func (x *Key) GetDisplayName() string

func (*Key) GetEtag

func (x *Key) GetEtag() string

func (*Key) GetKeyString

func (x *Key) GetKeyString() string

func (*Key) GetName

func (x *Key) GetName() string

func (*Key) GetRestrictions

func (x *Key) GetRestrictions() *Restrictions

func (*Key) GetUid

func (x *Key) GetUid() string

func (*Key) GetUpdateTime

func (x *Key) GetUpdateTime() *timestamppb.Timestamp

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) ProtoReflect

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

func (*Key) Reset

func (x *Key) Reset()

func (*Key) String

func (x *Key) String() 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() int32

func (*ListKeysRequest) GetPageToken

func (x *ListKeysRequest) GetPageToken() string

func (*ListKeysRequest) GetParent

func (x *ListKeysRequest) GetParent() string

func (*ListKeysRequest) GetShowDeleted

func (x *ListKeysRequest) GetShowDeleted() bool

func (*ListKeysRequest) ProtoMessage

func (*ListKeysRequest) ProtoMessage()

func (*ListKeysRequest) ProtoReflect

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

func (*ListKeysRequest) Reset

func (x *ListKeysRequest) Reset()

func (*ListKeysRequest) String

func (x *ListKeysRequest) String() string

ListKeysResponse

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() []*Key

func (*ListKeysResponse) GetNextPageToken

func (x *ListKeysResponse) GetNextPageToken() string

func (*ListKeysResponse) ProtoMessage

func (*ListKeysResponse) ProtoMessage()

func (*ListKeysResponse) ProtoReflect

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

func (*ListKeysResponse) Reset

func (x *ListKeysResponse) Reset()

func (*ListKeysResponse) String

func (x *ListKeysResponse) String() string

LookupKeyRequest

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() string

func (*LookupKeyRequest) ProtoMessage

func (*LookupKeyRequest) ProtoMessage()

func (*LookupKeyRequest) ProtoReflect

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

func (*LookupKeyRequest) Reset

func (x *LookupKeyRequest) Reset()

func (*LookupKeyRequest) String

func (x *LookupKeyRequest) String() string

LookupKeyResponse

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() string

func (*LookupKeyResponse) GetParent

func (x *LookupKeyResponse) GetParent() string

func (*LookupKeyResponse) ProtoMessage

func (*LookupKeyResponse) ProtoMessage()

func (*LookupKeyResponse) ProtoReflect

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

func (*LookupKeyResponse) Reset

func (x *LookupKeyResponse) Reset()

func (*LookupKeyResponse) String

func (x *LookupKeyResponse) String() string

Restrictions

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() *AndroidKeyRestrictions

func (*Restrictions) GetApiTargets

func (x *Restrictions) GetApiTargets() []*ApiTarget

func (*Restrictions) GetBrowserKeyRestrictions

func (x *Restrictions) GetBrowserKeyRestrictions() *BrowserKeyRestrictions

func (*Restrictions) GetClientRestrictions

func (x *Restrictions) GetClientRestrictions() isRestrictions_ClientRestrictions

func (*Restrictions) GetIosKeyRestrictions

func (x *Restrictions) GetIosKeyRestrictions() *IosKeyRestrictions

func (*Restrictions) GetServerKeyRestrictions

func (x *Restrictions) GetServerKeyRestrictions() *ServerKeyRestrictions

func (*Restrictions) ProtoMessage

func (*Restrictions) ProtoMessage()

func (*Restrictions) ProtoReflect

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

func (*Restrictions) Reset

func (x *Restrictions) Reset()

func (*Restrictions) String

func (x *Restrictions) String() string

Restrictions_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() []string

func (*ServerKeyRestrictions) ProtoMessage

func (*ServerKeyRestrictions) ProtoMessage()

func (*ServerKeyRestrictions) ProtoReflect

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

func (*ServerKeyRestrictions) Reset

func (x *ServerKeyRestrictions) Reset()

func (*ServerKeyRestrictions) String

func (x *ServerKeyRestrictions) String() string

UndeleteKeyRequest

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() string

func (*UndeleteKeyRequest) ProtoMessage

func (*UndeleteKeyRequest) ProtoMessage()

func (*UndeleteKeyRequest) ProtoReflect

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

func (*UndeleteKeyRequest) Reset

func (x *UndeleteKeyRequest) Reset()

func (*UndeleteKeyRequest) String

func (x *UndeleteKeyRequest) String() string

UnimplementedApiKeysServer

type UnimplementedApiKeysServer struct {
}

UnimplementedApiKeysServer should be embedded to have forward compatible implementations.

func (UnimplementedApiKeysServer) CreateKey

func (UnimplementedApiKeysServer) DeleteKey

func (UnimplementedApiKeysServer) GetKey

func (UnimplementedApiKeysServer) GetKeyString

func (UnimplementedApiKeysServer) ListKeys

func (UnimplementedApiKeysServer) LookupKey

func (UnimplementedApiKeysServer) UndeleteKey

func (UnimplementedApiKeysServer) UpdateKey

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() *Key

func (*UpdateKeyRequest) GetUpdateMask

func (x *UpdateKeyRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateKeyRequest) ProtoMessage

func (*UpdateKeyRequest) ProtoMessage()

func (*UpdateKeyRequest) ProtoReflect

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

func (*UpdateKeyRequest) Reset

func (x *UpdateKeyRequest) Reset()

func (*UpdateKeyRequest) String

func (x *UpdateKeyRequest) String() string