@classmethod
def from_list(cls, deployments):
    """Instantiate DeploymentDefinitions from a list."""
    results = []
    if not deployments:
        return []
    for i, deployment in enumerate(deployments):
        if not deployment.get('name'):
            deployment['name'] = 'deployment_{}'.format(str(i + 1))
        results.append(cls(deployment))
    return results
