import {Injectable} from '@angular/core';
import {ICollection, ISchema, Resource, Service} from 'ngx-jsonapi';

@Injectable()
export class AppService extends Service<App> {
  public resource = App;
  public type = 'apps';
}

export class App extends Resource {
  public attributes: {
    id: string,
    name: string,
    key: string,
    sdk: string,
    packagename: string,
    version: string,
  };

  public getId() {
    return this.attributes.id;
  }

  public setId(id: string) {
    return this.attributes.id = id;
  }

  public getName() {
    return this.attributes.name;
  }

  public setName(name: string) {
    return this.attributes.name = name;
  }

  public getKey() {
    return this.attributes.key;
  }

  public setKey(key: string) {
    return this.attributes.key = key;
  }
  public getSdk() {
    return this.attributes.sdk;
  }

  public setSdk(sdk: string) {
    return this.attributes.sdk = sdk;
  }
  public getPackageName() {
    return this.attributes.packagename;
  }

  public setpackageName(packagename: string) {
    return this.attributes.packagename = packagename;
  }
  public getVersion() {
    return this.attributes.version;
  }

  public setVersion(version: string) {
    return this.attributes.version = version;
  }
}

