@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Cloud Functions API
@base https://cloudfunctions.googleapis.com/
@version v2
@auth OAuth2 | OAuth2
@endpoints 13
@toc {name}(5), {name}:generateDownloadUrl(1), {parent}(4), {resource}:getIamPolicy(1), {resource}:setIamPolicy(1), {resource}:testIamPermissions(1)

@group {name}
@endpoint DELETE /v2/{name}
@required {name: str}
@returns(200) {done: bool, error: map{code: int(int32), details: [map], message: str}, metadata: map, name: str, response: map}

@endpoint GET /v2/{name}
@required {name: str}
@returns(200) {done: bool, error: map{code: int(int32), details: [map], message: str}, metadata: map, name: str, response: map}

@endpoint PATCH /v2/{name}
@required {name: str}
@optional {updateMask: str, buildConfig: map{build: str, dockerRegistry: str, dockerRepository: str, entryPoint: str, environmentVariables: map, runtime: str, source: map, sourceProvenance: map, workerPool: str}, description: str, environment: str(ENVIRONMENT_UNSPECIFIED/GEN_1/GEN_2), eventTrigger: map{channel: str, eventFilters: [map], eventType: str, pubsubTopic: str, retryPolicy: str, serviceAccountEmail: str, trigger: str, triggerRegion: str}, kmsKeyName: str, labels: map, name: str, serviceConfig: map{allTrafficOnLatestRevision: bool, availableCpu: str, availableMemory: str, environmentVariables: map, ingressSettings: str, maxInstanceCount: int(int32), maxInstanceRequestConcurrency: int(int32), minInstanceCount: int(int32), revision: str, secretEnvironmentVariables: [map], secretVolumes: [map], securityLevel: str, service: str, serviceAccountEmail: str, timeoutSeconds: int(int32), uri: str, vpcConnector: str, vpcConnectorEgressSettings: str}, state: str(STATE_UNSPECIFIED/ACTIVE/FAILED/DEPLOYING/DELETING/UNKNOWN), stateMessages: [map{message: str, severity: str, type: str}], updateTime: str(google-datetime)}
@returns(200) {done: bool, error: map{code: int(int32), details: [map], message: str}, metadata: map, name: str, response: map}

@endpoint GET /v2/{name}/locations
@required {name: str}
@optional {filter: str, pageSize: int, pageToken: str}
@returns(200) {locations: [map], nextPageToken: str}

@endpoint GET /v2/{name}/operations
@required {name: str}
@optional {filter: str, pageSize: int, pageToken: str}
@returns(200) {nextPageToken: str, operations: [map]}

@endgroup

@group {name}:generateDownloadUrl
@endpoint POST /v2/{name}:generateDownloadUrl
@required {name: str}
@returns(200) {downloadUrl: str}

@endgroup

@group {parent}
@endpoint GET /v2/{parent}/functions
@required {parent: str}
@optional {filter: str, orderBy: str, pageSize: int, pageToken: str}
@returns(200) {functions: [map], nextPageToken: str, unreachable: [str]}

@endpoint POST /v2/{parent}/functions
@required {parent: str}
@optional {functionId: str, buildConfig: map{build: str, dockerRegistry: str, dockerRepository: str, entryPoint: str, environmentVariables: map, runtime: str, source: map, sourceProvenance: map, workerPool: str}, description: str, environment: str(ENVIRONMENT_UNSPECIFIED/GEN_1/GEN_2), eventTrigger: map{channel: str, eventFilters: [map], eventType: str, pubsubTopic: str, retryPolicy: str, serviceAccountEmail: str, trigger: str, triggerRegion: str}, kmsKeyName: str, labels: map, name: str, serviceConfig: map{allTrafficOnLatestRevision: bool, availableCpu: str, availableMemory: str, environmentVariables: map, ingressSettings: str, maxInstanceCount: int(int32), maxInstanceRequestConcurrency: int(int32), minInstanceCount: int(int32), revision: str, secretEnvironmentVariables: [map], secretVolumes: [map], securityLevel: str, service: str, serviceAccountEmail: str, timeoutSeconds: int(int32), uri: str, vpcConnector: str, vpcConnectorEgressSettings: str}, state: str(STATE_UNSPECIFIED/ACTIVE/FAILED/DEPLOYING/DELETING/UNKNOWN), stateMessages: [map{message: str, severity: str, type: str}], updateTime: str(google-datetime)}
@returns(200) {done: bool, error: map{code: int(int32), details: [map], message: str}, metadata: map, name: str, response: map}

@endpoint POST /v2/{parent}/functions:generateUploadUrl
@required {parent: str}
@optional {kmsKeyName: str}
@returns(200) {storageSource: map{bucket: str, generation: str(int64), object: str}, uploadUrl: str}

@endpoint GET /v2/{parent}/runtimes
@required {parent: str}
@optional {filter: str}
@returns(200) {runtimes: [map]}

@endgroup

@group {resource}:getIamPolicy
@endpoint GET /v2/{resource}:getIamPolicy
@required {resource: str}
@optional {options.requestedPolicyVersion: int}
@returns(200) {auditConfigs: [map], bindings: [map], etag: str(byte), version: int(int32)}

@endgroup

@group {resource}:setIamPolicy
@endpoint POST /v2/{resource}:setIamPolicy
@required {resource: str}
@optional {policy: map{auditConfigs: [map], bindings: [map], etag: str(byte), version: int(int32)}, updateMask: str(google-fieldmask)}
@returns(200) {auditConfigs: [map], bindings: [map], etag: str(byte), version: int(int32)}

@endgroup

@group {resource}:testIamPermissions
@endpoint POST /v2/{resource}:testIamPermissions
@required {resource: str}
@optional {permissions: [str]}
@returns(200) {permissions: [str]}

@endgroup

@end
