zz_generated.deepcopy.go 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. // +build !ignore_autogenerated
  2. /*
  3. Copyright 2016 The Kubernetes Authors.
  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. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. */
  14. // This file was autogenerated by deepcopy-gen. Do not edit it manually!
  15. package rbac
  16. import (
  17. api "k8s.io/kubernetes/pkg/api"
  18. conversion "k8s.io/kubernetes/pkg/conversion"
  19. runtime "k8s.io/kubernetes/pkg/runtime"
  20. reflect "reflect"
  21. )
  22. func init() {
  23. SchemeBuilder.Register(RegisterDeepCopies)
  24. }
  25. // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
  26. // to allow building arbitrary schemes.
  27. func RegisterDeepCopies(scheme *runtime.Scheme) error {
  28. return scheme.AddGeneratedDeepCopyFuncs(
  29. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
  30. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
  31. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
  32. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})},
  33. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})},
  34. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_Role, InType: reflect.TypeOf(&Role{})},
  35. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})},
  36. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
  37. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleList, InType: reflect.TypeOf(&RoleList{})},
  38. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_Subject, InType: reflect.TypeOf(&Subject{})},
  39. )
  40. }
  41. func DeepCopy_rbac_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
  42. {
  43. in := in.(*ClusterRole)
  44. out := out.(*ClusterRole)
  45. out.TypeMeta = in.TypeMeta
  46. if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
  47. return err
  48. }
  49. if in.Rules != nil {
  50. in, out := &in.Rules, &out.Rules
  51. *out = make([]PolicyRule, len(*in))
  52. for i := range *in {
  53. if err := DeepCopy_rbac_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
  54. return err
  55. }
  56. }
  57. } else {
  58. out.Rules = nil
  59. }
  60. return nil
  61. }
  62. }
  63. func DeepCopy_rbac_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
  64. {
  65. in := in.(*ClusterRoleBinding)
  66. out := out.(*ClusterRoleBinding)
  67. out.TypeMeta = in.TypeMeta
  68. if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
  69. return err
  70. }
  71. if in.Subjects != nil {
  72. in, out := &in.Subjects, &out.Subjects
  73. *out = make([]Subject, len(*in))
  74. for i := range *in {
  75. (*out)[i] = (*in)[i]
  76. }
  77. } else {
  78. out.Subjects = nil
  79. }
  80. out.RoleRef = in.RoleRef
  81. return nil
  82. }
  83. }
  84. func DeepCopy_rbac_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
  85. {
  86. in := in.(*ClusterRoleBindingList)
  87. out := out.(*ClusterRoleBindingList)
  88. out.TypeMeta = in.TypeMeta
  89. out.ListMeta = in.ListMeta
  90. if in.Items != nil {
  91. in, out := &in.Items, &out.Items
  92. *out = make([]ClusterRoleBinding, len(*in))
  93. for i := range *in {
  94. if err := DeepCopy_rbac_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
  95. return err
  96. }
  97. }
  98. } else {
  99. out.Items = nil
  100. }
  101. return nil
  102. }
  103. }
  104. func DeepCopy_rbac_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
  105. {
  106. in := in.(*ClusterRoleList)
  107. out := out.(*ClusterRoleList)
  108. out.TypeMeta = in.TypeMeta
  109. out.ListMeta = in.ListMeta
  110. if in.Items != nil {
  111. in, out := &in.Items, &out.Items
  112. *out = make([]ClusterRole, len(*in))
  113. for i := range *in {
  114. if err := DeepCopy_rbac_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
  115. return err
  116. }
  117. }
  118. } else {
  119. out.Items = nil
  120. }
  121. return nil
  122. }
  123. }
  124. func DeepCopy_rbac_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error {
  125. {
  126. in := in.(*PolicyRule)
  127. out := out.(*PolicyRule)
  128. if in.Verbs != nil {
  129. in, out := &in.Verbs, &out.Verbs
  130. *out = make([]string, len(*in))
  131. copy(*out, *in)
  132. } else {
  133. out.Verbs = nil
  134. }
  135. if in.AttributeRestrictions == nil {
  136. out.AttributeRestrictions = nil
  137. } else if newVal, err := c.DeepCopy(&in.AttributeRestrictions); err != nil {
  138. return err
  139. } else {
  140. out.AttributeRestrictions = *newVal.(*runtime.Object)
  141. }
  142. if in.APIGroups != nil {
  143. in, out := &in.APIGroups, &out.APIGroups
  144. *out = make([]string, len(*in))
  145. copy(*out, *in)
  146. } else {
  147. out.APIGroups = nil
  148. }
  149. if in.Resources != nil {
  150. in, out := &in.Resources, &out.Resources
  151. *out = make([]string, len(*in))
  152. copy(*out, *in)
  153. } else {
  154. out.Resources = nil
  155. }
  156. if in.ResourceNames != nil {
  157. in, out := &in.ResourceNames, &out.ResourceNames
  158. *out = make([]string, len(*in))
  159. copy(*out, *in)
  160. } else {
  161. out.ResourceNames = nil
  162. }
  163. if in.NonResourceURLs != nil {
  164. in, out := &in.NonResourceURLs, &out.NonResourceURLs
  165. *out = make([]string, len(*in))
  166. copy(*out, *in)
  167. } else {
  168. out.NonResourceURLs = nil
  169. }
  170. return nil
  171. }
  172. }
  173. func DeepCopy_rbac_Role(in interface{}, out interface{}, c *conversion.Cloner) error {
  174. {
  175. in := in.(*Role)
  176. out := out.(*Role)
  177. out.TypeMeta = in.TypeMeta
  178. if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
  179. return err
  180. }
  181. if in.Rules != nil {
  182. in, out := &in.Rules, &out.Rules
  183. *out = make([]PolicyRule, len(*in))
  184. for i := range *in {
  185. if err := DeepCopy_rbac_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
  186. return err
  187. }
  188. }
  189. } else {
  190. out.Rules = nil
  191. }
  192. return nil
  193. }
  194. }
  195. func DeepCopy_rbac_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
  196. {
  197. in := in.(*RoleBinding)
  198. out := out.(*RoleBinding)
  199. out.TypeMeta = in.TypeMeta
  200. if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
  201. return err
  202. }
  203. if in.Subjects != nil {
  204. in, out := &in.Subjects, &out.Subjects
  205. *out = make([]Subject, len(*in))
  206. for i := range *in {
  207. (*out)[i] = (*in)[i]
  208. }
  209. } else {
  210. out.Subjects = nil
  211. }
  212. out.RoleRef = in.RoleRef
  213. return nil
  214. }
  215. }
  216. func DeepCopy_rbac_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
  217. {
  218. in := in.(*RoleBindingList)
  219. out := out.(*RoleBindingList)
  220. out.TypeMeta = in.TypeMeta
  221. out.ListMeta = in.ListMeta
  222. if in.Items != nil {
  223. in, out := &in.Items, &out.Items
  224. *out = make([]RoleBinding, len(*in))
  225. for i := range *in {
  226. if err := DeepCopy_rbac_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
  227. return err
  228. }
  229. }
  230. } else {
  231. out.Items = nil
  232. }
  233. return nil
  234. }
  235. }
  236. func DeepCopy_rbac_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
  237. {
  238. in := in.(*RoleList)
  239. out := out.(*RoleList)
  240. out.TypeMeta = in.TypeMeta
  241. out.ListMeta = in.ListMeta
  242. if in.Items != nil {
  243. in, out := &in.Items, &out.Items
  244. *out = make([]Role, len(*in))
  245. for i := range *in {
  246. if err := DeepCopy_rbac_Role(&(*in)[i], &(*out)[i], c); err != nil {
  247. return err
  248. }
  249. }
  250. } else {
  251. out.Items = nil
  252. }
  253. return nil
  254. }
  255. }
  256. func DeepCopy_rbac_Subject(in interface{}, out interface{}, c *conversion.Cloner) error {
  257. {
  258. in := in.(*Subject)
  259. out := out.(*Subject)
  260. out.Kind = in.Kind
  261. out.APIVersion = in.APIVersion
  262. out.Name = in.Name
  263. out.Namespace = in.Namespace
  264. return nil
  265. }
  266. }