import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { Timestamp } from "../../../protobuf/timestamp"; /** * The representation of a key managed by the API Keys API. * * @generated from protobuf message google.api.apikeys.v2.Key */ export interface Key { /** * Output only. The resource name of the key. * The `name` has the form: * `projects//locations/global/keys/`. * For example: * `projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2` * * NOTE: Key is a global resource; hence the only supported value for * location is `global`. * * @generated from protobuf field: string name = 1; */ name: string; /** * Output only. Unique id in UUID4 format. * * @generated from protobuf field: string uid = 5; */ uid: string; /** * Human-readable display name of this key that you can modify. * The maximum length is 63 characters. * * @generated from protobuf field: string display_name = 2; */ displayName: string; /** * Output only. An encrypted and signed value held by this key. * This field can be accessed only through the `GetKeyString` method. * * @generated from protobuf field: string key_string = 3; */ keyString: string; /** * Output only. A timestamp identifying the time this key was originally * created. * * @generated from protobuf field: google.protobuf.Timestamp create_time = 4; */ createTime?: Timestamp; /** * Output only. A timestamp identifying the time this key was last * updated. * * @generated from protobuf field: google.protobuf.Timestamp update_time = 6; */ updateTime?: Timestamp; /** * Output only. A timestamp when this key was deleted. If the resource is not deleted, * this must be empty. * * @generated from protobuf field: google.protobuf.Timestamp delete_time = 7; */ deleteTime?: Timestamp; /** * Annotations is an unstructured key-value map stored with a policy that * may be set by external tools to store and retrieve arbitrary metadata. * They are not queryable and should be preserved when modifying objects. * * @generated from protobuf field: map annotations = 8; */ annotations: { [key: string]: string; }; /** * Key restrictions. * * @generated from protobuf field: google.api.apikeys.v2.Restrictions restrictions = 9; */ restrictions?: Restrictions; /** * Output only. A checksum computed by the server based on the current value of the Key * resource. This may be sent on update and delete requests to ensure the * client has an up-to-date value before proceeding. * See https://google.aip.dev/154. * * @generated from protobuf field: string etag = 11; */ etag: string; } /** * Describes the restrictions on the key. * * @generated from protobuf message google.api.apikeys.v2.Restrictions */ export interface Restrictions { /** * @generated from protobuf oneof: client_restrictions */ clientRestrictions: { oneofKind: "browserKeyRestrictions"; /** * The HTTP referrers (websites) that are allowed to use the key. * * @generated from protobuf field: google.api.apikeys.v2.BrowserKeyRestrictions browser_key_restrictions = 1; */ browserKeyRestrictions: BrowserKeyRestrictions; } | { oneofKind: "serverKeyRestrictions"; /** * The IP addresses of callers that are allowed to use the key. * * @generated from protobuf field: google.api.apikeys.v2.ServerKeyRestrictions server_key_restrictions = 2; */ serverKeyRestrictions: ServerKeyRestrictions; } | { oneofKind: "androidKeyRestrictions"; /** * The Android apps that are allowed to use the key. * * @generated from protobuf field: google.api.apikeys.v2.AndroidKeyRestrictions android_key_restrictions = 3; */ androidKeyRestrictions: AndroidKeyRestrictions; } | { oneofKind: "iosKeyRestrictions"; /** * The iOS apps that are allowed to use the key. * * @generated from protobuf field: google.api.apikeys.v2.IosKeyRestrictions ios_key_restrictions = 4; */ iosKeyRestrictions: IosKeyRestrictions; } | { oneofKind: undefined; }; /** * 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. * * @generated from protobuf field: repeated google.api.apikeys.v2.ApiTarget api_targets = 5; */ apiTargets: ApiTarget[]; } /** * The HTTP referrers (websites) that are allowed to use the key. * * @generated from protobuf message google.api.apikeys.v2.BrowserKeyRestrictions */ export interface BrowserKeyRestrictions { /** * A list of regular expressions for the referrer URLs that are allowed * to make API calls with this key. * * @generated from protobuf field: repeated string allowed_referrers = 1; */ allowedReferrers: string[]; } /** * The IP addresses of callers that are allowed to use the key. * * @generated from protobuf message google.api.apikeys.v2.ServerKeyRestrictions */ export interface ServerKeyRestrictions { /** * A list of the caller IP addresses that are allowed to make API calls * with this key. * * @generated from protobuf field: repeated string allowed_ips = 1; */ allowedIps: string[]; } /** * The Android apps that are allowed to use the key. * * @generated from protobuf message google.api.apikeys.v2.AndroidKeyRestrictions */ export interface AndroidKeyRestrictions { /** * A list of Android applications that are allowed to make API calls with * this key. * * @generated from protobuf field: repeated google.api.apikeys.v2.AndroidApplication allowed_applications = 1; */ allowedApplications: AndroidApplication[]; } /** * Identifier of an Android application for key use. * * @generated from protobuf message google.api.apikeys.v2.AndroidApplication */ export interface AndroidApplication { /** * 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. * * @generated from protobuf field: string sha1_fingerprint = 1; */ sha1Fingerprint: string; /** * The package name of the application. * * @generated from protobuf field: string package_name = 2; */ packageName: string; } /** * The iOS apps that are allowed to use the key. * * @generated from protobuf message google.api.apikeys.v2.IosKeyRestrictions */ export interface IosKeyRestrictions { /** * A list of bundle IDs that are allowed when making API calls with this key. * * @generated from protobuf field: repeated string allowed_bundle_ids = 1; */ allowedBundleIds: string[]; } /** * A restriction for a specific service and optionally one or multiple * specific methods. Both fields are case insensitive. * * @generated from protobuf message google.api.apikeys.v2.ApiTarget */ export interface ApiTarget { /** * 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. * * @generated from protobuf field: string service = 1; */ service: string; /** * 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*` * * @generated from protobuf field: repeated string methods = 2; */ methods: string[]; } declare class Key$Type extends MessageType { constructor(); create(value?: PartialMessage): Key; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Key): Key; private binaryReadMap8; internalBinaryWrite(message: Key, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.apikeys.v2.Key */ export declare const Key: Key$Type; declare class Restrictions$Type extends MessageType { constructor(); create(value?: PartialMessage): Restrictions; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Restrictions): Restrictions; internalBinaryWrite(message: Restrictions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.apikeys.v2.Restrictions */ export declare const Restrictions: Restrictions$Type; declare class BrowserKeyRestrictions$Type extends MessageType { constructor(); create(value?: PartialMessage): BrowserKeyRestrictions; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BrowserKeyRestrictions): BrowserKeyRestrictions; internalBinaryWrite(message: BrowserKeyRestrictions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.apikeys.v2.BrowserKeyRestrictions */ export declare const BrowserKeyRestrictions: BrowserKeyRestrictions$Type; declare class ServerKeyRestrictions$Type extends MessageType { constructor(); create(value?: PartialMessage): ServerKeyRestrictions; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServerKeyRestrictions): ServerKeyRestrictions; internalBinaryWrite(message: ServerKeyRestrictions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.apikeys.v2.ServerKeyRestrictions */ export declare const ServerKeyRestrictions: ServerKeyRestrictions$Type; declare class AndroidKeyRestrictions$Type extends MessageType { constructor(); create(value?: PartialMessage): AndroidKeyRestrictions; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AndroidKeyRestrictions): AndroidKeyRestrictions; internalBinaryWrite(message: AndroidKeyRestrictions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.apikeys.v2.AndroidKeyRestrictions */ export declare const AndroidKeyRestrictions: AndroidKeyRestrictions$Type; declare class AndroidApplication$Type extends MessageType { constructor(); create(value?: PartialMessage): AndroidApplication; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AndroidApplication): AndroidApplication; internalBinaryWrite(message: AndroidApplication, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.apikeys.v2.AndroidApplication */ export declare const AndroidApplication: AndroidApplication$Type; declare class IosKeyRestrictions$Type extends MessageType { constructor(); create(value?: PartialMessage): IosKeyRestrictions; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: IosKeyRestrictions): IosKeyRestrictions; internalBinaryWrite(message: IosKeyRestrictions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.apikeys.v2.IosKeyRestrictions */ export declare const IosKeyRestrictions: IosKeyRestrictions$Type; declare class ApiTarget$Type extends MessageType { constructor(); create(value?: PartialMessage): ApiTarget; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ApiTarget): ApiTarget; internalBinaryWrite(message: ApiTarget, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.api.apikeys.v2.ApiTarget */ export declare const ApiTarget: ApiTarget$Type; export {};