1 /* 2 Copyright The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 // Code generated by register-gen. DO NOT EDIT. 18 19 package v1 20 21 import ( 22 v1 "k8s.io/apimachinery/pkg/apis/meta/v1" 23 "k8s.io/apimachinery/pkg/runtime" 24 "k8s.io/apimachinery/pkg/runtime/schema" 25 ) 26 27 // GroupName specifies the group name used to register the objects. 28 const GroupName = "gateway.networking.k8s.io" 29 30 // GroupVersion specifies the group and the version used to register the objects. 31 var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1"} 32 33 // SchemeGroupVersion is group version used to register these objects 34 // Deprecated: use GroupVersion instead. 35 var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} 36 37 // Resource takes an unqualified resource and returns a Group qualified GroupResource 38 func Resource(resource string) schema.GroupResource { 39 return SchemeGroupVersion.WithResource(resource).GroupResource() 40 } 41 42 var ( 43 // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. 44 SchemeBuilder runtime.SchemeBuilder 45 localSchemeBuilder = &SchemeBuilder 46 // Depreciated: use Install instead 47 AddToScheme = localSchemeBuilder.AddToScheme 48 Install = localSchemeBuilder.AddToScheme 49 ) 50 51 func init() { 52 // We only register manually written functions here. The registration of the 53 // generated functions takes place in the generated files. The separation 54 // makes the code compile even when the generated files are missing. 55 localSchemeBuilder.Register(addKnownTypes) 56 } 57 58 // Adds the list of known types to Scheme. 59 func addKnownTypes(scheme *runtime.Scheme) error { 60 scheme.AddKnownTypes(SchemeGroupVersion, 61 &Gateway{}, 62 &GatewayClass{}, 63 &GatewayClassList{}, 64 &GatewayList{}, 65 &HTTPRoute{}, 66 &HTTPRouteList{}, 67 ) 68 // AddToGroupVersion allows the serialization of client types like ListOptions. 69 v1.AddToGroupVersion(scheme, SchemeGroupVersion) 70 return nil 71 } 72