gogol-pubsub-0.0.1: Google Cloud Pub/Sub SDK.

Copyright(c) 2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.PubSub.Types

Contents

Description

 

Synopsis

Service Configuration

pubSubService :: Service Source

Default request referring to version v1 of the Google Cloud Pub/Sub API. This contains the host and root path used as a starting point for constructing service requests.

OAuth Scopes

cloudPlatformScope :: OAuthScope Source

View and manage your data across Google Cloud Platform services

pubsubScope :: OAuthScope Source

View and manage Pub/Sub topics and subscriptions

PushConfig

data PushConfig Source

Configuration for a push delivery endpoint.

See: pushConfig smart constructor.

pushConfig :: PushConfig Source

Creates a value of PushConfig with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

pcAttributes :: Lens' PushConfig (Maybe PushConfigAttributes) Source

Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the `CreateSubscription` call, it will default to the version of the API used to make such call. If not present during a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.

pcPushEndpoint :: Lens' PushConfig (Maybe Text) Source

A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".

ReceivedMessage

receivedMessage :: ReceivedMessage Source

Creates a value of ReceivedMessage with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rmAckId :: Lens' ReceivedMessage (Maybe Text) Source

This ID can be used to acknowledge the received message.

ModifyAckDeadlineRequest

modifyAckDeadlineRequest :: ModifyAckDeadlineRequest Source

Creates a value of ModifyAckDeadlineRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

madrAckIds :: Lens' ModifyAckDeadlineRequest [Text] Source

List of acknowledgment IDs.

madrAckDeadlineSeconds :: Lens' ModifyAckDeadlineRequest (Maybe Int32) Source

The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero may immediately make the message available for another pull request.

ModifyPushConfigRequest

modifyPushConfigRequest :: ModifyPushConfigRequest Source

Creates a value of ModifyPushConfigRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

mpcrPushConfig :: Lens' ModifyPushConfigRequest (Maybe PushConfig) Source

The push configuration for future deliveries. An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages from the given subscription and allow messages to be pulled and acknowledged - effectively pausing the subscription if `Pull` is not called.

Empty

data Empty Source

A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.

See: empty smart constructor.

empty :: Empty Source

Creates a value of Empty with the minimum fields required to make a request.

PubsubMessage

data PubsubMessage Source

A message data and its attributes. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.

See: pubsubMessage smart constructor.

pubsubMessage :: PubsubMessage Source

Creates a value of PubsubMessage with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

pmData :: Lens' PubsubMessage (Maybe Word8) Source

The message payload. For JSON requests, the value of this field must be base64-encoded.

pmAttributes :: Lens' PubsubMessage (Maybe PubsubMessageAttributes) Source

Optional attributes for this message.

pmMessageId :: Lens' PubsubMessage (Maybe Text) Source

ID of this message assigned by the server at publication time. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by a publisher in a `Publish` call.

ListTopicSubscriptionsResponse

listTopicSubscriptionsResponse :: ListTopicSubscriptionsResponse Source

Creates a value of ListTopicSubscriptionsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

ltsrNextPageToken :: Lens' ListTopicSubscriptionsResponse (Maybe Text) Source

If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListTopicSubscriptionsRequest` to get more subscriptions.

ltsrSubscriptions :: Lens' ListTopicSubscriptionsResponse [Text] Source

The names of the subscriptions that match the request.

ListTopicsResponse

listTopicsResponse :: ListTopicsResponse Source

Creates a value of ListTopicsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

ltrNextPageToken :: Lens' ListTopicsResponse (Maybe Text) Source

If not empty, indicates that there may be more topics that match the request; this value should be passed in a new `ListTopicsRequest`.

ltrTopics :: Lens' ListTopicsResponse [Topic] Source

The resulting topics.

PullResponse

pullResponse :: PullResponse Source

Creates a value of PullResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

prReceivedMessages :: Lens' PullResponse [ReceivedMessage] Source

Received Pub/Sub messages. The Pub/Sub system will return zero messages if there are no more available in the backlog. The Pub/Sub system may return fewer than the `maxMessages` requested even if there are more messages available in the backlog.

SetIAMPolicyRequest

setIAMPolicyRequest :: SetIAMPolicyRequest Source

Creates a value of SetIAMPolicyRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

siprPolicy :: Lens' SetIAMPolicyRequest (Maybe Policy) Source

REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

Topic

data Topic Source

A topic resource.

See: topic smart constructor.

topic :: Topic Source

Creates a value of Topic with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

tName :: Lens' Topic (Maybe Text) Source

The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.

PullRequest

pullRequest :: PullRequest Source

Creates a value of PullRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

prMaxMessages :: Lens' PullRequest (Maybe Int32) Source

The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified.

prReturnImmediately :: Lens' PullRequest (Maybe Bool) Source

If this is specified as true the system will respond immediately even if it is not able to return a message in the `Pull` response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response.

PubsubMessageAttributes

pubsubMessageAttributes Source

Creates a value of PubsubMessageAttributes with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

TestIAMPermissionsRequest

testIAMPermissionsRequest :: TestIAMPermissionsRequest Source

Creates a value of TestIAMPermissionsRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

tiprPermissions :: Lens' TestIAMPermissionsRequest [Text] Source

The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.

PublishResponse

publishResponse :: PublishResponse Source

Creates a value of PublishResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

prMessageIds :: Lens' PublishResponse [Text] Source

The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

PublishRequest

publishRequest :: PublishRequest Source

Creates a value of PublishRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

prMessages :: Lens' PublishRequest [PubsubMessage] Source

The messages to publish.

TestIAMPermissionsResponse

testIAMPermissionsResponse :: TestIAMPermissionsResponse Source

Creates a value of TestIAMPermissionsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

tiamprPermissions :: Lens' TestIAMPermissionsResponse [Text] Source

A subset of `TestPermissionsRequest.permissions` that the caller is allowed.

Policy

data Policy Source

Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike'example.com", "group:admins'example.com", "domain:google.com", "serviceAccount:my-other-app'appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean'example.com"] } ] } For a description of IAM and its features, see the IAM developer's guide.

See: policy smart constructor.

policy :: Policy Source

Creates a value of Policy with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

pEtag :: Lens' Policy (Maybe Word8) Source

Can be used to perform a read-modify-write.

pVersion :: Lens' Policy (Maybe Int32) Source

Version of the `Policy`. The default version is 0.

pBindings :: Lens' Policy [Binding] Source

Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.

PushConfigAttributes

data PushConfigAttributes Source

Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the `CreateSubscription` call, it will default to the version of the API used to make such call. If not present during a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.

See: pushConfigAttributes smart constructor.

pushConfigAttributes Source

Creates a value of PushConfigAttributes with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Subscription

subscription :: Subscription Source

Creates a value of Subscription with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

sPushConfig :: Lens' Subscription (Maybe PushConfig) Source

If push delivery is used with this subscription, this field is used to configure it. An empty `pushConfig` signifies that the subscriber will pull and ack messages using API methods.

sTopic :: Lens' Subscription (Maybe Text) Source

The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted.

sName :: Lens' Subscription (Maybe Text) Source

The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.

sAckDeadlineSeconds :: Lens' Subscription (Maybe Int32) Source

This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id`. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used.

ListSubscriptionsResponse

listSubscriptionsResponse :: ListSubscriptionsResponse Source

Creates a value of ListSubscriptionsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

lsrNextPageToken :: Lens' ListSubscriptionsResponse (Maybe Text) Source

If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListSubscriptionsRequest` to get more subscriptions.

lsrSubscriptions :: Lens' ListSubscriptionsResponse [Subscription] Source

The subscriptions that match the request.

Binding

data Binding Source

Associates `members` with a `role`.

See: binding smart constructor.

binding :: Binding Source

Creates a value of Binding with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

bMembers :: Lens' Binding [Text] Source

Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice'gmail.com` or `joe'example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app'appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins'example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.

bRole :: Lens' Binding (Maybe Text) Source

Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required

AcknowledgeRequest

acknowledgeRequest :: AcknowledgeRequest Source

Creates a value of AcknowledgeRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

arAckIds :: Lens' AcknowledgeRequest [Text] Source

The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the `Pull` response. Must not be empty.