import os
import uuid
import subprocess

from datetime import datetime

class JobConfigurationItem:
    def __init__(self, name, value, type):
        self.name = name
        self.value = value
        self.type = type
        
class JobConfiguration:
    items = []
    def __init__(self):
        self.items = []
    def add(self, name, value, type):
        self.items.append(JobConfigurationItem(name, value, type))
    def to_dict(self):
        return [item.__dict__ for item in self.items]
    def to_json(self):
        return json.dumps(self.to_dict(), ensure_ascii=False,indent=4)
    def get(self, name,default=None):
        for item in self.items:
            if item.name == name:
                return item.value
        return default
