Move to vendor
Signed-off-by: Olivier Gambier <olivier@docker.com>
This commit is contained in:
parent
c8d8e7e357
commit
77e69b9cf3
1268 changed files with 34 additions and 24 deletions
422
vendor/google.golang.org/api/taskqueue/v1beta1/taskqueue-api.json
generated
vendored
Normal file
422
vendor/google.golang.org/api/taskqueue/v1beta1/taskqueue-api.json
generated
vendored
Normal file
|
@ -0,0 +1,422 @@
|
|||
{
|
||||
"kind": "discovery#restDescription",
|
||||
"etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/xnLtIe0CIvW_kIgCrq0S6VocjyE\"",
|
||||
"discoveryVersion": "v1",
|
||||
"id": "taskqueue:v1beta1",
|
||||
"name": "taskqueue",
|
||||
"version": "v1beta1",
|
||||
"revision": "20141111",
|
||||
"title": "TaskQueue API",
|
||||
"description": "Lets you access a Google App Engine Pull Task Queue over REST.",
|
||||
"ownerDomain": "google.com",
|
||||
"ownerName": "Google",
|
||||
"icons": {
|
||||
"x16": "https://www.google.com/images/icons/product/app_engine-16.png",
|
||||
"x32": "https://www.google.com/images/icons/product/app_engine-32.png"
|
||||
},
|
||||
"documentationLink": "https://developers.google.com/appengine/docs/python/taskqueue/rest",
|
||||
"protocol": "rest",
|
||||
"baseUrl": "https://www.googleapis.com/taskqueue/v1beta1/projects/",
|
||||
"basePath": "/taskqueue/v1beta1/projects/",
|
||||
"rootUrl": "https://www.googleapis.com/",
|
||||
"servicePath": "taskqueue/v1beta1/projects/",
|
||||
"batchPath": "batch",
|
||||
"parameters": {
|
||||
"alt": {
|
||||
"type": "string",
|
||||
"description": "Data format for the response.",
|
||||
"default": "json",
|
||||
"enum": [
|
||||
"json"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Responses with Content-Type of application/json"
|
||||
],
|
||||
"location": "query"
|
||||
},
|
||||
"fields": {
|
||||
"type": "string",
|
||||
"description": "Selector specifying which fields to include in a partial response.",
|
||||
"location": "query"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
|
||||
"location": "query"
|
||||
},
|
||||
"oauth_token": {
|
||||
"type": "string",
|
||||
"description": "OAuth 2.0 token for the current user.",
|
||||
"location": "query"
|
||||
},
|
||||
"prettyPrint": {
|
||||
"type": "boolean",
|
||||
"description": "Returns response with indentations and line breaks.",
|
||||
"default": "true",
|
||||
"location": "query"
|
||||
},
|
||||
"quotaUser": {
|
||||
"type": "string",
|
||||
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
|
||||
"location": "query"
|
||||
},
|
||||
"userIp": {
|
||||
"type": "string",
|
||||
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
|
||||
"location": "query"
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"oauth2": {
|
||||
"scopes": {
|
||||
"https://www.googleapis.com/auth/taskqueue": {
|
||||
"description": "Manage your Tasks and Taskqueues"
|
||||
},
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer": {
|
||||
"description": "Consume Tasks from your Taskqueues"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schemas": {
|
||||
"Task": {
|
||||
"id": "Task",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enqueueTimestamp": {
|
||||
"type": "string",
|
||||
"description": "Time (in seconds since the epoch) at which the task was enqueued.",
|
||||
"format": "int64"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Name of the task."
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "The kind of object returned, in this case set to task.",
|
||||
"default": "taskqueues#task"
|
||||
},
|
||||
"leaseTimestamp": {
|
||||
"type": "string",
|
||||
"description": "Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker.",
|
||||
"format": "int64"
|
||||
},
|
||||
"payloadBase64": {
|
||||
"type": "string",
|
||||
"description": "A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded."
|
||||
},
|
||||
"queueName": {
|
||||
"type": "string",
|
||||
"description": "Name of the queue that the task is in."
|
||||
}
|
||||
}
|
||||
},
|
||||
"TaskQueue": {
|
||||
"id": "TaskQueue",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"acl": {
|
||||
"type": "object",
|
||||
"description": "ACLs that are applicable to this TaskQueue object.",
|
||||
"properties": {
|
||||
"adminEmails": {
|
||||
"type": "array",
|
||||
"description": "Email addresses of users who are \"admins\" of the TaskQueue. This means they can control the queue, eg set ACLs for the queue.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"consumerEmails": {
|
||||
"type": "array",
|
||||
"description": "Email addresses of users who can \"consume\" tasks from the TaskQueue. This means they can Dequeue and Delete tasks from the queue.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"producerEmails": {
|
||||
"type": "array",
|
||||
"description": "Email addresses of users who can \"produce\" tasks into the TaskQueue. This means they can Insert tasks into the queue.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Name of the taskqueue."
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "The kind of REST object returned, in this case taskqueue.",
|
||||
"default": "taskqueues#taskqueue"
|
||||
},
|
||||
"maxLeases": {
|
||||
"type": "integer",
|
||||
"description": "The number of times we should lease out tasks before giving up on them. If unset we lease them out forever until a worker deletes the task.",
|
||||
"format": "int32"
|
||||
},
|
||||
"stats": {
|
||||
"type": "object",
|
||||
"description": "Statistics for the TaskQueue object in question.",
|
||||
"properties": {
|
||||
"leasedLastHour": {
|
||||
"type": "string",
|
||||
"description": "Number of tasks leased in the last hour.",
|
||||
"format": "int64"
|
||||
},
|
||||
"leasedLastMinute": {
|
||||
"type": "string",
|
||||
"description": "Number of tasks leased in the last minute.",
|
||||
"format": "int64"
|
||||
},
|
||||
"oldestTask": {
|
||||
"type": "string",
|
||||
"description": "The timestamp (in seconds since the epoch) of the oldest unfinished task.",
|
||||
"format": "int64"
|
||||
},
|
||||
"totalTasks": {
|
||||
"type": "integer",
|
||||
"description": "Number of tasks in the queue.",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Tasks": {
|
||||
"id": "Tasks",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"description": "The actual list of tasks returned as a result of the lease operation.",
|
||||
"items": {
|
||||
"$ref": "Task"
|
||||
}
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "The kind of object returned, a list of tasks.",
|
||||
"default": "taskqueue#tasks"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Tasks2": {
|
||||
"id": "Tasks2",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"description": "The actual list of tasks currently active in the TaskQueue.",
|
||||
"items": {
|
||||
"$ref": "Task"
|
||||
}
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "The kind of object returned, a list of tasks.",
|
||||
"default": "taskqueues#tasks"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"taskqueues": {
|
||||
"methods": {
|
||||
"get": {
|
||||
"id": "taskqueue.taskqueues.get",
|
||||
"path": "{project}/taskqueues/{taskqueue}",
|
||||
"httpMethod": "GET",
|
||||
"description": "Get detailed information about a TaskQueue.",
|
||||
"parameters": {
|
||||
"getStats": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to get stats. Optional.",
|
||||
"location": "query"
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The id of the taskqueue to get the properties of.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue"
|
||||
],
|
||||
"response": {
|
||||
"$ref": "TaskQueue"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"tasks": {
|
||||
"methods": {
|
||||
"delete": {
|
||||
"id": "taskqueue.tasks.delete",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
|
||||
"httpMethod": "DELETE",
|
||||
"description": "Delete a task from a TaskQueue.",
|
||||
"parameters": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"task": {
|
||||
"type": "string",
|
||||
"description": "The id of the task to delete.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The taskqueue to delete a task from.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue",
|
||||
"task"
|
||||
],
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"id": "taskqueue.tasks.get",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
|
||||
"httpMethod": "GET",
|
||||
"description": "Get a particular task from a TaskQueue.",
|
||||
"parameters": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"task": {
|
||||
"type": "string",
|
||||
"description": "The task to get properties of.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The taskqueue in which the task belongs.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue",
|
||||
"task"
|
||||
],
|
||||
"response": {
|
||||
"$ref": "Task"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
},
|
||||
"lease": {
|
||||
"id": "taskqueue.tasks.lease",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks/lease",
|
||||
"httpMethod": "POST",
|
||||
"description": "Lease 1 or more tasks from a TaskQueue.",
|
||||
"parameters": {
|
||||
"leaseSecs": {
|
||||
"type": "integer",
|
||||
"description": "The lease in seconds.",
|
||||
"required": true,
|
||||
"format": "int32",
|
||||
"location": "query"
|
||||
},
|
||||
"numTasks": {
|
||||
"type": "integer",
|
||||
"description": "The number of tasks to lease.",
|
||||
"required": true,
|
||||
"format": "int32",
|
||||
"location": "query"
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The taskqueue to lease a task from.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue",
|
||||
"numTasks",
|
||||
"leaseSecs"
|
||||
],
|
||||
"response": {
|
||||
"$ref": "Tasks"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"id": "taskqueue.tasks.list",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks",
|
||||
"httpMethod": "GET",
|
||||
"description": "List Tasks in a TaskQueue",
|
||||
"parameters": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The id of the taskqueue to list tasks from.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue"
|
||||
],
|
||||
"response": {
|
||||
"$ref": "Tasks2"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
982
vendor/google.golang.org/api/taskqueue/v1beta1/taskqueue-gen.go
generated
vendored
Normal file
982
vendor/google.golang.org/api/taskqueue/v1beta1/taskqueue-gen.go
generated
vendored
Normal file
|
@ -0,0 +1,982 @@
|
|||
// Package taskqueue provides access to the TaskQueue API.
|
||||
//
|
||||
// See https://developers.google.com/appengine/docs/python/taskqueue/rest
|
||||
//
|
||||
// Usage example:
|
||||
//
|
||||
// import "google.golang.org/api/taskqueue/v1beta1"
|
||||
// ...
|
||||
// taskqueueService, err := taskqueue.New(oauthHttpClient)
|
||||
package taskqueue // import "google.golang.org/api/taskqueue/v1beta1"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/net/context/ctxhttp"
|
||||
"google.golang.org/api/googleapi"
|
||||
"google.golang.org/api/internal"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Always reference these packages, just in case the auto-generated code
|
||||
// below doesn't.
|
||||
var _ = bytes.NewBuffer
|
||||
var _ = strconv.Itoa
|
||||
var _ = fmt.Sprintf
|
||||
var _ = json.NewDecoder
|
||||
var _ = io.Copy
|
||||
var _ = url.Parse
|
||||
var _ = googleapi.Version
|
||||
var _ = errors.New
|
||||
var _ = strings.Replace
|
||||
var _ = internal.MarshalJSON
|
||||
var _ = context.Canceled
|
||||
var _ = ctxhttp.Do
|
||||
|
||||
const apiId = "taskqueue:v1beta1"
|
||||
const apiName = "taskqueue"
|
||||
const apiVersion = "v1beta1"
|
||||
const basePath = "https://www.googleapis.com/taskqueue/v1beta1/projects/"
|
||||
|
||||
// OAuth2 scopes used by this API.
|
||||
const (
|
||||
// Manage your Tasks and Taskqueues
|
||||
TaskqueueScope = "https://www.googleapis.com/auth/taskqueue"
|
||||
|
||||
// Consume Tasks from your Taskqueues
|
||||
TaskqueueConsumerScope = "https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
)
|
||||
|
||||
func New(client *http.Client) (*Service, error) {
|
||||
if client == nil {
|
||||
return nil, errors.New("client is nil")
|
||||
}
|
||||
s := &Service{client: client, BasePath: basePath}
|
||||
s.Taskqueues = NewTaskqueuesService(s)
|
||||
s.Tasks = NewTasksService(s)
|
||||
return s, nil
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
client *http.Client
|
||||
BasePath string // API endpoint base URL
|
||||
UserAgent string // optional additional User-Agent fragment
|
||||
|
||||
Taskqueues *TaskqueuesService
|
||||
|
||||
Tasks *TasksService
|
||||
}
|
||||
|
||||
func (s *Service) userAgent() string {
|
||||
if s.UserAgent == "" {
|
||||
return googleapi.UserAgent
|
||||
}
|
||||
return googleapi.UserAgent + " " + s.UserAgent
|
||||
}
|
||||
|
||||
func NewTaskqueuesService(s *Service) *TaskqueuesService {
|
||||
rs := &TaskqueuesService{s: s}
|
||||
return rs
|
||||
}
|
||||
|
||||
type TaskqueuesService struct {
|
||||
s *Service
|
||||
}
|
||||
|
||||
func NewTasksService(s *Service) *TasksService {
|
||||
rs := &TasksService{s: s}
|
||||
return rs
|
||||
}
|
||||
|
||||
type TasksService struct {
|
||||
s *Service
|
||||
}
|
||||
|
||||
type Task struct {
|
||||
// EnqueueTimestamp: Time (in seconds since the epoch) at which the task
|
||||
// was enqueued.
|
||||
EnqueueTimestamp int64 `json:"enqueueTimestamp,omitempty,string"`
|
||||
|
||||
// Id: Name of the task.
|
||||
Id string `json:"id,omitempty"`
|
||||
|
||||
// Kind: The kind of object returned, in this case set to task.
|
||||
Kind string `json:"kind,omitempty"`
|
||||
|
||||
// LeaseTimestamp: Time (in seconds since the epoch) at which the task
|
||||
// lease will expire. This value is 0 if the task isnt currently leased
|
||||
// out to a worker.
|
||||
LeaseTimestamp int64 `json:"leaseTimestamp,omitempty,string"`
|
||||
|
||||
// PayloadBase64: A bag of bytes which is the task payload. The payload
|
||||
// on the JSON side is always Base64 encoded.
|
||||
PayloadBase64 string `json:"payloadBase64,omitempty"`
|
||||
|
||||
// QueueName: Name of the queue that the task is in.
|
||||
QueueName string `json:"queueName,omitempty"`
|
||||
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
// server.
|
||||
googleapi.ServerResponse `json:"-"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "EnqueueTimestamp") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
// server regardless of whether the field is empty or not. This may be
|
||||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *Task) MarshalJSON() ([]byte, error) {
|
||||
type noMethod Task
|
||||
raw := noMethod(*s)
|
||||
return internal.MarshalJSON(raw, s.ForceSendFields)
|
||||
}
|
||||
|
||||
type TaskQueue struct {
|
||||
// Acl: ACLs that are applicable to this TaskQueue object.
|
||||
Acl *TaskQueueAcl `json:"acl,omitempty"`
|
||||
|
||||
// Id: Name of the taskqueue.
|
||||
Id string `json:"id,omitempty"`
|
||||
|
||||
// Kind: The kind of REST object returned, in this case taskqueue.
|
||||
Kind string `json:"kind,omitempty"`
|
||||
|
||||
// MaxLeases: The number of times we should lease out tasks before
|
||||
// giving up on them. If unset we lease them out forever until a worker
|
||||
// deletes the task.
|
||||
MaxLeases int64 `json:"maxLeases,omitempty"`
|
||||
|
||||
// Stats: Statistics for the TaskQueue object in question.
|
||||
Stats *TaskQueueStats `json:"stats,omitempty"`
|
||||
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
// server.
|
||||
googleapi.ServerResponse `json:"-"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Acl") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
// server regardless of whether the field is empty or not. This may be
|
||||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *TaskQueue) MarshalJSON() ([]byte, error) {
|
||||
type noMethod TaskQueue
|
||||
raw := noMethod(*s)
|
||||
return internal.MarshalJSON(raw, s.ForceSendFields)
|
||||
}
|
||||
|
||||
// TaskQueueAcl: ACLs that are applicable to this TaskQueue object.
|
||||
type TaskQueueAcl struct {
|
||||
// AdminEmails: Email addresses of users who are "admins" of the
|
||||
// TaskQueue. This means they can control the queue, eg set ACLs for the
|
||||
// queue.
|
||||
AdminEmails []string `json:"adminEmails,omitempty"`
|
||||
|
||||
// ConsumerEmails: Email addresses of users who can "consume" tasks from
|
||||
// the TaskQueue. This means they can Dequeue and Delete tasks from the
|
||||
// queue.
|
||||
ConsumerEmails []string `json:"consumerEmails,omitempty"`
|
||||
|
||||
// ProducerEmails: Email addresses of users who can "produce" tasks into
|
||||
// the TaskQueue. This means they can Insert tasks into the queue.
|
||||
ProducerEmails []string `json:"producerEmails,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "AdminEmails") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
// server regardless of whether the field is empty or not. This may be
|
||||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *TaskQueueAcl) MarshalJSON() ([]byte, error) {
|
||||
type noMethod TaskQueueAcl
|
||||
raw := noMethod(*s)
|
||||
return internal.MarshalJSON(raw, s.ForceSendFields)
|
||||
}
|
||||
|
||||
// TaskQueueStats: Statistics for the TaskQueue object in question.
|
||||
type TaskQueueStats struct {
|
||||
// LeasedLastHour: Number of tasks leased in the last hour.
|
||||
LeasedLastHour int64 `json:"leasedLastHour,omitempty,string"`
|
||||
|
||||
// LeasedLastMinute: Number of tasks leased in the last minute.
|
||||
LeasedLastMinute int64 `json:"leasedLastMinute,omitempty,string"`
|
||||
|
||||
// OldestTask: The timestamp (in seconds since the epoch) of the oldest
|
||||
// unfinished task.
|
||||
OldestTask int64 `json:"oldestTask,omitempty,string"`
|
||||
|
||||
// TotalTasks: Number of tasks in the queue.
|
||||
TotalTasks int64 `json:"totalTasks,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "LeasedLastHour") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
// server regardless of whether the field is empty or not. This may be
|
||||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *TaskQueueStats) MarshalJSON() ([]byte, error) {
|
||||
type noMethod TaskQueueStats
|
||||
raw := noMethod(*s)
|
||||
return internal.MarshalJSON(raw, s.ForceSendFields)
|
||||
}
|
||||
|
||||
type Tasks struct {
|
||||
// Items: The actual list of tasks returned as a result of the lease
|
||||
// operation.
|
||||
Items []*Task `json:"items,omitempty"`
|
||||
|
||||
// Kind: The kind of object returned, a list of tasks.
|
||||
Kind string `json:"kind,omitempty"`
|
||||
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
// server.
|
||||
googleapi.ServerResponse `json:"-"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Items") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
// server regardless of whether the field is empty or not. This may be
|
||||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *Tasks) MarshalJSON() ([]byte, error) {
|
||||
type noMethod Tasks
|
||||
raw := noMethod(*s)
|
||||
return internal.MarshalJSON(raw, s.ForceSendFields)
|
||||
}
|
||||
|
||||
type Tasks2 struct {
|
||||
// Items: The actual list of tasks currently active in the TaskQueue.
|
||||
Items []*Task `json:"items,omitempty"`
|
||||
|
||||
// Kind: The kind of object returned, a list of tasks.
|
||||
Kind string `json:"kind,omitempty"`
|
||||
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
// server.
|
||||
googleapi.ServerResponse `json:"-"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Items") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
// server regardless of whether the field is empty or not. This may be
|
||||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *Tasks2) MarshalJSON() ([]byte, error) {
|
||||
type noMethod Tasks2
|
||||
raw := noMethod(*s)
|
||||
return internal.MarshalJSON(raw, s.ForceSendFields)
|
||||
}
|
||||
|
||||
// method id "taskqueue.taskqueues.get":
|
||||
|
||||
type TaskqueuesGetCall struct {
|
||||
s *Service
|
||||
project string
|
||||
taskqueue string
|
||||
opt_ map[string]interface{}
|
||||
ctx_ context.Context
|
||||
}
|
||||
|
||||
// Get: Get detailed information about a TaskQueue.
|
||||
func (r *TaskqueuesService) Get(project string, taskqueue string) *TaskqueuesGetCall {
|
||||
c := &TaskqueuesGetCall{s: r.s, opt_: make(map[string]interface{})}
|
||||
c.project = project
|
||||
c.taskqueue = taskqueue
|
||||
return c
|
||||
}
|
||||
|
||||
// GetStats sets the optional parameter "getStats": Whether to get
|
||||
// stats.
|
||||
func (c *TaskqueuesGetCall) GetStats(getStats bool) *TaskqueuesGetCall {
|
||||
c.opt_["getStats"] = getStats
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved.
|
||||
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *TaskqueuesGetCall) Fields(s ...googleapi.Field) *TaskqueuesGetCall {
|
||||
c.opt_["fields"] = googleapi.CombineFields(s)
|
||||
return c
|
||||
}
|
||||
|
||||
// IfNoneMatch sets the optional parameter which makes the operation
|
||||
// fail if the object's ETag matches the given value. This is useful for
|
||||
// getting updates only after the object has changed since the last
|
||||
// request. Use googleapi.IsNotModified to check whether the response
|
||||
// error from Do is the result of In-None-Match.
|
||||
func (c *TaskqueuesGetCall) IfNoneMatch(entityTag string) *TaskqueuesGetCall {
|
||||
c.opt_["ifNoneMatch"] = entityTag
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method.
|
||||
// Any pending HTTP request will be aborted if the provided context
|
||||
// is canceled.
|
||||
func (c *TaskqueuesGetCall) Context(ctx context.Context) *TaskqueuesGetCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *TaskqueuesGetCall) doRequest(alt string) (*http.Response, error) {
|
||||
var body io.Reader = nil
|
||||
params := make(url.Values)
|
||||
params.Set("alt", alt)
|
||||
if v, ok := c.opt_["getStats"]; ok {
|
||||
params.Set("getStats", fmt.Sprintf("%v", v))
|
||||
}
|
||||
if v, ok := c.opt_["fields"]; ok {
|
||||
params.Set("fields", fmt.Sprintf("%v", v))
|
||||
}
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}")
|
||||
urls += "?" + params.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"project": c.project,
|
||||
"taskqueue": c.taskqueue,
|
||||
})
|
||||
req.Header.Set("User-Agent", c.s.userAgent())
|
||||
if v, ok := c.opt_["ifNoneMatch"]; ok {
|
||||
req.Header.Set("If-None-Match", fmt.Sprintf("%v", v))
|
||||
}
|
||||
if c.ctx_ != nil {
|
||||
return ctxhttp.Do(c.ctx_, c.s.client, req)
|
||||
}
|
||||
return c.s.client.Do(req)
|
||||
}
|
||||
|
||||
// Do executes the "taskqueue.taskqueues.get" call.
|
||||
// Exactly one of *TaskQueue or error will be non-nil. Any non-2xx
|
||||
// status code is an error. Response headers are in either
|
||||
// *TaskQueue.ServerResponse.Header or (if a response was returned at
|
||||
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
|
||||
// to check whether the returned error was because
|
||||
// http.StatusNotModified was returned.
|
||||
func (c *TaskqueuesGetCall) Do() (*TaskQueue, error) {
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, &googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ret := &TaskQueue{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Get detailed information about a TaskQueue.",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "taskqueue.taskqueues.get",
|
||||
// "parameterOrder": [
|
||||
// "project",
|
||||
// "taskqueue"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "getStats": {
|
||||
// "description": "Whether to get stats. Optional.",
|
||||
// "location": "query",
|
||||
// "type": "boolean"
|
||||
// },
|
||||
// "project": {
|
||||
// "description": "The project under which the queue lies.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "taskqueue": {
|
||||
// "description": "The id of the taskqueue to get the properties of.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "{project}/taskqueues/{taskqueue}",
|
||||
// "response": {
|
||||
// "$ref": "TaskQueue"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/taskqueue",
|
||||
// "https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "taskqueue.tasks.delete":
|
||||
|
||||
type TasksDeleteCall struct {
|
||||
s *Service
|
||||
project string
|
||||
taskqueue string
|
||||
task string
|
||||
opt_ map[string]interface{}
|
||||
ctx_ context.Context
|
||||
}
|
||||
|
||||
// Delete: Delete a task from a TaskQueue.
|
||||
func (r *TasksService) Delete(project string, taskqueue string, task string) *TasksDeleteCall {
|
||||
c := &TasksDeleteCall{s: r.s, opt_: make(map[string]interface{})}
|
||||
c.project = project
|
||||
c.taskqueue = taskqueue
|
||||
c.task = task
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved.
|
||||
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *TasksDeleteCall) Fields(s ...googleapi.Field) *TasksDeleteCall {
|
||||
c.opt_["fields"] = googleapi.CombineFields(s)
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method.
|
||||
// Any pending HTTP request will be aborted if the provided context
|
||||
// is canceled.
|
||||
func (c *TasksDeleteCall) Context(ctx context.Context) *TasksDeleteCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *TasksDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||
var body io.Reader = nil
|
||||
params := make(url.Values)
|
||||
params.Set("alt", alt)
|
||||
if v, ok := c.opt_["fields"]; ok {
|
||||
params.Set("fields", fmt.Sprintf("%v", v))
|
||||
}
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}")
|
||||
urls += "?" + params.Encode()
|
||||
req, _ := http.NewRequest("DELETE", urls, body)
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"project": c.project,
|
||||
"taskqueue": c.taskqueue,
|
||||
"task": c.task,
|
||||
})
|
||||
req.Header.Set("User-Agent", c.s.userAgent())
|
||||
if c.ctx_ != nil {
|
||||
return ctxhttp.Do(c.ctx_, c.s.client, req)
|
||||
}
|
||||
return c.s.client.Do(req)
|
||||
}
|
||||
|
||||
// Do executes the "taskqueue.tasks.delete" call.
|
||||
func (c *TasksDeleteCall) Do() error {
|
||||
res, err := c.doRequest("json")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
// {
|
||||
// "description": "Delete a task from a TaskQueue.",
|
||||
// "httpMethod": "DELETE",
|
||||
// "id": "taskqueue.tasks.delete",
|
||||
// "parameterOrder": [
|
||||
// "project",
|
||||
// "taskqueue",
|
||||
// "task"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "project": {
|
||||
// "description": "The project under which the queue lies.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "task": {
|
||||
// "description": "The id of the task to delete.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "taskqueue": {
|
||||
// "description": "The taskqueue to delete a task from.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/taskqueue",
|
||||
// "https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "taskqueue.tasks.get":
|
||||
|
||||
type TasksGetCall struct {
|
||||
s *Service
|
||||
project string
|
||||
taskqueue string
|
||||
task string
|
||||
opt_ map[string]interface{}
|
||||
ctx_ context.Context
|
||||
}
|
||||
|
||||
// Get: Get a particular task from a TaskQueue.
|
||||
func (r *TasksService) Get(project string, taskqueue string, task string) *TasksGetCall {
|
||||
c := &TasksGetCall{s: r.s, opt_: make(map[string]interface{})}
|
||||
c.project = project
|
||||
c.taskqueue = taskqueue
|
||||
c.task = task
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved.
|
||||
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *TasksGetCall) Fields(s ...googleapi.Field) *TasksGetCall {
|
||||
c.opt_["fields"] = googleapi.CombineFields(s)
|
||||
return c
|
||||
}
|
||||
|
||||
// IfNoneMatch sets the optional parameter which makes the operation
|
||||
// fail if the object's ETag matches the given value. This is useful for
|
||||
// getting updates only after the object has changed since the last
|
||||
// request. Use googleapi.IsNotModified to check whether the response
|
||||
// error from Do is the result of In-None-Match.
|
||||
func (c *TasksGetCall) IfNoneMatch(entityTag string) *TasksGetCall {
|
||||
c.opt_["ifNoneMatch"] = entityTag
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method.
|
||||
// Any pending HTTP request will be aborted if the provided context
|
||||
// is canceled.
|
||||
func (c *TasksGetCall) Context(ctx context.Context) *TasksGetCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *TasksGetCall) doRequest(alt string) (*http.Response, error) {
|
||||
var body io.Reader = nil
|
||||
params := make(url.Values)
|
||||
params.Set("alt", alt)
|
||||
if v, ok := c.opt_["fields"]; ok {
|
||||
params.Set("fields", fmt.Sprintf("%v", v))
|
||||
}
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}")
|
||||
urls += "?" + params.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"project": c.project,
|
||||
"taskqueue": c.taskqueue,
|
||||
"task": c.task,
|
||||
})
|
||||
req.Header.Set("User-Agent", c.s.userAgent())
|
||||
if v, ok := c.opt_["ifNoneMatch"]; ok {
|
||||
req.Header.Set("If-None-Match", fmt.Sprintf("%v", v))
|
||||
}
|
||||
if c.ctx_ != nil {
|
||||
return ctxhttp.Do(c.ctx_, c.s.client, req)
|
||||
}
|
||||
return c.s.client.Do(req)
|
||||
}
|
||||
|
||||
// Do executes the "taskqueue.tasks.get" call.
|
||||
// Exactly one of *Task or error will be non-nil. Any non-2xx status
|
||||
// code is an error. Response headers are in either
|
||||
// *Task.ServerResponse.Header or (if a response was returned at all) in
|
||||
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
|
||||
// whether the returned error was because http.StatusNotModified was
|
||||
// returned.
|
||||
func (c *TasksGetCall) Do() (*Task, error) {
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, &googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ret := &Task{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Get a particular task from a TaskQueue.",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "taskqueue.tasks.get",
|
||||
// "parameterOrder": [
|
||||
// "project",
|
||||
// "taskqueue",
|
||||
// "task"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "project": {
|
||||
// "description": "The project under which the queue lies.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "task": {
|
||||
// "description": "The task to get properties of.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "taskqueue": {
|
||||
// "description": "The taskqueue in which the task belongs.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
|
||||
// "response": {
|
||||
// "$ref": "Task"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/taskqueue",
|
||||
// "https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "taskqueue.tasks.lease":
|
||||
|
||||
type TasksLeaseCall struct {
|
||||
s *Service
|
||||
project string
|
||||
taskqueue string
|
||||
numTasks int64
|
||||
leaseSecs int64
|
||||
opt_ map[string]interface{}
|
||||
ctx_ context.Context
|
||||
}
|
||||
|
||||
// Lease: Lease 1 or more tasks from a TaskQueue.
|
||||
func (r *TasksService) Lease(project string, taskqueue string, numTasks int64, leaseSecs int64) *TasksLeaseCall {
|
||||
c := &TasksLeaseCall{s: r.s, opt_: make(map[string]interface{})}
|
||||
c.project = project
|
||||
c.taskqueue = taskqueue
|
||||
c.numTasks = numTasks
|
||||
c.leaseSecs = leaseSecs
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved.
|
||||
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *TasksLeaseCall) Fields(s ...googleapi.Field) *TasksLeaseCall {
|
||||
c.opt_["fields"] = googleapi.CombineFields(s)
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method.
|
||||
// Any pending HTTP request will be aborted if the provided context
|
||||
// is canceled.
|
||||
func (c *TasksLeaseCall) Context(ctx context.Context) *TasksLeaseCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *TasksLeaseCall) doRequest(alt string) (*http.Response, error) {
|
||||
var body io.Reader = nil
|
||||
params := make(url.Values)
|
||||
params.Set("alt", alt)
|
||||
params.Set("leaseSecs", fmt.Sprintf("%v", c.leaseSecs))
|
||||
params.Set("numTasks", fmt.Sprintf("%v", c.numTasks))
|
||||
if v, ok := c.opt_["fields"]; ok {
|
||||
params.Set("fields", fmt.Sprintf("%v", v))
|
||||
}
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/lease")
|
||||
urls += "?" + params.Encode()
|
||||
req, _ := http.NewRequest("POST", urls, body)
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"project": c.project,
|
||||
"taskqueue": c.taskqueue,
|
||||
})
|
||||
req.Header.Set("User-Agent", c.s.userAgent())
|
||||
if c.ctx_ != nil {
|
||||
return ctxhttp.Do(c.ctx_, c.s.client, req)
|
||||
}
|
||||
return c.s.client.Do(req)
|
||||
}
|
||||
|
||||
// Do executes the "taskqueue.tasks.lease" call.
|
||||
// Exactly one of *Tasks or error will be non-nil. Any non-2xx status
|
||||
// code is an error. Response headers are in either
|
||||
// *Tasks.ServerResponse.Header or (if a response was returned at all)
|
||||
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
|
||||
// check whether the returned error was because http.StatusNotModified
|
||||
// was returned.
|
||||
func (c *TasksLeaseCall) Do() (*Tasks, error) {
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, &googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ret := &Tasks{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Lease 1 or more tasks from a TaskQueue.",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "taskqueue.tasks.lease",
|
||||
// "parameterOrder": [
|
||||
// "project",
|
||||
// "taskqueue",
|
||||
// "numTasks",
|
||||
// "leaseSecs"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "leaseSecs": {
|
||||
// "description": "The lease in seconds.",
|
||||
// "format": "int32",
|
||||
// "location": "query",
|
||||
// "required": true,
|
||||
// "type": "integer"
|
||||
// },
|
||||
// "numTasks": {
|
||||
// "description": "The number of tasks to lease.",
|
||||
// "format": "int32",
|
||||
// "location": "query",
|
||||
// "required": true,
|
||||
// "type": "integer"
|
||||
// },
|
||||
// "project": {
|
||||
// "description": "The project under which the queue lies.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "taskqueue": {
|
||||
// "description": "The taskqueue to lease a task from.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "{project}/taskqueues/{taskqueue}/tasks/lease",
|
||||
// "response": {
|
||||
// "$ref": "Tasks"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/taskqueue",
|
||||
// "https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "taskqueue.tasks.list":
|
||||
|
||||
type TasksListCall struct {
|
||||
s *Service
|
||||
project string
|
||||
taskqueue string
|
||||
opt_ map[string]interface{}
|
||||
ctx_ context.Context
|
||||
}
|
||||
|
||||
// List: List Tasks in a TaskQueue
|
||||
func (r *TasksService) List(project string, taskqueue string) *TasksListCall {
|
||||
c := &TasksListCall{s: r.s, opt_: make(map[string]interface{})}
|
||||
c.project = project
|
||||
c.taskqueue = taskqueue
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved.
|
||||
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *TasksListCall) Fields(s ...googleapi.Field) *TasksListCall {
|
||||
c.opt_["fields"] = googleapi.CombineFields(s)
|
||||
return c
|
||||
}
|
||||
|
||||
// IfNoneMatch sets the optional parameter which makes the operation
|
||||
// fail if the object's ETag matches the given value. This is useful for
|
||||
// getting updates only after the object has changed since the last
|
||||
// request. Use googleapi.IsNotModified to check whether the response
|
||||
// error from Do is the result of In-None-Match.
|
||||
func (c *TasksListCall) IfNoneMatch(entityTag string) *TasksListCall {
|
||||
c.opt_["ifNoneMatch"] = entityTag
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method.
|
||||
// Any pending HTTP request will be aborted if the provided context
|
||||
// is canceled.
|
||||
func (c *TasksListCall) Context(ctx context.Context) *TasksListCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *TasksListCall) doRequest(alt string) (*http.Response, error) {
|
||||
var body io.Reader = nil
|
||||
params := make(url.Values)
|
||||
params.Set("alt", alt)
|
||||
if v, ok := c.opt_["fields"]; ok {
|
||||
params.Set("fields", fmt.Sprintf("%v", v))
|
||||
}
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks")
|
||||
urls += "?" + params.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"project": c.project,
|
||||
"taskqueue": c.taskqueue,
|
||||
})
|
||||
req.Header.Set("User-Agent", c.s.userAgent())
|
||||
if v, ok := c.opt_["ifNoneMatch"]; ok {
|
||||
req.Header.Set("If-None-Match", fmt.Sprintf("%v", v))
|
||||
}
|
||||
if c.ctx_ != nil {
|
||||
return ctxhttp.Do(c.ctx_, c.s.client, req)
|
||||
}
|
||||
return c.s.client.Do(req)
|
||||
}
|
||||
|
||||
// Do executes the "taskqueue.tasks.list" call.
|
||||
// Exactly one of *Tasks2 or error will be non-nil. Any non-2xx status
|
||||
// code is an error. Response headers are in either
|
||||
// *Tasks2.ServerResponse.Header or (if a response was returned at all)
|
||||
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
|
||||
// check whether the returned error was because http.StatusNotModified
|
||||
// was returned.
|
||||
func (c *TasksListCall) Do() (*Tasks2, error) {
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, &googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ret := &Tasks2{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "List Tasks in a TaskQueue",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "taskqueue.tasks.list",
|
||||
// "parameterOrder": [
|
||||
// "project",
|
||||
// "taskqueue"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "project": {
|
||||
// "description": "The project under which the queue lies.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "taskqueue": {
|
||||
// "description": "The id of the taskqueue to list tasks from.",
|
||||
// "location": "path",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "{project}/taskqueues/{taskqueue}/tasks",
|
||||
// "response": {
|
||||
// "$ref": "Tasks2"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/taskqueue",
|
||||
// "https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
569
vendor/google.golang.org/api/taskqueue/v1beta2/taskqueue-api.json
generated
vendored
Normal file
569
vendor/google.golang.org/api/taskqueue/v1beta2/taskqueue-api.json
generated
vendored
Normal file
|
@ -0,0 +1,569 @@
|
|||
{
|
||||
"kind": "discovery#restDescription",
|
||||
"etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/LPLXKKjaGUbCz_MfuhQ-STkNWfw\"",
|
||||
"discoveryVersion": "v1",
|
||||
"id": "taskqueue:v1beta2",
|
||||
"name": "taskqueue",
|
||||
"version": "v1beta2",
|
||||
"revision": "20141111",
|
||||
"title": "TaskQueue API",
|
||||
"description": "Lets you access a Google App Engine Pull Task Queue over REST.",
|
||||
"ownerDomain": "google.com",
|
||||
"ownerName": "Google",
|
||||
"icons": {
|
||||
"x16": "https://www.google.com/images/icons/product/app_engine-16.png",
|
||||
"x32": "https://www.google.com/images/icons/product/app_engine-32.png"
|
||||
},
|
||||
"documentationLink": "https://developers.google.com/appengine/docs/python/taskqueue/rest",
|
||||
"protocol": "rest",
|
||||
"baseUrl": "https://www.googleapis.com/taskqueue/v1beta2/projects/",
|
||||
"basePath": "/taskqueue/v1beta2/projects/",
|
||||
"rootUrl": "https://www.googleapis.com/",
|
||||
"servicePath": "taskqueue/v1beta2/projects/",
|
||||
"batchPath": "batch",
|
||||
"parameters": {
|
||||
"alt": {
|
||||
"type": "string",
|
||||
"description": "Data format for the response.",
|
||||
"default": "json",
|
||||
"enum": [
|
||||
"json"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Responses with Content-Type of application/json"
|
||||
],
|
||||
"location": "query"
|
||||
},
|
||||
"fields": {
|
||||
"type": "string",
|
||||
"description": "Selector specifying which fields to include in a partial response.",
|
||||
"location": "query"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
|
||||
"location": "query"
|
||||
},
|
||||
"oauth_token": {
|
||||
"type": "string",
|
||||
"description": "OAuth 2.0 token for the current user.",
|
||||
"location": "query"
|
||||
},
|
||||
"prettyPrint": {
|
||||
"type": "boolean",
|
||||
"description": "Returns response with indentations and line breaks.",
|
||||
"default": "true",
|
||||
"location": "query"
|
||||
},
|
||||
"quotaUser": {
|
||||
"type": "string",
|
||||
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
|
||||
"location": "query"
|
||||
},
|
||||
"userIp": {
|
||||
"type": "string",
|
||||
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
|
||||
"location": "query"
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"oauth2": {
|
||||
"scopes": {
|
||||
"https://www.googleapis.com/auth/taskqueue": {
|
||||
"description": "Manage your Tasks and Taskqueues"
|
||||
},
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer": {
|
||||
"description": "Consume Tasks from your Taskqueues"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schemas": {
|
||||
"Task": {
|
||||
"id": "Task",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enqueueTimestamp": {
|
||||
"type": "string",
|
||||
"description": "Time (in seconds since the epoch) at which the task was enqueued.",
|
||||
"format": "int64"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Name of the task."
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "The kind of object returned, in this case set to task.",
|
||||
"default": "taskqueues#task"
|
||||
},
|
||||
"leaseTimestamp": {
|
||||
"type": "string",
|
||||
"description": "Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker.",
|
||||
"format": "int64"
|
||||
},
|
||||
"payloadBase64": {
|
||||
"type": "string",
|
||||
"description": "A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded."
|
||||
},
|
||||
"queueName": {
|
||||
"type": "string",
|
||||
"description": "Name of the queue that the task is in."
|
||||
},
|
||||
"retry_count": {
|
||||
"type": "integer",
|
||||
"description": "The number of leases applied to this task.",
|
||||
"format": "int32"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string",
|
||||
"description": "Tag for the task, could be used later to lease tasks grouped by a specific tag."
|
||||
}
|
||||
}
|
||||
},
|
||||
"TaskQueue": {
|
||||
"id": "TaskQueue",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"acl": {
|
||||
"type": "object",
|
||||
"description": "ACLs that are applicable to this TaskQueue object.",
|
||||
"properties": {
|
||||
"adminEmails": {
|
||||
"type": "array",
|
||||
"description": "Email addresses of users who are \"admins\" of the TaskQueue. This means they can control the queue, eg set ACLs for the queue.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"consumerEmails": {
|
||||
"type": "array",
|
||||
"description": "Email addresses of users who can \"consume\" tasks from the TaskQueue. This means they can Dequeue and Delete tasks from the queue.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"producerEmails": {
|
||||
"type": "array",
|
||||
"description": "Email addresses of users who can \"produce\" tasks into the TaskQueue. This means they can Insert tasks into the queue.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Name of the taskqueue."
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "The kind of REST object returned, in this case taskqueue.",
|
||||
"default": "taskqueues#taskqueue"
|
||||
},
|
||||
"maxLeases": {
|
||||
"type": "integer",
|
||||
"description": "The number of times we should lease out tasks before giving up on them. If unset we lease them out forever until a worker deletes the task.",
|
||||
"format": "int32"
|
||||
},
|
||||
"stats": {
|
||||
"type": "object",
|
||||
"description": "Statistics for the TaskQueue object in question.",
|
||||
"properties": {
|
||||
"leasedLastHour": {
|
||||
"type": "string",
|
||||
"description": "Number of tasks leased in the last hour.",
|
||||
"format": "int64"
|
||||
},
|
||||
"leasedLastMinute": {
|
||||
"type": "string",
|
||||
"description": "Number of tasks leased in the last minute.",
|
||||
"format": "int64"
|
||||
},
|
||||
"oldestTask": {
|
||||
"type": "string",
|
||||
"description": "The timestamp (in seconds since the epoch) of the oldest unfinished task.",
|
||||
"format": "int64"
|
||||
},
|
||||
"totalTasks": {
|
||||
"type": "integer",
|
||||
"description": "Number of tasks in the queue.",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Tasks": {
|
||||
"id": "Tasks",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"description": "The actual list of tasks returned as a result of the lease operation.",
|
||||
"items": {
|
||||
"$ref": "Task"
|
||||
}
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "The kind of object returned, a list of tasks.",
|
||||
"default": "taskqueue#tasks"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Tasks2": {
|
||||
"id": "Tasks2",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"description": "The actual list of tasks currently active in the TaskQueue.",
|
||||
"items": {
|
||||
"$ref": "Task"
|
||||
}
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "The kind of object returned, a list of tasks.",
|
||||
"default": "taskqueues#tasks"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"taskqueues": {
|
||||
"methods": {
|
||||
"get": {
|
||||
"id": "taskqueue.taskqueues.get",
|
||||
"path": "{project}/taskqueues/{taskqueue}",
|
||||
"httpMethod": "GET",
|
||||
"description": "Get detailed information about a TaskQueue.",
|
||||
"parameters": {
|
||||
"getStats": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to get stats. Optional.",
|
||||
"location": "query"
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The id of the taskqueue to get the properties of.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue"
|
||||
],
|
||||
"response": {
|
||||
"$ref": "TaskQueue"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"tasks": {
|
||||
"methods": {
|
||||
"delete": {
|
||||
"id": "taskqueue.tasks.delete",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
|
||||
"httpMethod": "DELETE",
|
||||
"description": "Delete a task from a TaskQueue.",
|
||||
"parameters": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"task": {
|
||||
"type": "string",
|
||||
"description": "The id of the task to delete.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The taskqueue to delete a task from.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue",
|
||||
"task"
|
||||
],
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"id": "taskqueue.tasks.get",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
|
||||
"httpMethod": "GET",
|
||||
"description": "Get a particular task from a TaskQueue.",
|
||||
"parameters": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"task": {
|
||||
"type": "string",
|
||||
"description": "The task to get properties of.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The taskqueue in which the task belongs.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue",
|
||||
"task"
|
||||
],
|
||||
"response": {
|
||||
"$ref": "Task"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
},
|
||||
"insert": {
|
||||
"id": "taskqueue.tasks.insert",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks",
|
||||
"httpMethod": "POST",
|
||||
"description": "Insert a new task in a TaskQueue",
|
||||
"parameters": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The taskqueue to insert the task into",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue"
|
||||
],
|
||||
"request": {
|
||||
"$ref": "Task"
|
||||
},
|
||||
"response": {
|
||||
"$ref": "Task"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
},
|
||||
"lease": {
|
||||
"id": "taskqueue.tasks.lease",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks/lease",
|
||||
"httpMethod": "POST",
|
||||
"description": "Lease 1 or more tasks from a TaskQueue.",
|
||||
"parameters": {
|
||||
"groupByTag": {
|
||||
"type": "boolean",
|
||||
"description": "When true, all returned tasks will have the same tag",
|
||||
"location": "query"
|
||||
},
|
||||
"leaseSecs": {
|
||||
"type": "integer",
|
||||
"description": "The lease in seconds.",
|
||||
"required": true,
|
||||
"format": "int32",
|
||||
"location": "query"
|
||||
},
|
||||
"numTasks": {
|
||||
"type": "integer",
|
||||
"description": "The number of tasks to lease.",
|
||||
"required": true,
|
||||
"format": "int32",
|
||||
"location": "query"
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string",
|
||||
"description": "The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta, i.e. the first available tag",
|
||||
"location": "query"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The taskqueue to lease a task from.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue",
|
||||
"numTasks",
|
||||
"leaseSecs"
|
||||
],
|
||||
"response": {
|
||||
"$ref": "Tasks"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"id": "taskqueue.tasks.list",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks",
|
||||
"httpMethod": "GET",
|
||||
"description": "List Tasks in a TaskQueue",
|
||||
"parameters": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"description": "The id of the taskqueue to list tasks from.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue"
|
||||
],
|
||||
"response": {
|
||||
"$ref": "Tasks2"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"id": "taskqueue.tasks.patch",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
|
||||
"httpMethod": "PATCH",
|
||||
"description": "Update tasks that are leased out of a TaskQueue. This method supports patch semantics.",
|
||||
"parameters": {
|
||||
"newLeaseSeconds": {
|
||||
"type": "integer",
|
||||
"description": "The new lease in seconds.",
|
||||
"required": true,
|
||||
"format": "int32",
|
||||
"location": "query"
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"task": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue",
|
||||
"task",
|
||||
"newLeaseSeconds"
|
||||
],
|
||||
"request": {
|
||||
"$ref": "Task"
|
||||
},
|
||||
"response": {
|
||||
"$ref": "Task"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
},
|
||||
"update": {
|
||||
"id": "taskqueue.tasks.update",
|
||||
"path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
|
||||
"httpMethod": "POST",
|
||||
"description": "Update tasks that are leased out of a TaskQueue.",
|
||||
"parameters": {
|
||||
"newLeaseSeconds": {
|
||||
"type": "integer",
|
||||
"description": "The new lease in seconds.",
|
||||
"required": true,
|
||||
"format": "int32",
|
||||
"location": "query"
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The project under which the queue lies.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"task": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"taskqueue": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"taskqueue",
|
||||
"task",
|
||||
"newLeaseSeconds"
|
||||
],
|
||||
"request": {
|
||||
"$ref": "Task"
|
||||
},
|
||||
"response": {
|
||||
"$ref": "Task"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/taskqueue",
|
||||
"https://www.googleapis.com/auth/taskqueue.consumer"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1465
vendor/google.golang.org/api/taskqueue/v1beta2/taskqueue-gen.go
generated
vendored
Normal file
1465
vendor/google.golang.org/api/taskqueue/v1beta2/taskqueue-gen.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue