# coding=utf-8
#####################################################
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT #
#####################################################
# noqa: E128,E201
from .asyncclient import AsyncBaseClient
from .asyncclient import createApiClient
from .asyncclient import config
from .asyncclient import createTemporaryCredentials
from .asyncclient import createSession
_defaultConfig = config


class AwsProvisionerEvents(AsyncBaseClient):
    """
    Exchanges from the provisioner... more docs later
    """

    classOptions = {
        "exchangePrefix": "exchange/taskcluster-aws-provisioner/v1/",
    }
    apiVersion = 'v1'

    def workerTypeCreated(self, *args, **kwargs):
        """
        WorkerType Created Message

        When a new `workerType` is created a message will be published to this
        exchange.

        This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes the following keys:

         * routingKeyKind: Identifier for the routing-key kind. This is always `'primary'` for the formalized routing key. (required)

         * workerType: WorkerType that this message concerns. (required)

         * reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
        """

        ref = {
            'exchange': 'worker-type-created',
            'name': 'workerTypeCreated',
            'routingKey': [
                {
                    'constant': 'primary',
                    'multipleWords': False,
                    'name': 'routingKeyKind',
                },
                {
                    'multipleWords': False,
                    'name': 'workerType',
                },
                {
                    'multipleWords': True,
                    'name': 'reserved',
                },
            ],
            'schema': 'http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#',
        }
        return self._makeTopicExchange(ref, *args, **kwargs)

    def workerTypeUpdated(self, *args, **kwargs):
        """
        WorkerType Updated Message

        When a `workerType` is updated a message will be published to this
        exchange.

        This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes the following keys:

         * routingKeyKind: Identifier for the routing-key kind. This is always `'primary'` for the formalized routing key. (required)

         * workerType: WorkerType that this message concerns. (required)

         * reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
        """

        ref = {
            'exchange': 'worker-type-updated',
            'name': 'workerTypeUpdated',
            'routingKey': [
                {
                    'constant': 'primary',
                    'multipleWords': False,
                    'name': 'routingKeyKind',
                },
                {
                    'multipleWords': False,
                    'name': 'workerType',
                },
                {
                    'multipleWords': True,
                    'name': 'reserved',
                },
            ],
            'schema': 'http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#',
        }
        return self._makeTopicExchange(ref, *args, **kwargs)

    def workerTypeRemoved(self, *args, **kwargs):
        """
        WorkerType Removed Message

        When a `workerType` is removed a message will be published to this
        exchange.

        This exchange outputs: ``http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#``This exchange takes the following keys:

         * routingKeyKind: Identifier for the routing-key kind. This is always `'primary'` for the formalized routing key. (required)

         * workerType: WorkerType that this message concerns. (required)

         * reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
        """

        ref = {
            'exchange': 'worker-type-removed',
            'name': 'workerTypeRemoved',
            'routingKey': [
                {
                    'constant': 'primary',
                    'multipleWords': False,
                    'name': 'routingKeyKind',
                },
                {
                    'multipleWords': False,
                    'name': 'workerType',
                },
                {
                    'multipleWords': True,
                    'name': 'reserved',
                },
            ],
            'schema': 'http://schemas.taskcluster.net/aws-provisioner/v1/worker-type-message.json#',
        }
        return self._makeTopicExchange(ref, *args, **kwargs)

    funcinfo = {
    }


__all__ = ['createTemporaryCredentials', 'config', '_defaultConfig', 'createApiClient', 'createSession', 'AwsProvisionerEvents']
