# Path: src/artifactcli/artifact/baseinfo.py
# class BaseInfo(CaseClass):
#     def to_dict(self):
#         return dict((k, getattr(self, k)) for k in self.keys)


import os
import re
from .baseinfo import BaseInfo
from artifactcli.util import *
        super(BasicInfo, self).__init__(BasicInfo.keys)
        self.group_id = group_id
        self.artifact_id = artifact_id
        self.version = version
        self.packaging = packaging
        self.revision = revision

    def __str__(self):
        buf = [
            'Basic Info:',
            '  Group ID   : %s' % self.group_id,
            '  Artifact ID: %s' % self.artifact_id,
            '  Version    : %s' % self.version,
            '  Packaging  : %s' % self.packaging,
            '  Revision   : %s' % self.revision
        ]
        return '\n'.join(buf)

    def filename(self):
        return '%s-%s.%s' % (self.artifact_id, self.version, self.packaging)

    def s3_path(self):
        if self.revision is None:
            raise ValueError('Revision is not defined')
        else:
            xs = (str(x) for x in [self.group_id, self.artifact_id, self.version, self.revision, self.filename()])
            return '/'.join(xs)

    @staticmethod
    def from_dict(d):

# Path: src/artifactcli/artifact/baseinfo.py
# class BaseInfo(CaseClass):
#     def to_dict(self):
#         return dict((k, getattr(self, k)) for k in self.keys)


# Path: src/artifactcli/artifact/basicinfo.py
import os
import re
from .baseinfo import BaseInfo
from artifactcli.util import *

        super(BasicInfo, self).__init__(BasicInfo.keys)
        self.group_id = group_id
        self.artifact_id = artifact_id
        self.version = version
        self.packaging = packaging
        self.revision = revision

    def __str__(self):
        buf = [
            'Basic Info:',
            '  Group ID   : %s' % self.group_id,
            '  Artifact ID: %s' % self.artifact_id,
            '  Version    : %s' % self.version,
            '  Packaging  : %s' % self.packaging,
            '  Revision   : %s' % self.revision
        ]
        return '\n'.join(buf)

    def filename(self):
        return '%s-%s.%s' % (self.artifact_id, self.version, self.packaging)

    def s3_path(self):
        if self.revision is None:
            raise ValueError('Revision is not defined')
        else:
            xs = (str(x) for x in [self.group_id, self.artifact_id, self.version, self.revision, self.filename()])
            return '/'.join(xs)

    @staticmethod
    def from_dict(d):

        return BasicInfo(*[d[k] for k in BasicInfo.keys])