/**
 * 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 apiCoreV1 from './io.k8s.api.core.v1' ; import * as apisMetaV1 from './io.k8s.apimachinery.pkg.apis.meta.v1' ; export class Event implements KubernetesObject { public action ? : string ; public apiVersion : string ; public deprecatedCount ? : number ; public deprecatedFirstTimestamp ? : apisMetaV1 . Time ; public deprecatedLastTimestamp ? : apisMetaV1 . Time ; public deprecatedSource ? : apiCoreV1 . EventSource ; public eventTime : apisMetaV1 . MicroTime ; public kind : string ; public metadata : apisMetaV1 . ObjectMeta ; public note ? : string ; public reason ? : string ; public regarding ? : apiCoreV1 . ObjectReference ; public related ? : apiCoreV1 . ObjectReference ; public reportingController ? : string ; public reportingInstance ? : string ; public series ? : EventSeries ; public type ? : string ; constructor ( desc ) { this . action = desc . action ; this . apiVersion = Event . apiVersion ; this . deprecatedCount = desc . deprecatedCount ; this . deprecatedFirstTimestamp = desc . deprecatedFirstTimestamp ; this . deprecatedLastTimestamp = desc . deprecatedLastTimestamp ; this . deprecatedSource = desc . deprecatedSource ; this . eventTime = desc . eventTime ; this . kind = Event . kind ; this . metadata = desc . metadata ; this . note = desc . note ; this . reason = desc . reason ; this . regarding = desc . regarding ; this . related = desc . related ; this . reportingController = desc . reportingController ; this . reportingInstance = desc . reportingInstance ; this . series = desc . series ; this . type = desc . type ; } } export function isEvent ( o ) { return o && o . apiVersion === Event . apiVersion && o . kind === Event . kind ; } export namespace Event { export const apiVersion = 'events.k8s.io/v1beta1' ; export const group = 'events.k8s.io' ; export const version = 'v1beta1' ; export const kind = 'Event' ; export interface Interface { action ? : string ; deprecatedCount ? : number ; deprecatedFirstTimestamp ? : apisMetaV1 . Time ; deprecatedLastTimestamp ? : apisMetaV1 . Time ; deprecatedSource ? : apiCoreV1 . EventSource ; eventTime : apisMetaV1 . MicroTime ; metadata : apisMetaV1 . ObjectMeta ; note ? : string ; reason ? : string ; regarding ? : apiCoreV1 . ObjectReference ; related ? : apiCoreV1 . ObjectReference ; reportingController ? : string ; reportingInstance ? : string ; series ? : EventSeries ; type ? : string ; } } export class EventList { public apiVersion : string ; public items : Event [ ] ; public kind : string ; public metadata ? : apisMetaV1 . ListMeta ; constructor ( desc ) { this . apiVersion = EventList . apiVersion ; this . items = desc . items . map ( ( i ) => new Event ( i ) ) ; this . kind = EventList . kind ; this . metadata = desc . metadata ; } } export function isEventList ( o ) { return ( o && o . apiVersion === EventList . apiVersion && o . kind === EventList . kind ) ; } export namespace EventList { export const apiVersion = 'events.k8s.io/v1beta1' ; export const group = 'events.k8s.io' ; export const version = 'v1beta1' ; export const kind = 'EventList' ; export interface Interface { items : Event [ ] ; metadata ? : apisMetaV1 . ListMeta ; } } export class EventSeries { public count : number ; public lastObservedTime : apisMetaV1 . MicroTime ; public state : string ; constructor ( desc ) { this . count = desc . count ; this . lastObservedTime = desc . lastObservedTime ; this . state = desc . state ; } }