-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Google TaskQueue SDK.
--   
--   Accesses a Google App Engine Pull Task Queue over REST.
--   
--   <i>Warning:</i> This is an experimental prototype/preview release
--   which is still under exploratory development and not intended for
--   public use, caveat emptor!
--   
--   This library is compatible with version <tt>v1beta2</tt> of the API.
@package gogol-taskqueue
@version 0.3.0


module Network.Google.TaskQueue.Types

-- | Default request referring to version <tt>v1beta2</tt> of the TaskQueue
--   API. This contains the host and root path used as a starting point for
--   constructing service requests.
taskQueueService :: ServiceConfig

-- | Consume Tasks from your Taskqueues
taskQueueConsumerScope :: Proxy '["https://www.googleapis.com/auth/taskqueue.consumer"]

-- | Manage your Tasks and Taskqueues
taskQueueScope :: Proxy '["https://www.googleapis.com/auth/taskqueue"]
data Tasks2

-- | Creates a value of <a>Tasks2</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tKind</a></li>
--   <li><a>tItems</a></li>
--   </ul>
tasks2 :: Tasks2

-- | The kind of object returned, a list of tasks.
tKind :: Lens' Tasks2 Text

-- | The actual list of tasks currently active in the TaskQueue.
tItems :: Lens' Tasks2 [Task]
data TaskQueue

-- | Creates a value of <a>TaskQueue</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tqKind</a></li>
--   <li><a>tqStats</a></li>
--   <li><a>tqMaxLeases</a></li>
--   <li><a>tqId</a></li>
--   <li><a>tqACL</a></li>
--   </ul>
taskQueue :: TaskQueue

-- | The kind of REST object returned, in this case taskqueue.
tqKind :: Lens' TaskQueue Text

-- | Statistics for the TaskQueue object in question.
tqStats :: Lens' TaskQueue (Maybe TaskQueueStats)

-- | 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.
tqMaxLeases :: Lens' TaskQueue (Maybe Int32)

-- | Name of the taskqueue.
tqId :: Lens' TaskQueue (Maybe Text)

-- | ACLs that are applicable to this TaskQueue object.
tqACL :: Lens' TaskQueue (Maybe TaskQueueACL)

-- | ACLs that are applicable to this TaskQueue object.
--   
--   <i>See:</i> <a>taskQueueACL</a> smart constructor.
data TaskQueueACL

-- | Creates a value of <a>TaskQueueACL</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tqaProducerEmails</a></li>
--   <li><a>tqaAdminEmails</a></li>
--   <li><a>tqaConsumerEmails</a></li>
--   </ul>
taskQueueACL :: TaskQueueACL

-- | Email addresses of users who can "produce" tasks into the TaskQueue.
--   This means they can Insert tasks into the queue.
tqaProducerEmails :: Lens' TaskQueueACL [Text]

-- | Email addresses of users who are "admins" of the TaskQueue. This means
--   they can control the queue, eg set ACLs for the queue.
tqaAdminEmails :: Lens' TaskQueueACL [Text]

-- | Email addresses of users who can "consume" tasks from the TaskQueue.
--   This means they can Dequeue and Delete tasks from the queue.
tqaConsumerEmails :: Lens' TaskQueueACL [Text]

-- | Statistics for the TaskQueue object in question.
--   
--   <i>See:</i> <a>taskQueueStats</a> smart constructor.
data TaskQueueStats

-- | Creates a value of <a>TaskQueueStats</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tqsTotalTasks</a></li>
--   <li><a>tqsOldestTask</a></li>
--   <li><a>tqsLeasedLastHour</a></li>
--   <li><a>tqsLeasedLastMinute</a></li>
--   </ul>
taskQueueStats :: TaskQueueStats

-- | Number of tasks in the queue.
tqsTotalTasks :: Lens' TaskQueueStats (Maybe Int32)

-- | The timestamp (in seconds since the epoch) of the oldest unfinished
--   task.
tqsOldestTask :: Lens' TaskQueueStats (Maybe Int64)

-- | Number of tasks leased in the last hour.
tqsLeasedLastHour :: Lens' TaskQueueStats (Maybe Int64)

-- | Number of tasks leased in the last minute.
tqsLeasedLastMinute :: Lens' TaskQueueStats (Maybe Int64)
data Tasks

-- | Creates a value of <a>Tasks</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tasKind</a></li>
--   <li><a>tasItems</a></li>
--   </ul>
tasks :: Tasks

-- | The kind of object returned, a list of tasks.
tasKind :: Lens' Tasks Text

-- | The actual list of tasks returned as a result of the lease operation.
tasItems :: Lens' Tasks [Task]
data Task

-- | Creates a value of <a>Task</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ttRetryCount</a></li>
--   <li><a>ttEnQueueTimestamp</a></li>
--   <li><a>ttTag</a></li>
--   <li><a>ttKind</a></li>
--   <li><a>ttQueueName</a></li>
--   <li><a>ttPayloadBase64</a></li>
--   <li><a>ttId</a></li>
--   <li><a>ttLeaseTimestamp</a></li>
--   </ul>
task :: Task

-- | The number of leases applied to this task.
ttRetryCount :: Lens' Task (Maybe Int32)

-- | Time (in seconds since the epoch) at which the task was enqueued.
ttEnQueueTimestamp :: Lens' Task (Maybe Int64)

-- | Tag for the task, could be used later to lease tasks grouped by a
--   specific tag.
ttTag :: Lens' Task (Maybe Text)

-- | The kind of object returned, in this case set to task.
ttKind :: Lens' Task Text

-- | Name of the queue that the task is in.
ttQueueName :: Lens' Task (Maybe Text)

-- | A bag of bytes which is the task payload. The payload on the JSON side
--   is always Base64 encoded.
ttPayloadBase64 :: Lens' Task (Maybe Text)

-- | Name of the task.
ttId :: Lens' Task (Maybe Text)

-- | 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.
ttLeaseTimestamp :: Lens' Task (Maybe Int64)


-- | Update tasks that are leased out of a TaskQueue.
--   
--   <i>See:</i> <a>TaskQueue API Reference</a> for
--   <tt>taskqueue.tasks.update</tt>.
module Network.Google.Resource.TaskQueue.Tasks.Update

-- | A resource alias for <tt>taskqueue.tasks.update</tt> method which the
--   <a>TasksUpdate</a> request conforms to.
type TasksUpdateResource = "taskqueue" :> ("v1beta2" :> ("projects" :> (Capture "project" Text :> ("taskqueues" :> (Capture "taskqueue" Text :> ("tasks" :> (Capture "task" Text :> (QueryParam "newLeaseSeconds" (Textual Int32) :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Task :> Post '[JSON] Task))))))))))

-- | Creates a value of <a>TasksUpdate</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tuTaskQueue</a></li>
--   <li><a>tuProject</a></li>
--   <li><a>tuPayload</a></li>
--   <li><a>tuTask</a></li>
--   <li><a>tuNewLeaseSeconds</a></li>
--   </ul>
tasksUpdate :: Text -> Text -> Task -> Text -> Int32 -> TasksUpdate

-- | Update tasks that are leased out of a TaskQueue.
--   
--   <i>See:</i> <a>tasksUpdate</a> smart constructor.
data TasksUpdate
tuTaskQueue :: Lens' TasksUpdate Text

-- | The project under which the queue lies.
tuProject :: Lens' TasksUpdate Text

-- | Multipart request metadata.
tuPayload :: Lens' TasksUpdate Task
tuTask :: Lens' TasksUpdate Text

-- | The new lease in seconds.
tuNewLeaseSeconds :: Lens' TasksUpdate Int32
instance GHC.Generics.Generic Network.Google.Resource.TaskQueue.Tasks.Update.TasksUpdate
instance Data.Data.Data Network.Google.Resource.TaskQueue.Tasks.Update.TasksUpdate
instance GHC.Show.Show Network.Google.Resource.TaskQueue.Tasks.Update.TasksUpdate
instance GHC.Classes.Eq Network.Google.Resource.TaskQueue.Tasks.Update.TasksUpdate
instance Network.Google.Types.GoogleRequest Network.Google.Resource.TaskQueue.Tasks.Update.TasksUpdate


-- | Update tasks that are leased out of a TaskQueue. This method supports
--   patch semantics.
--   
--   <i>See:</i> <a>TaskQueue API Reference</a> for
--   <tt>taskqueue.tasks.patch</tt>.
module Network.Google.Resource.TaskQueue.Tasks.Patch

-- | A resource alias for <tt>taskqueue.tasks.patch</tt> method which the
--   <a>TasksPatch</a> request conforms to.
type TasksPatchResource = "taskqueue" :> ("v1beta2" :> ("projects" :> (Capture "project" Text :> ("taskqueues" :> (Capture "taskqueue" Text :> ("tasks" :> (Capture "task" Text :> (QueryParam "newLeaseSeconds" (Textual Int32) :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Task :> Patch '[JSON] Task))))))))))

-- | Creates a value of <a>TasksPatch</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tpTaskQueue</a></li>
--   <li><a>tpProject</a></li>
--   <li><a>tpPayload</a></li>
--   <li><a>tpTask</a></li>
--   <li><a>tpNewLeaseSeconds</a></li>
--   </ul>
tasksPatch :: Text -> Text -> Task -> Text -> Int32 -> TasksPatch

-- | Update tasks that are leased out of a TaskQueue. This method supports
--   patch semantics.
--   
--   <i>See:</i> <a>tasksPatch</a> smart constructor.
data TasksPatch
tpTaskQueue :: Lens' TasksPatch Text

-- | The project under which the queue lies.
tpProject :: Lens' TasksPatch Text

-- | Multipart request metadata.
tpPayload :: Lens' TasksPatch Task
tpTask :: Lens' TasksPatch Text

-- | The new lease in seconds.
tpNewLeaseSeconds :: Lens' TasksPatch Int32
instance GHC.Generics.Generic Network.Google.Resource.TaskQueue.Tasks.Patch.TasksPatch
instance Data.Data.Data Network.Google.Resource.TaskQueue.Tasks.Patch.TasksPatch
instance GHC.Show.Show Network.Google.Resource.TaskQueue.Tasks.Patch.TasksPatch
instance GHC.Classes.Eq Network.Google.Resource.TaskQueue.Tasks.Patch.TasksPatch
instance Network.Google.Types.GoogleRequest Network.Google.Resource.TaskQueue.Tasks.Patch.TasksPatch


-- | List Tasks in a TaskQueue
--   
--   <i>See:</i> <a>TaskQueue API Reference</a> for
--   <tt>taskqueue.tasks.list</tt>.
module Network.Google.Resource.TaskQueue.Tasks.List

-- | A resource alias for <tt>taskqueue.tasks.list</tt> method which the
--   <a>TasksList</a> request conforms to.
type TasksListResource = "taskqueue" :> ("v1beta2" :> ("projects" :> (Capture "project" Text :> ("taskqueues" :> (Capture "taskqueue" Text :> ("tasks" :> (QueryParam "alt" AltJSON :> Get '[JSON] Tasks2)))))))

-- | Creates a value of <a>TasksList</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tTaskQueue</a></li>
--   <li><a>tProject</a></li>
--   </ul>
tasksList :: Text -> Text -> TasksList

-- | List Tasks in a TaskQueue
--   
--   <i>See:</i> <a>tasksList</a> smart constructor.
data TasksList

-- | The id of the taskqueue to list tasks from.
tTaskQueue :: Lens' TasksList Text

-- | The project under which the queue lies.
tProject :: Lens' TasksList Text
instance GHC.Generics.Generic Network.Google.Resource.TaskQueue.Tasks.List.TasksList
instance Data.Data.Data Network.Google.Resource.TaskQueue.Tasks.List.TasksList
instance GHC.Show.Show Network.Google.Resource.TaskQueue.Tasks.List.TasksList
instance GHC.Classes.Eq Network.Google.Resource.TaskQueue.Tasks.List.TasksList
instance Network.Google.Types.GoogleRequest Network.Google.Resource.TaskQueue.Tasks.List.TasksList


-- | Lease 1 or more tasks from a TaskQueue.
--   
--   <i>See:</i> <a>TaskQueue API Reference</a> for
--   <tt>taskqueue.tasks.lease</tt>.
module Network.Google.Resource.TaskQueue.Tasks.Lease

-- | A resource alias for <tt>taskqueue.tasks.lease</tt> method which the
--   <a>TasksLease</a> request conforms to.
type TasksLeaseResource = "taskqueue" :> ("v1beta2" :> ("projects" :> (Capture "project" Text :> ("taskqueues" :> (Capture "taskqueue" Text :> ("tasks" :> ("lease" :> (QueryParam "numTasks" (Textual Int32) :> (QueryParam "leaseSecs" (Textual Int32) :> (QueryParam "tag" Text :> (QueryParam "groupByTag" Bool :> (QueryParam "alt" AltJSON :> Post '[JSON] Tasks))))))))))))

-- | Creates a value of <a>TasksLease</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tlTaskQueue</a></li>
--   <li><a>tlTag</a></li>
--   <li><a>tlProject</a></li>
--   <li><a>tlNumTasks</a></li>
--   <li><a>tlLeaseSecs</a></li>
--   <li><a>tlGroupByTag</a></li>
--   </ul>
tasksLease :: Text -> Text -> Int32 -> Int32 -> TasksLease

-- | Lease 1 or more tasks from a TaskQueue.
--   
--   <i>See:</i> <a>tasksLease</a> smart constructor.
data TasksLease

-- | The taskqueue to lease a task from.
tlTaskQueue :: Lens' TasksLease Text

-- | 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
tlTag :: Lens' TasksLease (Maybe Text)

-- | The project under which the queue lies.
tlProject :: Lens' TasksLease Text

-- | The number of tasks to lease.
tlNumTasks :: Lens' TasksLease Int32

-- | The lease in seconds.
tlLeaseSecs :: Lens' TasksLease Int32

-- | When true, all returned tasks will have the same tag
tlGroupByTag :: Lens' TasksLease (Maybe Bool)
instance GHC.Generics.Generic Network.Google.Resource.TaskQueue.Tasks.Lease.TasksLease
instance Data.Data.Data Network.Google.Resource.TaskQueue.Tasks.Lease.TasksLease
instance GHC.Show.Show Network.Google.Resource.TaskQueue.Tasks.Lease.TasksLease
instance GHC.Classes.Eq Network.Google.Resource.TaskQueue.Tasks.Lease.TasksLease
instance Network.Google.Types.GoogleRequest Network.Google.Resource.TaskQueue.Tasks.Lease.TasksLease


-- | Insert a new task in a TaskQueue
--   
--   <i>See:</i> <a>TaskQueue API Reference</a> for
--   <tt>taskqueue.tasks.insert</tt>.
module Network.Google.Resource.TaskQueue.Tasks.Insert

-- | A resource alias for <tt>taskqueue.tasks.insert</tt> method which the
--   <a>TasksInsert</a> request conforms to.
type TasksInsertResource = "taskqueue" :> ("v1beta2" :> ("projects" :> (Capture "project" Text :> ("taskqueues" :> (Capture "taskqueue" Text :> ("tasks" :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Task :> Post '[JSON] Task))))))))

-- | Creates a value of <a>TasksInsert</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tiTaskQueue</a></li>
--   <li><a>tiProject</a></li>
--   <li><a>tiPayload</a></li>
--   </ul>
tasksInsert :: Text -> Text -> Task -> TasksInsert

-- | Insert a new task in a TaskQueue
--   
--   <i>See:</i> <a>tasksInsert</a> smart constructor.
data TasksInsert

-- | The taskqueue to insert the task into
tiTaskQueue :: Lens' TasksInsert Text

-- | The project under which the queue lies
tiProject :: Lens' TasksInsert Text

-- | Multipart request metadata.
tiPayload :: Lens' TasksInsert Task
instance GHC.Generics.Generic Network.Google.Resource.TaskQueue.Tasks.Insert.TasksInsert
instance Data.Data.Data Network.Google.Resource.TaskQueue.Tasks.Insert.TasksInsert
instance GHC.Show.Show Network.Google.Resource.TaskQueue.Tasks.Insert.TasksInsert
instance GHC.Classes.Eq Network.Google.Resource.TaskQueue.Tasks.Insert.TasksInsert
instance Network.Google.Types.GoogleRequest Network.Google.Resource.TaskQueue.Tasks.Insert.TasksInsert


-- | Get a particular task from a TaskQueue.
--   
--   <i>See:</i> <a>TaskQueue API Reference</a> for
--   <tt>taskqueue.tasks.get</tt>.
module Network.Google.Resource.TaskQueue.Tasks.Get

-- | A resource alias for <tt>taskqueue.tasks.get</tt> method which the
--   <a>TasksGet</a> request conforms to.
type TasksGetResource = "taskqueue" :> ("v1beta2" :> ("projects" :> (Capture "project" Text :> ("taskqueues" :> (Capture "taskqueue" Text :> ("tasks" :> (Capture "task" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] Task))))))))

-- | Creates a value of <a>TasksGet</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tgTaskQueue</a></li>
--   <li><a>tgProject</a></li>
--   <li><a>tgTask</a></li>
--   </ul>
tasksGet :: Text -> Text -> Text -> TasksGet

-- | Get a particular task from a TaskQueue.
--   
--   <i>See:</i> <a>tasksGet</a> smart constructor.
data TasksGet

-- | The taskqueue in which the task belongs.
tgTaskQueue :: Lens' TasksGet Text

-- | The project under which the queue lies.
tgProject :: Lens' TasksGet Text

-- | The task to get properties of.
tgTask :: Lens' TasksGet Text
instance GHC.Generics.Generic Network.Google.Resource.TaskQueue.Tasks.Get.TasksGet
instance Data.Data.Data Network.Google.Resource.TaskQueue.Tasks.Get.TasksGet
instance GHC.Show.Show Network.Google.Resource.TaskQueue.Tasks.Get.TasksGet
instance GHC.Classes.Eq Network.Google.Resource.TaskQueue.Tasks.Get.TasksGet
instance Network.Google.Types.GoogleRequest Network.Google.Resource.TaskQueue.Tasks.Get.TasksGet


-- | Delete a task from a TaskQueue.
--   
--   <i>See:</i> <a>TaskQueue API Reference</a> for
--   <tt>taskqueue.tasks.delete</tt>.
module Network.Google.Resource.TaskQueue.Tasks.Delete

-- | A resource alias for <tt>taskqueue.tasks.delete</tt> method which the
--   <a>TasksDelete</a> request conforms to.
type TasksDeleteResource = "taskqueue" :> ("v1beta2" :> ("projects" :> (Capture "project" Text :> ("taskqueues" :> (Capture "taskqueue" Text :> ("tasks" :> (Capture "task" Text :> (QueryParam "alt" AltJSON :> Delete '[JSON] ()))))))))

-- | Creates a value of <a>TasksDelete</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tdTaskQueue</a></li>
--   <li><a>tdProject</a></li>
--   <li><a>tdTask</a></li>
--   </ul>
tasksDelete :: Text -> Text -> Text -> TasksDelete

-- | Delete a task from a TaskQueue.
--   
--   <i>See:</i> <a>tasksDelete</a> smart constructor.
data TasksDelete

-- | The taskqueue to delete a task from.
tdTaskQueue :: Lens' TasksDelete Text

-- | The project under which the queue lies.
tdProject :: Lens' TasksDelete Text

-- | The id of the task to delete.
tdTask :: Lens' TasksDelete Text
instance GHC.Generics.Generic Network.Google.Resource.TaskQueue.Tasks.Delete.TasksDelete
instance Data.Data.Data Network.Google.Resource.TaskQueue.Tasks.Delete.TasksDelete
instance GHC.Show.Show Network.Google.Resource.TaskQueue.Tasks.Delete.TasksDelete
instance GHC.Classes.Eq Network.Google.Resource.TaskQueue.Tasks.Delete.TasksDelete
instance Network.Google.Types.GoogleRequest Network.Google.Resource.TaskQueue.Tasks.Delete.TasksDelete


-- | Get detailed information about a TaskQueue.
--   
--   <i>See:</i> <a>TaskQueue API Reference</a> for
--   <tt>taskqueue.taskqueues.get</tt>.
module Network.Google.Resource.TaskQueue.TaskQueues.Get

-- | A resource alias for <tt>taskqueue.taskqueues.get</tt> method which
--   the <a>TaskQueuesGet</a> request conforms to.
type TaskQueuesGetResource = "taskqueue" :> ("v1beta2" :> ("projects" :> (Capture "project" Text :> ("taskqueues" :> (Capture "taskqueue" Text :> (QueryParam "getStats" Bool :> (QueryParam "alt" AltJSON :> Get '[JSON] TaskQueue)))))))

-- | Creates a value of <a>TaskQueuesGet</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tqgTaskQueue</a></li>
--   <li><a>tqgProject</a></li>
--   <li><a>tqgGetStats</a></li>
--   </ul>
taskQueuesGet :: Text -> Text -> TaskQueuesGet

-- | Get detailed information about a TaskQueue.
--   
--   <i>See:</i> <a>taskQueuesGet</a> smart constructor.
data TaskQueuesGet

-- | The id of the taskqueue to get the properties of.
tqgTaskQueue :: Lens' TaskQueuesGet Text

-- | The project under which the queue lies.
tqgProject :: Lens' TaskQueuesGet Text

-- | Whether to get stats. Optional.
tqgGetStats :: Lens' TaskQueuesGet (Maybe Bool)
instance GHC.Generics.Generic Network.Google.Resource.TaskQueue.TaskQueues.Get.TaskQueuesGet
instance Data.Data.Data Network.Google.Resource.TaskQueue.TaskQueues.Get.TaskQueuesGet
instance GHC.Show.Show Network.Google.Resource.TaskQueue.TaskQueues.Get.TaskQueuesGet
instance GHC.Classes.Eq Network.Google.Resource.TaskQueue.TaskQueues.Get.TaskQueuesGet
instance Network.Google.Types.GoogleRequest Network.Google.Resource.TaskQueue.TaskQueues.Get.TaskQueuesGet


-- | Accesses a Google App Engine Pull Task Queue over REST.
--   
--   <i>See:</i> <a>TaskQueue API Reference</a>
module Network.Google.TaskQueue

-- | Default request referring to version <tt>v1beta2</tt> of the TaskQueue
--   API. This contains the host and root path used as a starting point for
--   constructing service requests.
taskQueueService :: ServiceConfig

-- | Consume Tasks from your Taskqueues
taskQueueConsumerScope :: Proxy '["https://www.googleapis.com/auth/taskqueue.consumer"]

-- | Manage your Tasks and Taskqueues
taskQueueScope :: Proxy '["https://www.googleapis.com/auth/taskqueue"]

-- | Represents the entirety of the methods and resources available for the
--   TaskQueue API service.
type TaskQueueAPI = TasksInsertResource :<|> (TasksListResource :<|> (TasksPatchResource :<|> (TasksGetResource :<|> (TasksLeaseResource :<|> (TasksDeleteResource :<|> (TasksUpdateResource :<|> TaskQueuesGetResource))))))
data Tasks2

-- | Creates a value of <a>Tasks2</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tKind</a></li>
--   <li><a>tItems</a></li>
--   </ul>
tasks2 :: Tasks2

-- | The kind of object returned, a list of tasks.
tKind :: Lens' Tasks2 Text

-- | The actual list of tasks currently active in the TaskQueue.
tItems :: Lens' Tasks2 [Task]
data TaskQueue

-- | Creates a value of <a>TaskQueue</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tqKind</a></li>
--   <li><a>tqStats</a></li>
--   <li><a>tqMaxLeases</a></li>
--   <li><a>tqId</a></li>
--   <li><a>tqACL</a></li>
--   </ul>
taskQueue :: TaskQueue

-- | The kind of REST object returned, in this case taskqueue.
tqKind :: Lens' TaskQueue Text

-- | Statistics for the TaskQueue object in question.
tqStats :: Lens' TaskQueue (Maybe TaskQueueStats)

-- | 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.
tqMaxLeases :: Lens' TaskQueue (Maybe Int32)

-- | Name of the taskqueue.
tqId :: Lens' TaskQueue (Maybe Text)

-- | ACLs that are applicable to this TaskQueue object.
tqACL :: Lens' TaskQueue (Maybe TaskQueueACL)

-- | ACLs that are applicable to this TaskQueue object.
--   
--   <i>See:</i> <a>taskQueueACL</a> smart constructor.
data TaskQueueACL

-- | Creates a value of <a>TaskQueueACL</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tqaProducerEmails</a></li>
--   <li><a>tqaAdminEmails</a></li>
--   <li><a>tqaConsumerEmails</a></li>
--   </ul>
taskQueueACL :: TaskQueueACL

-- | Email addresses of users who can "produce" tasks into the TaskQueue.
--   This means they can Insert tasks into the queue.
tqaProducerEmails :: Lens' TaskQueueACL [Text]

-- | Email addresses of users who are "admins" of the TaskQueue. This means
--   they can control the queue, eg set ACLs for the queue.
tqaAdminEmails :: Lens' TaskQueueACL [Text]

-- | Email addresses of users who can "consume" tasks from the TaskQueue.
--   This means they can Dequeue and Delete tasks from the queue.
tqaConsumerEmails :: Lens' TaskQueueACL [Text]

-- | Statistics for the TaskQueue object in question.
--   
--   <i>See:</i> <a>taskQueueStats</a> smart constructor.
data TaskQueueStats

-- | Creates a value of <a>TaskQueueStats</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tqsTotalTasks</a></li>
--   <li><a>tqsOldestTask</a></li>
--   <li><a>tqsLeasedLastHour</a></li>
--   <li><a>tqsLeasedLastMinute</a></li>
--   </ul>
taskQueueStats :: TaskQueueStats

-- | Number of tasks in the queue.
tqsTotalTasks :: Lens' TaskQueueStats (Maybe Int32)

-- | The timestamp (in seconds since the epoch) of the oldest unfinished
--   task.
tqsOldestTask :: Lens' TaskQueueStats (Maybe Int64)

-- | Number of tasks leased in the last hour.
tqsLeasedLastHour :: Lens' TaskQueueStats (Maybe Int64)

-- | Number of tasks leased in the last minute.
tqsLeasedLastMinute :: Lens' TaskQueueStats (Maybe Int64)
data Tasks

-- | Creates a value of <a>Tasks</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>tasKind</a></li>
--   <li><a>tasItems</a></li>
--   </ul>
tasks :: Tasks

-- | The kind of object returned, a list of tasks.
tasKind :: Lens' Tasks Text

-- | The actual list of tasks returned as a result of the lease operation.
tasItems :: Lens' Tasks [Task]
data Task

-- | Creates a value of <a>Task</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ttRetryCount</a></li>
--   <li><a>ttEnQueueTimestamp</a></li>
--   <li><a>ttTag</a></li>
--   <li><a>ttKind</a></li>
--   <li><a>ttQueueName</a></li>
--   <li><a>ttPayloadBase64</a></li>
--   <li><a>ttId</a></li>
--   <li><a>ttLeaseTimestamp</a></li>
--   </ul>
task :: Task

-- | The number of leases applied to this task.
ttRetryCount :: Lens' Task (Maybe Int32)

-- | Time (in seconds since the epoch) at which the task was enqueued.
ttEnQueueTimestamp :: Lens' Task (Maybe Int64)

-- | Tag for the task, could be used later to lease tasks grouped by a
--   specific tag.
ttTag :: Lens' Task (Maybe Text)

-- | The kind of object returned, in this case set to task.
ttKind :: Lens' Task Text

-- | Name of the queue that the task is in.
ttQueueName :: Lens' Task (Maybe Text)

-- | A bag of bytes which is the task payload. The payload on the JSON side
--   is always Base64 encoded.
ttPayloadBase64 :: Lens' Task (Maybe Text)

-- | Name of the task.
ttId :: Lens' Task (Maybe Text)

-- | 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.
ttLeaseTimestamp :: Lens' Task (Maybe Int64)
