/**
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */ import { KubernetesObject } from 'kpt-functions' ; import * as apisMetaV1 from './io.k8s.apimachinery.pkg.apis.meta.v1' ; export class Team implements KubernetesObject { public apiVersion : string ; public kind : string ; public metadata : apisMetaV1 . ObjectMeta ; public spec : Team . Spec ; constructor ( desc ) { this . apiVersion = Team . apiVersion ; this . kind = Team . kind ; this . metadata = desc . metadata ; this . spec = desc . spec ; } } export function isTeam ( o ) { return o && o . apiVersion === Team . apiVersion && o . kind === Team . kind ; } export namespace Team { export const apiVersion = 'anthos.cft.dev/v1alpha1' ; export const group = 'anthos.cft.dev' ; export const version = 'v1alpha1' ; export const kind = 'Team' ; export interface Interface { metadata : apisMetaV1 . ObjectMeta ; spec : Team . Spec ; } export class Spec { public roles ? : Team . Spec . Item [ ] ; } export namespace Spec { export class Item { public groups ? : string [ ] ; public role : string ; public users ? : string [ ] ; constructor ( desc ) { this . groups = desc . groups ; this . role = desc . role ; this . users = desc . users ; } } } } export class TeamList { public apiVersion : string ; public items : Team [ ] ; public kind : string ; public metadata ? : TeamList . Metadata ; constructor ( desc ) { this . apiVersion = TeamList . apiVersion ; this . items = desc . items . map ( ( i ) => new Team ( i ) ) ; this . kind = TeamList . kind ; this . metadata = desc . metadata ; } } export function isTeamList ( o ) { return o && o . apiVersion === TeamList . apiVersion && o . kind === TeamList . kind ; } export namespace TeamList { export const apiVersion = 'anthos.cft.dev/v1alpha1' ; export const group = 'anthos.cft.dev' ; export const version = 'v1alpha1' ; export const kind = 'TeamList' ; export interface Interface { items : Team [ ] ; metadata ? : TeamList . Metadata ; } export class Metadata { public continue ? : string ; public resourceVersion ? : string ; public selfLink ? : string ; } }