#
# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
#  options string: py:dynamic
#

from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive import fix_spec

import sys

from thrift.transport import TTransport
from thrift.protocol.TBase import TBase, TFrozenBase, TExceptionBase, TTransport
all_structs = []


class NameFromRef(TBase):
    """
    Attributes:
     - clusterParam
    """


    def __init__(self, clusterParam=None,):
        self.clusterParam = clusterParam

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GceAddressValueRef(TBase):
    """
    Attributes:
     - name
     - nameFrom
     - isGlobal
    """


    def __init__(self, name=None, nameFrom=None, isGlobal=None,):
        self.name = name
        self.nameFrom = nameFrom
        self.isGlobal = isGlobal

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GceValueRef(TBase):
    """
    Attributes:
     - address
    """


    def __init__(self, address=None,):
        self.address = address

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ChartValueRef(TBase):
    """
    Attributes:
     - gceResource
    """


    def __init__(self, gceResource=None,):
        self.gceResource = gceResource

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ChartValue(TBase):
    """
    Attributes:
     - key
     - value
     - valueFrom
    """


    def __init__(self, key=None, value=None, valueFrom=None,):
        self.key = key
        self.value = value
        self.valueFrom = valueFrom

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GithubTrigger(TBase):
    """
    Attributes:
     - repository
     - branch
     - tagMatching
    """


    def __init__(self, repository=None, branch=None, tagMatching=None,):
        self.repository = repository
        self.branch = branch
        self.tagMatching = tagMatching

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ImageTrigger(TBase):
    """
    Attributes:
     - tagValue
     - repoValue
     - repoPrefixValue
     - track
    """


    def __init__(self, tagValue="image.tag", repoValue="image.repository", repoPrefixValue="image.prefix", track=None,):
        self.tagValue = tagValue
        self.repoValue = repoValue
        self.repoPrefixValue = repoPrefixValue
        self.track = track

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class HelmTrigger(TBase):
    """
    Attributes:
     - track
    """


    def __init__(self, track=None,):
        self.track = track

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DeploymentTrigger(TBase):
    """
    Attributes:
     - github
     - image
     - helm
    """


    def __init__(self, github=None, image=None, helm=None,):
        self.github = github
        self.image = image
        self.helm = helm

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Chart(TBase):
    """
    Attributes:
     - reference
     - dir
     - version
    """


    def __init__(self, reference=None, dir=None, version=None,):
        self.reference = reference
        self.dir = dir
        self.version = version

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Release(TBase):
    """
    Attributes:
     - name
     - chart
     - valuesFile
     - values
     - trigger
     - triggers
     - skipDefaultValues
     - resourceFiles
    """


    def __init__(self, name=None, chart=None, valuesFile=None, values=None, trigger=None, triggers=None, skipDefaultValues=None, resourceFiles=None,):
        self.name = name
        self.chart = chart
        self.valuesFile = valuesFile
        self.values = values
        self.trigger = trigger
        self.triggers = triggers
        self.skipDefaultValues = skipDefaultValues
        self.resourceFiles = resourceFiles

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class KubernetesResourceRef(TBase):
    """
    Attributes:
     - kind
     - name
    """


    def __init__(self, kind=None, name=None,):
        self.kind = kind
        self.name = name

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Releases(TBase):
    """
    Attributes:
     - resourceFiles
     - releases
     - resourceDependencies
    """


    def __init__(self, resourceFiles=None, releases=None, resourceDependencies=None,):
        self.resourceFiles = resourceFiles
        self.releases = releases
        self.resourceDependencies = resourceDependencies

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GkeProvider(TBase):
    """
    Attributes:
     - project
     - clusterName
     - zone
    """


    def __init__(self, project=None, clusterName=None, zone=None,):
        self.project = project
        self.clusterName = clusterName
        self.zone = zone

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class MinikubeProvider(TBase):


    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Provider(TBase):
    """
    Attributes:
     - gke
     - minikube
    """


    def __init__(self, gke=None, minikube=None,):
        self.gke = gke
        self.minikube = minikube

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ClusterParameter(TBase):
    """
    Attributes:
     - name
     - value
    """


    def __init__(self, name=None, value=None,):
        self.name = name
        self.value = value

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Cluster(TBase):
    """
    Attributes:
     - name
     - provider
     - parameters
    """


    def __init__(self, name=None, provider=None, parameters=None,):
        self.name = name
        self.provider = provider
        self.parameters = parameters

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Environment(TBase):
    """
    Attributes:
     - name
     - clusterName
     - kubeNamespace
     - releasesFiles: a list of `releases.yaml` files
     - defaultValuesFile: default helm values file for the environment
     - defaultValues
    """


    def __init__(self, name=None, clusterName=None, kubeNamespace=None, releasesFiles=None, defaultValuesFile=None, defaultValues=None,):
        self.name = name
        self.clusterName = clusterName
        self.kubeNamespace = kubeNamespace
        self.releasesFiles = releasesFiles
        self.defaultValuesFile = defaultValuesFile
        self.defaultValues = defaultValues

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class HelmRepo(TBase):
    """
    Attributes:
     - name
     - url
     - caFile
     - certFile
     - keyFile
    """


    def __init__(self, name=None, url=None, caFile=None, certFile=None, keyFile=None,):
        self.name = name
        self.url = url
        self.caFile = caFile
        self.certFile = certFile
        self.keyFile = keyFile

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class KubecdConfig(TBase):
    """
    Attributes:
     - clusters
     - environments
     - helmRepos
    """


    def __init__(self, clusters=None, environments=None, helmRepos=None,):
        self.clusters = clusters
        self.environments = environments
        self.helmRepos = helmRepos

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(NameFromRef)
NameFromRef.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'clusterParam', 'UTF8', None, ),  # 1
)
all_structs.append(GceAddressValueRef)
GceAddressValueRef.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'nameFrom', [NameFromRef, None], None, ),  # 2
    (3, TType.BOOL, 'isGlobal', None, None, ),  # 3
)
all_structs.append(GceValueRef)
GceValueRef.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'address', [GceAddressValueRef, None], None, ),  # 1
)
all_structs.append(ChartValueRef)
ChartValueRef.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'gceResource', [GceValueRef, None], None, ),  # 1
)
all_structs.append(ChartValue)
ChartValue.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'key', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'value', 'UTF8', None, ),  # 2
    (3, TType.STRUCT, 'valueFrom', [ChartValueRef, None], None, ),  # 3
)
all_structs.append(GithubTrigger)
GithubTrigger.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'repository', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'branch', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'tagMatching', 'UTF8', None, ),  # 3
)
all_structs.append(ImageTrigger)
ImageTrigger.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'tagValue', 'UTF8', "image.tag", ),  # 1
    (2, TType.STRING, 'repoValue', 'UTF8', "image.repository", ),  # 2
    (3, TType.STRING, 'repoPrefixValue', 'UTF8', "image.prefix", ),  # 3
    (4, TType.STRING, 'track', 'UTF8', None, ),  # 4
)
all_structs.append(HelmTrigger)
HelmTrigger.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'track', 'UTF8', None, ),  # 1
)
all_structs.append(DeploymentTrigger)
DeploymentTrigger.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'github', [GithubTrigger, None], None, ),  # 1
    (2, TType.STRUCT, 'image', [ImageTrigger, None], None, ),  # 2
    (3, TType.STRUCT, 'helm', [HelmTrigger, None], None, ),  # 3
)
all_structs.append(Chart)
Chart.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'reference', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'dir', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'version', 'UTF8', None, ),  # 3
)
all_structs.append(Release)
Release.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'chart', [Chart, None], None, ),  # 2
    (3, TType.STRING, 'valuesFile', 'UTF8', None, ),  # 3
    (4, TType.LIST, 'values', (TType.STRUCT, [ChartValue, None], False), None, ),  # 4
    (5, TType.STRUCT, 'trigger', [DeploymentTrigger, None], None, ),  # 5
    (6, TType.LIST, 'triggers', (TType.STRUCT, [DeploymentTrigger, None], False), None, ),  # 6
    (7, TType.BOOL, 'skipDefaultValues', None, None, ),  # 7
    (8, TType.LIST, 'resourceFiles', (TType.STRING, 'UTF8', False), None, ),  # 8
)
all_structs.append(KubernetesResourceRef)
KubernetesResourceRef.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'kind', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'name', 'UTF8', None, ),  # 2
)
all_structs.append(Releases)
Releases.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'resourceFiles', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.LIST, 'releases', (TType.STRUCT, [Release, None], False), None, ),  # 2
    (3, TType.LIST, 'resourceDependencies', (TType.STRUCT, [KubernetesResourceRef, None], False), None, ),  # 3
)
all_structs.append(GkeProvider)
GkeProvider.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'project', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'clusterName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'zone', 'UTF8', None, ),  # 3
)
all_structs.append(MinikubeProvider)
MinikubeProvider.thrift_spec = (
)
all_structs.append(Provider)
Provider.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'gke', [GkeProvider, None], None, ),  # 1
    (2, TType.STRUCT, 'minikube', [MinikubeProvider, None], None, ),  # 2
)
all_structs.append(ClusterParameter)
ClusterParameter.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'value', 'UTF8', None, ),  # 2
)
all_structs.append(Cluster)
Cluster.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'provider', [Provider, None], None, ),  # 2
    (3, TType.LIST, 'parameters', (TType.STRUCT, [ClusterParameter, None], False), None, ),  # 3
)
all_structs.append(Environment)
Environment.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'clusterName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'kubeNamespace', 'UTF8', None, ),  # 3
    (4, TType.LIST, 'releasesFiles', (TType.STRING, 'UTF8', False), None, ),  # 4
    (5, TType.STRING, 'defaultValuesFile', 'UTF8', None, ),  # 5
    (6, TType.LIST, 'defaultValues', (TType.STRUCT, [ChartValue, None], False), None, ),  # 6
)
all_structs.append(HelmRepo)
HelmRepo.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'url', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'caFile', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'certFile', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'keyFile', 'UTF8', None, ),  # 5
)
all_structs.append(KubecdConfig)
KubecdConfig.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'clusters', (TType.STRUCT, [Cluster, None], False), None, ),  # 1
    (2, TType.LIST, 'environments', (TType.STRUCT, [Environment, None], False), None, ),  # 2
    (3, TType.LIST, 'helmRepos', (TType.STRUCT, [HelmRepo, None], False), None, ),  # 3
)
fix_spec(all_structs)
del all_structs
