All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.app.core.model.git-repository.model.ts Maven / Gradle / Ivy

The newest version!
/*
 * SPDX-FileCopyrightText: 2017-2024 Enedis
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 */

export class GitRepository {
    constructor(
      public id: number,
      public url: string,
      public sourceDirectory: string,
      public name: string,
    ) { }

    static deserializeGitRepositories(jsonObject: any): GitRepository[] {
      return jsonObject.map(execution => GitRepository.deserialize(execution));
    }

    static deserialize(jsonObject: any): GitRepository {
      return new GitRepository(
        jsonObject.id,
        jsonObject.url,
        jsonObject.sourceDirectory,
        jsonObject.name
      );
    }
  }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy