repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/leasecandidate.go
vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/leasecandidate.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package v1alpha2 import ( context "context" coordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" applyconfigurationscoordinationv1alpha2 "k8s.io/client-go/applyconfigurations/coordination/v1alpha2" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) // LeaseCandidatesGetter has a method to return a LeaseCandidateInterface. // A group's client should implement this interface. type LeaseCandidatesGetter interface { LeaseCandidates(namespace string) LeaseCandidateInterface } // LeaseCandidateInterface has methods to work with LeaseCandidate resources. type LeaseCandidateInterface interface { Create(ctx context.Context, leaseCandidate *coordinationv1alpha2.LeaseCandidate, opts v1.CreateOptions) (*coordinationv1alpha2.LeaseCandidate, error) Update(ctx context.Context, leaseCandidate *coordinationv1alpha2.LeaseCandidate, opts v1.UpdateOptions) (*coordinationv1alpha2.LeaseCandidate, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error Get(ctx context.Context, name string, opts v1.GetOptions) (*coordinationv1alpha2.LeaseCandidate, error) List(ctx context.Context, opts v1.ListOptions) (*coordinationv1alpha2.LeaseCandidateList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *coordinationv1alpha2.LeaseCandidate, err error) Apply(ctx context.Context, leaseCandidate *applyconfigurationscoordinationv1alpha2.LeaseCandidateApplyConfiguration, opts v1.ApplyOptions) (result *coordinationv1alpha2.LeaseCandidate, err error) LeaseCandidateExpansion } // leaseCandidates implements LeaseCandidateInterface type leaseCandidates struct { *gentype.ClientWithListAndApply[*coordinationv1alpha2.LeaseCandidate, *coordinationv1alpha2.LeaseCandidateList, *applyconfigurationscoordinationv1alpha2.LeaseCandidateApplyConfiguration] } // newLeaseCandidates returns a LeaseCandidates func newLeaseCandidates(c *CoordinationV1alpha2Client, namespace string) *leaseCandidates { return &leaseCandidates{ gentype.NewClientWithListAndApply[*coordinationv1alpha2.LeaseCandidate, *coordinationv1alpha2.LeaseCandidateList, *applyconfigurationscoordinationv1alpha2.LeaseCandidateApplyConfiguration]( "leasecandidates", c.RESTClient(), scheme.ParameterCodec, namespace, func() *coordinationv1alpha2.LeaseCandidate { return &coordinationv1alpha2.LeaseCandidate{} }, func() *coordinationv1alpha2.LeaseCandidateList { return &coordinationv1alpha2.LeaseCandidateList{} }, gentype.PrefersProtobuf[*coordinationv1alpha2.LeaseCandidate](), ), } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/doc.go
vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/doc.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. package v1alpha2
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/fake_leasecandidate.go
vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/fake_leasecandidate.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( v1alpha2 "k8s.io/api/coordination/v1alpha2" coordinationv1alpha2 "k8s.io/client-go/applyconfigurations/coordination/v1alpha2" gentype "k8s.io/client-go/gentype" typedcoordinationv1alpha2 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha2" ) // fakeLeaseCandidates implements LeaseCandidateInterface type fakeLeaseCandidates struct { *gentype.FakeClientWithListAndApply[*v1alpha2.LeaseCandidate, *v1alpha2.LeaseCandidateList, *coordinationv1alpha2.LeaseCandidateApplyConfiguration] Fake *FakeCoordinationV1alpha2 } func newFakeLeaseCandidates(fake *FakeCoordinationV1alpha2, namespace string) typedcoordinationv1alpha2.LeaseCandidateInterface { return &fakeLeaseCandidates{ gentype.NewFakeClientWithListAndApply[*v1alpha2.LeaseCandidate, *v1alpha2.LeaseCandidateList, *coordinationv1alpha2.LeaseCandidateApplyConfiguration]( fake.Fake, namespace, v1alpha2.SchemeGroupVersion.WithResource("leasecandidates"), v1alpha2.SchemeGroupVersion.WithKind("LeaseCandidate"), func() *v1alpha2.LeaseCandidate { return &v1alpha2.LeaseCandidate{} }, func() *v1alpha2.LeaseCandidateList { return &v1alpha2.LeaseCandidateList{} }, func(dst, src *v1alpha2.LeaseCandidateList) { dst.ListMeta = src.ListMeta }, func(list *v1alpha2.LeaseCandidateList) []*v1alpha2.LeaseCandidate { return gentype.ToPointerSlice(list.Items) }, func(list *v1alpha2.LeaseCandidateList, items []*v1alpha2.LeaseCandidate) { list.Items = gentype.FromPointerSlice(items) }, ), fake, } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/fake_coordination_client.go
vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/fake_coordination_client.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( v1alpha2 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha2" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) type FakeCoordinationV1alpha2 struct { *testing.Fake } func (c *FakeCoordinationV1alpha2) LeaseCandidates(namespace string) v1alpha2.LeaseCandidateInterface { return newFakeLeaseCandidates(c, namespace) } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeCoordinationV1alpha2) RESTClient() rest.Interface { var ret *rest.RESTClient return ret }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/doc.go
vendor/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/doc.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. // Package fake has the automatically generated clients. package fake
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/eviction_expansion.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/eviction_expansion.go
/* Copyright 2021 The Kubernetes Authors. 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. */ package v1 import ( "context" policy "k8s.io/api/policy/v1" ) // The EvictionExpansion interface allows manually adding extra methods to the ScaleInterface. type EvictionExpansion interface { Evict(ctx context.Context, eviction *policy.Eviction) error } func (c *evictions) Evict(ctx context.Context, eviction *policy.Eviction) error { return c.GetClient().Post(). AbsPath("/api/v1"). Namespace(eviction.Namespace). Resource("pods"). Name(eviction.Name). SubResource("eviction"). Body(eviction). Do(ctx). Error() }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package v1 import ( context "context" policyv1 "k8s.io/api/policy/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" applyconfigurationspolicyv1 "k8s.io/client-go/applyconfigurations/policy/v1" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) // PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. // A group's client should implement this interface. type PodDisruptionBudgetsGetter interface { PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface } // PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources. type PodDisruptionBudgetInterface interface { Create(ctx context.Context, podDisruptionBudget *policyv1.PodDisruptionBudget, opts metav1.CreateOptions) (*policyv1.PodDisruptionBudget, error) Update(ctx context.Context, podDisruptionBudget *policyv1.PodDisruptionBudget, opts metav1.UpdateOptions) (*policyv1.PodDisruptionBudget, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, podDisruptionBudget *policyv1.PodDisruptionBudget, opts metav1.UpdateOptions) (*policyv1.PodDisruptionBudget, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error Get(ctx context.Context, name string, opts metav1.GetOptions) (*policyv1.PodDisruptionBudget, error) List(ctx context.Context, opts metav1.ListOptions) (*policyv1.PodDisruptionBudgetList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *policyv1.PodDisruptionBudget, err error) Apply(ctx context.Context, podDisruptionBudget *applyconfigurationspolicyv1.PodDisruptionBudgetApplyConfiguration, opts metav1.ApplyOptions) (result *policyv1.PodDisruptionBudget, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). ApplyStatus(ctx context.Context, podDisruptionBudget *applyconfigurationspolicyv1.PodDisruptionBudgetApplyConfiguration, opts metav1.ApplyOptions) (result *policyv1.PodDisruptionBudget, err error) PodDisruptionBudgetExpansion } // podDisruptionBudgets implements PodDisruptionBudgetInterface type podDisruptionBudgets struct { *gentype.ClientWithListAndApply[*policyv1.PodDisruptionBudget, *policyv1.PodDisruptionBudgetList, *applyconfigurationspolicyv1.PodDisruptionBudgetApplyConfiguration] } // newPodDisruptionBudgets returns a PodDisruptionBudgets func newPodDisruptionBudgets(c *PolicyV1Client, namespace string) *podDisruptionBudgets { return &podDisruptionBudgets{ gentype.NewClientWithListAndApply[*policyv1.PodDisruptionBudget, *policyv1.PodDisruptionBudgetList, *applyconfigurationspolicyv1.PodDisruptionBudgetApplyConfiguration]( "poddisruptionbudgets", c.RESTClient(), scheme.ParameterCodec, namespace, func() *policyv1.PodDisruptionBudget { return &policyv1.PodDisruptionBudget{} }, func() *policyv1.PodDisruptionBudgetList { return &policyv1.PodDisruptionBudgetList{} }, gentype.PrefersProtobuf[*policyv1.PodDisruptionBudget](), ), } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/policy_client.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/policy_client.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package v1 import ( http "net/http" policyv1 "k8s.io/api/policy/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) type PolicyV1Interface interface { RESTClient() rest.Interface EvictionsGetter PodDisruptionBudgetsGetter } // PolicyV1Client is used to interact with features provided by the policy group. type PolicyV1Client struct { restClient rest.Interface } func (c *PolicyV1Client) Evictions(namespace string) EvictionInterface { return newEvictions(c, namespace) } func (c *PolicyV1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface { return newPodDisruptionBudgets(c, namespace) } // NewForConfig creates a new PolicyV1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*PolicyV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } httpClient, err := rest.HTTPClientFor(&config) if err != nil { return nil, err } return NewForConfigAndClient(&config, httpClient) } // NewForConfigAndClient creates a new PolicyV1Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PolicyV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } return &PolicyV1Client{client}, nil } // NewForConfigOrDie creates a new PolicyV1Client for the given config and // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *PolicyV1Client { client, err := NewForConfig(c) if err != nil { panic(err) } return client } // New creates a new PolicyV1Client for the given RESTClient. func New(c rest.Interface) *PolicyV1Client { return &PolicyV1Client{c} } func setConfigDefaults(config *rest.Config) error { gv := policyv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } return nil } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *PolicyV1Client) RESTClient() rest.Interface { if c == nil { return nil } return c.restClient }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/generated_expansion.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/generated_expansion.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package v1 type PodDisruptionBudgetExpansion interface{}
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/doc.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/doc.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. package v1
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/eviction.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/eviction.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package v1 import ( policyv1 "k8s.io/api/policy/v1" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) // EvictionsGetter has a method to return a EvictionInterface. // A group's client should implement this interface. type EvictionsGetter interface { Evictions(namespace string) EvictionInterface } // EvictionInterface has methods to work with Eviction resources. type EvictionInterface interface { EvictionExpansion } // evictions implements EvictionInterface type evictions struct { *gentype.Client[*policyv1.Eviction] } // newEvictions returns a Evictions func newEvictions(c *PolicyV1Client, namespace string) *evictions { return &evictions{ gentype.NewClient[*policyv1.Eviction]( "evictions", c.RESTClient(), scheme.ParameterCodec, namespace, func() *policyv1.Eviction { return &policyv1.Eviction{} }, gentype.PrefersProtobuf[*policyv1.Eviction](), ), } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_poddisruptionbudget.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_poddisruptionbudget.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( v1 "k8s.io/api/policy/v1" policyv1 "k8s.io/client-go/applyconfigurations/policy/v1" gentype "k8s.io/client-go/gentype" typedpolicyv1 "k8s.io/client-go/kubernetes/typed/policy/v1" ) // fakePodDisruptionBudgets implements PodDisruptionBudgetInterface type fakePodDisruptionBudgets struct { *gentype.FakeClientWithListAndApply[*v1.PodDisruptionBudget, *v1.PodDisruptionBudgetList, *policyv1.PodDisruptionBudgetApplyConfiguration] Fake *FakePolicyV1 } func newFakePodDisruptionBudgets(fake *FakePolicyV1, namespace string) typedpolicyv1.PodDisruptionBudgetInterface { return &fakePodDisruptionBudgets{ gentype.NewFakeClientWithListAndApply[*v1.PodDisruptionBudget, *v1.PodDisruptionBudgetList, *policyv1.PodDisruptionBudgetApplyConfiguration]( fake.Fake, namespace, v1.SchemeGroupVersion.WithResource("poddisruptionbudgets"), v1.SchemeGroupVersion.WithKind("PodDisruptionBudget"), func() *v1.PodDisruptionBudget { return &v1.PodDisruptionBudget{} }, func() *v1.PodDisruptionBudgetList { return &v1.PodDisruptionBudgetList{} }, func(dst, src *v1.PodDisruptionBudgetList) { dst.ListMeta = src.ListMeta }, func(list *v1.PodDisruptionBudgetList) []*v1.PodDisruptionBudget { return gentype.ToPointerSlice(list.Items) }, func(list *v1.PodDisruptionBudgetList, items []*v1.PodDisruptionBudget) { list.Items = gentype.FromPointerSlice(items) }, ), fake, } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( v1 "k8s.io/api/policy/v1" gentype "k8s.io/client-go/gentype" policyv1 "k8s.io/client-go/kubernetes/typed/policy/v1" ) // fakeEvictions implements EvictionInterface type fakeEvictions struct { *gentype.FakeClient[*v1.Eviction] Fake *FakePolicyV1 } func newFakeEvictions(fake *FakePolicyV1, namespace string) policyv1.EvictionInterface { return &fakeEvictions{ gentype.NewFakeClient[*v1.Eviction]( fake.Fake, namespace, v1.SchemeGroupVersion.WithResource("evictions"), v1.SchemeGroupVersion.WithKind("Eviction"), func() *v1.Eviction { return &v1.Eviction{} }, ), fake, } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction_expansion.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction_expansion.go
/* Copyright 2021 The Kubernetes Authors. 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. */ package fake import ( "context" policy "k8s.io/api/policy/v1" "k8s.io/apimachinery/pkg/runtime/schema" core "k8s.io/client-go/testing" ) func (c *fakeEvictions) Evict(ctx context.Context, eviction *policy.Eviction) error { action := core.CreateActionImpl{} action.Verb = "create" action.Namespace = c.Namespace() action.Resource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"} action.Subresource = "eviction" action.Object = eviction _, err := c.Fake.Invokes(action, eviction) return err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/doc.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/doc.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. // Package fake has the automatically generated clients. package fake
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_policy_client.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_policy_client.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( v1 "k8s.io/client-go/kubernetes/typed/policy/v1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) type FakePolicyV1 struct { *testing.Fake } func (c *FakePolicyV1) Evictions(namespace string) v1.EvictionInterface { return newFakeEvictions(c, namespace) } func (c *FakePolicyV1) PodDisruptionBudgets(namespace string) v1.PodDisruptionBudgetInterface { return newFakePodDisruptionBudgets(c, namespace) } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakePolicyV1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go
/* Copyright 2016 The Kubernetes Authors. 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. */ package v1beta1 import ( "context" policy "k8s.io/api/policy/v1beta1" ) // The EvictionExpansion interface allows manually adding extra methods to the ScaleInterface. type EvictionExpansion interface { Evict(ctx context.Context, eviction *policy.Eviction) error } func (c *evictions) Evict(ctx context.Context, eviction *policy.Eviction) error { return c.GetClient().Post(). AbsPath("/api/v1"). Namespace(eviction.Namespace). Resource("pods"). Name(eviction.Name). SubResource("eviction"). Body(eviction). Do(ctx). Error() }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package v1beta1 import ( context "context" policyv1beta1 "k8s.io/api/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" applyconfigurationspolicyv1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) // PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. // A group's client should implement this interface. type PodDisruptionBudgetsGetter interface { PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface } // PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources. type PodDisruptionBudgetInterface interface { Create(ctx context.Context, podDisruptionBudget *policyv1beta1.PodDisruptionBudget, opts v1.CreateOptions) (*policyv1beta1.PodDisruptionBudget, error) Update(ctx context.Context, podDisruptionBudget *policyv1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (*policyv1beta1.PodDisruptionBudget, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). UpdateStatus(ctx context.Context, podDisruptionBudget *policyv1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (*policyv1beta1.PodDisruptionBudget, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error Get(ctx context.Context, name string, opts v1.GetOptions) (*policyv1beta1.PodDisruptionBudget, error) List(ctx context.Context, opts v1.ListOptions) (*policyv1beta1.PodDisruptionBudgetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *policyv1beta1.PodDisruptionBudget, err error) Apply(ctx context.Context, podDisruptionBudget *applyconfigurationspolicyv1beta1.PodDisruptionBudgetApplyConfiguration, opts v1.ApplyOptions) (result *policyv1beta1.PodDisruptionBudget, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). ApplyStatus(ctx context.Context, podDisruptionBudget *applyconfigurationspolicyv1beta1.PodDisruptionBudgetApplyConfiguration, opts v1.ApplyOptions) (result *policyv1beta1.PodDisruptionBudget, err error) PodDisruptionBudgetExpansion } // podDisruptionBudgets implements PodDisruptionBudgetInterface type podDisruptionBudgets struct { *gentype.ClientWithListAndApply[*policyv1beta1.PodDisruptionBudget, *policyv1beta1.PodDisruptionBudgetList, *applyconfigurationspolicyv1beta1.PodDisruptionBudgetApplyConfiguration] } // newPodDisruptionBudgets returns a PodDisruptionBudgets func newPodDisruptionBudgets(c *PolicyV1beta1Client, namespace string) *podDisruptionBudgets { return &podDisruptionBudgets{ gentype.NewClientWithListAndApply[*policyv1beta1.PodDisruptionBudget, *policyv1beta1.PodDisruptionBudgetList, *applyconfigurationspolicyv1beta1.PodDisruptionBudgetApplyConfiguration]( "poddisruptionbudgets", c.RESTClient(), scheme.ParameterCodec, namespace, func() *policyv1beta1.PodDisruptionBudget { return &policyv1beta1.PodDisruptionBudget{} }, func() *policyv1beta1.PodDisruptionBudgetList { return &policyv1beta1.PodDisruptionBudgetList{} }, gentype.PrefersProtobuf[*policyv1beta1.PodDisruptionBudget](), ), } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package v1beta1 import ( http "net/http" policyv1beta1 "k8s.io/api/policy/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) type PolicyV1beta1Interface interface { RESTClient() rest.Interface EvictionsGetter PodDisruptionBudgetsGetter } // PolicyV1beta1Client is used to interact with features provided by the policy group. type PolicyV1beta1Client struct { restClient rest.Interface } func (c *PolicyV1beta1Client) Evictions(namespace string) EvictionInterface { return newEvictions(c, namespace) } func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface { return newPodDisruptionBudgets(c, namespace) } // NewForConfig creates a new PolicyV1beta1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*PolicyV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } httpClient, err := rest.HTTPClientFor(&config) if err != nil { return nil, err } return NewForConfigAndClient(&config, httpClient) } // NewForConfigAndClient creates a new PolicyV1beta1Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PolicyV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } return &PolicyV1beta1Client{client}, nil } // NewForConfigOrDie creates a new PolicyV1beta1Client for the given config and // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *PolicyV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) } return client } // New creates a new PolicyV1beta1Client for the given RESTClient. func New(c rest.Interface) *PolicyV1beta1Client { return &PolicyV1beta1Client{c} } func setConfigDefaults(config *rest.Config) error { gv := policyv1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } return nil } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *PolicyV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } return c.restClient }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package v1beta1 type PodDisruptionBudgetExpansion interface{}
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. package v1beta1
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package v1beta1 import ( policyv1beta1 "k8s.io/api/policy/v1beta1" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) // EvictionsGetter has a method to return a EvictionInterface. // A group's client should implement this interface. type EvictionsGetter interface { Evictions(namespace string) EvictionInterface } // EvictionInterface has methods to work with Eviction resources. type EvictionInterface interface { EvictionExpansion } // evictions implements EvictionInterface type evictions struct { *gentype.Client[*policyv1beta1.Eviction] } // newEvictions returns a Evictions func newEvictions(c *PolicyV1beta1Client, namespace string) *evictions { return &evictions{ gentype.NewClient[*policyv1beta1.Eviction]( "evictions", c.RESTClient(), scheme.ParameterCodec, namespace, func() *policyv1beta1.Eviction { return &policyv1beta1.Eviction{} }, gentype.PrefersProtobuf[*policyv1beta1.Eviction](), ), } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( v1beta1 "k8s.io/api/policy/v1beta1" policyv1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" gentype "k8s.io/client-go/gentype" typedpolicyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" ) // fakePodDisruptionBudgets implements PodDisruptionBudgetInterface type fakePodDisruptionBudgets struct { *gentype.FakeClientWithListAndApply[*v1beta1.PodDisruptionBudget, *v1beta1.PodDisruptionBudgetList, *policyv1beta1.PodDisruptionBudgetApplyConfiguration] Fake *FakePolicyV1beta1 } func newFakePodDisruptionBudgets(fake *FakePolicyV1beta1, namespace string) typedpolicyv1beta1.PodDisruptionBudgetInterface { return &fakePodDisruptionBudgets{ gentype.NewFakeClientWithListAndApply[*v1beta1.PodDisruptionBudget, *v1beta1.PodDisruptionBudgetList, *policyv1beta1.PodDisruptionBudgetApplyConfiguration]( fake.Fake, namespace, v1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"), v1beta1.SchemeGroupVersion.WithKind("PodDisruptionBudget"), func() *v1beta1.PodDisruptionBudget { return &v1beta1.PodDisruptionBudget{} }, func() *v1beta1.PodDisruptionBudgetList { return &v1beta1.PodDisruptionBudgetList{} }, func(dst, src *v1beta1.PodDisruptionBudgetList) { dst.ListMeta = src.ListMeta }, func(list *v1beta1.PodDisruptionBudgetList) []*v1beta1.PodDisruptionBudget { return gentype.ToPointerSlice(list.Items) }, func(list *v1beta1.PodDisruptionBudgetList, items []*v1beta1.PodDisruptionBudget) { list.Items = gentype.FromPointerSlice(items) }, ), fake, } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( v1beta1 "k8s.io/api/policy/v1beta1" gentype "k8s.io/client-go/gentype" policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" ) // fakeEvictions implements EvictionInterface type fakeEvictions struct { *gentype.FakeClient[*v1beta1.Eviction] Fake *FakePolicyV1beta1 } func newFakeEvictions(fake *FakePolicyV1beta1, namespace string) policyv1beta1.EvictionInterface { return &fakeEvictions{ gentype.NewFakeClient[*v1beta1.Eviction]( fake.Fake, namespace, v1beta1.SchemeGroupVersion.WithResource("evictions"), v1beta1.SchemeGroupVersion.WithKind("Eviction"), func() *v1beta1.Eviction { return &v1beta1.Eviction{} }, ), fake, } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go
/* Copyright 2016 The Kubernetes Authors. 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. */ package fake import ( "context" policy "k8s.io/api/policy/v1beta1" "k8s.io/apimachinery/pkg/runtime/schema" core "k8s.io/client-go/testing" ) func (c *fakeEvictions) Evict(ctx context.Context, eviction *policy.Eviction) error { action := core.CreateActionImpl{} action.Verb = "create" action.Namespace = c.Namespace() action.Resource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"} action.Subresource = "eviction" action.Object = eviction _, err := c.Fake.Invokes(action, eviction) return err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. // Package fake has the automatically generated clients. package fake
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_policy_client.go
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_policy_client.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( v1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) type FakePolicyV1beta1 struct { *testing.Fake } func (c *FakePolicyV1beta1) Evictions(namespace string) v1beta1.EvictionInterface { return newFakeEvictions(c, namespace) } func (c *FakePolicyV1beta1) PodDisruptionBudgets(namespace string) v1beta1.PodDisruptionBudgetInterface { return newFakePodDisruptionBudgets(c, namespace) } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakePolicyV1beta1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/restmapper/category_expansion.go
vendor/k8s.io/client-go/restmapper/category_expansion.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package restmapper import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery" ) // CategoryExpander maps category strings to GroupResources. // Categories are classification or 'tag' of a group of resources. type CategoryExpander interface { Expand(category string) ([]schema.GroupResource, bool) } // SimpleCategoryExpander implements CategoryExpander interface // using a static mapping of categories to GroupResource mapping. type SimpleCategoryExpander struct { Expansions map[string][]schema.GroupResource } // Expand fulfills CategoryExpander func (e SimpleCategoryExpander) Expand(category string) ([]schema.GroupResource, bool) { ret, ok := e.Expansions[category] return ret, ok } // discoveryCategoryExpander struct lets a REST Client wrapper (discoveryClient) to retrieve list of APIResourceList, // and then convert to fallbackExpander type discoveryCategoryExpander struct { discoveryClient discovery.DiscoveryInterface } // NewDiscoveryCategoryExpander returns a category expander that makes use of the "categories" fields from // the API, found through the discovery client. In case of any error or no category found (which likely // means we're at a cluster prior to categories support, fallback to the expander provided. func NewDiscoveryCategoryExpander(client discovery.DiscoveryInterface) CategoryExpander { if client == nil { panic("Please provide discovery client to shortcut expander") } return discoveryCategoryExpander{discoveryClient: client} } // Expand fulfills CategoryExpander func (e discoveryCategoryExpander) Expand(category string) ([]schema.GroupResource, bool) { // Get all supported resources for groups and versions from server, if no resource found, fallback anyway. _, apiResourceLists, _ := e.discoveryClient.ServerGroupsAndResources() if len(apiResourceLists) == 0 { return nil, false } discoveredExpansions := map[string][]schema.GroupResource{} for _, apiResourceList := range apiResourceLists { gv, err := schema.ParseGroupVersion(apiResourceList.GroupVersion) if err != nil { continue } // Collect GroupVersions by categories for _, apiResource := range apiResourceList.APIResources { if categories := apiResource.Categories; len(categories) > 0 { for _, category := range categories { groupResource := schema.GroupResource{ Group: gv.Group, Resource: apiResource.Name, } discoveredExpansions[category] = append(discoveredExpansions[category], groupResource) } } } } ret, ok := discoveredExpansions[category] return ret, ok } // UnionCategoryExpander implements CategoryExpander interface. // It maps given category string to union of expansions returned by all the CategoryExpanders in the list. type UnionCategoryExpander []CategoryExpander // Expand fulfills CategoryExpander func (u UnionCategoryExpander) Expand(category string) ([]schema.GroupResource, bool) { ret := []schema.GroupResource{} ok := false // Expand the category for each CategoryExpander in the list and merge/combine the results. for _, expansion := range u { curr, currOk := expansion.Expand(category) for _, currGR := range curr { found := false for _, existing := range ret { if existing == currGR { found = true break } } if !found { ret = append(ret, currGR) } } ok = ok || currOk } return ret, ok }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/restmapper/discovery.go
vendor/k8s.io/client-go/restmapper/discovery.go
/* Copyright 2016 The Kubernetes Authors. 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. */ package restmapper import ( "fmt" "strings" "sync" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery" "k8s.io/klog/v2" ) // APIGroupResources is an API group with a mapping of versions to // resources. type APIGroupResources struct { Group metav1.APIGroup // A mapping of version string to a slice of APIResources for // that version. VersionedResources map[string][]metav1.APIResource } // NewDiscoveryRESTMapper returns a PriorityRESTMapper based on the discovered // groups and resources passed in. func NewDiscoveryRESTMapper(groupResources []*APIGroupResources) meta.RESTMapper { unionMapper := meta.MultiRESTMapper{} var groupPriority []string // /v1 is special. It should always come first resourcePriority := []schema.GroupVersionResource{{Group: "", Version: "v1", Resource: meta.AnyResource}} kindPriority := []schema.GroupVersionKind{{Group: "", Version: "v1", Kind: meta.AnyKind}} for _, group := range groupResources { groupPriority = append(groupPriority, group.Group.Name) // Make sure the preferred version comes first if len(group.Group.PreferredVersion.Version) != 0 { preferred := group.Group.PreferredVersion.Version if _, ok := group.VersionedResources[preferred]; ok { resourcePriority = append(resourcePriority, schema.GroupVersionResource{ Group: group.Group.Name, Version: group.Group.PreferredVersion.Version, Resource: meta.AnyResource, }) kindPriority = append(kindPriority, schema.GroupVersionKind{ Group: group.Group.Name, Version: group.Group.PreferredVersion.Version, Kind: meta.AnyKind, }) } } for _, discoveryVersion := range group.Group.Versions { resources, ok := group.VersionedResources[discoveryVersion.Version] if !ok { continue } // Add non-preferred versions after the preferred version, in case there are resources that only exist in those versions if discoveryVersion.Version != group.Group.PreferredVersion.Version { resourcePriority = append(resourcePriority, schema.GroupVersionResource{ Group: group.Group.Name, Version: discoveryVersion.Version, Resource: meta.AnyResource, }) kindPriority = append(kindPriority, schema.GroupVersionKind{ Group: group.Group.Name, Version: discoveryVersion.Version, Kind: meta.AnyKind, }) } gv := schema.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version} versionMapper := meta.NewDefaultRESTMapper([]schema.GroupVersion{gv}) for _, resource := range resources { scope := meta.RESTScopeNamespace if !resource.Namespaced { scope = meta.RESTScopeRoot } // if we have a slash, then this is a subresource and we shouldn't create mappings for those. if strings.Contains(resource.Name, "/") { continue } plural := gv.WithResource(resource.Name) singular := gv.WithResource(resource.SingularName) // this is for legacy resources and servers which don't list singular forms. For those we must still guess. if len(resource.SingularName) == 0 { _, singular = meta.UnsafeGuessKindToResource(gv.WithKind(resource.Kind)) } versionMapper.AddSpecific(gv.WithKind(strings.ToLower(resource.Kind)), plural, singular, scope) versionMapper.AddSpecific(gv.WithKind(resource.Kind), plural, singular, scope) // TODO this is producing unsafe guesses that don't actually work, but it matches previous behavior versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope) } // TODO why is this type not in discovery (at least for "v1") versionMapper.Add(gv.WithKind("List"), meta.RESTScopeRoot) unionMapper = append(unionMapper, versionMapper) } } for _, group := range groupPriority { resourcePriority = append(resourcePriority, schema.GroupVersionResource{ Group: group, Version: meta.AnyVersion, Resource: meta.AnyResource, }) kindPriority = append(kindPriority, schema.GroupVersionKind{ Group: group, Version: meta.AnyVersion, Kind: meta.AnyKind, }) } return meta.PriorityRESTMapper{ Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority, } } // GetAPIGroupResources uses the provided discovery client to gather // discovery information and populate a slice of APIGroupResources. func GetAPIGroupResources(cl discovery.DiscoveryInterface) ([]*APIGroupResources, error) { gs, rs, err := cl.ServerGroupsAndResources() if rs == nil || gs == nil { return nil, err // TODO track the errors and update callers to handle partial errors. } rsm := map[string]*metav1.APIResourceList{} for _, r := range rs { rsm[r.GroupVersion] = r } var result []*APIGroupResources for _, group := range gs { groupResources := &APIGroupResources{ Group: *group, VersionedResources: make(map[string][]metav1.APIResource), } for _, version := range group.Versions { resources, ok := rsm[version.GroupVersion] if !ok { continue } groupResources.VersionedResources[version.Version] = resources.APIResources } result = append(result, groupResources) } return result, nil } // DeferredDiscoveryRESTMapper is a RESTMapper that will defer // initialization of the RESTMapper until the first mapping is // requested. type DeferredDiscoveryRESTMapper struct { initMu sync.Mutex delegate meta.RESTMapper cl discovery.CachedDiscoveryInterface } // NewDeferredDiscoveryRESTMapper returns a // DeferredDiscoveryRESTMapper that will lazily query the provided // client for discovery information to do REST mappings. func NewDeferredDiscoveryRESTMapper(cl discovery.CachedDiscoveryInterface) *DeferredDiscoveryRESTMapper { return &DeferredDiscoveryRESTMapper{ cl: cl, } } func (d *DeferredDiscoveryRESTMapper) getDelegate() (meta.RESTMapper, error) { d.initMu.Lock() defer d.initMu.Unlock() if d.delegate != nil { return d.delegate, nil } groupResources, err := GetAPIGroupResources(d.cl) if err != nil { return nil, err } d.delegate = NewDiscoveryRESTMapper(groupResources) return d.delegate, nil } // Reset resets the internally cached Discovery information and will // cause the next mapping request to re-discover. func (d *DeferredDiscoveryRESTMapper) Reset() { klog.V(5).Info("Invalidating discovery information") d.initMu.Lock() defer d.initMu.Unlock() d.cl.Invalidate() d.delegate = nil } // KindFor takes a partial resource and returns back the single match. // It returns an error if there are multiple matches. func (d *DeferredDiscoveryRESTMapper) KindFor(resource schema.GroupVersionResource) (gvk schema.GroupVersionKind, err error) { del, err := d.getDelegate() if err != nil { return schema.GroupVersionKind{}, err } gvk, err = del.KindFor(resource) if err != nil && !d.cl.Fresh() { d.Reset() gvk, err = d.KindFor(resource) } return } // KindsFor takes a partial resource and returns back the list of // potential kinds in priority order. func (d *DeferredDiscoveryRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvks []schema.GroupVersionKind, err error) { del, err := d.getDelegate() if err != nil { return nil, err } gvks, err = del.KindsFor(resource) if len(gvks) == 0 && !d.cl.Fresh() { d.Reset() gvks, err = d.KindsFor(resource) } return } // ResourceFor takes a partial resource and returns back the single // match. It returns an error if there are multiple matches. func (d *DeferredDiscoveryRESTMapper) ResourceFor(input schema.GroupVersionResource) (gvr schema.GroupVersionResource, err error) { del, err := d.getDelegate() if err != nil { return schema.GroupVersionResource{}, err } gvr, err = del.ResourceFor(input) if err != nil && !d.cl.Fresh() { d.Reset() gvr, err = d.ResourceFor(input) } return } // ResourcesFor takes a partial resource and returns back the list of // potential resource in priority order. func (d *DeferredDiscoveryRESTMapper) ResourcesFor(input schema.GroupVersionResource) (gvrs []schema.GroupVersionResource, err error) { del, err := d.getDelegate() if err != nil { return nil, err } gvrs, err = del.ResourcesFor(input) if len(gvrs) == 0 && !d.cl.Fresh() { d.Reset() gvrs, err = d.ResourcesFor(input) } return } // RESTMapping identifies a preferred resource mapping for the // provided group kind. func (d *DeferredDiscoveryRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (m *meta.RESTMapping, err error) { del, err := d.getDelegate() if err != nil { return nil, err } m, err = del.RESTMapping(gk, versions...) if err != nil && !d.cl.Fresh() { d.Reset() m, err = d.RESTMapping(gk, versions...) } return } // RESTMappings returns the RESTMappings for the provided group kind // in a rough internal preferred order. If no kind is found, it will // return a NoResourceMatchError. func (d *DeferredDiscoveryRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) (ms []*meta.RESTMapping, err error) { del, err := d.getDelegate() if err != nil { return nil, err } ms, err = del.RESTMappings(gk, versions...) if len(ms) == 0 && !d.cl.Fresh() { d.Reset() ms, err = d.RESTMappings(gk, versions...) } return } // ResourceSingularizer converts a resource name from plural to // singular (e.g., from pods to pod). func (d *DeferredDiscoveryRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { del, err := d.getDelegate() if err != nil { return resource, err } singular, err = del.ResourceSingularizer(resource) if err != nil && !d.cl.Fresh() { d.Reset() singular, err = d.ResourceSingularizer(resource) } return } func (d *DeferredDiscoveryRESTMapper) String() string { del, err := d.getDelegate() if err != nil { return fmt.Sprintf("DeferredDiscoveryRESTMapper{%v}", err) } return fmt.Sprintf("DeferredDiscoveryRESTMapper{\n\t%v\n}", del) } // Make sure it satisfies the interface var _ meta.ResettableRESTMapper = &DeferredDiscoveryRESTMapper{}
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/restmapper/shortcut.go
vendor/k8s.io/client-go/restmapper/shortcut.go
/* Copyright 2016 The Kubernetes Authors. 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. */ package restmapper import ( "fmt" "strings" "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery" ) // shortcutExpander is a RESTMapper that can be used for Kubernetes resources. It expands the resource first, then invokes the wrapped type shortcutExpander struct { RESTMapper meta.RESTMapper discoveryClient discovery.DiscoveryInterface warningHandler func(string) } var _ meta.ResettableRESTMapper = shortcutExpander{} // NewShortcutExpander wraps a restmapper in a layer that expands shortcuts found via discovery func NewShortcutExpander(delegate meta.RESTMapper, client discovery.DiscoveryInterface, warningHandler func(string)) meta.RESTMapper { return shortcutExpander{RESTMapper: delegate, discoveryClient: client, warningHandler: warningHandler} } // KindFor fulfills meta.RESTMapper func (e shortcutExpander) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { // expandResourceShortcut works with current API resources as read from discovery cache. // In case of new CRDs this means we potentially don't have current state of discovery. // In the current wiring in k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go#toRESTMapper, // we are using DeferredDiscoveryRESTMapper which on KindFor failure will clear the // cache and fetch all data from a cluster (see k8s.io/client-go/restmapper/discovery.go#KindFor). // Thus another call to expandResourceShortcut, after a NoMatchError should successfully // read Kind to the user or an error. gvk, err := e.RESTMapper.KindFor(e.expandResourceShortcut(resource)) if meta.IsNoMatchError(err) { return e.RESTMapper.KindFor(e.expandResourceShortcut(resource)) } return gvk, err } // KindsFor fulfills meta.RESTMapper func (e shortcutExpander) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error) { return e.RESTMapper.KindsFor(e.expandResourceShortcut(resource)) } // ResourcesFor fulfills meta.RESTMapper func (e shortcutExpander) ResourcesFor(resource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { return e.RESTMapper.ResourcesFor(e.expandResourceShortcut(resource)) } // ResourceFor fulfills meta.RESTMapper func (e shortcutExpander) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { return e.RESTMapper.ResourceFor(e.expandResourceShortcut(resource)) } // ResourceSingularizer fulfills meta.RESTMapper func (e shortcutExpander) ResourceSingularizer(resource string) (string, error) { return e.RESTMapper.ResourceSingularizer(e.expandResourceShortcut(schema.GroupVersionResource{Resource: resource}).Resource) } // RESTMapping fulfills meta.RESTMapper func (e shortcutExpander) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error) { return e.RESTMapper.RESTMapping(gk, versions...) } // RESTMappings fulfills meta.RESTMapper func (e shortcutExpander) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error) { return e.RESTMapper.RESTMappings(gk, versions...) } // getShortcutMappings returns a set of tuples which holds short names for resources. // First the list of potential resources will be taken from the API server. // Next we will append the hardcoded list of resources - to be backward compatible with old servers. // NOTE that the list is ordered by group priority. func (e shortcutExpander) getShortcutMappings() ([]*metav1.APIResourceList, []resourceShortcuts, error) { res := []resourceShortcuts{} // get server resources // This can return an error *and* the results it was able to find. We don't need to fail on the error. _, apiResList, err := e.discoveryClient.ServerGroupsAndResources() if err != nil { klog.V(1).Infof("Error loading discovery information: %v", err) } for _, apiResources := range apiResList { gv, err := schema.ParseGroupVersion(apiResources.GroupVersion) if err != nil { klog.V(1).Infof("Unable to parse groupversion = %s due to = %s", apiResources.GroupVersion, err.Error()) continue } for _, apiRes := range apiResources.APIResources { for _, shortName := range apiRes.ShortNames { rs := resourceShortcuts{ ShortForm: schema.GroupResource{Group: gv.Group, Resource: shortName}, LongForm: schema.GroupResource{Group: gv.Group, Resource: apiRes.Name}, } res = append(res, rs) } } } return apiResList, res, nil } // expandResourceShortcut will return the expanded version of resource // (something that a pkg/api/meta.RESTMapper can understand), if it is // indeed a shortcut. If no match has been found, we will match on group prefixing. // Lastly we will return resource unmodified. func (e shortcutExpander) expandResourceShortcut(resource schema.GroupVersionResource) schema.GroupVersionResource { // get the shortcut mappings and return on first match. if allResources, shortcutResources, err := e.getShortcutMappings(); err == nil { // avoid expanding if there's an exact match to a full resource name for _, apiResources := range allResources { gv, err := schema.ParseGroupVersion(apiResources.GroupVersion) if err != nil { continue } if len(resource.Group) != 0 && resource.Group != gv.Group { continue } for _, apiRes := range apiResources.APIResources { if resource.Resource == apiRes.Name { return resource } if resource.Resource == apiRes.SingularName { return resource } } } found := false var rsc schema.GroupVersionResource warnedAmbiguousShortcut := make(map[schema.GroupResource]bool) for _, item := range shortcutResources { if len(resource.Group) != 0 && resource.Group != item.ShortForm.Group { continue } if resource.Resource == item.ShortForm.Resource { if found { if item.LongForm.Group == rsc.Group && item.LongForm.Resource == rsc.Resource { // It is common and acceptable that group/resource has multiple // versions registered in cluster. This does not introduce ambiguity // in terms of shortname usage. continue } if !warnedAmbiguousShortcut[item.LongForm] { if e.warningHandler != nil { e.warningHandler(fmt.Sprintf("short name %q could also match lower priority resource %s", resource.Resource, item.LongForm.String())) } warnedAmbiguousShortcut[item.LongForm] = true } continue } rsc.Resource = item.LongForm.Resource rsc.Group = item.LongForm.Group found = true } } if found { return rsc } // we didn't find exact match so match on group prefixing. This allows autoscal to match autoscaling if len(resource.Group) == 0 { return resource } for _, item := range shortcutResources { if !strings.HasPrefix(item.ShortForm.Group, resource.Group) { continue } if resource.Resource == item.ShortForm.Resource { resource.Resource = item.LongForm.Resource resource.Group = item.LongForm.Group return resource } } } return resource } func (e shortcutExpander) Reset() { meta.MaybeResetRESTMapper(e.RESTMapper) } // ResourceShortcuts represents a structure that holds the information how to // transition from resource's shortcut to its full name. type resourceShortcuts struct { ShortForm schema.GroupResource LongForm schema.GroupResource }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/openapi/client.go
vendor/k8s.io/client-go/openapi/client.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package openapi import ( "context" "encoding/json" "strings" "k8s.io/client-go/rest" "k8s.io/kube-openapi/pkg/handler3" ) type Client interface { Paths() (map[string]GroupVersion, error) } type client struct { // URL includes the `hash` query param to take advantage of cache busting restClient rest.Interface } func NewClient(restClient rest.Interface) Client { return &client{ restClient: restClient, } } func (c *client) Paths() (map[string]GroupVersion, error) { data, err := c.restClient.Get(). AbsPath("/openapi/v3"). Do(context.TODO()). Raw() if err != nil { return nil, err } discoMap := &handler3.OpenAPIV3Discovery{} err = json.Unmarshal(data, discoMap) if err != nil { return nil, err } // Create GroupVersions for each element of the result result := map[string]GroupVersion{} for k, v := range discoMap.Paths { // If the server returned a URL rooted at /openapi/v3, preserve any additional client-side prefix. // If the server returned a URL not rooted at /openapi/v3, treat it as an actual server-relative URL. // See https://github.com/kubernetes/kubernetes/issues/117463 for details useClientPrefix := strings.HasPrefix(v.ServerRelativeURL, "/openapi/v3") result[k] = newGroupVersion(c, v, useClientPrefix) } return result, nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/openapi/groupversion.go
vendor/k8s.io/client-go/openapi/groupversion.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package openapi import ( "context" "net/url" "k8s.io/kube-openapi/pkg/handler3" ) const ContentTypeOpenAPIV3PB = "application/com.github.proto-openapi.spec.v3@v1.0+protobuf" type GroupVersion interface { Schema(contentType string) ([]byte, error) // ServerRelativeURL. Returns the path and parameters used to fetch the schema. // You should use the Schema method to fetch it, but this value can be used // to key the current version of the schema in a cache since it contains a // hash string which changes upon schema update. ServerRelativeURL() string } type groupversion struct { client *client item handler3.OpenAPIV3DiscoveryGroupVersion useClientPrefix bool } func newGroupVersion(client *client, item handler3.OpenAPIV3DiscoveryGroupVersion, useClientPrefix bool) *groupversion { return &groupversion{client: client, item: item, useClientPrefix: useClientPrefix} } func (g *groupversion) Schema(contentType string) ([]byte, error) { if !g.useClientPrefix { return g.client.restClient.Get(). RequestURI(g.item.ServerRelativeURL). SetHeader("Accept", contentType). Do(context.TODO()). Raw() } locator, err := url.Parse(g.item.ServerRelativeURL) if err != nil { return nil, err } path := g.client.restClient.Get(). AbsPath(locator.Path). SetHeader("Accept", contentType) // Other than root endpoints(openapiv3/apis), resources have hash query parameter to support etags. // However, absPath does not support handling query parameters internally, // so that hash query parameter is added manually for k, value := range locator.Query() { for _, v := range value { path.Param(k, v) } } return path.Do(context.TODO()).Raw() } // URL used for fetching the schema. The URL includes a hash and can be used // to key the current version of the schema in a cache. func (g *groupversion) ServerRelativeURL() string { return g.item.ServerRelativeURL }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/openapi/typeconverter.go
vendor/k8s.io/client-go/openapi/typeconverter.go
/* Copyright 2023 The Kubernetes Authors. 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. */ package openapi import ( "encoding/json" "fmt" "k8s.io/apimachinery/pkg/util/managedfields" "k8s.io/kube-openapi/pkg/spec3" "k8s.io/kube-openapi/pkg/validation/spec" ) func NewTypeConverter(client Client, preserveUnknownFields bool) (managedfields.TypeConverter, error) { spec := map[string]*spec.Schema{} paths, err := client.Paths() if err != nil { return nil, fmt.Errorf("failed to list paths: %w", err) } for _, gv := range paths { s, err := gv.Schema("application/json") if err != nil { return nil, fmt.Errorf("failed to download schema: %w", err) } var openapi spec3.OpenAPI if err := json.Unmarshal(s, &openapi); err != nil { return nil, fmt.Errorf("failed to parse schema: %w", err) } for k, v := range openapi.Components.Schemas { spec[k] = v } } return managedfields.NewTypeConverter(spec, preserveUnknownFields) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. 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. */ // Code generated by deepcopy-gen. DO NOT EDIT. package apiextensions import ( runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceColumnDefinition) DeepCopyInto(out *CustomResourceColumnDefinition) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceColumnDefinition. func (in *CustomResourceColumnDefinition) DeepCopy() *CustomResourceColumnDefinition { if in == nil { return nil } out := new(CustomResourceColumnDefinition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceConversion) DeepCopyInto(out *CustomResourceConversion) { *out = *in if in.WebhookClientConfig != nil { in, out := &in.WebhookClientConfig, &out.WebhookClientConfig *out = new(WebhookClientConfig) (*in).DeepCopyInto(*out) } if in.ConversionReviewVersions != nil { in, out := &in.ConversionReviewVersions, &out.ConversionReviewVersions *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceConversion. func (in *CustomResourceConversion) DeepCopy() *CustomResourceConversion { if in == nil { return nil } out := new(CustomResourceConversion) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinition) DeepCopyInto(out *CustomResourceDefinition) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinition. func (in *CustomResourceDefinition) DeepCopy() *CustomResourceDefinition { if in == nil { return nil } out := new(CustomResourceDefinition) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *CustomResourceDefinition) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionCondition) DeepCopyInto(out *CustomResourceDefinitionCondition) { *out = *in in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionCondition. func (in *CustomResourceDefinitionCondition) DeepCopy() *CustomResourceDefinitionCondition { if in == nil { return nil } out := new(CustomResourceDefinitionCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionList) DeepCopyInto(out *CustomResourceDefinitionList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]CustomResourceDefinition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionList. func (in *CustomResourceDefinitionList) DeepCopy() *CustomResourceDefinitionList { if in == nil { return nil } out := new(CustomResourceDefinitionList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *CustomResourceDefinitionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionNames) DeepCopyInto(out *CustomResourceDefinitionNames) { *out = *in if in.ShortNames != nil { in, out := &in.ShortNames, &out.ShortNames *out = make([]string, len(*in)) copy(*out, *in) } if in.Categories != nil { in, out := &in.Categories, &out.Categories *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionNames. func (in *CustomResourceDefinitionNames) DeepCopy() *CustomResourceDefinitionNames { if in == nil { return nil } out := new(CustomResourceDefinitionNames) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefinitionSpec) { *out = *in in.Names.DeepCopyInto(&out.Names) if in.Validation != nil { in, out := &in.Validation, &out.Validation *out = new(CustomResourceValidation) (*in).DeepCopyInto(*out) } if in.Subresources != nil { in, out := &in.Subresources, &out.Subresources *out = new(CustomResourceSubresources) (*in).DeepCopyInto(*out) } if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]CustomResourceDefinitionVersion, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.AdditionalPrinterColumns != nil { in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } if in.SelectableFields != nil { in, out := &in.SelectableFields, &out.SelectableFields *out = make([]SelectableField, len(*in)) copy(*out, *in) } if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) (*in).DeepCopyInto(*out) } if in.PreserveUnknownFields != nil { in, out := &in.PreserveUnknownFields, &out.PreserveUnknownFields *out = new(bool) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionSpec. func (in *CustomResourceDefinitionSpec) DeepCopy() *CustomResourceDefinitionSpec { if in == nil { return nil } out := new(CustomResourceDefinitionSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionStatus) DeepCopyInto(out *CustomResourceDefinitionStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]CustomResourceDefinitionCondition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } in.AcceptedNames.DeepCopyInto(&out.AcceptedNames) if in.StoredVersions != nil { in, out := &in.StoredVersions, &out.StoredVersions *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionStatus. func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionStatus { if in == nil { return nil } out := new(CustomResourceDefinitionStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { *out = *in if in.DeprecationWarning != nil { in, out := &in.DeprecationWarning, &out.DeprecationWarning *out = new(string) **out = **in } if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(CustomResourceValidation) (*in).DeepCopyInto(*out) } if in.Subresources != nil { in, out := &in.Subresources, &out.Subresources *out = new(CustomResourceSubresources) (*in).DeepCopyInto(*out) } if in.AdditionalPrinterColumns != nil { in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } if in.SelectableFields != nil { in, out := &in.SelectableFields, &out.SelectableFields *out = make([]SelectableField, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionVersion. func (in *CustomResourceDefinitionVersion) DeepCopy() *CustomResourceDefinitionVersion { if in == nil { return nil } out := new(CustomResourceDefinitionVersion) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceSubresourceScale) DeepCopyInto(out *CustomResourceSubresourceScale) { *out = *in if in.LabelSelectorPath != nil { in, out := &in.LabelSelectorPath, &out.LabelSelectorPath *out = new(string) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceScale. func (in *CustomResourceSubresourceScale) DeepCopy() *CustomResourceSubresourceScale { if in == nil { return nil } out := new(CustomResourceSubresourceScale) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceSubresourceStatus) DeepCopyInto(out *CustomResourceSubresourceStatus) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceStatus. func (in *CustomResourceSubresourceStatus) DeepCopy() *CustomResourceSubresourceStatus { if in == nil { return nil } out := new(CustomResourceSubresourceStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceSubresources) DeepCopyInto(out *CustomResourceSubresources) { *out = *in if in.Status != nil { in, out := &in.Status, &out.Status *out = new(CustomResourceSubresourceStatus) **out = **in } if in.Scale != nil { in, out := &in.Scale, &out.Scale *out = new(CustomResourceSubresourceScale) (*in).DeepCopyInto(*out) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresources. func (in *CustomResourceSubresources) DeepCopy() *CustomResourceSubresources { if in == nil { return nil } out := new(CustomResourceSubresources) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceValidation) DeepCopyInto(out *CustomResourceValidation) { *out = *in if in.OpenAPIV3Schema != nil { in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema *out = (*in).DeepCopy() } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceValidation. func (in *CustomResourceValidation) DeepCopy() *CustomResourceValidation { if in == nil { return nil } out := new(CustomResourceValidation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExternalDocumentation) DeepCopyInto(out *ExternalDocumentation) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalDocumentation. func (in *ExternalDocumentation) DeepCopy() *ExternalDocumentation { if in == nil { return nil } out := new(ExternalDocumentation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in JSONSchemaDefinitions) DeepCopyInto(out *JSONSchemaDefinitions) { { in := &in *out = make(JSONSchemaDefinitions, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } return } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDefinitions. func (in JSONSchemaDefinitions) DeepCopy() JSONSchemaDefinitions { if in == nil { return nil } out := new(JSONSchemaDefinitions) in.DeepCopyInto(out) return *out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in JSONSchemaDependencies) DeepCopyInto(out *JSONSchemaDependencies) { { in := &in *out = make(JSONSchemaDependencies, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } return } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDependencies. func (in JSONSchemaDependencies) DeepCopy() JSONSchemaDependencies { if in == nil { return nil } out := new(JSONSchemaDependencies) in.DeepCopyInto(out) return *out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaProps) DeepCopyInto(out *JSONSchemaProps) { clone := in.DeepCopy() *out = *clone return } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaPropsOrArray) DeepCopyInto(out *JSONSchemaPropsOrArray) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = (*in).DeepCopy() } if in.JSONSchemas != nil { in, out := &in.JSONSchemas, &out.JSONSchemas *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrArray. func (in *JSONSchemaPropsOrArray) DeepCopy() *JSONSchemaPropsOrArray { if in == nil { return nil } out := new(JSONSchemaPropsOrArray) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaPropsOrBool) DeepCopyInto(out *JSONSchemaPropsOrBool) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = (*in).DeepCopy() } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrBool. func (in *JSONSchemaPropsOrBool) DeepCopy() *JSONSchemaPropsOrBool { if in == nil { return nil } out := new(JSONSchemaPropsOrBool) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaPropsOrStringArray) DeepCopyInto(out *JSONSchemaPropsOrStringArray) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = (*in).DeepCopy() } if in.Property != nil { in, out := &in.Property, &out.Property *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrStringArray. func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray { if in == nil { return nil } out := new(JSONSchemaPropsOrStringArray) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SelectableField) DeepCopyInto(out *SelectableField) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. func (in *SelectableField) DeepCopy() *SelectableField { if in == nil { return nil } out := new(SelectableField) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { *out = *in if in.Path != nil { in, out := &in.Path, &out.Path *out = new(string) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. func (in *ServiceReference) DeepCopy() *ServiceReference { if in == nil { return nil } out := new(ServiceReference) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidationRule) DeepCopyInto(out *ValidationRule) { *out = *in if in.Reason != nil { in, out := &in.Reason, &out.Reason *out = new(FieldValueErrorReason) **out = **in } if in.OptionalOldSelf != nil { in, out := &in.OptionalOldSelf, &out.OptionalOldSelf *out = new(bool) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRule. func (in *ValidationRule) DeepCopy() *ValidationRule { if in == nil { return nil } out := new(ValidationRule) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in ValidationRules) DeepCopyInto(out *ValidationRules) { { in := &in *out = make(ValidationRules, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } return } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRules. func (in ValidationRules) DeepCopy() ValidationRules { if in == nil { return nil } out := new(ValidationRules) in.DeepCopyInto(out) return *out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { *out = *in if in.URL != nil { in, out := &in.URL, &out.URL *out = new(string) **out = **in } if in.Service != nil { in, out := &in.Service, &out.Service *out = new(ServiceReference) (*in).DeepCopyInto(*out) } if in.CABundle != nil { in, out := &in.CABundle, &out.CABundle *out = make([]byte, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { if in == nil { return nil } out := new(WebhookClientConfig) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package apiextensions import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ConversionStrategyType describes different conversion types. type ConversionStrategyType string const ( // NoneConverter is a converter that only sets apiversion of the CR and leave everything else unchanged. NoneConverter ConversionStrategyType = "None" // WebhookConverter is a converter that calls to an external webhook to convert the CR. WebhookConverter ConversionStrategyType = "Webhook" ) // CustomResourceDefinitionSpec describes how a user wants their resource to appear type CustomResourceDefinitionSpec struct { // Group is the group this resource belongs in Group string // Version is the version this resource belongs in // Should be always first item in Versions field if provided. // Optional, but at least one of Version or Versions must be set. // Deprecated: Please use `Versions`. Version string // Names are the names used to describe this custom resource Names CustomResourceDefinitionNames // Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced Scope ResourceScope // Validation describes the validation methods for CustomResources // Optional, the global validation schema for all versions. // Top-level and per-version schemas are mutually exclusive. // +optional Validation *CustomResourceValidation // Subresources describes the subresources for CustomResource // Optional, the global subresources for all versions. // Top-level and per-version subresources are mutually exclusive. // +optional Subresources *CustomResourceSubresources // Versions is the list of all supported versions for this resource. // If Version field is provided, this field is optional. // Validation: All versions must use the same validation schema for now. i.e., top // level Validation field is applied to all of these versions. // Order: The version name will be used to compute the order. // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. Versions []CustomResourceDefinitionVersion // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. // Optional, the global columns for all versions. // Top-level and per-version columns are mutually exclusive. // +optional AdditionalPrinterColumns []CustomResourceColumnDefinition // selectableFields specifies paths to fields that may be used as field selectors. // A maximum of 8 selectable fields are allowed. // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors // Top-level and per-version columns are mutually exclusive. // +optional SelectableFields []SelectableField // `conversion` defines conversion settings for the CRD. Conversion *CustomResourceConversion // preserveUnknownFields disables pruning of object fields which are not // specified in the OpenAPI schema. apiVersion, kind, metadata and known // fields inside metadata are always preserved. // Defaults to true in v1beta and will default to false in v1. PreserveUnknownFields *bool } // CustomResourceConversion describes how to convert different versions of a CR. type CustomResourceConversion struct { // `strategy` specifies the conversion strategy. Allowed values are: // - `None`: The converter only change the apiVersion and would not touch any other field in the CR. // - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information // is needed for this option. This requires spec.preserveUnknownFields to be false. Strategy ConversionStrategyType // `webhookClientConfig` is the instructions for how to call the webhook if strategy is `Webhook`. WebhookClientConfig *WebhookClientConfig // ConversionReviewVersions is an ordered list of preferred `ConversionReview` // versions the Webhook expects. API server will try to use first version in // the list which it supports. If none of the versions specified in this list // supported by API server, conversion will fail for this object. // If a persisted Webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail. // +optional ConversionReviewVersions []string } // WebhookClientConfig contains the information to make a TLS // connection with the webhook. It has the same field as admissionregistration.internal.WebhookClientConfig. type WebhookClientConfig struct { // `url` gives the location of the webhook, in standard URL form // (`scheme://host:port/path`). Exactly one of `url` or `service` // must be specified. // // The `host` should not refer to a service running in the cluster; use // the `service` field instead. The host might be resolved via external // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve // in-cluster DNS as that would be a layering violation). `host` may // also be an IP address. // // Please note that using `localhost` or `127.0.0.1` as a `host` is // risky unless you take great care to run this webhook on all hosts // which run an apiserver which might need to make calls to this // webhook. Such installs are likely to be non-portable, i.e., not easy // to turn up in a new cluster. // // The scheme must be "https"; the URL must begin with "https://". // // A path is optional, and if present may be any string permissible in // a URL. You may use the path to pass an arbitrary string to the // webhook, for example, a cluster identifier. // // Attempting to use a user or basic auth e.g. "user:password@" is not // allowed. Fragments ("#...") and query parameters ("?...") are not // allowed, either. // // +optional URL *string // `service` is a reference to the service for this webhook. Either // `service` or `url` must be specified. // // If the webhook is running within the cluster, then you should use `service`. // // +optional Service *ServiceReference // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. // If unspecified, system trust roots on the apiserver are used. // +optional CABundle []byte } // ServiceReference holds a reference to Service.legacy.k8s.io type ServiceReference struct { // `namespace` is the namespace of the service. // Required Namespace string // `name` is the name of the service. // Required Name string // `path` is an optional URL path which will be sent in any request to // this service. // +optional Path *string // If specified, the port on the service that hosting webhook. // `port` should be a valid port number (1-65535, inclusive). // +optional Port int32 } // CustomResourceDefinitionVersion describes a version for CRD. type CustomResourceDefinitionVersion struct { // Name is the version name, e.g. “v1”, “v2beta1”, etc. Name string // Served is a flag enabling/disabling this version from being served via REST APIs Served bool // Storage flags the version as storage version. There must be exactly one flagged // as storage version. Storage bool // deprecated indicates this version of the custom resource API is deprecated. // When set to true, API requests to this version receive a warning header in the server response. // Defaults to false. Deprecated bool // deprecationWarning overrides the default warning returned to API clients. // May only be set when `deprecated` is true. // The default warning indicates this version is deprecated and recommends use // of the newest served version of equal or greater stability, if one exists. DeprecationWarning *string // Schema describes the schema for CustomResource used in validation, pruning, and defaulting. // Top-level and per-version schemas are mutually exclusive. // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead) // This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. // +optional Schema *CustomResourceValidation // Subresources describes the subresources for CustomResource // Top-level and per-version subresources are mutually exclusive. // Per-version subresources must not all be set to identical values (top-level subresources should be used instead) // This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. // +optional Subresources *CustomResourceSubresources // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. // Top-level and per-version columns are mutually exclusive. // Per-version columns must not all be set to identical values (top-level columns should be used instead) // This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. // NOTE: CRDs created prior to 1.13 populated the top-level additionalPrinterColumns field by default. To apply an // update that changes to per-version additionalPrinterColumns, the top-level additionalPrinterColumns field must // be explicitly set to null // +optional AdditionalPrinterColumns []CustomResourceColumnDefinition // selectableFields specifies paths to fields that may be used as field selectors. // A maximum of 8 selectable fields are allowed. // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors // +optional SelectableFields []SelectableField } // SelectableField specifies the JSON path of a field that may be used with field selectors. type SelectableField struct { // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a // field selector value. // Only JSON paths without the array notation are allowed. // Must point to a field of type string, boolean or integer. Types with enum values // and strings with formats are allowed. // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. // Must not point to metdata fields. // Required. JSONPath string } // CustomResourceColumnDefinition specifies a column for server side printing. type CustomResourceColumnDefinition struct { // name is a human readable name for the column. Name string // type is an OpenAPI type definition for this column. // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. Type string // format is an optional OpenAPI type definition for this column. The 'name' format is applied // to the primary identifier column to assist in clients identifying column is the resource name. // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. Format string // description is a human readable description of this column. Description string // priority is an integer defining the relative importance of this column compared to others. Lower // numbers are considered higher priority. Columns that may be omitted in limited space scenarios // should be given a higher priority. Priority int32 // JSONPath is a simple JSON path, i.e. without array notation. JSONPath string } // CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition type CustomResourceDefinitionNames struct { // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration // too: plural.group and it must be all lowercase. Plural string // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased <kind> Singular string // ShortNames are short names for the resource. It must be all lowercase. ShortNames []string // Kind is the serialized kind of the resource. It is normally CamelCase and singular. Kind string // ListKind is the serialized kind of the list for this resource. Defaults to <kind>List. ListKind string // Categories is a list of grouped resources custom resources belong to (e.g. 'all') // +optional Categories []string } // ResourceScope is an enum defining the different scopes available to a custom resource type ResourceScope string const ( ClusterScoped ResourceScope = "Cluster" NamespaceScoped ResourceScope = "Namespaced" ) type ConditionStatus string // These are valid condition statuses. "ConditionTrue" means a resource is in the condition. // "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes // can't decide if a resource is in the condition or not. In the future, we could add other // intermediate conditions, e.g. ConditionDegraded. const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" ) // CustomResourceDefinitionConditionType is a valid value for CustomResourceDefinitionCondition.Type type CustomResourceDefinitionConditionType string const ( // Established means that the resource has become active. A resource is established when all names are // accepted without a conflict for the first time. A resource stays established until deleted, even during // a later NamesAccepted due to changed names. Note that not all names can be changed. Established CustomResourceDefinitionConditionType = "Established" // NamesAccepted means the names chosen for this CustomResourceDefinition do not conflict with others in // the group and are therefore accepted. NamesAccepted CustomResourceDefinitionConditionType = "NamesAccepted" // NonStructuralSchema means that one or more OpenAPI schema is not structural. // // A schema is structural if it specifies types for all values, with the only exceptions of those with // - x-kubernetes-int-or-string: true — for fields which can be integer or string // - x-kubernetes-preserve-unknown-fields: true — for raw, unspecified JSON values // and there is no type, additionalProperties, default, nullable or x-kubernetes-* vendor extenions // specified under allOf, anyOf, oneOf or not. // // Non-structural schemas will not be allowed anymore in v1 API groups. Moreover, new features will not be // available for non-structural CRDs: // - pruning // - defaulting // - read-only // - OpenAPI publishing // - webhook conversion NonStructuralSchema CustomResourceDefinitionConditionType = "NonStructuralSchema" // Terminating means that the CustomResourceDefinition has been deleted and is cleaning up. Terminating CustomResourceDefinitionConditionType = "Terminating" // KubernetesAPIApprovalPolicyConformant indicates that an API in *.k8s.io or *.kubernetes.io is or is not approved. For CRDs // outside those groups, this condition will not be set. For CRDs inside those groups, the condition will // be true if .metadata.annotations["api-approved.kubernetes.io"] is set to a URL, otherwise it will be false. // See https://github.com/kubernetes/enhancements/pull/1111 for more details. KubernetesAPIApprovalPolicyConformant CustomResourceDefinitionConditionType = "KubernetesAPIApprovalPolicyConformant" ) // CustomResourceDefinitionCondition contains details for the current condition of this pod. type CustomResourceDefinitionCondition struct { // Type is the type of the condition. Types include Established, NamesAccepted and Terminating. Type CustomResourceDefinitionConditionType // Status is the status of the condition. // Can be True, False, Unknown. Status ConditionStatus // Last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time // Unique, one-word, CamelCase reason for the condition's last transition. // +optional Reason string // Human-readable message indicating details about last transition. // +optional Message string } // CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition type CustomResourceDefinitionStatus struct { // Conditions indicate state for particular aspects of a CustomResourceDefinition // +listType=map // +listMapKey=type Conditions []CustomResourceDefinitionCondition // AcceptedNames are the names that are actually being used to serve discovery // They may be different than the names in spec. AcceptedNames CustomResourceDefinitionNames // StoredVersions are all versions of CustomResources that were ever persisted. Tracking these // versions allows a migration path for stored versions in etcd. The field is mutable // so the migration controller can first finish a migration to another version (i.e. // that no old objects are left in the storage), and then remove the rest of the // versions from this list. // None of the versions in this list can be removed from the spec.Versions field. StoredVersions []string } // CustomResourceCleanupFinalizer is the name of the finalizer which will delete instances of // a CustomResourceDefinition const CustomResourceCleanupFinalizer = "customresourcecleanup.apiextensions.k8s.io" // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format // <.spec.name>.<.spec.group>. type CustomResourceDefinition struct { metav1.TypeMeta metav1.ObjectMeta // Spec describes how the user wants the resources to appear Spec CustomResourceDefinitionSpec // Status indicates the actual state of the CustomResourceDefinition Status CustomResourceDefinitionStatus } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // CustomResourceDefinitionList is a list of CustomResourceDefinition objects. type CustomResourceDefinitionList struct { metav1.TypeMeta metav1.ListMeta // Items individual CustomResourceDefinitions Items []CustomResourceDefinition } // CustomResourceValidation is a list of validation methods for CustomResources. type CustomResourceValidation struct { // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. OpenAPIV3Schema *JSONSchemaProps } // CustomResourceSubresources defines the status and scale subresources for CustomResources. type CustomResourceSubresources struct { // Status denotes the status subresource for CustomResources Status *CustomResourceSubresourceStatus // Scale denotes the scale subresource for CustomResources Scale *CustomResourceSubresourceScale } // CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. // Status is represented by the `.status` JSON path inside of a CustomResource. When set, // * exposes a /status subresource for the custom resource // * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza // * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza type CustomResourceSubresourceStatus struct{} // CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. type CustomResourceSubresourceScale struct { // SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under .spec. // If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET. SpecReplicasPath string // StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under .status. // If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource // will default to 0. StatusReplicasPath string // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under .status or .spec. // Must be set to work with HPA. // The field pointed by this JSON path must be a string field (not a complex selector struct) // which contains a serialized label selector in string form. // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource // If there is no value under the given path in the CustomResource, the status label selector value in the /scale // subresource will default to the empty string. // +optional LabelSelectorPath *string }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/register.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/register.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package apiextensions import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) const GroupName = "apiextensions.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns back a Group qualified GroupKind func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns back a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme ) // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CustomResourceDefinition{}, &CustomResourceDefinitionList{}, ) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/deepcopy.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/deepcopy.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package apiextensions import "k8s.io/apimachinery/pkg/runtime" // TODO: Update this after a tag is created for interface fields in DeepCopy func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { if in == nil { return nil } out := new(JSONSchemaProps) *out = *in if in.Default != nil { defaultJSON := JSON(runtime.DeepCopyJSONValue(*(in.Default))) out.Default = &(defaultJSON) } else { out.Default = nil } if in.Example != nil { exampleJSON := JSON(runtime.DeepCopyJSONValue(*(in.Example))) out.Example = &(exampleJSON) } else { out.Example = nil } if in.Ref != nil { in, out := &in.Ref, &out.Ref if *in == nil { *out = nil } else { *out = new(string) **out = **in } } if in.Maximum != nil { in, out := &in.Maximum, &out.Maximum if *in == nil { *out = nil } else { *out = new(float64) **out = **in } } if in.Minimum != nil { in, out := &in.Minimum, &out.Minimum if *in == nil { *out = nil } else { *out = new(float64) **out = **in } } if in.MaxLength != nil { in, out := &in.MaxLength, &out.MaxLength if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MinLength != nil { in, out := &in.MinLength, &out.MinLength if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MaxItems != nil { in, out := &in.MaxItems, &out.MaxItems if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MinItems != nil { in, out := &in.MinItems, &out.MinItems if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MultipleOf != nil { in, out := &in.MultipleOf, &out.MultipleOf if *in == nil { *out = nil } else { *out = new(float64) **out = **in } } if in.Enum != nil { out.Enum = make([]JSON, len(in.Enum)) for i := range in.Enum { out.Enum[i] = runtime.DeepCopyJSONValue(in.Enum[i]) } } if in.MaxProperties != nil { in, out := &in.MaxProperties, &out.MaxProperties if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MinProperties != nil { in, out := &in.MinProperties, &out.MinProperties if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.Required != nil { in, out := &in.Required, &out.Required *out = make([]string, len(*in)) copy(*out, *in) } if in.Items != nil { in, out := &in.Items, &out.Items if *in == nil { *out = nil } else { *out = new(JSONSchemaPropsOrArray) (*in).DeepCopyInto(*out) } } if in.AllOf != nil { in, out := &in.AllOf, &out.AllOf *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.OneOf != nil { in, out := &in.OneOf, &out.OneOf *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.AnyOf != nil { in, out := &in.AnyOf, &out.AnyOf *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Not != nil { in, out := &in.Not, &out.Not if *in == nil { *out = nil } else { *out = new(JSONSchemaProps) (*in).DeepCopyInto(*out) } } if in.Properties != nil { in, out := &in.Properties, &out.Properties *out = make(map[string]JSONSchemaProps, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.AdditionalProperties != nil { in, out := &in.AdditionalProperties, &out.AdditionalProperties if *in == nil { *out = nil } else { *out = new(JSONSchemaPropsOrBool) (*in).DeepCopyInto(*out) } } if in.PatternProperties != nil { in, out := &in.PatternProperties, &out.PatternProperties *out = make(map[string]JSONSchemaProps, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.Dependencies != nil { in, out := &in.Dependencies, &out.Dependencies *out = make(JSONSchemaDependencies, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.AdditionalItems != nil { in, out := &in.AdditionalItems, &out.AdditionalItems if *in == nil { *out = nil } else { *out = new(JSONSchemaPropsOrBool) (*in).DeepCopyInto(*out) } } if in.Definitions != nil { in, out := &in.Definitions, &out.Definitions *out = make(JSONSchemaDefinitions, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.ExternalDocs != nil { in, out := &in.ExternalDocs, &out.ExternalDocs if *in == nil { *out = nil } else { *out = new(ExternalDocumentation) (*in).DeepCopyInto(*out) } } if in.XPreserveUnknownFields != nil { in, out := &in.XPreserveUnknownFields, &out.XPreserveUnknownFields if *in == nil { *out = nil } else { *out = new(bool) **out = **in } } if in.XListMapKeys != nil { in, out := &in.XListMapKeys, &out.XListMapKeys *out = make([]string, len(*in)) copy(*out, *in) } if in.XListType != nil { in, out := &in.XListType, &out.XListType if *in == nil { *out = nil } else { *out = new(string) **out = **in } } if in.XMapType != nil { in, out := &in.XMapType, &out.XMapType *out = new(string) **out = **in } if in.XValidations != nil { inValidations, outValidations := &in.XValidations, &out.XValidations *outValidations = make([]ValidationRule, len(*inValidations)) for i := range *inValidations { in.XValidations[i].DeepCopyInto(&out.XValidations[i]) } } return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package apiextensions // FieldValueErrorReason is a machine-readable value providing more detail about why a field failed the validation. // +enum type FieldValueErrorReason string const ( // FieldValueRequired is used to report required values that are not // provided (e.g. empty strings, null values, or empty arrays). FieldValueRequired FieldValueErrorReason = "FieldValueRequired" // FieldValueDuplicate is used to report collisions of values that must be // unique (e.g. unique IDs). FieldValueDuplicate FieldValueErrorReason = "FieldValueDuplicate" // FieldValueInvalid is used to report malformed values (e.g. failed regex // match, too long, out of bounds). FieldValueInvalid FieldValueErrorReason = "FieldValueInvalid" // FieldValueForbidden is used to report valid (as per formatting rules) // values which would be accepted under some conditions, but which are not // permitted by the current conditions (such as security policy). FieldValueForbidden FieldValueErrorReason = "FieldValueForbidden" ) // JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). type JSONSchemaProps struct { ID string Schema JSONSchemaURL Ref *string Description string Type string Nullable bool Format string Title string Default *JSON Maximum *float64 ExclusiveMaximum bool Minimum *float64 ExclusiveMinimum bool MaxLength *int64 MinLength *int64 Pattern string MaxItems *int64 MinItems *int64 UniqueItems bool MultipleOf *float64 Enum []JSON MaxProperties *int64 MinProperties *int64 Required []string Items *JSONSchemaPropsOrArray AllOf []JSONSchemaProps OneOf []JSONSchemaProps AnyOf []JSONSchemaProps Not *JSONSchemaProps Properties map[string]JSONSchemaProps AdditionalProperties *JSONSchemaPropsOrBool PatternProperties map[string]JSONSchemaProps Dependencies JSONSchemaDependencies AdditionalItems *JSONSchemaPropsOrBool Definitions JSONSchemaDefinitions ExternalDocs *ExternalDocumentation Example *JSON // x-kubernetes-preserve-unknown-fields stops the API server // decoding step from pruning fields which are not specified // in the validation schema. This affects fields recursively, // but switches back to normal pruning behaviour if nested // properties or additionalProperties are specified in the schema. // This can either be true or undefined. False is forbidden. XPreserveUnknownFields *bool // x-kubernetes-embedded-resource defines that the value is an // embedded Kubernetes runtime.Object, with TypeMeta and // ObjectMeta. The type must be object. It is allowed to further // restrict the embedded object. Both ObjectMeta and TypeMeta // are validated automatically. x-kubernetes-preserve-unknown-fields // must be true. XEmbeddedResource bool // x-kubernetes-int-or-string specifies that this value is // either an integer or a string. If this is true, an empty // type is allowed and type as child of anyOf is permitted // if following one of the following patterns: // // 1) anyOf: // - type: integer // - type: string // 2) allOf: // - anyOf: // - type: integer // - type: string // - ... zero or more XIntOrString bool // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used // as the index of the map. // // This tag MUST only be used on lists that have the "x-kubernetes-list-type" // extension set to "map". Also, the values specified for this attribute must // be a scalar typed field of the child structure (no nesting is supported). XListMapKeys []string // x-kubernetes-list-type annotates an array to further describe its topology. // This extension must only be used on lists and may have 3 possible values: // // 1) `atomic`: the list is treated as a single entity, like a scalar. // Atomic lists will be entirely replaced when updated. This extension // may be used on any type of list (struct, scalar, ...). // 2) `set`: // Sets are lists that must not have multiple items with the same value. Each // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an // array with x-kubernetes-list-type `atomic`. // 3) `map`: // These lists are like maps in that their elements have a non-index key // used to identify them. Order is preserved upon merge. The map tag // must only be used on a list with elements of type object. XListType *string // x-kubernetes-map-type annotates an object to further describe its topology. // This extension must only be used when type is object and may have 2 possible values: // // 1) `granular`: // These maps are actual maps (key-value pairs) and each fields are independent // from each other (they can each be manipulated by separate actors). This is // the default behaviour for all maps. // 2) `atomic`: the list is treated as a single entity, like a scalar. // Atomic maps will be entirely replaced when updated. // +optional XMapType *string // x-kubernetes-validations -kubernetes-validations describes a list of validation rules written in the CEL expression language. // +patchMergeKey=rule // +patchStrategy=merge // +listType=map // +listMapKey=rule XValidations ValidationRules } // ValidationRules describes a list of validation rules written in the CEL expression language. type ValidationRules []ValidationRule // ValidationRule describes a validation rule written in the CEL expression language. type ValidationRule struct { // Rule represents the expression which will be evaluated by CEL. // ref: https://github.com/google/cel-spec // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. // The `self` variable in the CEL expression is bound to the scoped value. // Example: // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} // // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as // absent fields in CEL expressions. // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map // are accessible via CEL macros and functions such as `self.all(...)`. // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and // functions. // If the Rule is scoped to a scalar, `self` is bound to the scalar value. // Examples: // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} // // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. // // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL // expressions. This includes: // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true // - An array where the items schema is of an "unknown type" // - An object where the additionalProperties schema is of an "unknown type" // // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. // Accessible property names are escaped according to the following rules when accessed in the expression: // - '__' escapes to '__underscores__' // - '.' escapes to '__dot__' // - '-' escapes to '__dash__' // - '/' escapes to '__slash__' // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", // "import", "let", "loop", "package", "namespace", "return". // Examples: // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} // // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and // non-intersecting elements in `Y` are appended, retaining their partial order. // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with // non-intersecting keys are appended, retaining their partial order. // // If `rule` makes use of the `oldSelf` variable it is implicitly a // `transition rule`. // // By default, the `oldSelf` variable is the same type as `self`. // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional // variable whose value() is the same type as `self`. // See the documentation for the `optionalOldSelf` field for details. // // Transition rules by default are applied only on UPDATE requests and are // skipped if an old value could not be found. You can opt a transition // rule into unconditional evaluation by setting `optionalOldSelf` to true. // Rule string // Message represents the message displayed when validation fails. The message is required if the Rule contains // line breaks. The message must not contain line breaks. // If unset, the message is "failed rule: {Rule}". // e.g. "must be a URL with the host matching spec.host" Message string // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. // Since messageExpression is used as a failure message, it must evaluate to a string. // If both message and messageExpression are present on a rule, then messageExpression will be used if validation // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. // messageExpression has access to all the same variables as the rule; the only difference is the return type. // Example: // "x must be less than max ("+string(self.max)+")" // +optional MessageExpression string // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". // If not set, default to use "FieldValueInvalid". // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. // +optional Reason *FieldValueErrorReason // fieldPath represents the field path returned when the validation fails. // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` // It does not support list numeric index. // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. // Numeric index of array is not supported. // For field name which contains special characters, use `['specialName']` to refer the field name. // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` // +optional FieldPath string // optionalOldSelf is used to opt a transition rule into evaluation // even when the object is first created, or if the old object is // missing the value. // // When enabled `oldSelf` will be a CEL optional whose value will be // `None` if there is no old value, or when the object is initially created. // // You may check for presence of oldSelf using `oldSelf.hasValue()` and // unwrap it after checking using `oldSelf.value()`. Check the CEL // documentation for Optional types for more information: // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes // // May not be set unless `oldSelf` is used in `rule`. // // +featureGate=CRDValidationRatcheting // +optional OptionalOldSelf *bool } // JSON represents any valid JSON value. // These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. type JSON interface{} // JSONSchemaURL represents a schema url. type JSONSchemaURL string // JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps // or an array of JSONSchemaProps. Mainly here for serialization purposes. type JSONSchemaPropsOrArray struct { Schema *JSONSchemaProps JSONSchemas []JSONSchemaProps } // JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. // Defaults to true for the boolean property. type JSONSchemaPropsOrBool struct { Allows bool Schema *JSONSchemaProps } // JSONSchemaDependencies represent a dependencies property. type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray // JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. type JSONSchemaPropsOrStringArray struct { Schema *JSONSchemaProps Property []string } // JSONSchemaDefinitions contains the models explicitly defined in this spec. type JSONSchemaDefinitions map[string]JSONSchemaProps // ExternalDocumentation allows referencing an external resource for extended documentation. type ExternalDocumentation struct { Description string URL string }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/doc.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/doc.go
/* Copyright 2017 The Kubernetes Authors. 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. */ // +k8s:deepcopy-gen=package // +groupName=apiextensions.k8s.io // Package apiextensions is the internal version of the API. package apiextensions // import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package apiextensions import ( "fmt" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) var swaggerMetadataDescriptions = metav1.ObjectMeta{}.SwaggerDoc() // SetCRDCondition sets the status condition. It either overwrites the existing one or creates a new one. func SetCRDCondition(crd *CustomResourceDefinition, newCondition CustomResourceDefinitionCondition) { newCondition.LastTransitionTime = metav1.NewTime(time.Now()) existingCondition := FindCRDCondition(crd, newCondition.Type) if existingCondition == nil { crd.Status.Conditions = append(crd.Status.Conditions, newCondition) return } if existingCondition.Status != newCondition.Status || existingCondition.LastTransitionTime.IsZero() { existingCondition.LastTransitionTime = newCondition.LastTransitionTime } existingCondition.Status = newCondition.Status existingCondition.Reason = newCondition.Reason existingCondition.Message = newCondition.Message } // RemoveCRDCondition removes the status condition. func RemoveCRDCondition(crd *CustomResourceDefinition, conditionType CustomResourceDefinitionConditionType) { newConditions := []CustomResourceDefinitionCondition{} for _, condition := range crd.Status.Conditions { if condition.Type != conditionType { newConditions = append(newConditions, condition) } } crd.Status.Conditions = newConditions } // FindCRDCondition returns the condition you're looking for or nil. func FindCRDCondition(crd *CustomResourceDefinition, conditionType CustomResourceDefinitionConditionType) *CustomResourceDefinitionCondition { for i := range crd.Status.Conditions { if crd.Status.Conditions[i].Type == conditionType { return &crd.Status.Conditions[i] } } return nil } // IsCRDConditionTrue indicates if the condition is present and strictly true. func IsCRDConditionTrue(crd *CustomResourceDefinition, conditionType CustomResourceDefinitionConditionType) bool { return IsCRDConditionPresentAndEqual(crd, conditionType, ConditionTrue) } // IsCRDConditionFalse indicates if the condition is present and false. func IsCRDConditionFalse(crd *CustomResourceDefinition, conditionType CustomResourceDefinitionConditionType) bool { return IsCRDConditionPresentAndEqual(crd, conditionType, ConditionFalse) } // IsCRDConditionPresentAndEqual indicates if the condition is present and equal to the given status. func IsCRDConditionPresentAndEqual(crd *CustomResourceDefinition, conditionType CustomResourceDefinitionConditionType, status ConditionStatus) bool { for _, condition := range crd.Status.Conditions { if condition.Type == conditionType { return condition.Status == status } } return false } // IsCRDConditionEquivalent returns true if the lhs and rhs are equivalent except for times. func IsCRDConditionEquivalent(lhs, rhs *CustomResourceDefinitionCondition) bool { if lhs == nil && rhs == nil { return true } if lhs == nil || rhs == nil { return false } return lhs.Message == rhs.Message && lhs.Reason == rhs.Reason && lhs.Status == rhs.Status && lhs.Type == rhs.Type } // CRDHasFinalizer returns true if the finalizer is in the list. func CRDHasFinalizer(crd *CustomResourceDefinition, needle string) bool { for _, finalizer := range crd.Finalizers { if finalizer == needle { return true } } return false } // CRDRemoveFinalizer removes the finalizer if present. func CRDRemoveFinalizer(crd *CustomResourceDefinition, needle string) { newFinalizers := []string{} for _, finalizer := range crd.Finalizers { if finalizer != needle { newFinalizers = append(newFinalizers, finalizer) } } crd.Finalizers = newFinalizers } // HasServedCRDVersion returns true if the given version is in the list of CRD's versions and the Served flag is set. func HasServedCRDVersion(crd *CustomResourceDefinition, version string) bool { for _, v := range crd.Spec.Versions { if v.Name == version { return v.Served } } return false } // GetCRDStorageVersion returns the storage version for given CRD. func GetCRDStorageVersion(crd *CustomResourceDefinition) (string, error) { for _, v := range crd.Spec.Versions { if v.Storage { return v.Name, nil } } // This should not happened if crd is valid return "", fmt.Errorf("invalid CustomResourceDefinition, no storage version") } // IsStoredVersion returns whether the given version is the storage version of the CRD. func IsStoredVersion(crd *CustomResourceDefinition, version string) bool { for _, v := range crd.Status.StoredVersions { if version == v { return true } } return false } // GetSchemaForVersion returns the validation schema for the given version or nil. func GetSchemaForVersion(crd *CustomResourceDefinition, version string) (*CustomResourceValidation, error) { if !HasPerVersionSchema(crd.Spec.Versions) { return crd.Spec.Validation, nil } if crd.Spec.Validation != nil { return nil, fmt.Errorf("malformed CustomResourceDefinition %s version %s: top-level and per-version schemas must be mutual exclusive", crd.Name, version) } for _, v := range crd.Spec.Versions { if version == v.Name { return v.Schema, nil } } return nil, fmt.Errorf("version %s not found in CustomResourceDefinition: %v", version, crd.Name) } // GetSubresourcesForVersion returns the subresources for given version or nil. func GetSubresourcesForVersion(crd *CustomResourceDefinition, version string) (*CustomResourceSubresources, error) { if !HasPerVersionSubresources(crd.Spec.Versions) { return crd.Spec.Subresources, nil } if crd.Spec.Subresources != nil { return nil, fmt.Errorf("malformed CustomResourceDefinition %s version %s: top-level and per-version subresources must be mutual exclusive", crd.Name, version) } for _, v := range crd.Spec.Versions { if version == v.Name { return v.Subresources, nil } } return nil, fmt.Errorf("version %s not found in CustomResourceDefinition: %v", version, crd.Name) } // GetColumnsForVersion returns the columns for given version or nil. // NOTE: the newly logically-defaulted columns is not pointing to the original CRD object. // One cannot mutate the original CRD columns using the logically-defaulted columns. Please iterate through // the original CRD object instead. func GetColumnsForVersion(crd *CustomResourceDefinition, version string) ([]CustomResourceColumnDefinition, error) { if !HasPerVersionColumns(crd.Spec.Versions) { return serveDefaultColumnsIfEmpty(crd.Spec.AdditionalPrinterColumns), nil } if len(crd.Spec.AdditionalPrinterColumns) > 0 { return nil, fmt.Errorf("malformed CustomResourceDefinition %s version %s: top-level and per-version additionalPrinterColumns must be mutual exclusive", crd.Name, version) } for _, v := range crd.Spec.Versions { if version == v.Name { return serveDefaultColumnsIfEmpty(v.AdditionalPrinterColumns), nil } } return nil, fmt.Errorf("version %s not found in CustomResourceDefinition: %v", version, crd.Name) } // HasPerVersionSchema returns true if a CRD uses per-version schema. func HasPerVersionSchema(versions []CustomResourceDefinitionVersion) bool { for _, v := range versions { if v.Schema != nil { return true } } return false } // HasPerVersionSubresources returns true if a CRD uses per-version subresources. func HasPerVersionSubresources(versions []CustomResourceDefinitionVersion) bool { for _, v := range versions { if v.Subresources != nil { return true } } return false } // HasPerVersionColumns returns true if a CRD uses per-version columns. func HasPerVersionColumns(versions []CustomResourceDefinitionVersion) bool { for _, v := range versions { if len(v.AdditionalPrinterColumns) > 0 { return true } } return false } // serveDefaultColumnsIfEmpty applies logically defaulting to columns, if the input columns is empty. // NOTE: in this way, the newly logically-defaulted columns is not pointing to the original CRD object. // One cannot mutate the original CRD columns using the logically-defaulted columns. Please iterate through // the original CRD object instead. func serveDefaultColumnsIfEmpty(columns []CustomResourceColumnDefinition) []CustomResourceColumnDefinition { if len(columns) > 0 { return columns } return []CustomResourceColumnDefinition{ {Name: "Age", Type: "date", Description: swaggerMetadataDescriptions["creationTimestamp"], JSONPath: ".metadata.creationTimestamp"}, } } // HasVersionServed returns true if given CRD has given version served. func HasVersionServed(crd *CustomResourceDefinition, version string) bool { for _, v := range crd.Spec.Versions { if !v.Served || v.Name != version { continue } return true } return false }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. 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. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConversionRequest) DeepCopyInto(out *ConversionRequest) { *out = *in if in.Objects != nil { in, out := &in.Objects, &out.Objects *out = make([]runtime.RawExtension, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionRequest. func (in *ConversionRequest) DeepCopy() *ConversionRequest { if in == nil { return nil } out := new(ConversionRequest) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConversionResponse) DeepCopyInto(out *ConversionResponse) { *out = *in if in.ConvertedObjects != nil { in, out := &in.ConvertedObjects, &out.ConvertedObjects *out = make([]runtime.RawExtension, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } in.Result.DeepCopyInto(&out.Result) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionResponse. func (in *ConversionResponse) DeepCopy() *ConversionResponse { if in == nil { return nil } out := new(ConversionResponse) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConversionReview) DeepCopyInto(out *ConversionReview) { *out = *in out.TypeMeta = in.TypeMeta if in.Request != nil { in, out := &in.Request, &out.Request *out = new(ConversionRequest) (*in).DeepCopyInto(*out) } if in.Response != nil { in, out := &in.Response, &out.Response *out = new(ConversionResponse) (*in).DeepCopyInto(*out) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionReview. func (in *ConversionReview) DeepCopy() *ConversionReview { if in == nil { return nil } out := new(ConversionReview) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ConversionReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceColumnDefinition) DeepCopyInto(out *CustomResourceColumnDefinition) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceColumnDefinition. func (in *CustomResourceColumnDefinition) DeepCopy() *CustomResourceColumnDefinition { if in == nil { return nil } out := new(CustomResourceColumnDefinition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceConversion) DeepCopyInto(out *CustomResourceConversion) { *out = *in if in.Webhook != nil { in, out := &in.Webhook, &out.Webhook *out = new(WebhookConversion) (*in).DeepCopyInto(*out) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceConversion. func (in *CustomResourceConversion) DeepCopy() *CustomResourceConversion { if in == nil { return nil } out := new(CustomResourceConversion) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinition) DeepCopyInto(out *CustomResourceDefinition) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinition. func (in *CustomResourceDefinition) DeepCopy() *CustomResourceDefinition { if in == nil { return nil } out := new(CustomResourceDefinition) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *CustomResourceDefinition) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionCondition) DeepCopyInto(out *CustomResourceDefinitionCondition) { *out = *in in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionCondition. func (in *CustomResourceDefinitionCondition) DeepCopy() *CustomResourceDefinitionCondition { if in == nil { return nil } out := new(CustomResourceDefinitionCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionList) DeepCopyInto(out *CustomResourceDefinitionList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]CustomResourceDefinition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionList. func (in *CustomResourceDefinitionList) DeepCopy() *CustomResourceDefinitionList { if in == nil { return nil } out := new(CustomResourceDefinitionList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *CustomResourceDefinitionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionNames) DeepCopyInto(out *CustomResourceDefinitionNames) { *out = *in if in.ShortNames != nil { in, out := &in.ShortNames, &out.ShortNames *out = make([]string, len(*in)) copy(*out, *in) } if in.Categories != nil { in, out := &in.Categories, &out.Categories *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionNames. func (in *CustomResourceDefinitionNames) DeepCopy() *CustomResourceDefinitionNames { if in == nil { return nil } out := new(CustomResourceDefinitionNames) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefinitionSpec) { *out = *in in.Names.DeepCopyInto(&out.Names) if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]CustomResourceDefinitionVersion, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) (*in).DeepCopyInto(*out) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionSpec. func (in *CustomResourceDefinitionSpec) DeepCopy() *CustomResourceDefinitionSpec { if in == nil { return nil } out := new(CustomResourceDefinitionSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionStatus) DeepCopyInto(out *CustomResourceDefinitionStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]CustomResourceDefinitionCondition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } in.AcceptedNames.DeepCopyInto(&out.AcceptedNames) if in.StoredVersions != nil { in, out := &in.StoredVersions, &out.StoredVersions *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionStatus. func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionStatus { if in == nil { return nil } out := new(CustomResourceDefinitionStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { *out = *in if in.DeprecationWarning != nil { in, out := &in.DeprecationWarning, &out.DeprecationWarning *out = new(string) **out = **in } if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(CustomResourceValidation) (*in).DeepCopyInto(*out) } if in.Subresources != nil { in, out := &in.Subresources, &out.Subresources *out = new(CustomResourceSubresources) (*in).DeepCopyInto(*out) } if in.AdditionalPrinterColumns != nil { in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } if in.SelectableFields != nil { in, out := &in.SelectableFields, &out.SelectableFields *out = make([]SelectableField, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionVersion. func (in *CustomResourceDefinitionVersion) DeepCopy() *CustomResourceDefinitionVersion { if in == nil { return nil } out := new(CustomResourceDefinitionVersion) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceSubresourceScale) DeepCopyInto(out *CustomResourceSubresourceScale) { *out = *in if in.LabelSelectorPath != nil { in, out := &in.LabelSelectorPath, &out.LabelSelectorPath *out = new(string) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceScale. func (in *CustomResourceSubresourceScale) DeepCopy() *CustomResourceSubresourceScale { if in == nil { return nil } out := new(CustomResourceSubresourceScale) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceSubresourceStatus) DeepCopyInto(out *CustomResourceSubresourceStatus) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceStatus. func (in *CustomResourceSubresourceStatus) DeepCopy() *CustomResourceSubresourceStatus { if in == nil { return nil } out := new(CustomResourceSubresourceStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceSubresources) DeepCopyInto(out *CustomResourceSubresources) { *out = *in if in.Status != nil { in, out := &in.Status, &out.Status *out = new(CustomResourceSubresourceStatus) **out = **in } if in.Scale != nil { in, out := &in.Scale, &out.Scale *out = new(CustomResourceSubresourceScale) (*in).DeepCopyInto(*out) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresources. func (in *CustomResourceSubresources) DeepCopy() *CustomResourceSubresources { if in == nil { return nil } out := new(CustomResourceSubresources) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceValidation) DeepCopyInto(out *CustomResourceValidation) { *out = *in if in.OpenAPIV3Schema != nil { in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema *out = (*in).DeepCopy() } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceValidation. func (in *CustomResourceValidation) DeepCopy() *CustomResourceValidation { if in == nil { return nil } out := new(CustomResourceValidation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExternalDocumentation) DeepCopyInto(out *ExternalDocumentation) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalDocumentation. func (in *ExternalDocumentation) DeepCopy() *ExternalDocumentation { if in == nil { return nil } out := new(ExternalDocumentation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSON) DeepCopyInto(out *JSON) { *out = *in if in.Raw != nil { in, out := &in.Raw, &out.Raw *out = make([]byte, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSON. func (in *JSON) DeepCopy() *JSON { if in == nil { return nil } out := new(JSON) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in JSONSchemaDefinitions) DeepCopyInto(out *JSONSchemaDefinitions) { { in := &in *out = make(JSONSchemaDefinitions, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } return } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDefinitions. func (in JSONSchemaDefinitions) DeepCopy() JSONSchemaDefinitions { if in == nil { return nil } out := new(JSONSchemaDefinitions) in.DeepCopyInto(out) return *out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in JSONSchemaDependencies) DeepCopyInto(out *JSONSchemaDependencies) { { in := &in *out = make(JSONSchemaDependencies, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } return } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDependencies. func (in JSONSchemaDependencies) DeepCopy() JSONSchemaDependencies { if in == nil { return nil } out := new(JSONSchemaDependencies) in.DeepCopyInto(out) return *out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaProps) DeepCopyInto(out *JSONSchemaProps) { clone := in.DeepCopy() *out = *clone return } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaPropsOrArray) DeepCopyInto(out *JSONSchemaPropsOrArray) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = (*in).DeepCopy() } if in.JSONSchemas != nil { in, out := &in.JSONSchemas, &out.JSONSchemas *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrArray. func (in *JSONSchemaPropsOrArray) DeepCopy() *JSONSchemaPropsOrArray { if in == nil { return nil } out := new(JSONSchemaPropsOrArray) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaPropsOrBool) DeepCopyInto(out *JSONSchemaPropsOrBool) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = (*in).DeepCopy() } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrBool. func (in *JSONSchemaPropsOrBool) DeepCopy() *JSONSchemaPropsOrBool { if in == nil { return nil } out := new(JSONSchemaPropsOrBool) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaPropsOrStringArray) DeepCopyInto(out *JSONSchemaPropsOrStringArray) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = (*in).DeepCopy() } if in.Property != nil { in, out := &in.Property, &out.Property *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrStringArray. func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray { if in == nil { return nil } out := new(JSONSchemaPropsOrStringArray) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SelectableField) DeepCopyInto(out *SelectableField) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. func (in *SelectableField) DeepCopy() *SelectableField { if in == nil { return nil } out := new(SelectableField) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { *out = *in if in.Path != nil { in, out := &in.Path, &out.Path *out = new(string) **out = **in } if in.Port != nil { in, out := &in.Port, &out.Port *out = new(int32) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. func (in *ServiceReference) DeepCopy() *ServiceReference { if in == nil { return nil } out := new(ServiceReference) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidationRule) DeepCopyInto(out *ValidationRule) { *out = *in if in.Reason != nil { in, out := &in.Reason, &out.Reason *out = new(FieldValueErrorReason) **out = **in } if in.OptionalOldSelf != nil { in, out := &in.OptionalOldSelf, &out.OptionalOldSelf *out = new(bool) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRule. func (in *ValidationRule) DeepCopy() *ValidationRule { if in == nil { return nil } out := new(ValidationRule) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in ValidationRules) DeepCopyInto(out *ValidationRules) { { in := &in *out = make(ValidationRules, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } return } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRules. func (in ValidationRules) DeepCopy() ValidationRules { if in == nil { return nil } out := new(ValidationRules) in.DeepCopyInto(out) return *out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { *out = *in if in.URL != nil { in, out := &in.URL, &out.URL *out = new(string) **out = **in } if in.Service != nil { in, out := &in.Service, &out.Service *out = new(ServiceReference) (*in).DeepCopyInto(*out) } if in.CABundle != nil { in, out := &in.CABundle, &out.CABundle *out = make([]byte, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { if in == nil { return nil } out := new(WebhookClientConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WebhookConversion) DeepCopyInto(out *WebhookConversion) { *out = *in if in.ClientConfig != nil { in, out := &in.ClientConfig, &out.ClientConfig *out = new(WebhookClientConfig) (*in).DeepCopyInto(*out) } if in.ConversionReviewVersions != nil { in, out := &in.ConversionReviewVersions, &out.ConversionReviewVersions *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookConversion. func (in *WebhookConversion) DeepCopy() *WebhookConversion { if in == nil { return nil } out := new(WebhookConversion) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go
/* Copyright 2019 The Kubernetes Authors. 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. */ package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" ) // ConversionStrategyType describes different conversion types. type ConversionStrategyType string const ( // KubeAPIApprovedAnnotation is an annotation that must be set to create a CRD for the k8s.io, *.k8s.io, kubernetes.io, or *.kubernetes.io namespaces. // The value should be a link to a URL where the current spec was approved, so updates to the spec should also update the URL. // If the API is unapproved, you may set the annotation to a string starting with `"unapproved"`. For instance, `"unapproved, temporarily squatting"` or `"unapproved, experimental-only"`. This is discouraged. KubeAPIApprovedAnnotation = "api-approved.kubernetes.io" // NoneConverter is a converter that only sets apiversion of the CR and leave everything else unchanged. NoneConverter ConversionStrategyType = "None" // WebhookConverter is a converter that calls to an external webhook to convert the CR. WebhookConverter ConversionStrategyType = "Webhook" ) // CustomResourceDefinitionSpec describes how a user wants their resource to appear type CustomResourceDefinitionSpec struct { // group is the API group of the defined custom resource. // The custom resources are served under `/apis/<group>/...`. // Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`). Group string `json:"group" protobuf:"bytes,1,opt,name=group"` // names specify the resource and kind names for the custom resource. Names CustomResourceDefinitionNames `json:"names" protobuf:"bytes,3,opt,name=names"` // scope indicates whether the defined custom resource is cluster- or namespace-scoped. // Allowed values are `Cluster` and `Namespaced`. Scope ResourceScope `json:"scope" protobuf:"bytes,4,opt,name=scope,casttype=ResourceScope"` // versions is the list of all API versions of the defined custom resource. // Version names are used to compute the order in which served versions are listed in API discovery. // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. // +listType=atomic Versions []CustomResourceDefinitionVersion `json:"versions" protobuf:"bytes,7,rep,name=versions"` // conversion defines conversion settings for the CRD. // +optional Conversion *CustomResourceConversion `json:"conversion,omitempty" protobuf:"bytes,9,opt,name=conversion"` // preserveUnknownFields indicates that object fields which are not specified // in the OpenAPI schema should be preserved when persisting to storage. // apiVersion, kind, metadata and known fields inside metadata are always preserved. // This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. // +optional PreserveUnknownFields bool `json:"preserveUnknownFields,omitempty" protobuf:"varint,10,opt,name=preserveUnknownFields"` } // CustomResourceConversion describes how to convert different versions of a CR. type CustomResourceConversion struct { // strategy specifies how custom resources are converted between versions. Allowed values are: // - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource. // - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set. Strategy ConversionStrategyType `json:"strategy" protobuf:"bytes,1,name=strategy"` // webhook describes how to call the conversion webhook. Required when `strategy` is set to `"Webhook"`. // +optional Webhook *WebhookConversion `json:"webhook,omitempty" protobuf:"bytes,2,opt,name=webhook"` } // WebhookConversion describes how to call a conversion webhook type WebhookConversion struct { // clientConfig is the instructions for how to call the webhook if strategy is `Webhook`. // +optional ClientConfig *WebhookClientConfig `json:"clientConfig,omitempty" protobuf:"bytes,2,name=clientConfig"` // conversionReviewVersions is an ordered list of preferred `ConversionReview` // versions the Webhook expects. The API server will use the first version in // the list which it supports. If none of the versions specified in this list // are supported by API server, conversion will fail for the custom resource. // If a persisted Webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail. // +listType=atomic ConversionReviewVersions []string `json:"conversionReviewVersions" protobuf:"bytes,3,rep,name=conversionReviewVersions"` } // WebhookClientConfig contains the information to make a TLS connection with the webhook. type WebhookClientConfig struct { // url gives the location of the webhook, in standard URL form // (`scheme://host:port/path`). Exactly one of `url` or `service` // must be specified. // // The `host` should not refer to a service running in the cluster; use // the `service` field instead. The host might be resolved via external // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve // in-cluster DNS as that would be a layering violation). `host` may // also be an IP address. // // Please note that using `localhost` or `127.0.0.1` as a `host` is // risky unless you take great care to run this webhook on all hosts // which run an apiserver which might need to make calls to this // webhook. Such installs are likely to be non-portable, i.e., not easy // to turn up in a new cluster. // // The scheme must be "https"; the URL must begin with "https://". // // A path is optional, and if present may be any string permissible in // a URL. You may use the path to pass an arbitrary string to the // webhook, for example, a cluster identifier. // // Attempting to use a user or basic auth e.g. "user:password@" is not // allowed. Fragments ("#...") and query parameters ("?...") are not // allowed, either. // // +optional URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"` // service is a reference to the service for this webhook. Either // service or url must be specified. // // If the webhook is running within the cluster, then you should use `service`. // // +optional Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"` // caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. // If unspecified, system trust roots on the apiserver are used. // +optional CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,2,opt,name=caBundle"` } // ServiceReference holds a reference to Service.legacy.k8s.io type ServiceReference struct { // namespace is the namespace of the service. // Required Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` // name is the name of the service. // Required Name string `json:"name" protobuf:"bytes,2,opt,name=name"` // path is an optional URL path at which the webhook will be contacted. // +optional Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"` // port is an optional service port at which the webhook will be contacted. // `port` should be a valid port number (1-65535, inclusive). // Defaults to 443 for backward compatibility. // +optional Port *int32 `json:"port,omitempty" protobuf:"varint,4,opt,name=port"` } // CustomResourceDefinitionVersion describes a version for CRD. type CustomResourceDefinitionVersion struct { // name is the version name, e.g. “v1”, “v2beta1”, etc. // The custom resources are served under this version at `/apis/<group>/<version>/...` if `served` is true. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // served is a flag enabling/disabling this version from being served via REST APIs Served bool `json:"served" protobuf:"varint,2,opt,name=served"` // storage indicates this version should be used when persisting custom resources to storage. // There must be exactly one version with storage=true. Storage bool `json:"storage" protobuf:"varint,3,opt,name=storage"` // deprecated indicates this version of the custom resource API is deprecated. // When set to true, API requests to this version receive a warning header in the server response. // Defaults to false. // +optional Deprecated bool `json:"deprecated,omitempty" protobuf:"varint,7,opt,name=deprecated"` // deprecationWarning overrides the default warning returned to API clients. // May only be set when `deprecated` is true. // The default warning indicates this version is deprecated and recommends use // of the newest served version of equal or greater stability, if one exists. // +optional DeprecationWarning *string `json:"deprecationWarning,omitempty" protobuf:"bytes,8,opt,name=deprecationWarning"` // schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. // +optional Schema *CustomResourceValidation `json:"schema,omitempty" protobuf:"bytes,4,opt,name=schema"` // subresources specify what subresources this version of the defined custom resource have. // +optional Subresources *CustomResourceSubresources `json:"subresources,omitempty" protobuf:"bytes,5,opt,name=subresources"` // additionalPrinterColumns specifies additional columns returned in Table output. // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. // If no columns are specified, a single column displaying the age of the custom resource is used. // +optional // +listType=atomic AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,6,rep,name=additionalPrinterColumns"` // selectableFields specifies paths to fields that may be used as field selectors. // A maximum of 8 selectable fields are allowed. // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors // // +featureGate=CustomResourceFieldSelectors // +optional // +listType=atomic SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,9,rep,name=selectableFields"` } // SelectableField specifies the JSON path of a field that may be used with field selectors. type SelectableField struct { // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a // field selector value. // Only JSON paths without the array notation are allowed. // Must point to a field of type string, boolean or integer. Types with enum values // and strings with formats are allowed. // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. // Must not point to metdata fields. // Required. JSONPath string `json:"jsonPath" protobuf:"bytes,1,opt,name=jsonPath"` } // CustomResourceColumnDefinition specifies a column for server side printing. type CustomResourceColumnDefinition struct { // name is a human readable name for the column. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // type is an OpenAPI type definition for this column. // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. Type string `json:"type" protobuf:"bytes,2,opt,name=type"` // format is an optional OpenAPI type definition for this column. The 'name' format is applied // to the primary identifier column to assist in clients identifying column is the resource name. // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. // +optional Format string `json:"format,omitempty" protobuf:"bytes,3,opt,name=format"` // description is a human readable description of this column. // +optional Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"` // priority is an integer defining the relative importance of this column compared to others. Lower // numbers are considered higher priority. Columns that may be omitted in limited space scenarios // should be given a priority greater than 0. // +optional Priority int32 `json:"priority,omitempty" protobuf:"bytes,5,opt,name=priority"` // jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against // each custom resource to produce the value for this column. JSONPath string `json:"jsonPath" protobuf:"bytes,6,opt,name=jsonPath"` } // CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition type CustomResourceDefinitionNames struct { // plural is the plural name of the resource to serve. // The custom resources are served under `/apis/<group>/<version>/.../<plural>`. // Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`). // Must be all lowercase. Plural string `json:"plural" protobuf:"bytes,1,opt,name=plural"` // singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. // +optional Singular string `json:"singular,omitempty" protobuf:"bytes,2,opt,name=singular"` // shortNames are short names for the resource, exposed in API discovery documents, // and used by clients to support invocations like `kubectl get <shortname>`. // It must be all lowercase. // +optional // +listType=atomic ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"` // kind is the serialized kind of the resource. It is normally CamelCase and singular. // Custom resource instances will use this value as the `kind` attribute in API calls. Kind string `json:"kind" protobuf:"bytes,4,opt,name=kind"` // listKind is the serialized kind of the list for this resource. Defaults to "`kind`List". // +optional ListKind string `json:"listKind,omitempty" protobuf:"bytes,5,opt,name=listKind"` // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). // This is published in API discovery documents, and used by clients to support invocations like // `kubectl get all`. // +optional // +listType=atomic Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"` } // ResourceScope is an enum defining the different scopes available to a custom resource type ResourceScope string const ( ClusterScoped ResourceScope = "Cluster" NamespaceScoped ResourceScope = "Namespaced" ) type ConditionStatus string // These are valid condition statuses. "ConditionTrue" means a resource is in the condition. // "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes // can't decide if a resource is in the condition or not. In the future, we could add other // intermediate conditions, e.g. ConditionDegraded. const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" ) // CustomResourceDefinitionConditionType is a valid value for CustomResourceDefinitionCondition.Type type CustomResourceDefinitionConditionType string const ( // Established means that the resource has become active. A resource is established when all names are // accepted without a conflict for the first time. A resource stays established until deleted, even during // a later NamesAccepted due to changed names. Note that not all names can be changed. Established CustomResourceDefinitionConditionType = "Established" // NamesAccepted means the names chosen for this CustomResourceDefinition do not conflict with others in // the group and are therefore accepted. NamesAccepted CustomResourceDefinitionConditionType = "NamesAccepted" // NonStructuralSchema means that one or more OpenAPI schema is not structural. // // A schema is structural if it specifies types for all values, with the only exceptions of those with // - x-kubernetes-int-or-string: true — for fields which can be integer or string // - x-kubernetes-preserve-unknown-fields: true — for raw, unspecified JSON values // and there is no type, additionalProperties, default, nullable or x-kubernetes-* vendor extenions // specified under allOf, anyOf, oneOf or not. // // Non-structural schemas will not be allowed anymore in v1 API groups. Moreover, new features will not be // available for non-structural CRDs: // - pruning // - defaulting // - read-only // - OpenAPI publishing // - webhook conversion NonStructuralSchema CustomResourceDefinitionConditionType = "NonStructuralSchema" // Terminating means that the CustomResourceDefinition has been deleted and is cleaning up. Terminating CustomResourceDefinitionConditionType = "Terminating" // KubernetesAPIApprovalPolicyConformant indicates that an API in *.k8s.io or *.kubernetes.io is or is not approved. For CRDs // outside those groups, this condition will not be set. For CRDs inside those groups, the condition will // be true if .metadata.annotations["api-approved.kubernetes.io"] is set to a URL, otherwise it will be false. // See https://github.com/kubernetes/enhancements/pull/1111 for more details. KubernetesAPIApprovalPolicyConformant CustomResourceDefinitionConditionType = "KubernetesAPIApprovalPolicyConformant" ) // CustomResourceDefinitionCondition contains details for the current condition of this pod. type CustomResourceDefinitionCondition struct { // type is the type of the condition. Types include Established, NamesAccepted and Terminating. Type CustomResourceDefinitionConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=CustomResourceDefinitionConditionType"` // status is the status of the condition. // Can be True, False, Unknown. Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` // lastTransitionTime last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` // reason is a unique, one-word, CamelCase reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` // message is a human-readable message indicating details about last transition. // +optional Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` } // CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition type CustomResourceDefinitionStatus struct { // conditions indicate state for particular aspects of a CustomResourceDefinition // +optional // +listType=map // +listMapKey=type Conditions []CustomResourceDefinitionCondition `json:"conditions" protobuf:"bytes,1,opt,name=conditions"` // acceptedNames are the names that are actually being used to serve discovery. // They may be different than the names in spec. // +optional AcceptedNames CustomResourceDefinitionNames `json:"acceptedNames" protobuf:"bytes,2,opt,name=acceptedNames"` // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these // versions allows a migration path for stored versions in etcd. The field is mutable // so a migration controller can finish a migration to another version (ensuring // no old objects are left in storage), and then remove the rest of the // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. // +optional // +listType=atomic StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` } // CustomResourceCleanupFinalizer is the name of the finalizer which will delete instances of // a CustomResourceDefinition const CustomResourceCleanupFinalizer = "customresourcecleanup.apiextensions.k8s.io" // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.16 // CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format // <.spec.name>.<.spec.group>. type CustomResourceDefinition struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // spec describes how the user wants the resources to appear Spec CustomResourceDefinitionSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` // status indicates the actual state of the CustomResourceDefinition // +optional Status CustomResourceDefinitionStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.16 // CustomResourceDefinitionList is a list of CustomResourceDefinition objects. type CustomResourceDefinitionList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items list individual CustomResourceDefinition objects Items []CustomResourceDefinition `json:"items" protobuf:"bytes,2,rep,name=items"` } // CustomResourceValidation is a list of validation methods for CustomResources. type CustomResourceValidation struct { // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. // +optional OpenAPIV3Schema *JSONSchemaProps `json:"openAPIV3Schema,omitempty" protobuf:"bytes,1,opt,name=openAPIV3Schema"` } // CustomResourceSubresources defines the status and scale subresources for CustomResources. type CustomResourceSubresources struct { // status indicates the custom resource should serve a `/status` subresource. // When enabled: // 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. // 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. // +optional Status *CustomResourceSubresourceStatus `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"` // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. // +optional Scale *CustomResourceSubresourceScale `json:"scale,omitempty" protobuf:"bytes,2,opt,name=scale"` } // CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. // Status is represented by the `.status` JSON path inside of a CustomResource. When set, // * exposes a /status subresource for the custom resource // * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza // * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza type CustomResourceSubresourceStatus struct{} // CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. type CustomResourceSubresourceScale struct { // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under `.spec`. // If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. SpecReplicasPath string `json:"specReplicasPath" protobuf:"bytes,1,name=specReplicasPath"` // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under `.status`. // If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource // will default to 0. StatusReplicasPath string `json:"statusReplicasPath" protobuf:"bytes,2,opt,name=statusReplicasPath"` // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under `.status` or `.spec`. // Must be set to work with HorizontalPodAutoscaler. // The field pointed by this JSON path must be a string field (not a complex selector struct) // which contains a serialized label selector in string form. // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource // If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` // subresource will default to the empty string. // +optional LabelSelectorPath *string `json:"labelSelectorPath,omitempty" protobuf:"bytes,3,opt,name=labelSelectorPath"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.16 // ConversionReview describes a conversion request/response. type ConversionReview struct { metav1.TypeMeta `json:",inline"` // request describes the attributes for the conversion request. // +optional Request *ConversionRequest `json:"request,omitempty" protobuf:"bytes,1,opt,name=request"` // response describes the attributes for the conversion response. // +optional Response *ConversionResponse `json:"response,omitempty" protobuf:"bytes,2,opt,name=response"` } // ConversionRequest describes the conversion request parameters. type ConversionRequest struct { // uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are // otherwise identical (parallel requests, etc). // The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"` // desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1" DesiredAPIVersion string `json:"desiredAPIVersion" protobuf:"bytes,2,name=desiredAPIVersion"` // objects is the list of custom resource objects to be converted. // +listType=atomic Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"` } // ConversionResponse describes a conversion response. type ConversionResponse struct { // uid is an identifier for the individual request/response. // This should be copied over from the corresponding `request.uid`. UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"` // convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. // +listType=atomic ConvertedObjects []runtime.RawExtension `json:"convertedObjects" protobuf:"bytes,2,rep,name=convertedObjects"` // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the // conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set // `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` // will be used to construct an error message for the end user. Result metav1.Status `json:"result" protobuf:"bytes,3,name=result"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. 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. */ // Code generated by conversion-gen. DO NOT EDIT. package v1 import ( unsafe "unsafe" apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" ) func init() { localSchemeBuilder.Register(RegisterConversions) } // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { if err := s.AddGeneratedConversionFunc((*CustomResourceColumnDefinition)(nil), (*apiextensions.CustomResourceColumnDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(a.(*CustomResourceColumnDefinition), b.(*apiextensions.CustomResourceColumnDefinition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceColumnDefinition)(nil), (*CustomResourceColumnDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition(a.(*apiextensions.CustomResourceColumnDefinition), b.(*CustomResourceColumnDefinition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinition)(nil), (*apiextensions.CustomResourceDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(a.(*CustomResourceDefinition), b.(*apiextensions.CustomResourceDefinition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinition)(nil), (*CustomResourceDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition(a.(*apiextensions.CustomResourceDefinition), b.(*CustomResourceDefinition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionCondition)(nil), (*apiextensions.CustomResourceDefinitionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(a.(*CustomResourceDefinitionCondition), b.(*apiextensions.CustomResourceDefinitionCondition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionCondition)(nil), (*CustomResourceDefinitionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionCondition_To_v1_CustomResourceDefinitionCondition(a.(*apiextensions.CustomResourceDefinitionCondition), b.(*CustomResourceDefinitionCondition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionList)(nil), (*apiextensions.CustomResourceDefinitionList)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(a.(*CustomResourceDefinitionList), b.(*apiextensions.CustomResourceDefinitionList), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionList)(nil), (*CustomResourceDefinitionList)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionList_To_v1_CustomResourceDefinitionList(a.(*apiextensions.CustomResourceDefinitionList), b.(*CustomResourceDefinitionList), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionNames)(nil), (*apiextensions.CustomResourceDefinitionNames)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(a.(*CustomResourceDefinitionNames), b.(*apiextensions.CustomResourceDefinitionNames), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionNames)(nil), (*CustomResourceDefinitionNames)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(a.(*apiextensions.CustomResourceDefinitionNames), b.(*CustomResourceDefinitionNames), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionStatus)(nil), (*apiextensions.CustomResourceDefinitionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(a.(*CustomResourceDefinitionStatus), b.(*apiextensions.CustomResourceDefinitionStatus), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionStatus)(nil), (*CustomResourceDefinitionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionStatus_To_v1_CustomResourceDefinitionStatus(a.(*apiextensions.CustomResourceDefinitionStatus), b.(*CustomResourceDefinitionStatus), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionVersion)(nil), (*apiextensions.CustomResourceDefinitionVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(a.(*CustomResourceDefinitionVersion), b.(*apiextensions.CustomResourceDefinitionVersion), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionVersion)(nil), (*CustomResourceDefinitionVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResourceDefinitionVersion(a.(*apiextensions.CustomResourceDefinitionVersion), b.(*CustomResourceDefinitionVersion), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceSubresourceScale)(nil), (*apiextensions.CustomResourceSubresourceScale)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(a.(*CustomResourceSubresourceScale), b.(*apiextensions.CustomResourceSubresourceScale), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresourceScale)(nil), (*CustomResourceSubresourceScale)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceSubresourceScale_To_v1_CustomResourceSubresourceScale(a.(*apiextensions.CustomResourceSubresourceScale), b.(*CustomResourceSubresourceScale), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceSubresourceStatus)(nil), (*apiextensions.CustomResourceSubresourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(a.(*CustomResourceSubresourceStatus), b.(*apiextensions.CustomResourceSubresourceStatus), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresourceStatus)(nil), (*CustomResourceSubresourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceSubresourceStatus_To_v1_CustomResourceSubresourceStatus(a.(*apiextensions.CustomResourceSubresourceStatus), b.(*CustomResourceSubresourceStatus), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceSubresources)(nil), (*apiextensions.CustomResourceSubresources)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(a.(*CustomResourceSubresources), b.(*apiextensions.CustomResourceSubresources), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresources)(nil), (*CustomResourceSubresources)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceSubresources_To_v1_CustomResourceSubresources(a.(*apiextensions.CustomResourceSubresources), b.(*CustomResourceSubresources), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceValidation)(nil), (*apiextensions.CustomResourceValidation)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(a.(*CustomResourceValidation), b.(*apiextensions.CustomResourceValidation), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceValidation)(nil), (*CustomResourceValidation)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceValidation_To_v1_CustomResourceValidation(a.(*apiextensions.CustomResourceValidation), b.(*CustomResourceValidation), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*ExternalDocumentation)(nil), (*apiextensions.ExternalDocumentation)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(a.(*ExternalDocumentation), b.(*apiextensions.ExternalDocumentation), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.ExternalDocumentation)(nil), (*ExternalDocumentation)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_ExternalDocumentation_To_v1_ExternalDocumentation(a.(*apiextensions.ExternalDocumentation), b.(*ExternalDocumentation), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*JSONSchemaProps)(nil), (*apiextensions.JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(a.(*JSONSchemaProps), b.(*apiextensions.JSONSchemaProps), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrArray)(nil), (*apiextensions.JSONSchemaPropsOrArray)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(a.(*JSONSchemaPropsOrArray), b.(*apiextensions.JSONSchemaPropsOrArray), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrArray)(nil), (*JSONSchemaPropsOrArray)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_JSONSchemaPropsOrArray_To_v1_JSONSchemaPropsOrArray(a.(*apiextensions.JSONSchemaPropsOrArray), b.(*JSONSchemaPropsOrArray), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrBool)(nil), (*apiextensions.JSONSchemaPropsOrBool)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(a.(*JSONSchemaPropsOrBool), b.(*apiextensions.JSONSchemaPropsOrBool), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrBool)(nil), (*JSONSchemaPropsOrBool)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_JSONSchemaPropsOrBool_To_v1_JSONSchemaPropsOrBool(a.(*apiextensions.JSONSchemaPropsOrBool), b.(*JSONSchemaPropsOrBool), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrStringArray)(nil), (*apiextensions.JSONSchemaPropsOrStringArray)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(a.(*JSONSchemaPropsOrStringArray), b.(*apiextensions.JSONSchemaPropsOrStringArray), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrStringArray)(nil), (*JSONSchemaPropsOrStringArray)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrStringArray(a.(*apiextensions.JSONSchemaPropsOrStringArray), b.(*JSONSchemaPropsOrStringArray), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*SelectableField)(nil), (*apiextensions.SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_SelectableField_To_apiextensions_SelectableField(a.(*SelectableField), b.(*apiextensions.SelectableField), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.SelectableField)(nil), (*SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_SelectableField_To_v1_SelectableField(a.(*apiextensions.SelectableField), b.(*SelectableField), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*ServiceReference)(nil), (*apiextensions.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ServiceReference_To_apiextensions_ServiceReference(a.(*ServiceReference), b.(*apiextensions.ServiceReference), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.ServiceReference)(nil), (*ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_ServiceReference_To_v1_ServiceReference(a.(*apiextensions.ServiceReference), b.(*ServiceReference), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*ValidationRule)(nil), (*apiextensions.ValidationRule)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ValidationRule_To_apiextensions_ValidationRule(a.(*ValidationRule), b.(*apiextensions.ValidationRule), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.ValidationRule)(nil), (*ValidationRule)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_ValidationRule_To_v1_ValidationRule(a.(*apiextensions.ValidationRule), b.(*ValidationRule), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*WebhookClientConfig)(nil), (*apiextensions.WebhookClientConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(a.(*WebhookClientConfig), b.(*apiextensions.WebhookClientConfig), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.WebhookClientConfig)(nil), (*WebhookClientConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_WebhookClientConfig_To_v1_WebhookClientConfig(a.(*apiextensions.WebhookClientConfig), b.(*WebhookClientConfig), scope) }); err != nil { return err } if err := s.AddConversionFunc((*apiextensions.CustomResourceConversion)(nil), (*CustomResourceConversion)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversion(a.(*apiextensions.CustomResourceConversion), b.(*CustomResourceConversion), scope) }); err != nil { return err } if err := s.AddConversionFunc((*apiextensions.CustomResourceDefinitionSpec)(nil), (*CustomResourceDefinitionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefinitionSpec(a.(*apiextensions.CustomResourceDefinitionSpec), b.(*CustomResourceDefinitionSpec), scope) }); err != nil { return err } if err := s.AddConversionFunc((*apiextensions.JSONSchemaProps)(nil), (*JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(a.(*apiextensions.JSONSchemaProps), b.(*JSONSchemaProps), scope) }); err != nil { return err } if err := s.AddConversionFunc((*apiextensions.JSON)(nil), (*JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_JSON_To_v1_JSON(a.(*apiextensions.JSON), b.(*JSON), scope) }); err != nil { return err } if err := s.AddConversionFunc((*apiextensions.ValidationRules)(nil), (*ValidationRules)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_ValidationRules_To_v1_ValidationRules(a.(*apiextensions.ValidationRules), b.(*ValidationRules), scope) }); err != nil { return err } if err := s.AddConversionFunc((*CustomResourceConversion)(nil), (*apiextensions.CustomResourceConversion)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(a.(*CustomResourceConversion), b.(*apiextensions.CustomResourceConversion), scope) }); err != nil { return err } if err := s.AddConversionFunc((*CustomResourceDefinitionSpec)(nil), (*apiextensions.CustomResourceDefinitionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(a.(*CustomResourceDefinitionSpec), b.(*apiextensions.CustomResourceDefinitionSpec), scope) }); err != nil { return err } if err := s.AddConversionFunc((*JSON)(nil), (*apiextensions.JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_JSON_To_apiextensions_JSON(a.(*JSON), b.(*apiextensions.JSON), scope) }); err != nil { return err } return nil } func autoConvert_v1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in *CustomResourceColumnDefinition, out *apiextensions.CustomResourceColumnDefinition, s conversion.Scope) error { out.Name = in.Name out.Type = in.Type out.Format = in.Format out.Description = in.Description out.Priority = in.Priority out.JSONPath = in.JSONPath return nil } // Convert_v1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition is an autogenerated conversion function. func Convert_v1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in *CustomResourceColumnDefinition, out *apiextensions.CustomResourceColumnDefinition, s conversion.Scope) error { return autoConvert_v1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in, out, s) } func autoConvert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition(in *apiextensions.CustomResourceColumnDefinition, out *CustomResourceColumnDefinition, s conversion.Scope) error { out.Name = in.Name out.Type = in.Type out.Format = in.Format out.Description = in.Description out.Priority = in.Priority out.JSONPath = in.JSONPath return nil } // Convert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition is an autogenerated conversion function. func Convert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition(in *apiextensions.CustomResourceColumnDefinition, out *CustomResourceColumnDefinition, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition(in, out, s) } func autoConvert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in *CustomResourceConversion, out *apiextensions.CustomResourceConversion, s conversion.Scope) error { out.Strategy = apiextensions.ConversionStrategyType(in.Strategy) // WARNING: in.Webhook requires manual conversion: does not exist in peer-type return nil } func autoConvert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversion(in *apiextensions.CustomResourceConversion, out *CustomResourceConversion, s conversion.Scope) error { out.Strategy = ConversionStrategyType(in.Strategy) // WARNING: in.WebhookClientConfig requires manual conversion: does not exist in peer-type // WARNING: in.ConversionReviewVersions requires manual conversion: does not exist in peer-type return nil } func autoConvert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(&in.Spec, &out.Spec, s); err != nil { return err } if err := Convert_v1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } // Convert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition is an autogenerated conversion function. func Convert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { return autoConvert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition(in *apiextensions.CustomResourceDefinition, out *CustomResourceDefinition, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefinitionSpec(&in.Spec, &out.Spec, s); err != nil { return err } if err := Convert_apiextensions_CustomResourceDefinitionStatus_To_v1_CustomResourceDefinitionStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } // Convert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition(in *apiextensions.CustomResourceDefinition, out *CustomResourceDefinition, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition(in, out, s) } func autoConvert_v1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in *CustomResourceDefinitionCondition, out *apiextensions.CustomResourceDefinitionCondition, s conversion.Scope) error { out.Type = apiextensions.CustomResourceDefinitionConditionType(in.Type) out.Status = apiextensions.ConditionStatus(in.Status) out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil } // Convert_v1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition is an autogenerated conversion function. func Convert_v1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in *CustomResourceDefinitionCondition, out *apiextensions.CustomResourceDefinitionCondition, s conversion.Scope) error { return autoConvert_v1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionCondition_To_v1_CustomResourceDefinitionCondition(in *apiextensions.CustomResourceDefinitionCondition, out *CustomResourceDefinitionCondition, s conversion.Scope) error { out.Type = CustomResourceDefinitionConditionType(in.Type) out.Status = ConditionStatus(in.Status) out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil } // Convert_apiextensions_CustomResourceDefinitionCondition_To_v1_CustomResourceDefinitionCondition is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionCondition_To_v1_CustomResourceDefinitionCondition(in *apiextensions.CustomResourceDefinitionCondition, out *CustomResourceDefinitionCondition, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionCondition_To_v1_CustomResourceDefinitionCondition(in, out, s) } func autoConvert_v1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in *CustomResourceDefinitionList, out *apiextensions.CustomResourceDefinitionList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]apiextensions.CustomResourceDefinition, len(*in)) for i := range *in { if err := Convert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(&(*in)[i], &(*out)[i], s); err != nil { return err } } } else { out.Items = nil } return nil } // Convert_v1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList is an autogenerated conversion function. func Convert_v1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in *CustomResourceDefinitionList, out *apiextensions.CustomResourceDefinitionList, s conversion.Scope) error { return autoConvert_v1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionList_To_v1_CustomResourceDefinitionList(in *apiextensions.CustomResourceDefinitionList, out *CustomResourceDefinitionList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]CustomResourceDefinition, len(*in)) for i := range *in { if err := Convert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition(&(*in)[i], &(*out)[i], s); err != nil { return err } } } else { out.Items = nil } return nil } // Convert_apiextensions_CustomResourceDefinitionList_To_v1_CustomResourceDefinitionList is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionList_To_v1_CustomResourceDefinitionList(in *apiextensions.CustomResourceDefinitionList, out *CustomResourceDefinitionList, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionList_To_v1_CustomResourceDefinitionList(in, out, s) } func autoConvert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in *CustomResourceDefinitionNames, out *apiextensions.CustomResourceDefinitionNames, s conversion.Scope) error { out.Plural = in.Plural out.Singular = in.Singular out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) out.Kind = in.Kind out.ListKind = in.ListKind out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories)) return nil } // Convert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames is an autogenerated conversion function. func Convert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in *CustomResourceDefinitionNames, out *apiextensions.CustomResourceDefinitionNames, s conversion.Scope) error { return autoConvert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(in *apiextensions.CustomResourceDefinitionNames, out *CustomResourceDefinitionNames, s conversion.Scope) error { out.Plural = in.Plural out.Singular = in.Singular out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) out.Kind = in.Kind out.ListKind = in.ListKind out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories)) return nil } // Convert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(in *apiextensions.CustomResourceDefinitionNames, out *CustomResourceDefinitionNames, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(in, out, s) } func autoConvert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error { out.Group = in.Group if err := Convert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(&in.Names, &out.Names, s); err != nil { return err } out.Scope = apiextensions.ResourceScope(in.Scope) if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]apiextensions.CustomResourceDefinitionVersion, len(*in)) for i := range *in { if err := Convert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(&(*in)[i], &(*out)[i], s); err != nil { return err } } } else { out.Versions = nil } if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(apiextensions.CustomResourceConversion) if err := Convert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(*in, *out, s); err != nil { return err } } else { out.Conversion = nil } if err := metav1.Convert_bool_To_Pointer_bool(&in.PreserveUnknownFields, &out.PreserveUnknownFields, s); err != nil { return err } return nil } func autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefinitionSpec(in *apiextensions.CustomResourceDefinitionSpec, out *CustomResourceDefinitionSpec, s conversion.Scope) error { out.Group = in.Group // WARNING: in.Version requires manual conversion: does not exist in peer-type if err := Convert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(&in.Names, &out.Names, s); err != nil { return err } out.Scope = ResourceScope(in.Scope) // WARNING: in.Validation requires manual conversion: does not exist in peer-type // WARNING: in.Subresources requires manual conversion: does not exist in peer-type if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]CustomResourceDefinitionVersion, len(*in)) for i := range *in { if err := Convert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResourceDefinitionVersion(&(*in)[i], &(*out)[i], s); err != nil { return err } } } else { out.Versions = nil } // WARNING: in.AdditionalPrinterColumns requires manual conversion: does not exist in peer-type // WARNING: in.SelectableFields requires manual conversion: does not exist in peer-type if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) if err := Convert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversion(*in, *out, s); err != nil { return err } } else { out.Conversion = nil } if err := metav1.Convert_Pointer_bool_To_bool(&in.PreserveUnknownFields, &out.PreserveUnknownFields, s); err != nil { return err } return nil } func autoConvert_v1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(in *CustomResourceDefinitionStatus, out *apiextensions.CustomResourceDefinitionStatus, s conversion.Scope) error { out.Conditions = *(*[]apiextensions.CustomResourceDefinitionCondition)(unsafe.Pointer(&in.Conditions)) if err := Convert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil { return err } out.StoredVersions = *(*[]string)(unsafe.Pointer(&in.StoredVersions)) return nil } // Convert_v1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus is an autogenerated conversion function.
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/register.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/register.go
/* Copyright 2019 The Kubernetes Authors. 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. */ package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) const GroupName = "apiextensions.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // Kind takes an unqualified kind and returns back a Group qualified GroupKind func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns back a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) localSchemeBuilder = &SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CustomResourceDefinition{}, &CustomResourceDefinitionList{}, &ConversionReview{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } func init() { // We only register manually written functions here. The registration of the // generated functions takes place in the generated files. The separation // makes the code compile even when the generated files are missing. localSchemeBuilder.Register(addDefaultingFuncs) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go
/* Copyright 2019 The Kubernetes Authors. 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. */ package v1 import ( "bytes" unsafe "unsafe" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/util/json" ) func Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(in *apiextensions.JSONSchemaProps, out *JSONSchemaProps, s conversion.Scope) error { if err := autoConvert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(in, out, s); err != nil { return err } if in.Default != nil && *(in.Default) == nil { out.Default = nil } if in.Example != nil && *(in.Example) == nil { out.Example = nil } return nil } var nullLiteral = []byte(`null`) func Convert_apiextensions_JSON_To_v1_JSON(in *apiextensions.JSON, out *JSON, s conversion.Scope) error { raw, err := json.Marshal(*in) if err != nil { return err } if len(raw) == 0 || bytes.Equal(raw, nullLiteral) { // match JSON#UnmarshalJSON treatment of literal nulls out.Raw = nil } else { out.Raw = raw } return nil } func Convert_v1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s conversion.Scope) error { if in != nil { var i interface{} if len(in.Raw) > 0 && !bytes.Equal(in.Raw, nullLiteral) { if err := json.Unmarshal(in.Raw, &i); err != nil { return err } } *out = i } else { out = nil } return nil } func Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefinitionSpec(in *apiextensions.CustomResourceDefinitionSpec, out *CustomResourceDefinitionSpec, s conversion.Scope) error { if err := autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefinitionSpec(in, out, s); err != nil { return err } if len(out.Versions) == 0 && len(in.Version) > 0 { // no versions were specified, and a version name was specified out.Versions = []CustomResourceDefinitionVersion{{Name: in.Version, Served: true, Storage: true}} } // If spec.{subresources,validation,additionalPrinterColumns,selectableFields} exists, move to versions if in.Subresources != nil { subresources := &CustomResourceSubresources{} if err := Convert_apiextensions_CustomResourceSubresources_To_v1_CustomResourceSubresources(in.Subresources, subresources, s); err != nil { return err } for i := range out.Versions { out.Versions[i].Subresources = subresources } } if in.Validation != nil { schema := &CustomResourceValidation{} if err := Convert_apiextensions_CustomResourceValidation_To_v1_CustomResourceValidation(in.Validation, schema, s); err != nil { return err } for i := range out.Versions { out.Versions[i].Schema = schema } } if in.AdditionalPrinterColumns != nil { additionalPrinterColumns := make([]CustomResourceColumnDefinition, len(in.AdditionalPrinterColumns)) for i := range in.AdditionalPrinterColumns { if err := Convert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition(&in.AdditionalPrinterColumns[i], &additionalPrinterColumns[i], s); err != nil { return err } } for i := range out.Versions { out.Versions[i].AdditionalPrinterColumns = additionalPrinterColumns } } if in.SelectableFields != nil { selectableFields := make([]SelectableField, len(in.SelectableFields)) for i := range in.SelectableFields { if err := Convert_apiextensions_SelectableField_To_v1_SelectableField(&in.SelectableFields[i], &selectableFields[i], s); err != nil { return err } } for i := range out.Versions { out.Versions[i].SelectableFields = selectableFields } } return nil } func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error { if err := autoConvert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in, out, s); err != nil { return err } if len(out.Versions) == 0 { return nil } // Copy versions[0] to version out.Version = out.Versions[0].Name // If versions[*].{subresources,schema,additionalPrinterColumns,selectableFields} are identical, move to spec subresources := out.Versions[0].Subresources subresourcesIdentical := true validation := out.Versions[0].Schema validationIdentical := true additionalPrinterColumns := out.Versions[0].AdditionalPrinterColumns additionalPrinterColumnsIdentical := true selectableFields := out.Versions[0].SelectableFields selectableFieldsIdentical := true // Detect if per-version fields are identical for _, v := range out.Versions { if subresourcesIdentical && !apiequality.Semantic.DeepEqual(v.Subresources, subresources) { subresourcesIdentical = false } if validationIdentical && !apiequality.Semantic.DeepEqual(v.Schema, validation) { validationIdentical = false } if additionalPrinterColumnsIdentical && !apiequality.Semantic.DeepEqual(v.AdditionalPrinterColumns, additionalPrinterColumns) { additionalPrinterColumnsIdentical = false } if selectableFieldsIdentical && !apiequality.Semantic.DeepEqual(v.SelectableFields, selectableFields) { selectableFieldsIdentical = false } } // If they are, set the top-level fields and clear the per-version fields if subresourcesIdentical { out.Subresources = subresources } if validationIdentical { out.Validation = validation } if additionalPrinterColumnsIdentical { out.AdditionalPrinterColumns = additionalPrinterColumns } if selectableFieldsIdentical { out.SelectableFields = selectableFields } for i := range out.Versions { if subresourcesIdentical { out.Versions[i].Subresources = nil } if validationIdentical { out.Versions[i].Schema = nil } if additionalPrinterColumnsIdentical { out.Versions[i].AdditionalPrinterColumns = nil } if selectableFieldsIdentical { out.Versions[i].SelectableFields = nil } } return nil } func Convert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in *CustomResourceConversion, out *apiextensions.CustomResourceConversion, s conversion.Scope) error { if err := autoConvert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in, out, s); err != nil { return err } out.WebhookClientConfig = nil out.ConversionReviewVersions = nil if in.Webhook != nil { out.ConversionReviewVersions = in.Webhook.ConversionReviewVersions if in.Webhook.ClientConfig != nil { out.WebhookClientConfig = &apiextensions.WebhookClientConfig{} if err := Convert_v1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(in.Webhook.ClientConfig, out.WebhookClientConfig, s); err != nil { return err } } } return nil } func Convert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversion(in *apiextensions.CustomResourceConversion, out *CustomResourceConversion, s conversion.Scope) error { if err := autoConvert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversion(in, out, s); err != nil { return err } out.Webhook = nil if in.WebhookClientConfig != nil || in.ConversionReviewVersions != nil { out.Webhook = &WebhookConversion{} out.Webhook.ConversionReviewVersions = in.ConversionReviewVersions if in.WebhookClientConfig != nil { out.Webhook.ClientConfig = &WebhookClientConfig{} if err := Convert_apiextensions_WebhookClientConfig_To_v1_WebhookClientConfig(in.WebhookClientConfig, out.Webhook.ClientConfig, s); err != nil { return err } } } return nil } func Convert_apiextensions_ValidationRules_To_v1_ValidationRules(in *apiextensions.ValidationRules, out *ValidationRules, s conversion.Scope) error { *out = *(*ValidationRules)(unsafe.Pointer(in)) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/deepcopy.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/deepcopy.go
/* Copyright 2019 The Kubernetes Authors. 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. */ package v1 // TODO: Update this after a tag is created for interface fields in DeepCopy func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { if in == nil { return nil } out := new(JSONSchemaProps) *out = *in if in.Ref != nil { in, out := &in.Ref, &out.Ref if *in == nil { *out = nil } else { *out = new(string) **out = **in } } if in.Maximum != nil { in, out := &in.Maximum, &out.Maximum if *in == nil { *out = nil } else { *out = new(float64) **out = **in } } if in.Minimum != nil { in, out := &in.Minimum, &out.Minimum if *in == nil { *out = nil } else { *out = new(float64) **out = **in } } if in.MaxLength != nil { in, out := &in.MaxLength, &out.MaxLength if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MinLength != nil { in, out := &in.MinLength, &out.MinLength if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MaxItems != nil { in, out := &in.MaxItems, &out.MaxItems if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MinItems != nil { in, out := &in.MinItems, &out.MinItems if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MultipleOf != nil { in, out := &in.MultipleOf, &out.MultipleOf if *in == nil { *out = nil } else { *out = new(float64) **out = **in } } if in.MaxProperties != nil { in, out := &in.MaxProperties, &out.MaxProperties if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MinProperties != nil { in, out := &in.MinProperties, &out.MinProperties if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.Required != nil { in, out := &in.Required, &out.Required *out = make([]string, len(*in)) copy(*out, *in) } if in.Items != nil { in, out := &in.Items, &out.Items if *in == nil { *out = nil } else { *out = new(JSONSchemaPropsOrArray) (*in).DeepCopyInto(*out) } } if in.AllOf != nil { in, out := &in.AllOf, &out.AllOf *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.OneOf != nil { in, out := &in.OneOf, &out.OneOf *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.AnyOf != nil { in, out := &in.AnyOf, &out.AnyOf *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Not != nil { in, out := &in.Not, &out.Not if *in == nil { *out = nil } else { *out = new(JSONSchemaProps) (*in).DeepCopyInto(*out) } } if in.Properties != nil { in, out := &in.Properties, &out.Properties *out = make(map[string]JSONSchemaProps, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.AdditionalProperties != nil { in, out := &in.AdditionalProperties, &out.AdditionalProperties if *in == nil { *out = nil } else { *out = new(JSONSchemaPropsOrBool) (*in).DeepCopyInto(*out) } } if in.PatternProperties != nil { in, out := &in.PatternProperties, &out.PatternProperties *out = make(map[string]JSONSchemaProps, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.Dependencies != nil { in, out := &in.Dependencies, &out.Dependencies *out = make(JSONSchemaDependencies, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.AdditionalItems != nil { in, out := &in.AdditionalItems, &out.AdditionalItems if *in == nil { *out = nil } else { *out = new(JSONSchemaPropsOrBool) (*in).DeepCopyInto(*out) } } if in.Definitions != nil { in, out := &in.Definitions, &out.Definitions *out = make(JSONSchemaDefinitions, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.ExternalDocs != nil { in, out := &in.ExternalDocs, &out.ExternalDocs if *in == nil { *out = nil } else { *out = new(ExternalDocumentation) (*in).DeepCopyInto(*out) } } if in.XPreserveUnknownFields != nil { in, out := &in.XPreserveUnknownFields, &out.XPreserveUnknownFields if *in == nil { *out = nil } else { *out = new(bool) **out = **in } } if in.XMapType != nil { in, out := &in.XMapType, &out.XMapType *out = new(string) **out = **in } if in.XValidations != nil { inValidations, outValidations := &in.XValidations, &out.XValidations *outValidations = make([]ValidationRule, len(*inValidations)) for i := range *inValidations { in.XValidations[i].DeepCopyInto(&out.XValidations[i]) } } return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/defaults.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/defaults.go
/* Copyright 2019 The Kubernetes Authors. 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. */ package v1 import ( "strings" "k8s.io/apimachinery/pkg/runtime" utilpointer "k8s.io/utils/pointer" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { return RegisterDefaults(scheme) } func SetDefaults_CustomResourceDefinition(obj *CustomResourceDefinition) { SetDefaults_CustomResourceDefinitionSpec(&obj.Spec) if len(obj.Status.StoredVersions) == 0 { for _, v := range obj.Spec.Versions { if v.Storage { obj.Status.StoredVersions = append(obj.Status.StoredVersions, v.Name) break } } } } func SetDefaults_CustomResourceDefinitionSpec(obj *CustomResourceDefinitionSpec) { if len(obj.Names.Singular) == 0 { obj.Names.Singular = strings.ToLower(obj.Names.Kind) } if len(obj.Names.ListKind) == 0 && len(obj.Names.Kind) > 0 { obj.Names.ListKind = obj.Names.Kind + "List" } if obj.Conversion == nil { obj.Conversion = &CustomResourceConversion{ Strategy: NoneConverter, } } } // SetDefaults_ServiceReference sets defaults for Webhook's ServiceReference func SetDefaults_ServiceReference(obj *ServiceReference) { if obj.Port == nil { obj.Port = utilpointer.Int32Ptr(443) } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go
/* Copyright 2019 The Kubernetes Authors. 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. */ package v1 import ( "bytes" "errors" cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" "k8s.io/apimachinery/pkg/util/json" ) var jsTrue = []byte("true") var jsFalse = []byte("false") // The CBOR parsing related constants and functions below are not exported so they can be // easily removed at a future date when the CBOR library provides equivalent functionality. type cborMajorType int const ( // https://www.rfc-editor.org/rfc/rfc8949.html#section-3.1 cborUnsignedInteger cborMajorType = 0 cborNegativeInteger cborMajorType = 1 cborByteString cborMajorType = 2 cborTextString cborMajorType = 3 cborArray cborMajorType = 4 cborMap cborMajorType = 5 cborTag cborMajorType = 6 cborOther cborMajorType = 7 ) const ( // from https://www.rfc-editor.org/rfc/rfc8949.html#name-jump-table-for-initial-byte. // additionally, see https://www.rfc-editor.org/rfc/rfc8949.html#section-3.3-5. cborFalseValue = 0xf4 cborTrueValue = 0xf5 cborNullValue = 0xf6 ) func cborType(b byte) cborMajorType { return cborMajorType(b >> 5) } func (s JSONSchemaPropsOrBool) MarshalJSON() ([]byte, error) { if s.Schema != nil { return json.Marshal(s.Schema) } if s.Schema == nil && !s.Allows { return jsFalse, nil } return jsTrue, nil } func (s *JSONSchemaPropsOrBool) UnmarshalJSON(data []byte) error { var nw JSONSchemaPropsOrBool switch { case len(data) == 0: case data[0] == '{': var sch JSONSchemaProps if err := json.Unmarshal(data, &sch); err != nil { return err } nw.Allows = true nw.Schema = &sch case len(data) == 4 && string(data) == "true": nw.Allows = true case len(data) == 5 && string(data) == "false": nw.Allows = false default: return errors.New("boolean or JSON schema expected") } *s = nw return nil } func (s JSONSchemaPropsOrBool) MarshalCBOR() ([]byte, error) { if s.Schema != nil { return cbor.Marshal(s.Schema) } return cbor.Marshal(s.Allows) } func (s *JSONSchemaPropsOrBool) UnmarshalCBOR(data []byte) error { switch { case len(data) == 0: // ideally we would avoid modifying *s here, but we are matching the behavior of UnmarshalJSON *s = JSONSchemaPropsOrBool{} return nil case cborType(data[0]) == cborMap: var p JSONSchemaProps if err := cbor.Unmarshal(data, &p); err != nil { return err } *s = JSONSchemaPropsOrBool{Allows: true, Schema: &p} return nil case data[0] == cborTrueValue: *s = JSONSchemaPropsOrBool{Allows: true} return nil case data[0] == cborFalseValue: *s = JSONSchemaPropsOrBool{Allows: false} return nil default: // ideally, this case would not also capture a null input value, // but we are matching the behavior of the UnmarshalJSON return errors.New("boolean or JSON schema expected") } } func (s JSONSchemaPropsOrStringArray) MarshalJSON() ([]byte, error) { if len(s.Property) > 0 { return json.Marshal(s.Property) } if s.Schema != nil { return json.Marshal(s.Schema) } return []byte("null"), nil } func (s *JSONSchemaPropsOrStringArray) UnmarshalJSON(data []byte) error { var first byte if len(data) > 1 { first = data[0] } var nw JSONSchemaPropsOrStringArray if first == '{' { var sch JSONSchemaProps if err := json.Unmarshal(data, &sch); err != nil { return err } nw.Schema = &sch } if first == '[' { if err := json.Unmarshal(data, &nw.Property); err != nil { return err } } *s = nw return nil } func (s JSONSchemaPropsOrStringArray) MarshalCBOR() ([]byte, error) { if len(s.Property) > 0 { return cbor.Marshal(s.Property) } if s.Schema != nil { return cbor.Marshal(s.Schema) } return cbor.Marshal(nil) } func (s *JSONSchemaPropsOrStringArray) UnmarshalCBOR(data []byte) error { if len(data) > 0 && cborType(data[0]) == cborArray { var a []string if err := cbor.Unmarshal(data, &a); err != nil { return err } *s = JSONSchemaPropsOrStringArray{Property: a} return nil } if len(data) > 0 && cborType(data[0]) == cborMap { var p JSONSchemaProps if err := cbor.Unmarshal(data, &p); err != nil { return err } *s = JSONSchemaPropsOrStringArray{Schema: &p} return nil } // At this point we either have: empty data, a null value, or an // unexpected type. In order to match the behavior of the existing // UnmarshalJSON, no error is returned and *s is overwritten here. *s = JSONSchemaPropsOrStringArray{} return nil } func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) { if len(s.JSONSchemas) > 0 { return json.Marshal(s.JSONSchemas) } return json.Marshal(s.Schema) } func (s *JSONSchemaPropsOrArray) UnmarshalJSON(data []byte) error { var nw JSONSchemaPropsOrArray var first byte if len(data) > 1 { first = data[0] } if first == '{' { var sch JSONSchemaProps if err := json.Unmarshal(data, &sch); err != nil { return err } nw.Schema = &sch } if first == '[' { if err := json.Unmarshal(data, &nw.JSONSchemas); err != nil { return err } } *s = nw return nil } func (s JSONSchemaPropsOrArray) MarshalCBOR() ([]byte, error) { if len(s.JSONSchemas) > 0 { return cbor.Marshal(s.JSONSchemas) } return cbor.Marshal(s.Schema) } func (s *JSONSchemaPropsOrArray) UnmarshalCBOR(data []byte) error { if len(data) > 0 && cborType(data[0]) == cborMap { var p JSONSchemaProps if err := cbor.Unmarshal(data, &p); err != nil { return err } *s = JSONSchemaPropsOrArray{Schema: &p} return nil } if len(data) > 0 && cborType(data[0]) == cborArray { var a []JSONSchemaProps if err := cbor.Unmarshal(data, &a); err != nil { return err } *s = JSONSchemaPropsOrArray{JSONSchemas: a} return nil } // At this point we either have: empty data, a null value, or an // unexpected type. In order to match the behavior of the existing // UnmarshalJSON, no error is returned and *s is overwritten here. *s = JSONSchemaPropsOrArray{} return nil } func (s JSON) MarshalJSON() ([]byte, error) { if len(s.Raw) > 0 { return s.Raw, nil } return []byte("null"), nil } func (s *JSON) UnmarshalJSON(data []byte) error { if len(data) > 0 && !bytes.Equal(data, nullLiteral) { s.Raw = append(s.Raw[0:0], data...) } return nil } func (s JSON) MarshalCBOR() ([]byte, error) { // Note that non-semantic whitespace is lost during the transcoding performed here. // We do not forsee this to be a problem given the current known uses of this type. // Other limitations that arise when roundtripping JSON via dynamic clients also apply // here, for example: insignificant whitespace handling, number handling, and map key ordering. if len(s.Raw) == 0 { return []byte{cborNullValue}, nil } var u any if err := json.Unmarshal(s.Raw, &u); err != nil { return nil, err } return cbor.Marshal(u) } func (s *JSON) UnmarshalCBOR(data []byte) error { if len(data) == 0 || data[0] == cborNullValue { return nil } var u any if err := cbor.Unmarshal(data, &u); err != nil { return err } raw, err := json.Marshal(u) if err != nil { return err } s.Raw = raw return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.defaults.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.defaults.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. 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. */ // Code generated by defaulter-gen. DO NOT EDIT. package v1 import ( runtime "k8s.io/apimachinery/pkg/runtime" ) // RegisterDefaults adds defaulters functions to the given scheme. // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { scheme.AddTypeDefaultingFunc(&CustomResourceDefinition{}, func(obj interface{}) { SetObjectDefaults_CustomResourceDefinition(obj.(*CustomResourceDefinition)) }) scheme.AddTypeDefaultingFunc(&CustomResourceDefinitionList{}, func(obj interface{}) { SetObjectDefaults_CustomResourceDefinitionList(obj.(*CustomResourceDefinitionList)) }) return nil } func SetObjectDefaults_CustomResourceDefinition(in *CustomResourceDefinition) { SetDefaults_CustomResourceDefinition(in) SetDefaults_CustomResourceDefinitionSpec(&in.Spec) if in.Spec.Conversion != nil { if in.Spec.Conversion.Webhook != nil { if in.Spec.Conversion.Webhook.ClientConfig != nil { if in.Spec.Conversion.Webhook.ClientConfig.Service != nil { SetDefaults_ServiceReference(in.Spec.Conversion.Webhook.ClientConfig.Service) } } } } } func SetObjectDefaults_CustomResourceDefinitionList(in *CustomResourceDefinitionList) { for i := range in.Items { a := &in.Items[i] SetObjectDefaults_CustomResourceDefinition(a) } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. 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. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1 // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ConversionReview) APILifecycleIntroduced() (major, minor int) { return 1, 16 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *CustomResourceDefinition) APILifecycleIntroduced() (major, minor int) { return 1, 16 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *CustomResourceDefinitionList) APILifecycleIntroduced() (major, minor int) { return 1, 16 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go
/* Copyright 2019 The Kubernetes Authors. 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. */ package v1 // FieldValueErrorReason is a machine-readable value providing more detail about why a field failed the validation. // +enum type FieldValueErrorReason string const ( // FieldValueRequired is used to report required values that are not // provided (e.g. empty strings, null values, or empty arrays). FieldValueRequired FieldValueErrorReason = "FieldValueRequired" // FieldValueDuplicate is used to report collisions of values that must be // unique (e.g. unique IDs). FieldValueDuplicate FieldValueErrorReason = "FieldValueDuplicate" // FieldValueInvalid is used to report malformed values (e.g. failed regex // match, too long, out of bounds). FieldValueInvalid FieldValueErrorReason = "FieldValueInvalid" // FieldValueForbidden is used to report valid (as per formatting rules) // values which would be accepted under some conditions, but which are not // permitted by the current conditions (such as security policy). FieldValueForbidden FieldValueErrorReason = "FieldValueForbidden" ) // JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). type JSONSchemaProps struct { ID string `json:"id,omitempty" protobuf:"bytes,1,opt,name=id"` Schema JSONSchemaURL `json:"$schema,omitempty" protobuf:"bytes,2,opt,name=schema"` Ref *string `json:"$ref,omitempty" protobuf:"bytes,3,opt,name=ref"` Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"` Type string `json:"type,omitempty" protobuf:"bytes,5,opt,name=type"` // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: // // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string // - uri: an URI as parsed by Golang net/url.ParseRequestURI // - email: an email address as parsed by Golang net/mail.ParseAddress // - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. // - ipv4: an IPv4 IP as parsed by Golang net.ParseIP // - ipv6: an IPv6 IP as parsed by Golang net.ParseIP // - cidr: a CIDR as parsed by Golang net.ParseCIDR // - mac: a MAC address as parsed by Golang net.ParseMAC // - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ // - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ // - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ // - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ // - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" // - isbn10: an ISBN10 number string like "0321751043" // - isbn13: an ISBN13 number string like "978-0321751041" // - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in // - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ // - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ // - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" // - byte: base64 encoded binary data // - password: any kind of string // - date: a date string like "2006-01-02" as defined by full-date in RFC3339 // - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format // - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. Format string `json:"format,omitempty" protobuf:"bytes,6,opt,name=format"` Title string `json:"title,omitempty" protobuf:"bytes,7,opt,name=title"` // default is a default value for undefined object fields. // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. // Defaulting requires spec.preserveUnknownFields to be false. Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` // +listType=atomic Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` // +listType=atomic Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` // +listType=atomic AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` // +listType=atomic OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` // +listType=atomic AnyOf []JSONSchemaProps `json:"anyOf,omitempty" protobuf:"bytes,27,rep,name=anyOf"` Not *JSONSchemaProps `json:"not,omitempty" protobuf:"bytes,28,opt,name=not"` Properties map[string]JSONSchemaProps `json:"properties,omitempty" protobuf:"bytes,29,rep,name=properties"` AdditionalProperties *JSONSchemaPropsOrBool `json:"additionalProperties,omitempty" protobuf:"bytes,30,opt,name=additionalProperties"` PatternProperties map[string]JSONSchemaProps `json:"patternProperties,omitempty" protobuf:"bytes,31,rep,name=patternProperties"` Dependencies JSONSchemaDependencies `json:"dependencies,omitempty" protobuf:"bytes,32,opt,name=dependencies"` AdditionalItems *JSONSchemaPropsOrBool `json:"additionalItems,omitempty" protobuf:"bytes,33,opt,name=additionalItems"` Definitions JSONSchemaDefinitions `json:"definitions,omitempty" protobuf:"bytes,34,opt,name=definitions"` ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty" protobuf:"bytes,35,opt,name=externalDocs"` Example *JSON `json:"example,omitempty" protobuf:"bytes,36,opt,name=example"` Nullable bool `json:"nullable,omitempty" protobuf:"bytes,37,opt,name=nullable"` // x-kubernetes-preserve-unknown-fields stops the API server // decoding step from pruning fields which are not specified // in the validation schema. This affects fields recursively, // but switches back to normal pruning behaviour if nested // properties or additionalProperties are specified in the schema. // This can either be true or undefined. False is forbidden. XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty" protobuf:"bytes,38,opt,name=xKubernetesPreserveUnknownFields"` // x-kubernetes-embedded-resource defines that the value is an // embedded Kubernetes runtime.Object, with TypeMeta and // ObjectMeta. The type must be object. It is allowed to further // restrict the embedded object. kind, apiVersion and metadata // are validated automatically. x-kubernetes-preserve-unknown-fields // is allowed to be true, but does not have to be if the object // is fully specified (up to kind, apiVersion, metadata). XEmbeddedResource bool `json:"x-kubernetes-embedded-resource,omitempty" protobuf:"bytes,39,opt,name=xKubernetesEmbeddedResource"` // x-kubernetes-int-or-string specifies that this value is // either an integer or a string. If this is true, an empty // type is allowed and type as child of anyOf is permitted // if following one of the following patterns: // // 1) anyOf: // - type: integer // - type: string // 2) allOf: // - anyOf: // - type: integer // - type: string // - ... zero or more XIntOrString bool `json:"x-kubernetes-int-or-string,omitempty" protobuf:"bytes,40,opt,name=xKubernetesIntOrString"` // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used // as the index of the map. // // This tag MUST only be used on lists that have the "x-kubernetes-list-type" // extension set to "map". Also, the values specified for this attribute must // be a scalar typed field of the child structure (no nesting is supported). // // The properties specified must either be required or have a default value, // to ensure those properties are present for all list items. // // +optional // +listType=atomic XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"` // x-kubernetes-list-type annotates an array to further describe its topology. // This extension must only be used on lists and may have 3 possible values: // // 1) `atomic`: the list is treated as a single entity, like a scalar. // Atomic lists will be entirely replaced when updated. This extension // may be used on any type of list (struct, scalar, ...). // 2) `set`: // Sets are lists that must not have multiple items with the same value. Each // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an // array with x-kubernetes-list-type `atomic`. // 3) `map`: // These lists are like maps in that their elements have a non-index key // used to identify them. Order is preserved upon merge. The map tag // must only be used on a list with elements of type object. // Defaults to atomic for arrays. // +optional XListType *string `json:"x-kubernetes-list-type,omitempty" protobuf:"bytes,42,opt,name=xKubernetesListType"` // x-kubernetes-map-type annotates an object to further describe its topology. // This extension must only be used when type is object and may have 2 possible values: // // 1) `granular`: // These maps are actual maps (key-value pairs) and each fields are independent // from each other (they can each be manipulated by separate actors). This is // the default behaviour for all maps. // 2) `atomic`: the list is treated as a single entity, like a scalar. // Atomic maps will be entirely replaced when updated. // +optional XMapType *string `json:"x-kubernetes-map-type,omitempty" protobuf:"bytes,43,opt,name=xKubernetesMapType"` // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. // +patchMergeKey=rule // +patchStrategy=merge // +listType=map // +listMapKey=rule XValidations ValidationRules `json:"x-kubernetes-validations,omitempty" patchStrategy:"merge" patchMergeKey:"rule" protobuf:"bytes,44,rep,name=xKubernetesValidations"` } // ValidationRules describes a list of validation rules written in the CEL expression language. type ValidationRules []ValidationRule // ValidationRule describes a validation rule written in the CEL expression language. type ValidationRule struct { // Rule represents the expression which will be evaluated by CEL. // ref: https://github.com/google/cel-spec // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. // The `self` variable in the CEL expression is bound to the scoped value. // Example: // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} // // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as // absent fields in CEL expressions. // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map // are accessible via CEL macros and functions such as `self.all(...)`. // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and // functions. // If the Rule is scoped to a scalar, `self` is bound to the scalar value. // Examples: // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} // // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. // // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL // expressions. This includes: // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true // - An array where the items schema is of an "unknown type" // - An object where the additionalProperties schema is of an "unknown type" // // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. // Accessible property names are escaped according to the following rules when accessed in the expression: // - '__' escapes to '__underscores__' // - '.' escapes to '__dot__' // - '-' escapes to '__dash__' // - '/' escapes to '__slash__' // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", // "import", "let", "loop", "package", "namespace", "return". // Examples: // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} // // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and // non-intersecting elements in `Y` are appended, retaining their partial order. // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with // non-intersecting keys are appended, retaining their partial order. // // If `rule` makes use of the `oldSelf` variable it is implicitly a // `transition rule`. // // By default, the `oldSelf` variable is the same type as `self`. // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional // variable whose value() is the same type as `self`. // See the documentation for the `optionalOldSelf` field for details. // // Transition rules by default are applied only on UPDATE requests and are // skipped if an old value could not be found. You can opt a transition // rule into unconditional evaluation by setting `optionalOldSelf` to true. // Rule string `json:"rule" protobuf:"bytes,1,opt,name=rule"` // Message represents the message displayed when validation fails. The message is required if the Rule contains // line breaks. The message must not contain line breaks. // If unset, the message is "failed rule: {Rule}". // e.g. "must be a URL with the host matching spec.host" Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. // Since messageExpression is used as a failure message, it must evaluate to a string. // If both message and messageExpression are present on a rule, then messageExpression will be used if validation // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. // messageExpression has access to all the same variables as the rule; the only difference is the return type. // Example: // "x must be less than max ("+string(self.max)+")" // +optional MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,3,opt,name=messageExpression"` // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". // If not set, default to use "FieldValueInvalid". // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. // +optional Reason *FieldValueErrorReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` // fieldPath represents the field path returned when the validation fails. // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` // It does not support list numeric index. // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. // Numeric index of array is not supported. // For field name which contains special characters, use `['specialName']` to refer the field name. // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` // +optional FieldPath string `json:"fieldPath,omitempty" protobuf:"bytes,5,opt,name=fieldPath"` // optionalOldSelf is used to opt a transition rule into evaluation // even when the object is first created, or if the old object is // missing the value. // // When enabled `oldSelf` will be a CEL optional whose value will be // `None` if there is no old value, or when the object is initially created. // // You may check for presence of oldSelf using `oldSelf.hasValue()` and // unwrap it after checking using `oldSelf.value()`. Check the CEL // documentation for Optional types for more information: // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes // // May not be set unless `oldSelf` is used in `rule`. // // +featureGate=CRDValidationRatcheting // +optional OptionalOldSelf *bool `json:"optionalOldSelf,omitempty" protobuf:"bytes,6,opt,name=optionalOldSelf"` } // JSON represents any valid JSON value. // These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. type JSON struct { Raw []byte `json:"-" protobuf:"bytes,1,opt,name=raw"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. // // See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators func (_ JSON) OpenAPISchemaType() []string { // TODO: return actual types when anyOf is supported return nil } // OpenAPISchemaFormat is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. func (_ JSON) OpenAPISchemaFormat() string { return "" } // JSONSchemaURL represents a schema url. type JSONSchemaURL string // JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps // or an array of JSONSchemaProps. Mainly here for serialization purposes. type JSONSchemaPropsOrArray struct { Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` // +listType=atomic JSONSchemas []JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. // // See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators func (_ JSONSchemaPropsOrArray) OpenAPISchemaType() []string { // TODO: return actual types when anyOf is supported return nil } // OpenAPISchemaFormat is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. func (_ JSONSchemaPropsOrArray) OpenAPISchemaFormat() string { return "" } // JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. // Defaults to true for the boolean property. type JSONSchemaPropsOrBool struct { Allows bool `protobuf:"varint,1,opt,name=allows"` Schema *JSONSchemaProps `protobuf:"bytes,2,opt,name=schema"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. // // See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators func (_ JSONSchemaPropsOrBool) OpenAPISchemaType() []string { // TODO: return actual types when anyOf is supported return nil } // OpenAPISchemaFormat is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. func (_ JSONSchemaPropsOrBool) OpenAPISchemaFormat() string { return "" } // JSONSchemaDependencies represent a dependencies property. type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray // JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. type JSONSchemaPropsOrStringArray struct { Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` // +listType=atomic Property []string `protobuf:"bytes,2,rep,name=property"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. // // See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaType() []string { // TODO: return actual types when anyOf is supported return nil } // OpenAPISchemaFormat is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaFormat() string { return "" } // JSONSchemaDefinitions contains the models explicitly defined in this spec. type JSONSchemaDefinitions map[string]JSONSchemaProps // ExternalDocumentation allows referencing an external resource for extended documentation. type ExternalDocumentation struct { Description string `json:"description,omitempty" protobuf:"bytes,1,opt,name=description"` URL string `json:"url,omitempty" protobuf:"bytes,2,opt,name=url"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go
/* Copyright 2019 The Kubernetes Authors. 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. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:conversion-gen=k8s.io/apiextensions-apiserver/pkg/apis/apiextensions // +k8s:defaulter-gen=TypeMeta // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // +groupName=apiextensions.k8s.io // Package v1 is the v1 version of the API. package v1 // import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto package v1 import ( encoding_binary "encoding/binary" fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" runtime "k8s.io/apimachinery/pkg/runtime" math "math" math_bits "math/bits" reflect "reflect" strings "strings" k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } func (*ConversionRequest) ProtoMessage() {} func (*ConversionRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{0} } func (m *ConversionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConversionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConversionRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ConversionRequest.Merge(m, src) } func (m *ConversionRequest) XXX_Size() int { return m.Size() } func (m *ConversionRequest) XXX_DiscardUnknown() { xxx_messageInfo_ConversionRequest.DiscardUnknown(m) } var xxx_messageInfo_ConversionRequest proto.InternalMessageInfo func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } func (*ConversionResponse) ProtoMessage() {} func (*ConversionResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{1} } func (m *ConversionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConversionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConversionResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ConversionResponse.Merge(m, src) } func (m *ConversionResponse) XXX_Size() int { return m.Size() } func (m *ConversionResponse) XXX_DiscardUnknown() { xxx_messageInfo_ConversionResponse.DiscardUnknown(m) } var xxx_messageInfo_ConversionResponse proto.InternalMessageInfo func (m *ConversionReview) Reset() { *m = ConversionReview{} } func (*ConversionReview) ProtoMessage() {} func (*ConversionReview) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{2} } func (m *ConversionReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConversionReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConversionReview) XXX_Merge(src proto.Message) { xxx_messageInfo_ConversionReview.Merge(m, src) } func (m *ConversionReview) XXX_Size() int { return m.Size() } func (m *ConversionReview) XXX_DiscardUnknown() { xxx_messageInfo_ConversionReview.DiscardUnknown(m) } var xxx_messageInfo_ConversionReview proto.InternalMessageInfo func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } func (*CustomResourceColumnDefinition) ProtoMessage() {} func (*CustomResourceColumnDefinition) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{3} } func (m *CustomResourceColumnDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceColumnDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceColumnDefinition) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceColumnDefinition.Merge(m, src) } func (m *CustomResourceColumnDefinition) XXX_Size() int { return m.Size() } func (m *CustomResourceColumnDefinition) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceColumnDefinition.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceColumnDefinition proto.InternalMessageInfo func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } func (*CustomResourceConversion) ProtoMessage() {} func (*CustomResourceConversion) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{4} } func (m *CustomResourceConversion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceConversion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceConversion) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceConversion.Merge(m, src) } func (m *CustomResourceConversion) XXX_Size() int { return m.Size() } func (m *CustomResourceConversion) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceConversion.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceConversion proto.InternalMessageInfo func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } func (*CustomResourceDefinition) ProtoMessage() {} func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{5} } func (m *CustomResourceDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinition) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinition.Merge(m, src) } func (m *CustomResourceDefinition) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinition) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinition.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinition proto.InternalMessageInfo func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } func (*CustomResourceDefinitionCondition) ProtoMessage() {} func (*CustomResourceDefinitionCondition) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{6} } func (m *CustomResourceDefinitionCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionCondition) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionCondition.Merge(m, src) } func (m *CustomResourceDefinitionCondition) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionCondition) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionCondition.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionCondition proto.InternalMessageInfo func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } func (*CustomResourceDefinitionList) ProtoMessage() {} func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{7} } func (m *CustomResourceDefinitionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionList) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionList.Merge(m, src) } func (m *CustomResourceDefinitionList) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionList) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionList.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionList proto.InternalMessageInfo func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } func (*CustomResourceDefinitionNames) ProtoMessage() {} func (*CustomResourceDefinitionNames) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{8} } func (m *CustomResourceDefinitionNames) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionNames) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionNames.Merge(m, src) } func (m *CustomResourceDefinitionNames) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionNames) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionNames.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionNames proto.InternalMessageInfo func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } func (*CustomResourceDefinitionSpec) ProtoMessage() {} func (*CustomResourceDefinitionSpec) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{9} } func (m *CustomResourceDefinitionSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionSpec.Merge(m, src) } func (m *CustomResourceDefinitionSpec) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionSpec) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionSpec.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionSpec proto.InternalMessageInfo func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } func (*CustomResourceDefinitionStatus) ProtoMessage() {} func (*CustomResourceDefinitionStatus) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{10} } func (m *CustomResourceDefinitionStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionStatus.Merge(m, src) } func (m *CustomResourceDefinitionStatus) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionStatus) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionStatus.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionStatus proto.InternalMessageInfo func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } func (*CustomResourceDefinitionVersion) ProtoMessage() {} func (*CustomResourceDefinitionVersion) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{11} } func (m *CustomResourceDefinitionVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionVersion) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionVersion.Merge(m, src) } func (m *CustomResourceDefinitionVersion) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionVersion) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionVersion.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionVersion proto.InternalMessageInfo func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } func (*CustomResourceSubresourceScale) ProtoMessage() {} func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{12} } func (m *CustomResourceSubresourceScale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceSubresourceScale) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceSubresourceScale) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceSubresourceScale.Merge(m, src) } func (m *CustomResourceSubresourceScale) XXX_Size() int { return m.Size() } func (m *CustomResourceSubresourceScale) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceSubresourceScale.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceSubresourceScale proto.InternalMessageInfo func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } func (*CustomResourceSubresourceStatus) ProtoMessage() {} func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{13} } func (m *CustomResourceSubresourceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceSubresourceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceSubresourceStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceSubresourceStatus.Merge(m, src) } func (m *CustomResourceSubresourceStatus) XXX_Size() int { return m.Size() } func (m *CustomResourceSubresourceStatus) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceSubresourceStatus.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceSubresourceStatus proto.InternalMessageInfo func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } func (*CustomResourceSubresources) ProtoMessage() {} func (*CustomResourceSubresources) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{14} } func (m *CustomResourceSubresources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceSubresources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceSubresources) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceSubresources.Merge(m, src) } func (m *CustomResourceSubresources) XXX_Size() int { return m.Size() } func (m *CustomResourceSubresources) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceSubresources.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceSubresources proto.InternalMessageInfo func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } func (*CustomResourceValidation) ProtoMessage() {} func (*CustomResourceValidation) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{15} } func (m *CustomResourceValidation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceValidation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceValidation) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceValidation.Merge(m, src) } func (m *CustomResourceValidation) XXX_Size() int { return m.Size() } func (m *CustomResourceValidation) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceValidation.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceValidation proto.InternalMessageInfo func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } func (*ExternalDocumentation) ProtoMessage() {} func (*ExternalDocumentation) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{16} } func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ExternalDocumentation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ExternalDocumentation) XXX_Merge(src proto.Message) { xxx_messageInfo_ExternalDocumentation.Merge(m, src) } func (m *ExternalDocumentation) XXX_Size() int { return m.Size() } func (m *ExternalDocumentation) XXX_DiscardUnknown() { xxx_messageInfo_ExternalDocumentation.DiscardUnknown(m) } var xxx_messageInfo_ExternalDocumentation proto.InternalMessageInfo func (m *JSON) Reset() { *m = JSON{} } func (*JSON) ProtoMessage() {} func (*JSON) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{17} } func (m *JSON) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSON) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSON) XXX_Merge(src proto.Message) { xxx_messageInfo_JSON.Merge(m, src) } func (m *JSON) XXX_Size() int { return m.Size() } func (m *JSON) XXX_DiscardUnknown() { xxx_messageInfo_JSON.DiscardUnknown(m) } var xxx_messageInfo_JSON proto.InternalMessageInfo func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } func (*JSONSchemaProps) ProtoMessage() {} func (*JSONSchemaProps) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{18} } func (m *JSONSchemaProps) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSONSchemaProps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSONSchemaProps) XXX_Merge(src proto.Message) { xxx_messageInfo_JSONSchemaProps.Merge(m, src) } func (m *JSONSchemaProps) XXX_Size() int { return m.Size() } func (m *JSONSchemaProps) XXX_DiscardUnknown() { xxx_messageInfo_JSONSchemaProps.DiscardUnknown(m) } var xxx_messageInfo_JSONSchemaProps proto.InternalMessageInfo func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } func (*JSONSchemaPropsOrArray) ProtoMessage() {} func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{19} } func (m *JSONSchemaPropsOrArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSONSchemaPropsOrArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSONSchemaPropsOrArray) XXX_Merge(src proto.Message) { xxx_messageInfo_JSONSchemaPropsOrArray.Merge(m, src) } func (m *JSONSchemaPropsOrArray) XXX_Size() int { return m.Size() } func (m *JSONSchemaPropsOrArray) XXX_DiscardUnknown() { xxx_messageInfo_JSONSchemaPropsOrArray.DiscardUnknown(m) } var xxx_messageInfo_JSONSchemaPropsOrArray proto.InternalMessageInfo func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } func (*JSONSchemaPropsOrBool) ProtoMessage() {} func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{20} } func (m *JSONSchemaPropsOrBool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSONSchemaPropsOrBool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSONSchemaPropsOrBool) XXX_Merge(src proto.Message) { xxx_messageInfo_JSONSchemaPropsOrBool.Merge(m, src) } func (m *JSONSchemaPropsOrBool) XXX_Size() int { return m.Size() } func (m *JSONSchemaPropsOrBool) XXX_DiscardUnknown() { xxx_messageInfo_JSONSchemaPropsOrBool.DiscardUnknown(m) } var xxx_messageInfo_JSONSchemaPropsOrBool proto.InternalMessageInfo func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{21} } func (m *JSONSchemaPropsOrStringArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSONSchemaPropsOrStringArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSONSchemaPropsOrStringArray) XXX_Merge(src proto.Message) { xxx_messageInfo_JSONSchemaPropsOrStringArray.Merge(m, src) } func (m *JSONSchemaPropsOrStringArray) XXX_Size() int { return m.Size() } func (m *JSONSchemaPropsOrStringArray) XXX_DiscardUnknown() { xxx_messageInfo_JSONSchemaPropsOrStringArray.DiscardUnknown(m) } var xxx_messageInfo_JSONSchemaPropsOrStringArray proto.InternalMessageInfo func (m *SelectableField) Reset() { *m = SelectableField{} } func (*SelectableField) ProtoMessage() {} func (*SelectableField) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{22} } func (m *SelectableField) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SelectableField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *SelectableField) XXX_Merge(src proto.Message) { xxx_messageInfo_SelectableField.Merge(m, src) } func (m *SelectableField) XXX_Size() int { return m.Size() } func (m *SelectableField) XXX_DiscardUnknown() { xxx_messageInfo_SelectableField.DiscardUnknown(m) } var xxx_messageInfo_SelectableField proto.InternalMessageInfo func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{23} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ServiceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ServiceReference) XXX_Merge(src proto.Message) { xxx_messageInfo_ServiceReference.Merge(m, src) } func (m *ServiceReference) XXX_Size() int { return m.Size() } func (m *ServiceReference) XXX_DiscardUnknown() { xxx_messageInfo_ServiceReference.DiscardUnknown(m) } var xxx_messageInfo_ServiceReference proto.InternalMessageInfo func (m *ValidationRule) Reset() { *m = ValidationRule{} } func (*ValidationRule) ProtoMessage() {} func (*ValidationRule) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{24} } func (m *ValidationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidationRule) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidationRule.Merge(m, src) } func (m *ValidationRule) XXX_Size() int { return m.Size() } func (m *ValidationRule) XXX_DiscardUnknown() { xxx_messageInfo_ValidationRule.DiscardUnknown(m) } var xxx_messageInfo_ValidationRule proto.InternalMessageInfo func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{25} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *WebhookClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *WebhookClientConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_WebhookClientConfig.Merge(m, src) } func (m *WebhookClientConfig) XXX_Size() int { return m.Size() } func (m *WebhookClientConfig) XXX_DiscardUnknown() { xxx_messageInfo_WebhookClientConfig.DiscardUnknown(m) } var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo func (m *WebhookConversion) Reset() { *m = WebhookConversion{} } func (*WebhookConversion) ProtoMessage() {} func (*WebhookConversion) Descriptor() ([]byte, []int) { return fileDescriptor_c5e101a0235c8c62, []int{26} } func (m *WebhookConversion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *WebhookConversion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *WebhookConversion) XXX_Merge(src proto.Message) { xxx_messageInfo_WebhookConversion.Merge(m, src) } func (m *WebhookConversion) XXX_Size() int { return m.Size() } func (m *WebhookConversion) XXX_DiscardUnknown() { xxx_messageInfo_WebhookConversion.DiscardUnknown(m) } var xxx_messageInfo_WebhookConversion proto.InternalMessageInfo func init() { proto.RegisterType((*ConversionRequest)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ConversionRequest") proto.RegisterType((*ConversionResponse)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ConversionResponse") proto.RegisterType((*ConversionReview)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ConversionReview") proto.RegisterType((*CustomResourceColumnDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceColumnDefinition") proto.RegisterType((*CustomResourceConversion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion") proto.RegisterType((*CustomResourceDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition") proto.RegisterType((*CustomResourceDefinitionCondition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition") proto.RegisterType((*CustomResourceDefinitionList)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList") proto.RegisterType((*CustomResourceDefinitionNames)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames") proto.RegisterType((*CustomResourceDefinitionSpec)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec") proto.RegisterType((*CustomResourceDefinitionStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus") proto.RegisterType((*CustomResourceDefinitionVersion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion") proto.RegisterType((*CustomResourceSubresourceScale)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale") proto.RegisterType((*CustomResourceSubresourceStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceStatus") proto.RegisterType((*CustomResourceSubresources)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources") proto.RegisterType((*CustomResourceValidation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation") proto.RegisterType((*ExternalDocumentation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation") proto.RegisterType((*JSON)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON") proto.RegisterType((*JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps") proto.RegisterMapType((JSONSchemaDefinitions)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.DefinitionsEntry") proto.RegisterMapType((JSONSchemaDependencies)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.DependenciesEntry") proto.RegisterMapType((map[string]JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.PatternPropertiesEntry") proto.RegisterMapType((map[string]JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.PropertiesEntry") proto.RegisterType((*JSONSchemaPropsOrArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray") proto.RegisterType((*JSONSchemaPropsOrBool)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool") proto.RegisterType((*JSONSchemaPropsOrStringArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrStringArray") proto.RegisterType((*SelectableField)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.SelectableField") proto.RegisterType((*ServiceReference)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ServiceReference") proto.RegisterType((*ValidationRule)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ValidationRule") proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.WebhookClientConfig") proto.RegisterType((*WebhookConversion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.WebhookConversion") } func init() { proto.RegisterFile("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto", fileDescriptor_c5e101a0235c8c62) } var fileDescriptor_c5e101a0235c8c62 = []byte{ // 3166 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xdb, 0x6f, 0x1b, 0xc7, 0xd5, 0xf7, 0x52, 0x37, 0x6a, 0x24, 0x59, 0xd2, 0xd8, 0xd2, 0xb7, 0x56, 0x6c, 0x51, 0xa6, 0xbf, 0xf8, 0x53, 0x12, 0x87, 0x4a, 0xf4, 0x25, 0x8d, 0x9b, 0x5e, 0x02, 0x51, 0x92, 0x13, 0xc5, 0x92, 0x25, 0x0c, 0x6d, 0x47, 0x49, 0x8a, 0x26, 0x2b, 0xee, 0x90, 0xda, 0x68, 0xb9, 0xbb, 0x9e, 0xd9, 0xd5, 0x05, 0x68, 0x81, 0xa0, 0x45, 0xd0, 0x36, 0x40, 0x9b, 0x3e, 0x14, 0xe9, 0x53, 0x51, 0x14, 0x45, 0x1e, 0xda, 0x87, 0xf6, 0xad, 0xfd, 0x17, 0xf2, 0x52, 0x20, 0x40, 0x81, 0x22, 0x40, 0x01, 0xa2, 0x61, 0xff, 0x81, 0x02, 0x6d, 0x51, 0x54, 0x0f, 0x45, 0x31, 0x97, 0x9d, 0x9d, 0x5d, 0x92, 0xb6, 0x61, 0x51, 0xc9, 0x1b, 0x79, 0xce, 0x99, 0xf3, 0x3b, 0x73, 0xe6, 0xcc, 0x99, 0x33, 0x67, 0x07, 0xbc, 0xb2, 0x77, 0x9d, 0x96, 0x1c, 0x7f, 0xc1, 0x0a, 0x1c, 0x7c, 0x18, 0x62, 0x8f, 0x3a, 0xbe, 0x47, 0x9f, 0xb6, 0x02, 0x87, 0x62, 0xb2, 0x8f, 0xc9, 0x42, 0xb0, 0x57, 0x67, 0x3c, 0x9a, 0x16, 0x58, 0xd8, 0x7f, 0x76, 0xa1, 0x8e, 0x3d, 0x4c, 0xac, 0x10, 0xdb, 0xa5, 0x80, 0xf8, 0xa1, 0x0f, 0xaf, 0x0b, 0x4d, 0xa5, 0x94, 0xe0, 0x5b, 0x4a, 0x53, 0x29, 0xd8, 0xab, 0x33, 0x1e, 0x4d, 0x0b, 0x94, 0xf6, 0x9f, 0x9d, 0x79, 0xba, 0xee, 0x84, 0xbb, 0xd1, 0x4e, 0xa9, 0xea, 0x37, 0x16, 0xea, 0x7e, 0xdd, 0x5f, 0xe0, 0x0a, 0x77, 0xa2, 0x1a, 0xff, 0xc7, 0xff, 0xf0, 0x5f, 0x02, 0x68, 0xe6, 0xb9, 0xc4, 0xe4, 0x86, 0x55, 0xdd, 0x75, 0x3c, 0x4c, 0x8e, 0x12, 0x3b, 0x1b, 0x38, 0xb4, 0x3a, 0x98, 0x37, 0xb3, 0xd0, 0x6d, 0x14, 0x89, 0xbc, 0xd0, 0x69, 0xe0, 0xb6, 0x01, 0x5f, 0x7a, 0xd0, 0x00, 0x5a, 0xdd, 0xc5, 0x0d, 0x2b, 0x3b, 0xae, 0x78, 0x6c, 0x80, 0xc9, 0x65, 0xdf, 0xdb, 0xc7, 0x84, 0x4d, 0x10, 0xe1, 0x7b, 0x11, 0xa6, 0x21, 0x2c, 0x83, 0xbe, 0xc8, 0xb1, 0x4d, 0x63,
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. 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. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 import ( runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConversionRequest) DeepCopyInto(out *ConversionRequest) { *out = *in if in.Objects != nil { in, out := &in.Objects, &out.Objects *out = make([]runtime.RawExtension, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionRequest. func (in *ConversionRequest) DeepCopy() *ConversionRequest { if in == nil { return nil } out := new(ConversionRequest) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConversionResponse) DeepCopyInto(out *ConversionResponse) { *out = *in if in.ConvertedObjects != nil { in, out := &in.ConvertedObjects, &out.ConvertedObjects *out = make([]runtime.RawExtension, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } in.Result.DeepCopyInto(&out.Result) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionResponse. func (in *ConversionResponse) DeepCopy() *ConversionResponse { if in == nil { return nil } out := new(ConversionResponse) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConversionReview) DeepCopyInto(out *ConversionReview) { *out = *in out.TypeMeta = in.TypeMeta if in.Request != nil { in, out := &in.Request, &out.Request *out = new(ConversionRequest) (*in).DeepCopyInto(*out) } if in.Response != nil { in, out := &in.Response, &out.Response *out = new(ConversionResponse) (*in).DeepCopyInto(*out) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionReview. func (in *ConversionReview) DeepCopy() *ConversionReview { if in == nil { return nil } out := new(ConversionReview) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ConversionReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceColumnDefinition) DeepCopyInto(out *CustomResourceColumnDefinition) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceColumnDefinition. func (in *CustomResourceColumnDefinition) DeepCopy() *CustomResourceColumnDefinition { if in == nil { return nil } out := new(CustomResourceColumnDefinition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceConversion) DeepCopyInto(out *CustomResourceConversion) { *out = *in if in.WebhookClientConfig != nil { in, out := &in.WebhookClientConfig, &out.WebhookClientConfig *out = new(WebhookClientConfig) (*in).DeepCopyInto(*out) } if in.ConversionReviewVersions != nil { in, out := &in.ConversionReviewVersions, &out.ConversionReviewVersions *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceConversion. func (in *CustomResourceConversion) DeepCopy() *CustomResourceConversion { if in == nil { return nil } out := new(CustomResourceConversion) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinition) DeepCopyInto(out *CustomResourceDefinition) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinition. func (in *CustomResourceDefinition) DeepCopy() *CustomResourceDefinition { if in == nil { return nil } out := new(CustomResourceDefinition) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *CustomResourceDefinition) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionCondition) DeepCopyInto(out *CustomResourceDefinitionCondition) { *out = *in in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionCondition. func (in *CustomResourceDefinitionCondition) DeepCopy() *CustomResourceDefinitionCondition { if in == nil { return nil } out := new(CustomResourceDefinitionCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionList) DeepCopyInto(out *CustomResourceDefinitionList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]CustomResourceDefinition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionList. func (in *CustomResourceDefinitionList) DeepCopy() *CustomResourceDefinitionList { if in == nil { return nil } out := new(CustomResourceDefinitionList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *CustomResourceDefinitionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionNames) DeepCopyInto(out *CustomResourceDefinitionNames) { *out = *in if in.ShortNames != nil { in, out := &in.ShortNames, &out.ShortNames *out = make([]string, len(*in)) copy(*out, *in) } if in.Categories != nil { in, out := &in.Categories, &out.Categories *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionNames. func (in *CustomResourceDefinitionNames) DeepCopy() *CustomResourceDefinitionNames { if in == nil { return nil } out := new(CustomResourceDefinitionNames) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefinitionSpec) { *out = *in in.Names.DeepCopyInto(&out.Names) if in.Validation != nil { in, out := &in.Validation, &out.Validation *out = new(CustomResourceValidation) (*in).DeepCopyInto(*out) } if in.Subresources != nil { in, out := &in.Subresources, &out.Subresources *out = new(CustomResourceSubresources) (*in).DeepCopyInto(*out) } if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]CustomResourceDefinitionVersion, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.AdditionalPrinterColumns != nil { in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } if in.SelectableFields != nil { in, out := &in.SelectableFields, &out.SelectableFields *out = make([]SelectableField, len(*in)) copy(*out, *in) } if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) (*in).DeepCopyInto(*out) } if in.PreserveUnknownFields != nil { in, out := &in.PreserveUnknownFields, &out.PreserveUnknownFields *out = new(bool) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionSpec. func (in *CustomResourceDefinitionSpec) DeepCopy() *CustomResourceDefinitionSpec { if in == nil { return nil } out := new(CustomResourceDefinitionSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionStatus) DeepCopyInto(out *CustomResourceDefinitionStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]CustomResourceDefinitionCondition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } in.AcceptedNames.DeepCopyInto(&out.AcceptedNames) if in.StoredVersions != nil { in, out := &in.StoredVersions, &out.StoredVersions *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionStatus. func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionStatus { if in == nil { return nil } out := new(CustomResourceDefinitionStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { *out = *in if in.DeprecationWarning != nil { in, out := &in.DeprecationWarning, &out.DeprecationWarning *out = new(string) **out = **in } if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(CustomResourceValidation) (*in).DeepCopyInto(*out) } if in.Subresources != nil { in, out := &in.Subresources, &out.Subresources *out = new(CustomResourceSubresources) (*in).DeepCopyInto(*out) } if in.AdditionalPrinterColumns != nil { in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } if in.SelectableFields != nil { in, out := &in.SelectableFields, &out.SelectableFields *out = make([]SelectableField, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionVersion. func (in *CustomResourceDefinitionVersion) DeepCopy() *CustomResourceDefinitionVersion { if in == nil { return nil } out := new(CustomResourceDefinitionVersion) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceSubresourceScale) DeepCopyInto(out *CustomResourceSubresourceScale) { *out = *in if in.LabelSelectorPath != nil { in, out := &in.LabelSelectorPath, &out.LabelSelectorPath *out = new(string) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceScale. func (in *CustomResourceSubresourceScale) DeepCopy() *CustomResourceSubresourceScale { if in == nil { return nil } out := new(CustomResourceSubresourceScale) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceSubresourceStatus) DeepCopyInto(out *CustomResourceSubresourceStatus) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceStatus. func (in *CustomResourceSubresourceStatus) DeepCopy() *CustomResourceSubresourceStatus { if in == nil { return nil } out := new(CustomResourceSubresourceStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceSubresources) DeepCopyInto(out *CustomResourceSubresources) { *out = *in if in.Status != nil { in, out := &in.Status, &out.Status *out = new(CustomResourceSubresourceStatus) **out = **in } if in.Scale != nil { in, out := &in.Scale, &out.Scale *out = new(CustomResourceSubresourceScale) (*in).DeepCopyInto(*out) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresources. func (in *CustomResourceSubresources) DeepCopy() *CustomResourceSubresources { if in == nil { return nil } out := new(CustomResourceSubresources) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceValidation) DeepCopyInto(out *CustomResourceValidation) { *out = *in if in.OpenAPIV3Schema != nil { in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema *out = (*in).DeepCopy() } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceValidation. func (in *CustomResourceValidation) DeepCopy() *CustomResourceValidation { if in == nil { return nil } out := new(CustomResourceValidation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExternalDocumentation) DeepCopyInto(out *ExternalDocumentation) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalDocumentation. func (in *ExternalDocumentation) DeepCopy() *ExternalDocumentation { if in == nil { return nil } out := new(ExternalDocumentation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSON) DeepCopyInto(out *JSON) { *out = *in if in.Raw != nil { in, out := &in.Raw, &out.Raw *out = make([]byte, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSON. func (in *JSON) DeepCopy() *JSON { if in == nil { return nil } out := new(JSON) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in JSONSchemaDefinitions) DeepCopyInto(out *JSONSchemaDefinitions) { { in := &in *out = make(JSONSchemaDefinitions, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } return } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDefinitions. func (in JSONSchemaDefinitions) DeepCopy() JSONSchemaDefinitions { if in == nil { return nil } out := new(JSONSchemaDefinitions) in.DeepCopyInto(out) return *out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in JSONSchemaDependencies) DeepCopyInto(out *JSONSchemaDependencies) { { in := &in *out = make(JSONSchemaDependencies, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } return } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDependencies. func (in JSONSchemaDependencies) DeepCopy() JSONSchemaDependencies { if in == nil { return nil } out := new(JSONSchemaDependencies) in.DeepCopyInto(out) return *out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaProps) DeepCopyInto(out *JSONSchemaProps) { clone := in.DeepCopy() *out = *clone return } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaPropsOrArray) DeepCopyInto(out *JSONSchemaPropsOrArray) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = (*in).DeepCopy() } if in.JSONSchemas != nil { in, out := &in.JSONSchemas, &out.JSONSchemas *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrArray. func (in *JSONSchemaPropsOrArray) DeepCopy() *JSONSchemaPropsOrArray { if in == nil { return nil } out := new(JSONSchemaPropsOrArray) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaPropsOrBool) DeepCopyInto(out *JSONSchemaPropsOrBool) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = (*in).DeepCopy() } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrBool. func (in *JSONSchemaPropsOrBool) DeepCopy() *JSONSchemaPropsOrBool { if in == nil { return nil } out := new(JSONSchemaPropsOrBool) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaPropsOrStringArray) DeepCopyInto(out *JSONSchemaPropsOrStringArray) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = (*in).DeepCopy() } if in.Property != nil { in, out := &in.Property, &out.Property *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrStringArray. func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray { if in == nil { return nil } out := new(JSONSchemaPropsOrStringArray) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SelectableField) DeepCopyInto(out *SelectableField) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. func (in *SelectableField) DeepCopy() *SelectableField { if in == nil { return nil } out := new(SelectableField) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { *out = *in if in.Path != nil { in, out := &in.Path, &out.Path *out = new(string) **out = **in } if in.Port != nil { in, out := &in.Port, &out.Port *out = new(int32) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. func (in *ServiceReference) DeepCopy() *ServiceReference { if in == nil { return nil } out := new(ServiceReference) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidationRule) DeepCopyInto(out *ValidationRule) { *out = *in if in.Reason != nil { in, out := &in.Reason, &out.Reason *out = new(FieldValueErrorReason) **out = **in } if in.OptionalOldSelf != nil { in, out := &in.OptionalOldSelf, &out.OptionalOldSelf *out = new(bool) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRule. func (in *ValidationRule) DeepCopy() *ValidationRule { if in == nil { return nil } out := new(ValidationRule) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in ValidationRules) DeepCopyInto(out *ValidationRules) { { in := &in *out = make(ValidationRules, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } return } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRules. func (in ValidationRules) DeepCopy() ValidationRules { if in == nil { return nil } out := new(ValidationRules) in.DeepCopyInto(out) return *out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { *out = *in if in.URL != nil { in, out := &in.URL, &out.URL *out = new(string) **out = **in } if in.Service != nil { in, out := &in.Service, &out.Service *out = new(ServiceReference) (*in).DeepCopyInto(*out) } if in.CABundle != nil { in, out := &in.CABundle, &out.CABundle *out = make([]byte, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { if in == nil { return nil } out := new(WebhookClientConfig) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" ) // ConversionStrategyType describes different conversion types. type ConversionStrategyType string const ( // KubeAPIApprovedAnnotation is an annotation that must be set to create a CRD for the k8s.io, *.k8s.io, kubernetes.io, or *.kubernetes.io namespaces. // The value should be a link to a URL where the current spec was approved, so updates to the spec should also update the URL. // If the API is unapproved, you may set the annotation to a string starting with `"unapproved"`. For instance, `"unapproved, temporarily squatting"` or `"unapproved, experimental-only"`. This is discouraged. KubeAPIApprovedAnnotation = "api-approved.kubernetes.io" // NoneConverter is a converter that only sets apiversion of the CR and leave everything else unchanged. NoneConverter ConversionStrategyType = "None" // WebhookConverter is a converter that calls to an external webhook to convert the CR. WebhookConverter ConversionStrategyType = "Webhook" ) // CustomResourceDefinitionSpec describes how a user wants their resource to appear type CustomResourceDefinitionSpec struct { // group is the API group of the defined custom resource. // The custom resources are served under `/apis/<group>/...`. // Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`). Group string `json:"group" protobuf:"bytes,1,opt,name=group"` // version is the API version of the defined custom resource. // The custom resources are served under `/apis/<group>/<version>/...`. // Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. // Optional if `versions` is specified. // Deprecated: use `versions` instead. // +optional Version string `json:"version,omitempty" protobuf:"bytes,2,opt,name=version"` // names specify the resource and kind names for the custom resource. Names CustomResourceDefinitionNames `json:"names" protobuf:"bytes,3,opt,name=names"` // scope indicates whether the defined custom resource is cluster- or namespace-scoped. // Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`. Scope ResourceScope `json:"scope" protobuf:"bytes,4,opt,name=scope,casttype=ResourceScope"` // validation describes the schema used for validation and pruning of the custom resource. // If present, this validation schema is used to validate all versions. // Top-level and per-version schemas are mutually exclusive. // +optional Validation *CustomResourceValidation `json:"validation,omitempty" protobuf:"bytes,5,opt,name=validation"` // subresources specify what subresources the defined custom resource has. // If present, this field configures subresources for all versions. // Top-level and per-version subresources are mutually exclusive. // +optional Subresources *CustomResourceSubresources `json:"subresources,omitempty" protobuf:"bytes,6,opt,name=subresources"` // versions is the list of all API versions of the defined custom resource. // Optional if `version` is specified. // The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. // Version names are used to compute the order in which served versions are listed in API discovery. // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. // +optional // +listType=atomic Versions []CustomResourceDefinitionVersion `json:"versions,omitempty" protobuf:"bytes,7,rep,name=versions"` // additionalPrinterColumns specifies additional columns returned in Table output. // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. // If present, this field configures columns for all versions. // Top-level and per-version columns are mutually exclusive. // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. // +optional // +listType=atomic AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,8,rep,name=additionalPrinterColumns"` // selectableFields specifies paths to fields that may be used as field selectors. // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors // // +featureGate=CustomResourceFieldSelectors // +optional // +listType=atomic SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,11,rep,name=selectableFields"` // conversion defines conversion settings for the CRD. // +optional Conversion *CustomResourceConversion `json:"conversion,omitempty" protobuf:"bytes,9,opt,name=conversion"` // preserveUnknownFields indicates that object fields which are not specified // in the OpenAPI schema should be preserved when persisting to storage. // apiVersion, kind, metadata and known fields inside metadata are always preserved. // If false, schemas must be defined for all versions. // Defaults to true in v1beta for backwards compatibility. // Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified // in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. // +optional PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty" protobuf:"varint,10,opt,name=preserveUnknownFields"` } // CustomResourceConversion describes how to convert different versions of a CR. type CustomResourceConversion struct { // strategy specifies how custom resources are converted between versions. Allowed values are: // - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. // - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set. Strategy ConversionStrategyType `json:"strategy" protobuf:"bytes,1,name=strategy"` // webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. // Required when `strategy` is set to `Webhook`. // +optional WebhookClientConfig *WebhookClientConfig `json:"webhookClientConfig,omitempty" protobuf:"bytes,2,name=webhookClientConfig"` // conversionReviewVersions is an ordered list of preferred `ConversionReview` // versions the Webhook expects. The API server will use the first version in // the list which it supports. If none of the versions specified in this list // are supported by API server, conversion will fail for the custom resource. // If a persisted Webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail. // Defaults to `["v1beta1"]`. // +optional // +listType=atomic ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty" protobuf:"bytes,3,rep,name=conversionReviewVersions"` } // WebhookClientConfig contains the information to make a TLS connection with the webhook. type WebhookClientConfig struct { // url gives the location of the webhook, in standard URL form // (`scheme://host:port/path`). Exactly one of `url` or `service` // must be specified. // // The `host` should not refer to a service running in the cluster; use // the `service` field instead. The host might be resolved via external // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve // in-cluster DNS as that would be a layering violation). `host` may // also be an IP address. // // Please note that using `localhost` or `127.0.0.1` as a `host` is // risky unless you take great care to run this webhook on all hosts // which run an apiserver which might need to make calls to this // webhook. Such installs are likely to be non-portable, i.e., not easy // to turn up in a new cluster. // // The scheme must be "https"; the URL must begin with "https://". // // A path is optional, and if present may be any string permissible in // a URL. You may use the path to pass an arbitrary string to the // webhook, for example, a cluster identifier. // // Attempting to use a user or basic auth e.g. "user:password@" is not // allowed. Fragments ("#...") and query parameters ("?...") are not // allowed, either. // // +optional URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"` // service is a reference to the service for this webhook. Either // service or url must be specified. // // If the webhook is running within the cluster, then you should use `service`. // // +optional Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"` // caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. // If unspecified, system trust roots on the apiserver are used. // +optional CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,2,opt,name=caBundle"` } // ServiceReference holds a reference to Service.legacy.k8s.io type ServiceReference struct { // namespace is the namespace of the service. // Required Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` // name is the name of the service. // Required Name string `json:"name" protobuf:"bytes,2,opt,name=name"` // path is an optional URL path at which the webhook will be contacted. // +optional Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"` // port is an optional service port at which the webhook will be contacted. // `port` should be a valid port number (1-65535, inclusive). // Defaults to 443 for backward compatibility. // +optional Port *int32 `json:"port,omitempty" protobuf:"varint,4,opt,name=port"` } // CustomResourceDefinitionVersion describes a version for CRD. type CustomResourceDefinitionVersion struct { // name is the version name, e.g. “v1”, “v2beta1”, etc. // The custom resources are served under this version at `/apis/<group>/<version>/...` if `served` is true. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // served is a flag enabling/disabling this version from being served via REST APIs Served bool `json:"served" protobuf:"varint,2,opt,name=served"` // storage indicates this version should be used when persisting custom resources to storage. // There must be exactly one version with storage=true. Storage bool `json:"storage" protobuf:"varint,3,opt,name=storage"` // deprecated indicates this version of the custom resource API is deprecated. // When set to true, API requests to this version receive a warning header in the server response. // Defaults to false. // +optional Deprecated bool `json:"deprecated,omitempty" protobuf:"varint,7,opt,name=deprecated"` // deprecationWarning overrides the default warning returned to API clients. // May only be set when `deprecated` is true. // The default warning indicates this version is deprecated and recommends use // of the newest served version of equal or greater stability, if one exists. // +optional DeprecationWarning *string `json:"deprecationWarning,omitempty" protobuf:"bytes,8,opt,name=deprecationWarning"` // schema describes the schema used for validation and pruning of this version of the custom resource. // Top-level and per-version schemas are mutually exclusive. // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead). // +optional Schema *CustomResourceValidation `json:"schema,omitempty" protobuf:"bytes,4,opt,name=schema"` // subresources specify what subresources this version of the defined custom resource have. // Top-level and per-version subresources are mutually exclusive. // Per-version subresources must not all be set to identical values (top-level subresources should be used instead). // +optional Subresources *CustomResourceSubresources `json:"subresources,omitempty" protobuf:"bytes,5,opt,name=subresources"` // additionalPrinterColumns specifies additional columns returned in Table output. // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. // Top-level and per-version columns are mutually exclusive. // Per-version columns must not all be set to identical values (top-level columns should be used instead). // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. // +optional // +listType=atomic AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,6,rep,name=additionalPrinterColumns"` // selectableFields specifies paths to fields that may be used as field selectors. // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors // // +featureGate=CustomResourceFieldSelectors // +optional // +listType=atomic SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,9,rep,name=selectableFields"` } // SelectableField specifies the JSON path of a field that may be used with field selectors. type SelectableField struct { // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a // field selector value. // Only JSON paths without the array notation are allowed. // Must point to a field of type string, boolean or integer. Types with enum values // and strings with formats are allowed. // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. // Must not point to metdata fields. // Required. JSONPath string `json:"jsonPath" protobuf:"bytes,1,opt,name=jsonPath"` } // CustomResourceColumnDefinition specifies a column for server side printing. type CustomResourceColumnDefinition struct { // name is a human readable name for the column. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // type is an OpenAPI type definition for this column. // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. Type string `json:"type" protobuf:"bytes,2,opt,name=type"` // format is an optional OpenAPI type definition for this column. The 'name' format is applied // to the primary identifier column to assist in clients identifying column is the resource name. // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. // +optional Format string `json:"format,omitempty" protobuf:"bytes,3,opt,name=format"` // description is a human readable description of this column. // +optional Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"` // priority is an integer defining the relative importance of this column compared to others. Lower // numbers are considered higher priority. Columns that may be omitted in limited space scenarios // should be given a priority greater than 0. // +optional Priority int32 `json:"priority,omitempty" protobuf:"bytes,5,opt,name=priority"` // JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against // each custom resource to produce the value for this column. JSONPath string `json:"JSONPath" protobuf:"bytes,6,opt,name=JSONPath"` } // CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition type CustomResourceDefinitionNames struct { // plural is the plural name of the resource to serve. // The custom resources are served under `/apis/<group>/<version>/.../<plural>`. // Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`). // Must be all lowercase. Plural string `json:"plural" protobuf:"bytes,1,opt,name=plural"` // singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. // +optional Singular string `json:"singular,omitempty" protobuf:"bytes,2,opt,name=singular"` // shortNames are short names for the resource, exposed in API discovery documents, // and used by clients to support invocations like `kubectl get <shortname>`. // It must be all lowercase. // +optional // +listType=atomic ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"` // kind is the serialized kind of the resource. It is normally CamelCase and singular. // Custom resource instances will use this value as the `kind` attribute in API calls. Kind string `json:"kind" protobuf:"bytes,4,opt,name=kind"` // listKind is the serialized kind of the list for this resource. Defaults to "`kind`List". // +optional ListKind string `json:"listKind,omitempty" protobuf:"bytes,5,opt,name=listKind"` // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). // This is published in API discovery documents, and used by clients to support invocations like // `kubectl get all`. // +optional // +listType=atomic Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"` } // ResourceScope is an enum defining the different scopes available to a custom resource type ResourceScope string const ( ClusterScoped ResourceScope = "Cluster" NamespaceScoped ResourceScope = "Namespaced" ) type ConditionStatus string // These are valid condition statuses. "ConditionTrue" means a resource is in the condition. // "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes // can't decide if a resource is in the condition or not. In the future, we could add other // intermediate conditions, e.g. ConditionDegraded. const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" ) // CustomResourceDefinitionConditionType is a valid value for CustomResourceDefinitionCondition.Type type CustomResourceDefinitionConditionType string const ( // Established means that the resource has become active. A resource is established when all names are // accepted without a conflict for the first time. A resource stays established until deleted, even during // a later NamesAccepted due to changed names. Note that not all names can be changed. Established CustomResourceDefinitionConditionType = "Established" // NamesAccepted means the names chosen for this CustomResourceDefinition do not conflict with others in // the group and are therefore accepted. NamesAccepted CustomResourceDefinitionConditionType = "NamesAccepted" // NonStructuralSchema means that one or more OpenAPI schema is not structural. // // A schema is structural if it specifies types for all values, with the only exceptions of those with // - x-kubernetes-int-or-string: true — for fields which can be integer or string // - x-kubernetes-preserve-unknown-fields: true — for raw, unspecified JSON values // and there is no type, additionalProperties, default, nullable or x-kubernetes-* vendor extenions // specified under allOf, anyOf, oneOf or not. // // Non-structural schemas will not be allowed anymore in v1 API groups. Moreover, new features will not be // available for non-structural CRDs: // - pruning // - defaulting // - read-only // - OpenAPI publishing // - webhook conversion NonStructuralSchema CustomResourceDefinitionConditionType = "NonStructuralSchema" // Terminating means that the CustomResourceDefinition has been deleted and is cleaning up. Terminating CustomResourceDefinitionConditionType = "Terminating" // KubernetesAPIApprovalPolicyConformant indicates that an API in *.k8s.io or *.kubernetes.io is or is not approved. For CRDs // outside those groups, this condition will not be set. For CRDs inside those groups, the condition will // be true if .metadata.annotations["api-approved.kubernetes.io"] is set to a URL, otherwise it will be false. // See https://github.com/kubernetes/enhancements/pull/1111 for more details. KubernetesAPIApprovalPolicyConformant CustomResourceDefinitionConditionType = "KubernetesAPIApprovalPolicyConformant" ) // CustomResourceDefinitionCondition contains details for the current condition of this pod. type CustomResourceDefinitionCondition struct { // type is the type of the condition. Types include Established, NamesAccepted and Terminating. Type CustomResourceDefinitionConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=CustomResourceDefinitionConditionType"` // status is the status of the condition. // Can be True, False, Unknown. Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` // lastTransitionTime last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` // reason is a unique, one-word, CamelCase reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` // message is a human-readable message indicating details about last transition. // +optional Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` } // CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition type CustomResourceDefinitionStatus struct { // conditions indicate state for particular aspects of a CustomResourceDefinition // +optional // +listType=map // +listMapKey=type Conditions []CustomResourceDefinitionCondition `json:"conditions" protobuf:"bytes,1,opt,name=conditions"` // acceptedNames are the names that are actually being used to serve discovery. // They may be different than the names in spec. // +optional AcceptedNames CustomResourceDefinitionNames `json:"acceptedNames" protobuf:"bytes,2,opt,name=acceptedNames"` // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these // versions allows a migration path for stored versions in etcd. The field is mutable // so a migration controller can finish a migration to another version (ensuring // no old objects are left in storage), and then remove the rest of the // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. // +optional // +listType=atomic StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` } // CustomResourceCleanupFinalizer is the name of the finalizer which will delete instances of // a CustomResourceDefinition const CustomResourceCleanupFinalizer = "customresourcecleanup.apiextensions.k8s.io" // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.7 // +k8s:prerelease-lifecycle-gen:deprecated=1.16 // +k8s:prerelease-lifecycle-gen:removed=1.22 // +k8s:prerelease-lifecycle-gen:replacement=apiextensions.k8s.io,v1,CustomResourceDefinition // CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format // <.spec.name>.<.spec.group>. // Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead. type CustomResourceDefinition struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // spec describes how the user wants the resources to appear Spec CustomResourceDefinitionSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` // status indicates the actual state of the CustomResourceDefinition // +optional Status CustomResourceDefinitionStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.7 // +k8s:prerelease-lifecycle-gen:deprecated=1.16 // +k8s:prerelease-lifecycle-gen:removed=1.22 // +k8s:prerelease-lifecycle-gen:replacement=apiextensions.k8s.io,v1,CustomResourceDefinitionList // CustomResourceDefinitionList is a list of CustomResourceDefinition objects. type CustomResourceDefinitionList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items list individual CustomResourceDefinition objects Items []CustomResourceDefinition `json:"items" protobuf:"bytes,2,rep,name=items"` } // CustomResourceValidation is a list of validation methods for CustomResources. type CustomResourceValidation struct { // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. // +optional OpenAPIV3Schema *JSONSchemaProps `json:"openAPIV3Schema,omitempty" protobuf:"bytes,1,opt,name=openAPIV3Schema"` } // CustomResourceSubresources defines the status and scale subresources for CustomResources. type CustomResourceSubresources struct { // status indicates the custom resource should serve a `/status` subresource. // When enabled: // 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. // 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. // +optional Status *CustomResourceSubresourceStatus `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"` // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. // +optional Scale *CustomResourceSubresourceScale `json:"scale,omitempty" protobuf:"bytes,2,opt,name=scale"` } // CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. // Status is represented by the `.status` JSON path inside of a CustomResource. When set, // * exposes a /status subresource for the custom resource // * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza // * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza type CustomResourceSubresourceStatus struct{} // CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. type CustomResourceSubresourceScale struct { // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under `.spec`. // If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. SpecReplicasPath string `json:"specReplicasPath" protobuf:"bytes,1,name=specReplicasPath"` // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under `.status`. // If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource // will default to 0. StatusReplicasPath string `json:"statusReplicasPath" protobuf:"bytes,2,opt,name=statusReplicasPath"` // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under `.status` or `.spec`. // Must be set to work with HorizontalPodAutoscaler. // The field pointed by this JSON path must be a string field (not a complex selector struct) // which contains a serialized label selector in string form. // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource // If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` // subresource will default to the empty string. // +optional LabelSelectorPath *string `json:"labelSelectorPath,omitempty" protobuf:"bytes,3,opt,name=labelSelectorPath"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.13 // +k8s:prerelease-lifecycle-gen:deprecated=1.19 // This API is never served. It is used for outbound requests from apiservers. This will ensure it never gets served accidentally // and having the generator against this group will protect future APIs which may be served. // +k8s:prerelease-lifecycle-gen:replacement=apiextensions.k8s.io,v1,ConversionReview // ConversionReview describes a conversion request/response. type ConversionReview struct { metav1.TypeMeta `json:",inline"` // request describes the attributes for the conversion request. // +optional Request *ConversionRequest `json:"request,omitempty" protobuf:"bytes,1,opt,name=request"` // response describes the attributes for the conversion response. // +optional Response *ConversionResponse `json:"response,omitempty" protobuf:"bytes,2,opt,name=response"` } // ConversionRequest describes the conversion request parameters. type ConversionRequest struct { // uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are // otherwise identical (parallel requests, etc). // The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"` // desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1" DesiredAPIVersion string `json:"desiredAPIVersion" protobuf:"bytes,2,name=desiredAPIVersion"` // objects is the list of custom resource objects to be converted. // +listType=atomic Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"` } // ConversionResponse describes a conversion response. type ConversionResponse struct { // uid is an identifier for the individual request/response. // This should be copied over from the corresponding `request.uid`. UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"` // convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. // +listType=atomic ConvertedObjects []runtime.RawExtension `json:"convertedObjects" protobuf:"bytes,2,rep,name=convertedObjects"` // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. 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. */ // Code generated by conversion-gen. DO NOT EDIT. package v1beta1 import ( unsafe "unsafe" apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" ) func init() { localSchemeBuilder.Register(RegisterConversions) } // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { if err := s.AddGeneratedConversionFunc((*CustomResourceColumnDefinition)(nil), (*apiextensions.CustomResourceColumnDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(a.(*CustomResourceColumnDefinition), b.(*apiextensions.CustomResourceColumnDefinition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceColumnDefinition)(nil), (*CustomResourceColumnDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(a.(*apiextensions.CustomResourceColumnDefinition), b.(*CustomResourceColumnDefinition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceConversion)(nil), (*apiextensions.CustomResourceConversion)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(a.(*CustomResourceConversion), b.(*apiextensions.CustomResourceConversion), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceConversion)(nil), (*CustomResourceConversion)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion(a.(*apiextensions.CustomResourceConversion), b.(*CustomResourceConversion), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinition)(nil), (*apiextensions.CustomResourceDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(a.(*CustomResourceDefinition), b.(*apiextensions.CustomResourceDefinition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinition)(nil), (*CustomResourceDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(a.(*apiextensions.CustomResourceDefinition), b.(*CustomResourceDefinition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionCondition)(nil), (*apiextensions.CustomResourceDefinitionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(a.(*CustomResourceDefinitionCondition), b.(*apiextensions.CustomResourceDefinitionCondition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionCondition)(nil), (*CustomResourceDefinitionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(a.(*apiextensions.CustomResourceDefinitionCondition), b.(*CustomResourceDefinitionCondition), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionList)(nil), (*apiextensions.CustomResourceDefinitionList)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(a.(*CustomResourceDefinitionList), b.(*apiextensions.CustomResourceDefinitionList), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionList)(nil), (*CustomResourceDefinitionList)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(a.(*apiextensions.CustomResourceDefinitionList), b.(*CustomResourceDefinitionList), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionNames)(nil), (*apiextensions.CustomResourceDefinitionNames)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(a.(*CustomResourceDefinitionNames), b.(*apiextensions.CustomResourceDefinitionNames), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionNames)(nil), (*CustomResourceDefinitionNames)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(a.(*apiextensions.CustomResourceDefinitionNames), b.(*CustomResourceDefinitionNames), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionSpec)(nil), (*apiextensions.CustomResourceDefinitionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(a.(*CustomResourceDefinitionSpec), b.(*apiextensions.CustomResourceDefinitionSpec), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionSpec)(nil), (*CustomResourceDefinitionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(a.(*apiextensions.CustomResourceDefinitionSpec), b.(*CustomResourceDefinitionSpec), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionStatus)(nil), (*apiextensions.CustomResourceDefinitionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(a.(*CustomResourceDefinitionStatus), b.(*apiextensions.CustomResourceDefinitionStatus), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionStatus)(nil), (*CustomResourceDefinitionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(a.(*apiextensions.CustomResourceDefinitionStatus), b.(*CustomResourceDefinitionStatus), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionVersion)(nil), (*apiextensions.CustomResourceDefinitionVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(a.(*CustomResourceDefinitionVersion), b.(*apiextensions.CustomResourceDefinitionVersion), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionVersion)(nil), (*CustomResourceDefinitionVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion(a.(*apiextensions.CustomResourceDefinitionVersion), b.(*CustomResourceDefinitionVersion), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceSubresourceScale)(nil), (*apiextensions.CustomResourceSubresourceScale)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(a.(*CustomResourceSubresourceScale), b.(*apiextensions.CustomResourceSubresourceScale), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresourceScale)(nil), (*CustomResourceSubresourceScale)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale(a.(*apiextensions.CustomResourceSubresourceScale), b.(*CustomResourceSubresourceScale), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceSubresourceStatus)(nil), (*apiextensions.CustomResourceSubresourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(a.(*CustomResourceSubresourceStatus), b.(*apiextensions.CustomResourceSubresourceStatus), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresourceStatus)(nil), (*CustomResourceSubresourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus(a.(*apiextensions.CustomResourceSubresourceStatus), b.(*CustomResourceSubresourceStatus), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceSubresources)(nil), (*apiextensions.CustomResourceSubresources)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(a.(*CustomResourceSubresources), b.(*apiextensions.CustomResourceSubresources), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresources)(nil), (*CustomResourceSubresources)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources(a.(*apiextensions.CustomResourceSubresources), b.(*CustomResourceSubresources), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*CustomResourceValidation)(nil), (*apiextensions.CustomResourceValidation)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(a.(*CustomResourceValidation), b.(*apiextensions.CustomResourceValidation), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceValidation)(nil), (*CustomResourceValidation)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_CustomResourceValidation_To_v1beta1_CustomResourceValidation(a.(*apiextensions.CustomResourceValidation), b.(*CustomResourceValidation), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*ExternalDocumentation)(nil), (*apiextensions.ExternalDocumentation)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(a.(*ExternalDocumentation), b.(*apiextensions.ExternalDocumentation), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.ExternalDocumentation)(nil), (*ExternalDocumentation)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_ExternalDocumentation_To_v1beta1_ExternalDocumentation(a.(*apiextensions.ExternalDocumentation), b.(*ExternalDocumentation), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*JSONSchemaProps)(nil), (*apiextensions.JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(a.(*JSONSchemaProps), b.(*apiextensions.JSONSchemaProps), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrArray)(nil), (*apiextensions.JSONSchemaPropsOrArray)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(a.(*JSONSchemaPropsOrArray), b.(*apiextensions.JSONSchemaPropsOrArray), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrArray)(nil), (*JSONSchemaPropsOrArray)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_JSONSchemaPropsOrArray_To_v1beta1_JSONSchemaPropsOrArray(a.(*apiextensions.JSONSchemaPropsOrArray), b.(*JSONSchemaPropsOrArray), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrBool)(nil), (*apiextensions.JSONSchemaPropsOrBool)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(a.(*JSONSchemaPropsOrBool), b.(*apiextensions.JSONSchemaPropsOrBool), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrBool)(nil), (*JSONSchemaPropsOrBool)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_JSONSchemaPropsOrBool_To_v1beta1_JSONSchemaPropsOrBool(a.(*apiextensions.JSONSchemaPropsOrBool), b.(*JSONSchemaPropsOrBool), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrStringArray)(nil), (*apiextensions.JSONSchemaPropsOrStringArray)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(a.(*JSONSchemaPropsOrStringArray), b.(*apiextensions.JSONSchemaPropsOrStringArray), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrStringArray)(nil), (*JSONSchemaPropsOrStringArray)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray(a.(*apiextensions.JSONSchemaPropsOrStringArray), b.(*JSONSchemaPropsOrStringArray), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*SelectableField)(nil), (*apiextensions.SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_SelectableField_To_apiextensions_SelectableField(a.(*SelectableField), b.(*apiextensions.SelectableField), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.SelectableField)(nil), (*SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_SelectableField_To_v1beta1_SelectableField(a.(*apiextensions.SelectableField), b.(*SelectableField), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*ServiceReference)(nil), (*apiextensions.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_ServiceReference_To_apiextensions_ServiceReference(a.(*ServiceReference), b.(*apiextensions.ServiceReference), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.ServiceReference)(nil), (*ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_ServiceReference_To_v1beta1_ServiceReference(a.(*apiextensions.ServiceReference), b.(*ServiceReference), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*ValidationRule)(nil), (*apiextensions.ValidationRule)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_ValidationRule_To_apiextensions_ValidationRule(a.(*ValidationRule), b.(*apiextensions.ValidationRule), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.ValidationRule)(nil), (*ValidationRule)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_ValidationRule_To_v1beta1_ValidationRule(a.(*apiextensions.ValidationRule), b.(*ValidationRule), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*WebhookClientConfig)(nil), (*apiextensions.WebhookClientConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(a.(*WebhookClientConfig), b.(*apiextensions.WebhookClientConfig), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*apiextensions.WebhookClientConfig)(nil), (*WebhookClientConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_WebhookClientConfig_To_v1beta1_WebhookClientConfig(a.(*apiextensions.WebhookClientConfig), b.(*WebhookClientConfig), scope) }); err != nil { return err } if err := s.AddConversionFunc((*apiextensions.JSONSchemaProps)(nil), (*JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(a.(*apiextensions.JSONSchemaProps), b.(*JSONSchemaProps), scope) }); err != nil { return err } if err := s.AddConversionFunc((*apiextensions.JSON)(nil), (*JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_apiextensions_JSON_To_v1beta1_JSON(a.(*apiextensions.JSON), b.(*JSON), scope) }); err != nil { return err } if err := s.AddConversionFunc((*JSON)(nil), (*apiextensions.JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_JSON_To_apiextensions_JSON(a.(*JSON), b.(*apiextensions.JSON), scope) }); err != nil { return err } return nil } func autoConvert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in *CustomResourceColumnDefinition, out *apiextensions.CustomResourceColumnDefinition, s conversion.Scope) error { out.Name = in.Name out.Type = in.Type out.Format = in.Format out.Description = in.Description out.Priority = in.Priority out.JSONPath = in.JSONPath return nil } // Convert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition is an autogenerated conversion function. func Convert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in *CustomResourceColumnDefinition, out *apiextensions.CustomResourceColumnDefinition, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in, out, s) } func autoConvert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(in *apiextensions.CustomResourceColumnDefinition, out *CustomResourceColumnDefinition, s conversion.Scope) error { out.Name = in.Name out.Type = in.Type out.Format = in.Format out.Description = in.Description out.Priority = in.Priority out.JSONPath = in.JSONPath return nil } // Convert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition is an autogenerated conversion function. func Convert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(in *apiextensions.CustomResourceColumnDefinition, out *CustomResourceColumnDefinition, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(in, out, s) } func autoConvert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in *CustomResourceConversion, out *apiextensions.CustomResourceConversion, s conversion.Scope) error { out.Strategy = apiextensions.ConversionStrategyType(in.Strategy) if in.WebhookClientConfig != nil { in, out := &in.WebhookClientConfig, &out.WebhookClientConfig *out = new(apiextensions.WebhookClientConfig) if err := Convert_v1beta1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(*in, *out, s); err != nil { return err } } else { out.WebhookClientConfig = nil } out.ConversionReviewVersions = *(*[]string)(unsafe.Pointer(&in.ConversionReviewVersions)) return nil } // Convert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion is an autogenerated conversion function. func Convert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in *CustomResourceConversion, out *apiextensions.CustomResourceConversion, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in, out, s) } func autoConvert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion(in *apiextensions.CustomResourceConversion, out *CustomResourceConversion, s conversion.Scope) error { out.Strategy = ConversionStrategyType(in.Strategy) if in.WebhookClientConfig != nil { in, out := &in.WebhookClientConfig, &out.WebhookClientConfig *out = new(WebhookClientConfig) if err := Convert_apiextensions_WebhookClientConfig_To_v1beta1_WebhookClientConfig(*in, *out, s); err != nil { return err } } else { out.WebhookClientConfig = nil } out.ConversionReviewVersions = *(*[]string)(unsafe.Pointer(&in.ConversionReviewVersions)) return nil } // Convert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion is an autogenerated conversion function. func Convert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion(in *apiextensions.CustomResourceConversion, out *CustomResourceConversion, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(&in.Spec, &out.Spec, s); err != nil { return err } if err := Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } // Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition is an autogenerated conversion function. func Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(in *apiextensions.CustomResourceDefinition, out *CustomResourceDefinition, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(&in.Spec, &out.Spec, s); err != nil { return err } if err := Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } // Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(in *apiextensions.CustomResourceDefinition, out *CustomResourceDefinition, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in *CustomResourceDefinitionCondition, out *apiextensions.CustomResourceDefinitionCondition, s conversion.Scope) error { out.Type = apiextensions.CustomResourceDefinitionConditionType(in.Type) out.Status = apiextensions.ConditionStatus(in.Status) out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil } // Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition is an autogenerated conversion function. func Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in *CustomResourceDefinitionCondition, out *apiextensions.CustomResourceDefinitionCondition, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(in *apiextensions.CustomResourceDefinitionCondition, out *CustomResourceDefinitionCondition, s conversion.Scope) error { out.Type = CustomResourceDefinitionConditionType(in.Type) out.Status = ConditionStatus(in.Status) out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil } // Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(in *apiextensions.CustomResourceDefinitionCondition, out *CustomResourceDefinitionCondition, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in *CustomResourceDefinitionList, out *apiextensions.CustomResourceDefinitionList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]apiextensions.CustomResourceDefinition, len(*in)) for i := range *in { if err := Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(&(*in)[i], &(*out)[i], s); err != nil { return err } } } else { out.Items = nil } return nil } // Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList is an autogenerated conversion function. func Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in *CustomResourceDefinitionList, out *apiextensions.CustomResourceDefinitionList, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(in *apiextensions.CustomResourceDefinitionList, out *CustomResourceDefinitionList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]CustomResourceDefinition, len(*in)) for i := range *in { if err := Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(&(*in)[i], &(*out)[i], s); err != nil { return err } } } else { out.Items = nil } return nil } // Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(in *apiextensions.CustomResourceDefinitionList, out *CustomResourceDefinitionList, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in *CustomResourceDefinitionNames, out *apiextensions.CustomResourceDefinitionNames, s conversion.Scope) error { out.Plural = in.Plural out.Singular = in.Singular out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) out.Kind = in.Kind out.ListKind = in.ListKind out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories)) return nil } // Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames is an autogenerated conversion function. func Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in *CustomResourceDefinitionNames, out *apiextensions.CustomResourceDefinitionNames, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(in *apiextensions.CustomResourceDefinitionNames, out *CustomResourceDefinitionNames, s conversion.Scope) error { out.Plural = in.Plural out.Singular = in.Singular out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) out.Kind = in.Kind out.ListKind = in.ListKind out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories)) return nil } // Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(in *apiextensions.CustomResourceDefinitionNames, out *CustomResourceDefinitionNames, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error { out.Group = in.Group out.Version = in.Version if err := Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(&in.Names, &out.Names, s); err != nil { return err } out.Scope = apiextensions.ResourceScope(in.Scope) if in.Validation != nil { in, out := &in.Validation, &out.Validation *out = new(apiextensions.CustomResourceValidation) if err := Convert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(*in, *out, s); err != nil { return err } } else { out.Validation = nil } out.Subresources = (*apiextensions.CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]apiextensions.CustomResourceDefinitionVersion, len(*in)) for i := range *in { if err := Convert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(&(*in)[i], &(*out)[i], s); err != nil { return err } } } else { out.Versions = nil } out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) out.SelectableFields = *(*[]apiextensions.SelectableField)(unsafe.Pointer(&in.SelectableFields)) if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(apiextensions.CustomResourceConversion) if err := Convert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(*in, *out, s); err != nil { return err } } else { out.Conversion = nil } out.PreserveUnknownFields = (*bool)(unsafe.Pointer(in.PreserveUnknownFields)) return nil } // Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec is an autogenerated conversion function.
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/register.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/register.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) const GroupName = "apiextensions.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} // Kind takes an unqualified kind and returns back a Group qualified GroupKind func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns back a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) localSchemeBuilder = &SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CustomResourceDefinition{}, &CustomResourceDefinitionList{}, &ConversionReview{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } func init() { // We only register manually written functions here. The registration of the // generated functions takes place in the generated files. The separation // makes the code compile even when the generated files are missing. localSchemeBuilder.Register(addDefaultingFuncs) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/conversion.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/conversion.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package v1beta1 import ( "bytes" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/util/json" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" ) func Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(in *apiextensions.JSONSchemaProps, out *JSONSchemaProps, s conversion.Scope) error { if err := autoConvert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(in, out, s); err != nil { return err } if in.Default != nil && *(in.Default) == nil { out.Default = nil } if in.Example != nil && *(in.Example) == nil { out.Example = nil } return nil } var nullLiteral = []byte(`null`) func Convert_apiextensions_JSON_To_v1beta1_JSON(in *apiextensions.JSON, out *JSON, s conversion.Scope) error { raw, err := json.Marshal(*in) if err != nil { return err } if len(raw) == 0 || bytes.Equal(raw, nullLiteral) { // match JSON#UnmarshalJSON treatment of literal nulls out.Raw = nil } else { out.Raw = raw } return nil } func Convert_v1beta1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s conversion.Scope) error { if in != nil { var i interface{} if len(in.Raw) > 0 && !bytes.Equal(in.Raw, nullLiteral) { if err := json.Unmarshal(in.Raw, &i); err != nil { return err } } *out = i } else { out = nil } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/deepcopy.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/deepcopy.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package v1beta1 // TODO: Update this after a tag is created for interface fields in DeepCopy func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { if in == nil { return nil } out := new(JSONSchemaProps) *out = *in if in.Ref != nil { in, out := &in.Ref, &out.Ref if *in == nil { *out = nil } else { *out = new(string) **out = **in } } if in.Maximum != nil { in, out := &in.Maximum, &out.Maximum if *in == nil { *out = nil } else { *out = new(float64) **out = **in } } if in.Minimum != nil { in, out := &in.Minimum, &out.Minimum if *in == nil { *out = nil } else { *out = new(float64) **out = **in } } if in.MaxLength != nil { in, out := &in.MaxLength, &out.MaxLength if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MinLength != nil { in, out := &in.MinLength, &out.MinLength if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MaxItems != nil { in, out := &in.MaxItems, &out.MaxItems if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MinItems != nil { in, out := &in.MinItems, &out.MinItems if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MultipleOf != nil { in, out := &in.MultipleOf, &out.MultipleOf if *in == nil { *out = nil } else { *out = new(float64) **out = **in } } if in.MaxProperties != nil { in, out := &in.MaxProperties, &out.MaxProperties if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.MinProperties != nil { in, out := &in.MinProperties, &out.MinProperties if *in == nil { *out = nil } else { *out = new(int64) **out = **in } } if in.Required != nil { in, out := &in.Required, &out.Required *out = make([]string, len(*in)) copy(*out, *in) } if in.Items != nil { in, out := &in.Items, &out.Items if *in == nil { *out = nil } else { *out = new(JSONSchemaPropsOrArray) (*in).DeepCopyInto(*out) } } if in.AllOf != nil { in, out := &in.AllOf, &out.AllOf *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.OneOf != nil { in, out := &in.OneOf, &out.OneOf *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.AnyOf != nil { in, out := &in.AnyOf, &out.AnyOf *out = make([]JSONSchemaProps, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Not != nil { in, out := &in.Not, &out.Not if *in == nil { *out = nil } else { *out = new(JSONSchemaProps) (*in).DeepCopyInto(*out) } } if in.Properties != nil { in, out := &in.Properties, &out.Properties *out = make(map[string]JSONSchemaProps, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.AdditionalProperties != nil { in, out := &in.AdditionalProperties, &out.AdditionalProperties if *in == nil { *out = nil } else { *out = new(JSONSchemaPropsOrBool) (*in).DeepCopyInto(*out) } } if in.PatternProperties != nil { in, out := &in.PatternProperties, &out.PatternProperties *out = make(map[string]JSONSchemaProps, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.Dependencies != nil { in, out := &in.Dependencies, &out.Dependencies *out = make(JSONSchemaDependencies, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.AdditionalItems != nil { in, out := &in.AdditionalItems, &out.AdditionalItems if *in == nil { *out = nil } else { *out = new(JSONSchemaPropsOrBool) (*in).DeepCopyInto(*out) } } if in.Definitions != nil { in, out := &in.Definitions, &out.Definitions *out = make(JSONSchemaDefinitions, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.ExternalDocs != nil { in, out := &in.ExternalDocs, &out.ExternalDocs if *in == nil { *out = nil } else { *out = new(ExternalDocumentation) (*in).DeepCopyInto(*out) } } if in.XPreserveUnknownFields != nil { in, out := &in.XPreserveUnknownFields, &out.XPreserveUnknownFields if *in == nil { *out = nil } else { *out = new(bool) **out = **in } } if in.XListMapKeys != nil { in, out := &in.XListMapKeys, &out.XListMapKeys *out = make([]string, len(*in)) copy(*out, *in) } if in.XListType != nil { in, out := &in.XListType, &out.XListType if *in == nil { *out = nil } else { *out = new(string) **out = **in } } if in.XMapType != nil { in, out := &in.XMapType, &out.XMapType *out = new(string) **out = **in } if in.XValidations != nil { inValidations, outValidations := &in.XValidations, &out.XValidations *outValidations = make([]ValidationRule, len(*inValidations)) for i := range *inValidations { in.XValidations[i].DeepCopyInto(&out.XValidations[i]) } } return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/defaults.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/defaults.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package v1beta1 import ( "strings" "k8s.io/apimachinery/pkg/runtime" utilpointer "k8s.io/utils/pointer" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { return RegisterDefaults(scheme) } func SetDefaults_CustomResourceDefinition(obj *CustomResourceDefinition) { SetDefaults_CustomResourceDefinitionSpec(&obj.Spec) if len(obj.Status.StoredVersions) == 0 { for _, v := range obj.Spec.Versions { if v.Storage { obj.Status.StoredVersions = append(obj.Status.StoredVersions, v.Name) break } } } } func SetDefaults_CustomResourceDefinitionSpec(obj *CustomResourceDefinitionSpec) { if len(obj.Scope) == 0 { obj.Scope = NamespaceScoped } if len(obj.Names.Singular) == 0 { obj.Names.Singular = strings.ToLower(obj.Names.Kind) } if len(obj.Names.ListKind) == 0 && len(obj.Names.Kind) > 0 { obj.Names.ListKind = obj.Names.Kind + "List" } // If there is no list of versions, create on using deprecated Version field. if len(obj.Versions) == 0 && len(obj.Version) != 0 { obj.Versions = []CustomResourceDefinitionVersion{{ Name: obj.Version, Storage: true, Served: true, }} } // For backward compatibility set the version field to the first item in versions list. if len(obj.Version) == 0 && len(obj.Versions) != 0 { obj.Version = obj.Versions[0].Name } if obj.Conversion == nil { obj.Conversion = &CustomResourceConversion{ Strategy: NoneConverter, } } if obj.Conversion.Strategy == WebhookConverter && len(obj.Conversion.ConversionReviewVersions) == 0 { obj.Conversion.ConversionReviewVersions = []string{SchemeGroupVersion.Version} } if obj.PreserveUnknownFields == nil { obj.PreserveUnknownFields = utilpointer.BoolPtr(true) } } // SetDefaults_ServiceReference sets defaults for Webhook's ServiceReference func SetDefaults_ServiceReference(obj *ServiceReference) { if obj.Port == nil { obj.Port = utilpointer.Int32Ptr(443) } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package v1beta1 import ( "bytes" "errors" cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" "k8s.io/apimachinery/pkg/util/json" ) var jsTrue = []byte("true") var jsFalse = []byte("false") // The CBOR parsing related constants and functions below are not exported so they can be // easily removed at a future date when the CBOR library provides equivalent functionality. type cborMajorType int const ( // https://www.rfc-editor.org/rfc/rfc8949.html#section-3.1 cborUnsignedInteger cborMajorType = 0 cborNegativeInteger cborMajorType = 1 cborByteString cborMajorType = 2 cborTextString cborMajorType = 3 cborArray cborMajorType = 4 cborMap cborMajorType = 5 cborTag cborMajorType = 6 cborOther cborMajorType = 7 ) const ( cborFalseValue = 0xf4 cborTrueValue = 0xf5 cborNullValue = 0xf6 ) func cborType(b byte) cborMajorType { return cborMajorType(b >> 5) } func (s JSONSchemaPropsOrBool) MarshalJSON() ([]byte, error) { if s.Schema != nil { return json.Marshal(s.Schema) } if s.Schema == nil && !s.Allows { return jsFalse, nil } return jsTrue, nil } func (s *JSONSchemaPropsOrBool) UnmarshalJSON(data []byte) error { var nw JSONSchemaPropsOrBool switch { case len(data) == 0: case data[0] == '{': var sch JSONSchemaProps if err := json.Unmarshal(data, &sch); err != nil { return err } nw.Allows = true nw.Schema = &sch case len(data) == 4 && string(data) == "true": nw.Allows = true case len(data) == 5 && string(data) == "false": nw.Allows = false default: return errors.New("boolean or JSON schema expected") } *s = nw return nil } func (s JSONSchemaPropsOrBool) MarshalCBOR() ([]byte, error) { if s.Schema != nil { return cbor.Marshal(s.Schema) } return cbor.Marshal(s.Allows) } func (s *JSONSchemaPropsOrBool) UnmarshalCBOR(data []byte) error { switch { case len(data) == 0: // ideally we would avoid modifying *s here, but we are matching the behavior of UnmarshalJSON *s = JSONSchemaPropsOrBool{} return nil case cborType(data[0]) == cborMap: var p JSONSchemaProps if err := cbor.Unmarshal(data, &p); err != nil { return err } *s = JSONSchemaPropsOrBool{Allows: true, Schema: &p} return nil case data[0] == cborTrueValue: *s = JSONSchemaPropsOrBool{Allows: true} return nil case data[0] == cborFalseValue: *s = JSONSchemaPropsOrBool{Allows: false} return nil default: // ideally, this case would not also capture a null input value, // but we are matching the behavior of the UnmarshalJSON return errors.New("boolean or JSON schema expected") } } func (s JSONSchemaPropsOrStringArray) MarshalJSON() ([]byte, error) { if len(s.Property) > 0 { return json.Marshal(s.Property) } if s.Schema != nil { return json.Marshal(s.Schema) } return []byte("null"), nil } func (s *JSONSchemaPropsOrStringArray) UnmarshalJSON(data []byte) error { var first byte if len(data) > 1 { first = data[0] } var nw JSONSchemaPropsOrStringArray if first == '{' { var sch JSONSchemaProps if err := json.Unmarshal(data, &sch); err != nil { return err } nw.Schema = &sch } if first == '[' { if err := json.Unmarshal(data, &nw.Property); err != nil { return err } } *s = nw return nil } func (s JSONSchemaPropsOrStringArray) MarshalCBOR() ([]byte, error) { if len(s.Property) > 0 { return cbor.Marshal(s.Property) } if s.Schema != nil { return cbor.Marshal(s.Schema) } return cbor.Marshal(nil) } func (s *JSONSchemaPropsOrStringArray) UnmarshalCBOR(data []byte) error { if len(data) > 0 && cborType(data[0]) == cborArray { var a []string if err := cbor.Unmarshal(data, &a); err != nil { return err } *s = JSONSchemaPropsOrStringArray{Property: a} return nil } if len(data) > 0 && cborType(data[0]) == cborMap { var p JSONSchemaProps if err := cbor.Unmarshal(data, &p); err != nil { return err } *s = JSONSchemaPropsOrStringArray{Schema: &p} return nil } // At this point we either have: empty data, a null value, or an // unexpected type. In order to match the behavior of the existing // UnmarshalJSON, no error is returned and *s is overwritten here. *s = JSONSchemaPropsOrStringArray{} return nil } func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) { if len(s.JSONSchemas) > 0 { return json.Marshal(s.JSONSchemas) } return json.Marshal(s.Schema) } func (s *JSONSchemaPropsOrArray) UnmarshalJSON(data []byte) error { var nw JSONSchemaPropsOrArray var first byte if len(data) > 1 { first = data[0] } if first == '{' { var sch JSONSchemaProps if err := json.Unmarshal(data, &sch); err != nil { return err } nw.Schema = &sch } if first == '[' { if err := json.Unmarshal(data, &nw.JSONSchemas); err != nil { return err } } *s = nw return nil } func (s JSONSchemaPropsOrArray) MarshalCBOR() ([]byte, error) { if len(s.JSONSchemas) > 0 { return cbor.Marshal(s.JSONSchemas) } return cbor.Marshal(s.Schema) } func (s *JSONSchemaPropsOrArray) UnmarshalCBOR(data []byte) error { if len(data) > 0 && cborType(data[0]) == cborMap { var p JSONSchemaProps if err := cbor.Unmarshal(data, &p); err != nil { return err } *s = JSONSchemaPropsOrArray{Schema: &p} return nil } if len(data) > 0 && cborType(data[0]) == cborArray { var a []JSONSchemaProps if err := cbor.Unmarshal(data, &a); err != nil { return err } *s = JSONSchemaPropsOrArray{JSONSchemas: a} return nil } // At this point we either have: empty data, a null value, or an // unexpected type. In order to match the behavior of the existing // UnmarshalJSON, no error is returned and *s is overwritten here. *s = JSONSchemaPropsOrArray{} return nil } func (s JSON) MarshalJSON() ([]byte, error) { if len(s.Raw) > 0 { return s.Raw, nil } return []byte("null"), nil } func (s *JSON) UnmarshalJSON(data []byte) error { if len(data) > 0 && !bytes.Equal(data, nullLiteral) { s.Raw = append(s.Raw[0:0], data...) } return nil } func (s JSON) MarshalCBOR() ([]byte, error) { // Note that non-semantic whitespace is lost during the transcoding performed here. // We do not forsee this to be a problem given the current known uses of this type. // Other limitations that arise when roundtripping JSON via dynamic clients also apply // here, for example: insignificant whitespace handling, number handling, and map key ordering. if len(s.Raw) == 0 { return []byte{cborNullValue}, nil } var u any if err := json.Unmarshal(s.Raw, &u); err != nil { return nil, err } return cbor.Marshal(u) } func (s *JSON) UnmarshalCBOR(data []byte) error { if len(data) == 0 || data[0] == cborNullValue { return nil } var u any if err := cbor.Unmarshal(data, &u); err != nil { return err } raw, err := json.Marshal(u) if err != nil { return err } s.Raw = raw return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.defaults.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.defaults.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. 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. */ // Code generated by defaulter-gen. DO NOT EDIT. package v1beta1 import ( runtime "k8s.io/apimachinery/pkg/runtime" ) // RegisterDefaults adds defaulters functions to the given scheme. // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { scheme.AddTypeDefaultingFunc(&CustomResourceDefinition{}, func(obj interface{}) { SetObjectDefaults_CustomResourceDefinition(obj.(*CustomResourceDefinition)) }) scheme.AddTypeDefaultingFunc(&CustomResourceDefinitionList{}, func(obj interface{}) { SetObjectDefaults_CustomResourceDefinitionList(obj.(*CustomResourceDefinitionList)) }) return nil } func SetObjectDefaults_CustomResourceDefinition(in *CustomResourceDefinition) { SetDefaults_CustomResourceDefinition(in) SetDefaults_CustomResourceDefinitionSpec(&in.Spec) if in.Spec.Conversion != nil { if in.Spec.Conversion.WebhookClientConfig != nil { if in.Spec.Conversion.WebhookClientConfig.Service != nil { SetDefaults_ServiceReference(in.Spec.Conversion.WebhookClientConfig.Service) } } } } func SetObjectDefaults_CustomResourceDefinitionList(in *CustomResourceDefinitionList) { for i := range in.Items { a := &in.Items[i] SetObjectDefaults_CustomResourceDefinition(a) } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. 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. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1beta1 import ( schema "k8s.io/apimachinery/pkg/runtime/schema" ) // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ConversionReview) APILifecycleIntroduced() (major, minor int) { return 1, 13 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ConversionReview) APILifecycleDeprecated() (major, minor int) { return 1, 19 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *ConversionReview) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "ConversionReview"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ConversionReview) APILifecycleRemoved() (major, minor int) { return 1, 22 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *CustomResourceDefinition) APILifecycleIntroduced() (major, minor int) { return 1, 7 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *CustomResourceDefinition) APILifecycleDeprecated() (major, minor int) { return 1, 16 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *CustomResourceDefinition) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "CustomResourceDefinition"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *CustomResourceDefinition) APILifecycleRemoved() (major, minor int) { return 1, 22 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *CustomResourceDefinitionList) APILifecycleIntroduced() (major, minor int) { return 1, 7 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *CustomResourceDefinitionList) APILifecycleDeprecated() (major, minor int) { return 1, 16 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *CustomResourceDefinitionList) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "CustomResourceDefinitionList"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *CustomResourceDefinitionList) APILifecycleRemoved() (major, minor int) { return 1, 22 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go
/* Copyright 2017 The Kubernetes Authors. 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. */ package v1beta1 // FieldValueErrorReason is a machine-readable value providing more detail about why a field failed the validation. // +enum type FieldValueErrorReason string const ( // FieldValueRequired is used to report required values that are not // provided (e.g. empty strings, null values, or empty arrays). FieldValueRequired FieldValueErrorReason = "FieldValueRequired" // FieldValueDuplicate is used to report collisions of values that must be // unique (e.g. unique IDs). FieldValueDuplicate FieldValueErrorReason = "FieldValueDuplicate" // FieldValueInvalid is used to report malformed values (e.g. failed regex // match, too long, out of bounds). FieldValueInvalid FieldValueErrorReason = "FieldValueInvalid" // FieldValueForbidden is used to report valid (as per formatting rules) // values which would be accepted under some conditions, but which are not // permitted by the current conditions (such as security policy). FieldValueForbidden FieldValueErrorReason = "FieldValueForbidden" ) // JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). type JSONSchemaProps struct { ID string `json:"id,omitempty" protobuf:"bytes,1,opt,name=id"` Schema JSONSchemaURL `json:"$schema,omitempty" protobuf:"bytes,2,opt,name=schema"` Ref *string `json:"$ref,omitempty" protobuf:"bytes,3,opt,name=ref"` Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"` Type string `json:"type,omitempty" protobuf:"bytes,5,opt,name=type"` // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: // // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string // - uri: an URI as parsed by Golang net/url.ParseRequestURI // - email: an email address as parsed by Golang net/mail.ParseAddress // - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. // - ipv4: an IPv4 IP as parsed by Golang net.ParseIP // - ipv6: an IPv6 IP as parsed by Golang net.ParseIP // - cidr: a CIDR as parsed by Golang net.ParseCIDR // - mac: a MAC address as parsed by Golang net.ParseMAC // - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ // - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ // - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ // - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ // - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" // - isbn10: an ISBN10 number string like "0321751043" // - isbn13: an ISBN13 number string like "978-0321751041" // - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in // - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ // - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ // - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" // - byte: base64 encoded binary data // - password: any kind of string // - date: a date string like "2006-01-02" as defined by full-date in RFC3339 // - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format // - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. Format string `json:"format,omitempty" protobuf:"bytes,6,opt,name=format"` Title string `json:"title,omitempty" protobuf:"bytes,7,opt,name=title"` // default is a default value for undefined object fields. // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. // CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API. Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` // +listType=atomic Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` // +listType=atomic Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` // +listType=atomic AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` // +listType=atomic OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` // +listType=atomic AnyOf []JSONSchemaProps `json:"anyOf,omitempty" protobuf:"bytes,27,rep,name=anyOf"` Not *JSONSchemaProps `json:"not,omitempty" protobuf:"bytes,28,opt,name=not"` Properties map[string]JSONSchemaProps `json:"properties,omitempty" protobuf:"bytes,29,rep,name=properties"` AdditionalProperties *JSONSchemaPropsOrBool `json:"additionalProperties,omitempty" protobuf:"bytes,30,opt,name=additionalProperties"` PatternProperties map[string]JSONSchemaProps `json:"patternProperties,omitempty" protobuf:"bytes,31,rep,name=patternProperties"` Dependencies JSONSchemaDependencies `json:"dependencies,omitempty" protobuf:"bytes,32,opt,name=dependencies"` AdditionalItems *JSONSchemaPropsOrBool `json:"additionalItems,omitempty" protobuf:"bytes,33,opt,name=additionalItems"` Definitions JSONSchemaDefinitions `json:"definitions,omitempty" protobuf:"bytes,34,opt,name=definitions"` ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty" protobuf:"bytes,35,opt,name=externalDocs"` Example *JSON `json:"example,omitempty" protobuf:"bytes,36,opt,name=example"` Nullable bool `json:"nullable,omitempty" protobuf:"bytes,37,opt,name=nullable"` // x-kubernetes-preserve-unknown-fields stops the API server // decoding step from pruning fields which are not specified // in the validation schema. This affects fields recursively, // but switches back to normal pruning behaviour if nested // properties or additionalProperties are specified in the schema. // This can either be true or undefined. False is forbidden. XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty" protobuf:"bytes,38,opt,name=xKubernetesPreserveUnknownFields"` // x-kubernetes-embedded-resource defines that the value is an // embedded Kubernetes runtime.Object, with TypeMeta and // ObjectMeta. The type must be object. It is allowed to further // restrict the embedded object. kind, apiVersion and metadata // are validated automatically. x-kubernetes-preserve-unknown-fields // is allowed to be true, but does not have to be if the object // is fully specified (up to kind, apiVersion, metadata). XEmbeddedResource bool `json:"x-kubernetes-embedded-resource,omitempty" protobuf:"bytes,39,opt,name=xKubernetesEmbeddedResource"` // x-kubernetes-int-or-string specifies that this value is // either an integer or a string. If this is true, an empty // type is allowed and type as child of anyOf is permitted // if following one of the following patterns: // // 1) anyOf: // - type: integer // - type: string // 2) allOf: // - anyOf: // - type: integer // - type: string // - ... zero or more XIntOrString bool `json:"x-kubernetes-int-or-string,omitempty" protobuf:"bytes,40,opt,name=xKubernetesIntOrString"` // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used // as the index of the map. // // This tag MUST only be used on lists that have the "x-kubernetes-list-type" // extension set to "map". Also, the values specified for this attribute must // be a scalar typed field of the child structure (no nesting is supported). // // The properties specified must either be required or have a default value, // to ensure those properties are present for all list items. // // +optional // +listType=atomic XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"` // x-kubernetes-list-type annotates an array to further describe its topology. // This extension must only be used on lists and may have 3 possible values: // // 1) `atomic`: the list is treated as a single entity, like a scalar. // Atomic lists will be entirely replaced when updated. This extension // may be used on any type of list (struct, scalar, ...). // 2) `set`: // Sets are lists that must not have multiple items with the same value. Each // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an // array with x-kubernetes-list-type `atomic`. // 3) `map`: // These lists are like maps in that their elements have a non-index key // used to identify them. Order is preserved upon merge. The map tag // must only be used on a list with elements of type object. // Defaults to atomic for arrays. // +optional XListType *string `json:"x-kubernetes-list-type,omitempty" protobuf:"bytes,42,opt,name=xKubernetesListType"` // x-kubernetes-map-type annotates an object to further describe its topology. // This extension must only be used when type is object and may have 2 possible values: // // 1) `granular`: // These maps are actual maps (key-value pairs) and each fields are independent // from each other (they can each be manipulated by separate actors). This is // the default behaviour for all maps. // 2) `atomic`: the list is treated as a single entity, like a scalar. // Atomic maps will be entirely replaced when updated. // +optional XMapType *string `json:"x-kubernetes-map-type,omitempty" protobuf:"bytes,43,opt,name=xKubernetesMapType"` // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. // +patchMergeKey=rule // +patchStrategy=merge // +listType=map // +listMapKey=rule XValidations ValidationRules `json:"x-kubernetes-validations,omitempty" patchStrategy:"merge" patchMergeKey:"rule" protobuf:"bytes,44,rep,name=xKubernetesValidations"` } // ValidationRules describes a list of validation rules written in the CEL expression language. type ValidationRules []ValidationRule // ValidationRule describes a validation rule written in the CEL expression language. type ValidationRule struct { // Rule represents the expression which will be evaluated by CEL. // ref: https://github.com/google/cel-spec // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. // The `self` variable in the CEL expression is bound to the scoped value. // Example: // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} // // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as // absent fields in CEL expressions. // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map // are accessible via CEL macros and functions such as `self.all(...)`. // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and // functions. // If the Rule is scoped to a scalar, `self` is bound to the scalar value. // Examples: // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} // // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. // // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL // expressions. This includes: // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true // - An array where the items schema is of an "unknown type" // - An object where the additionalProperties schema is of an "unknown type" // // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. // Accessible property names are escaped according to the following rules when accessed in the expression: // - '__' escapes to '__underscores__' // - '.' escapes to '__dot__' // - '-' escapes to '__dash__' // - '/' escapes to '__slash__' // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", // "import", "let", "loop", "package", "namespace", "return". // Examples: // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} // // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and // non-intersecting elements in `Y` are appended, retaining their partial order. // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with // non-intersecting keys are appended, retaining their partial order. // // If `rule` makes use of the `oldSelf` variable it is implicitly a // `transition rule`. // // By default, the `oldSelf` variable is the same type as `self`. // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional // variable whose value() is the same type as `self`. // See the documentation for the `optionalOldSelf` field for details. // // Transition rules by default are applied only on UPDATE requests and are // skipped if an old value could not be found. You can opt a transition // rule into unconditional evaluation by setting `optionalOldSelf` to true. // Rule string `json:"rule" protobuf:"bytes,1,opt,name=rule"` // Message represents the message displayed when validation fails. The message is required if the Rule contains // line breaks. The message must not contain line breaks. // If unset, the message is "failed rule: {Rule}". // e.g. "must be a URL with the host matching spec.host" Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. // Since messageExpression is used as a failure message, it must evaluate to a string. // If both message and messageExpression are present on a rule, then messageExpression will be used if validation // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. // messageExpression has access to all the same variables as the rule; the only difference is the return type. // Example: // "x must be less than max ("+string(self.max)+")" // +optional MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,3,opt,name=messageExpression"` // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". // If not set, default to use "FieldValueInvalid". // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. // +optional Reason *FieldValueErrorReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` // fieldPath represents the field path returned when the validation fails. // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` // It does not support list numeric index. // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. // Numeric index of array is not supported. // For field name which contains special characters, use `['specialName']` to refer the field name. // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` // +optional FieldPath string `json:"fieldPath,omitempty" protobuf:"bytes,5,opt,name=fieldPath"` // optionalOldSelf is used to opt a transition rule into evaluation // even when the object is first created, or if the old object is // missing the value. // // When enabled `oldSelf` will be a CEL optional whose value will be // `None` if there is no old value, or when the object is initially created. // // You may check for presence of oldSelf using `oldSelf.hasValue()` and // unwrap it after checking using `oldSelf.value()`. Check the CEL // documentation for Optional types for more information: // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes // // May not be set unless `oldSelf` is used in `rule`. // // +featureGate=CRDValidationRatcheting // +optional OptionalOldSelf *bool `json:"optionalOldSelf,omitempty" protobuf:"bytes,6,opt,name=optionalOldSelf"` } // JSON represents any valid JSON value. // These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. type JSON struct { Raw []byte `json:"-" protobuf:"bytes,1,opt,name=raw"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. // // See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators func (_ JSON) OpenAPISchemaType() []string { // TODO: return actual types when anyOf is supported return nil } // OpenAPISchemaFormat is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. func (_ JSON) OpenAPISchemaFormat() string { return "" } // JSONSchemaURL represents a schema url. type JSONSchemaURL string // JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps // or an array of JSONSchemaProps. Mainly here for serialization purposes. type JSONSchemaPropsOrArray struct { Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` // +listType=atomic JSONSchemas []JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. // // See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators func (_ JSONSchemaPropsOrArray) OpenAPISchemaType() []string { // TODO: return actual types when anyOf is supported return nil } // OpenAPISchemaFormat is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. func (_ JSONSchemaPropsOrArray) OpenAPISchemaFormat() string { return "" } // JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. // Defaults to true for the boolean property. type JSONSchemaPropsOrBool struct { Allows bool `protobuf:"varint,1,opt,name=allows"` Schema *JSONSchemaProps `protobuf:"bytes,2,opt,name=schema"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. // // See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators func (_ JSONSchemaPropsOrBool) OpenAPISchemaType() []string { // TODO: return actual types when anyOf is supported return nil } // OpenAPISchemaFormat is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. func (_ JSONSchemaPropsOrBool) OpenAPISchemaFormat() string { return "" } // JSONSchemaDependencies represent a dependencies property. type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray // JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. type JSONSchemaPropsOrStringArray struct { Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` // +listType=atomic Property []string `protobuf:"bytes,2,rep,name=property"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. // // See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaType() []string { // TODO: return actual types when anyOf is supported return nil } // OpenAPISchemaFormat is used by the kube-openapi generator when constructing // the OpenAPI spec of this type. func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaFormat() string { return "" } // JSONSchemaDefinitions contains the models explicitly defined in this spec. type JSONSchemaDefinitions map[string]JSONSchemaProps // ExternalDocumentation allows referencing an external resource for extended documentation. type ExternalDocumentation struct { Description string `json:"description,omitempty" protobuf:"bytes,1,opt,name=description"` URL string `json:"url,omitempty" protobuf:"bytes,2,opt,name=url"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go
/* Copyright 2017 The Kubernetes Authors. 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. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:conversion-gen=k8s.io/apiextensions-apiserver/pkg/apis/apiextensions // +k8s:defaulter-gen=TypeMeta // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // +groupName=apiextensions.k8s.io // Package v1beta1 is the v1beta1 version of the API. package v1beta1 // import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto package v1beta1 import ( encoding_binary "encoding/binary" fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" runtime "k8s.io/apimachinery/pkg/runtime" math "math" math_bits "math/bits" reflect "reflect" strings "strings" k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } func (*ConversionRequest) ProtoMessage() {} func (*ConversionRequest) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{0} } func (m *ConversionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConversionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConversionRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ConversionRequest.Merge(m, src) } func (m *ConversionRequest) XXX_Size() int { return m.Size() } func (m *ConversionRequest) XXX_DiscardUnknown() { xxx_messageInfo_ConversionRequest.DiscardUnknown(m) } var xxx_messageInfo_ConversionRequest proto.InternalMessageInfo func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } func (*ConversionResponse) ProtoMessage() {} func (*ConversionResponse) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{1} } func (m *ConversionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConversionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConversionResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ConversionResponse.Merge(m, src) } func (m *ConversionResponse) XXX_Size() int { return m.Size() } func (m *ConversionResponse) XXX_DiscardUnknown() { xxx_messageInfo_ConversionResponse.DiscardUnknown(m) } var xxx_messageInfo_ConversionResponse proto.InternalMessageInfo func (m *ConversionReview) Reset() { *m = ConversionReview{} } func (*ConversionReview) ProtoMessage() {} func (*ConversionReview) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{2} } func (m *ConversionReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConversionReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConversionReview) XXX_Merge(src proto.Message) { xxx_messageInfo_ConversionReview.Merge(m, src) } func (m *ConversionReview) XXX_Size() int { return m.Size() } func (m *ConversionReview) XXX_DiscardUnknown() { xxx_messageInfo_ConversionReview.DiscardUnknown(m) } var xxx_messageInfo_ConversionReview proto.InternalMessageInfo func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } func (*CustomResourceColumnDefinition) ProtoMessage() {} func (*CustomResourceColumnDefinition) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{3} } func (m *CustomResourceColumnDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceColumnDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceColumnDefinition) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceColumnDefinition.Merge(m, src) } func (m *CustomResourceColumnDefinition) XXX_Size() int { return m.Size() } func (m *CustomResourceColumnDefinition) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceColumnDefinition.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceColumnDefinition proto.InternalMessageInfo func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } func (*CustomResourceConversion) ProtoMessage() {} func (*CustomResourceConversion) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{4} } func (m *CustomResourceConversion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceConversion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceConversion) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceConversion.Merge(m, src) } func (m *CustomResourceConversion) XXX_Size() int { return m.Size() } func (m *CustomResourceConversion) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceConversion.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceConversion proto.InternalMessageInfo func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } func (*CustomResourceDefinition) ProtoMessage() {} func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{5} } func (m *CustomResourceDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinition) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinition.Merge(m, src) } func (m *CustomResourceDefinition) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinition) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinition.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinition proto.InternalMessageInfo func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } func (*CustomResourceDefinitionCondition) ProtoMessage() {} func (*CustomResourceDefinitionCondition) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{6} } func (m *CustomResourceDefinitionCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionCondition) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionCondition.Merge(m, src) } func (m *CustomResourceDefinitionCondition) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionCondition) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionCondition.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionCondition proto.InternalMessageInfo func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } func (*CustomResourceDefinitionList) ProtoMessage() {} func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{7} } func (m *CustomResourceDefinitionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionList) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionList.Merge(m, src) } func (m *CustomResourceDefinitionList) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionList) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionList.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionList proto.InternalMessageInfo func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } func (*CustomResourceDefinitionNames) ProtoMessage() {} func (*CustomResourceDefinitionNames) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{8} } func (m *CustomResourceDefinitionNames) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionNames) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionNames.Merge(m, src) } func (m *CustomResourceDefinitionNames) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionNames) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionNames.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionNames proto.InternalMessageInfo func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } func (*CustomResourceDefinitionSpec) ProtoMessage() {} func (*CustomResourceDefinitionSpec) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{9} } func (m *CustomResourceDefinitionSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionSpec.Merge(m, src) } func (m *CustomResourceDefinitionSpec) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionSpec) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionSpec.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionSpec proto.InternalMessageInfo func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } func (*CustomResourceDefinitionStatus) ProtoMessage() {} func (*CustomResourceDefinitionStatus) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{10} } func (m *CustomResourceDefinitionStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionStatus.Merge(m, src) } func (m *CustomResourceDefinitionStatus) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionStatus) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionStatus.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionStatus proto.InternalMessageInfo func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } func (*CustomResourceDefinitionVersion) ProtoMessage() {} func (*CustomResourceDefinitionVersion) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{11} } func (m *CustomResourceDefinitionVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceDefinitionVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceDefinitionVersion) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceDefinitionVersion.Merge(m, src) } func (m *CustomResourceDefinitionVersion) XXX_Size() int { return m.Size() } func (m *CustomResourceDefinitionVersion) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceDefinitionVersion.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceDefinitionVersion proto.InternalMessageInfo func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } func (*CustomResourceSubresourceScale) ProtoMessage() {} func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{12} } func (m *CustomResourceSubresourceScale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceSubresourceScale) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceSubresourceScale) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceSubresourceScale.Merge(m, src) } func (m *CustomResourceSubresourceScale) XXX_Size() int { return m.Size() } func (m *CustomResourceSubresourceScale) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceSubresourceScale.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceSubresourceScale proto.InternalMessageInfo func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } func (*CustomResourceSubresourceStatus) ProtoMessage() {} func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{13} } func (m *CustomResourceSubresourceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceSubresourceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceSubresourceStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceSubresourceStatus.Merge(m, src) } func (m *CustomResourceSubresourceStatus) XXX_Size() int { return m.Size() } func (m *CustomResourceSubresourceStatus) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceSubresourceStatus.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceSubresourceStatus proto.InternalMessageInfo func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } func (*CustomResourceSubresources) ProtoMessage() {} func (*CustomResourceSubresources) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{14} } func (m *CustomResourceSubresources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceSubresources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceSubresources) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceSubresources.Merge(m, src) } func (m *CustomResourceSubresources) XXX_Size() int { return m.Size() } func (m *CustomResourceSubresources) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceSubresources.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceSubresources proto.InternalMessageInfo func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } func (*CustomResourceValidation) ProtoMessage() {} func (*CustomResourceValidation) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{15} } func (m *CustomResourceValidation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CustomResourceValidation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CustomResourceValidation) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomResourceValidation.Merge(m, src) } func (m *CustomResourceValidation) XXX_Size() int { return m.Size() } func (m *CustomResourceValidation) XXX_DiscardUnknown() { xxx_messageInfo_CustomResourceValidation.DiscardUnknown(m) } var xxx_messageInfo_CustomResourceValidation proto.InternalMessageInfo func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } func (*ExternalDocumentation) ProtoMessage() {} func (*ExternalDocumentation) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{16} } func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ExternalDocumentation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ExternalDocumentation) XXX_Merge(src proto.Message) { xxx_messageInfo_ExternalDocumentation.Merge(m, src) } func (m *ExternalDocumentation) XXX_Size() int { return m.Size() } func (m *ExternalDocumentation) XXX_DiscardUnknown() { xxx_messageInfo_ExternalDocumentation.DiscardUnknown(m) } var xxx_messageInfo_ExternalDocumentation proto.InternalMessageInfo func (m *JSON) Reset() { *m = JSON{} } func (*JSON) ProtoMessage() {} func (*JSON) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{17} } func (m *JSON) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSON) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSON) XXX_Merge(src proto.Message) { xxx_messageInfo_JSON.Merge(m, src) } func (m *JSON) XXX_Size() int { return m.Size() } func (m *JSON) XXX_DiscardUnknown() { xxx_messageInfo_JSON.DiscardUnknown(m) } var xxx_messageInfo_JSON proto.InternalMessageInfo func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } func (*JSONSchemaProps) ProtoMessage() {} func (*JSONSchemaProps) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{18} } func (m *JSONSchemaProps) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSONSchemaProps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSONSchemaProps) XXX_Merge(src proto.Message) { xxx_messageInfo_JSONSchemaProps.Merge(m, src) } func (m *JSONSchemaProps) XXX_Size() int { return m.Size() } func (m *JSONSchemaProps) XXX_DiscardUnknown() { xxx_messageInfo_JSONSchemaProps.DiscardUnknown(m) } var xxx_messageInfo_JSONSchemaProps proto.InternalMessageInfo func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } func (*JSONSchemaPropsOrArray) ProtoMessage() {} func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{19} } func (m *JSONSchemaPropsOrArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSONSchemaPropsOrArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSONSchemaPropsOrArray) XXX_Merge(src proto.Message) { xxx_messageInfo_JSONSchemaPropsOrArray.Merge(m, src) } func (m *JSONSchemaPropsOrArray) XXX_Size() int { return m.Size() } func (m *JSONSchemaPropsOrArray) XXX_DiscardUnknown() { xxx_messageInfo_JSONSchemaPropsOrArray.DiscardUnknown(m) } var xxx_messageInfo_JSONSchemaPropsOrArray proto.InternalMessageInfo func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } func (*JSONSchemaPropsOrBool) ProtoMessage() {} func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{20} } func (m *JSONSchemaPropsOrBool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSONSchemaPropsOrBool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSONSchemaPropsOrBool) XXX_Merge(src proto.Message) { xxx_messageInfo_JSONSchemaPropsOrBool.Merge(m, src) } func (m *JSONSchemaPropsOrBool) XXX_Size() int { return m.Size() } func (m *JSONSchemaPropsOrBool) XXX_DiscardUnknown() { xxx_messageInfo_JSONSchemaPropsOrBool.DiscardUnknown(m) } var xxx_messageInfo_JSONSchemaPropsOrBool proto.InternalMessageInfo func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{21} } func (m *JSONSchemaPropsOrStringArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSONSchemaPropsOrStringArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSONSchemaPropsOrStringArray) XXX_Merge(src proto.Message) { xxx_messageInfo_JSONSchemaPropsOrStringArray.Merge(m, src) } func (m *JSONSchemaPropsOrStringArray) XXX_Size() int { return m.Size() } func (m *JSONSchemaPropsOrStringArray) XXX_DiscardUnknown() { xxx_messageInfo_JSONSchemaPropsOrStringArray.DiscardUnknown(m) } var xxx_messageInfo_JSONSchemaPropsOrStringArray proto.InternalMessageInfo func (m *SelectableField) Reset() { *m = SelectableField{} } func (*SelectableField) ProtoMessage() {} func (*SelectableField) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{22} } func (m *SelectableField) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SelectableField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *SelectableField) XXX_Merge(src proto.Message) { xxx_messageInfo_SelectableField.Merge(m, src) } func (m *SelectableField) XXX_Size() int { return m.Size() } func (m *SelectableField) XXX_DiscardUnknown() { xxx_messageInfo_SelectableField.DiscardUnknown(m) } var xxx_messageInfo_SelectableField proto.InternalMessageInfo func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{23} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ServiceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ServiceReference) XXX_Merge(src proto.Message) { xxx_messageInfo_ServiceReference.Merge(m, src) } func (m *ServiceReference) XXX_Size() int { return m.Size() } func (m *ServiceReference) XXX_DiscardUnknown() { xxx_messageInfo_ServiceReference.DiscardUnknown(m) } var xxx_messageInfo_ServiceReference proto.InternalMessageInfo func (m *ValidationRule) Reset() { *m = ValidationRule{} } func (*ValidationRule) ProtoMessage() {} func (*ValidationRule) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{24} } func (m *ValidationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidationRule) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidationRule.Merge(m, src) } func (m *ValidationRule) XXX_Size() int { return m.Size() } func (m *ValidationRule) XXX_DiscardUnknown() { xxx_messageInfo_ValidationRule.DiscardUnknown(m) } var xxx_messageInfo_ValidationRule proto.InternalMessageInfo func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { return fileDescriptor_3623d6c0bd238430, []int{25} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *WebhookClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *WebhookClientConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_WebhookClientConfig.Merge(m, src) } func (m *WebhookClientConfig) XXX_Size() int { return m.Size() } func (m *WebhookClientConfig) XXX_DiscardUnknown() { xxx_messageInfo_WebhookClientConfig.DiscardUnknown(m) } var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo func init() { proto.RegisterType((*ConversionRequest)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ConversionRequest") proto.RegisterType((*ConversionResponse)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ConversionResponse") proto.RegisterType((*ConversionReview)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ConversionReview") proto.RegisterType((*CustomResourceColumnDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceColumnDefinition") proto.RegisterType((*CustomResourceConversion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceConversion") proto.RegisterType((*CustomResourceDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition") proto.RegisterType((*CustomResourceDefinitionCondition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition") proto.RegisterType((*CustomResourceDefinitionList)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList") proto.RegisterType((*CustomResourceDefinitionNames)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames") proto.RegisterType((*CustomResourceDefinitionSpec)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec") proto.RegisterType((*CustomResourceDefinitionStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus") proto.RegisterType((*CustomResourceDefinitionVersion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion") proto.RegisterType((*CustomResourceSubresourceScale)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceScale") proto.RegisterType((*CustomResourceSubresourceStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceStatus") proto.RegisterType((*CustomResourceSubresources)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources") proto.RegisterType((*CustomResourceValidation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation") proto.RegisterType((*ExternalDocumentation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation") proto.RegisterType((*JSON)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSON") proto.RegisterType((*JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps") proto.RegisterMapType((JSONSchemaDefinitions)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps.DefinitionsEntry") proto.RegisterMapType((JSONSchemaDependencies)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps.DependenciesEntry") proto.RegisterMapType((map[string]JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps.PatternPropertiesEntry") proto.RegisterMapType((map[string]JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps.PropertiesEntry") proto.RegisterType((*JSONSchemaPropsOrArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray") proto.RegisterType((*JSONSchemaPropsOrBool)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool") proto.RegisterType((*JSONSchemaPropsOrStringArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray") proto.RegisterType((*SelectableField)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.SelectableField") proto.RegisterType((*ServiceReference)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ServiceReference") proto.RegisterType((*ValidationRule)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ValidationRule") proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.WebhookClientConfig") } func init() { proto.RegisterFile("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto", fileDescriptor_3623d6c0bd238430) } var fileDescriptor_3623d6c0bd238430 = []byte{ // 3214 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0xcf, 0x73, 0x1c, 0x57, 0xf1, 0xf7, 0xac, 0xb4, 0xd2, 0xaa, 0x25, 0x5b, 0xd2, 0xb3, 0xa5, 0x8c, 0x15, 0x47, 0x2b, 0xaf, 0xbf, 0xf1, 0x57, 0x49, 0x9c, 0x55, 0xe2, 0x6f, 0xf2, 0x4d, 0x08, 0xa4, 0x52, 0x5a, 0x49, 0x0e, 0x4a, 0x2c, 0x4b, 0xbc, 0xb5, 0x1d, 0x41, 0x7e, 0x8e, 0x76, 0x9e, 0xd6, 0x63, 0xcf, 0xce, 0x8c, 0xe7, 0xcd, 0xac, 0xa4, 0x0a, 0x50, 0x40, 0x2a, 0x05, 0x45, 0x01, 0xa1, 0x48, 0x2e, 0x14, 0x70, 0x08, 0x14, 0x17, 0x0e, 0x70, 0x80, 0x1b, 0xfc, 0x01, 0x39, 0xa6, 0x80, 0x43, 0x0e, 0xd4, 0x16, 0x59, 0xfe, 0x05, 0x0a, 0xaa, 0x74, 0xa2, 0xde, 0x8f, 0x99, 0x79, 0x33, 0xbb, 0x6b, 0xbb, 0xa2, 0xdd, 0xb8, 0xb8, 0x69, 0xbb, 0xfb, 0xf5, 0xa7, 0xa7, 0x5f, 0xbf, 0xee, 0x7e, 0x3d, 0x23, 0xd8, 0xb8, 0xf5, 0x2c, 0x2d, 0x5b, 0xee, 0x92, 0xe1, 0x59, 0x64, 0x3f, 0x20, 0x0e, 0xb5, 0x5c, 0x87, 0x3e, 0x6e, 0x78, 0x16, 0x25, 0x7e, 0x93, 0xf8, 0x4b, 0xde, 0xad, 0x3a, 0xe3, 0xd1, 0xb4, 0xc0, 0x52, 0xf3, 0xc9, 0x1d, 0x12, 0x18, 0x4f, 0x2e, 0xd5, 0x89, 0x43, 0x7c, 0x23, 0x20, 0x66, 0xd9, 0xf3, 0xdd, 0xc0, 0x45, 0xcf, 0x0b, 0x75, 0xe5, 0x94, 0xf4, 0x9b, 0xb1, 0xba, 0xb2, 0x77, 0xab, 0xce, 0x78, 0x34, 0x2d, 0x50, 0x96, 0xea, 0xe6, 0x1e, 0xaf, 0x5b, 0xc1, 0x8d, 0x70, 0xa7, 0x5c, 0x73, 0x1b, 0x4b, 0x75, 0xb7, 0xee, 0x2e, 0x71, 0xad, 0x3b, 0xe1, 0x2e, 0xff, 0xc5, 0x7f, 0xf0, 0xbf, 0x04, 0xda, 0xdc, 0x53, 0x89, 0xf1, 0x0d, 0xa3, 0x76, 0xc3, 0x72, 0x88, 0x7f, 0x90, 0x58, 0xdc, 0x20, 0x81, 0xb1, 0xd4, 0xec, 0xb0, 0x71, 0x6e, 0xa9, 0xd7, 0x2a, 0x3f, 0x74, 0x02, 0xab, 0x41, 0x3a, 0x16, 0xfc, 0xff, 0xdd, 0x16, 0xd0, 0xda, 0x0d, 0xd2, 0x30, 0xb2, 0xeb, 0x4a, 0x87, 0x1a, 0x4c, 0xaf, 0xb8, 0x4e, 0x93, 0xf8, 0xec, 0x29, 0x31, 0xb9, 0x1d, 0x12, 0x1a, 0xa0, 0x0a, 0x0c, 0x85, 0x96, 0xa9, 0x6b, 0x0b, 0xda, 0xe2, 0x58, 0xe5, 0x89, 0x8f, 0x5a, 0xc5, 0x63, 0xed, 0x56, 0x71, 0xe8, 0xda, 0xfa, 0xea, 0x61, 0xab, 0x78, 0xb6, 0x17, 0x52, 0x70, 0xe0, 0x11, 0x5a, 0xbe, 0xb6, 0xbe, 0x8a, 0xd9, 0x62, 0xf4, 0x22, 0x4c, 0x9b, 0x84, 0x5a, 0x3e, 0x31, 0x97, 0xb7, 0xd6, 0xaf, 0x0b, 0xfd, 0x7a, 0x8e, 0x6b, 0x3c, 0x2d, 0x35, 0x4e, 0xaf, 0x66, 0x05, 0x70, 0xe7, 0x1a, 0xb4, 0x0d, 0xa3, 0xee, 0xce, 0x4d, 0x52, 0x0b, 0xa8, 0x3e, 0xb4, 0x30, 0xb4, 0x38, 0x7e, 0xf1, 0xf1, 0x72, 0xb2, 0x83, 0xb1, 0x09, 0x7c, 0xdb, 0xe4, 0xc3, 0x96, 0xb1, 0xb1, 0xb7, 0x16, 0xed, 0x5c, 0x65, 0x52, 0xa2, 0x8d, 0x6e, 0x0a, 0x2d, 0x38, 0x52, 0x57, 0xfa, 0x55, 0x0e, 0x90, 0xfa, 0xf0, 0xd4, 0x73, 0x1d, 0x4a, 0xfa, 0xf2, 0xf4, 0x14, 0xa6, 0x6a, 0x5c, 0x73, 0x40, 0x4c,
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/servicereference.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/servicereference.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // ServiceReferenceApplyConfiguration represents a declarative configuration of the ServiceReference type for use // with apply. type ServiceReferenceApplyConfiguration struct { Namespace *string `json:"namespace,omitempty"` Name *string `json:"name,omitempty"` Path *string `json:"path,omitempty"` Port *int32 `json:"port,omitempty"` } // ServiceReferenceApplyConfiguration constructs a declarative configuration of the ServiceReference type for use with // apply. func ServiceReference() *ServiceReferenceApplyConfiguration { return &ServiceReferenceApplyConfiguration{} } // WithNamespace sets the Namespace field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Namespace field is set to the value of the last call. func (b *ServiceReferenceApplyConfiguration) WithNamespace(value string) *ServiceReferenceApplyConfiguration { b.Namespace = &value return b } // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *ServiceReferenceApplyConfiguration) WithName(value string) *ServiceReferenceApplyConfiguration { b.Name = &value return b } // WithPath sets the Path field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Path field is set to the value of the last call. func (b *ServiceReferenceApplyConfiguration) WithPath(value string) *ServiceReferenceApplyConfiguration { b.Path = &value return b } // WithPort sets the Port field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Port field is set to the value of the last call. func (b *ServiceReferenceApplyConfiguration) WithPort(value int32) *ServiceReferenceApplyConfiguration { b.Port = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookconversion.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookconversion.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // WebhookConversionApplyConfiguration represents a declarative configuration of the WebhookConversion type for use // with apply. type WebhookConversionApplyConfiguration struct { ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty"` } // WebhookConversionApplyConfiguration constructs a declarative configuration of the WebhookConversion type for use with // apply. func WebhookConversion() *WebhookConversionApplyConfiguration { return &WebhookConversionApplyConfiguration{} } // WithClientConfig sets the ClientConfig field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ClientConfig field is set to the value of the last call. func (b *WebhookConversionApplyConfiguration) WithClientConfig(value *WebhookClientConfigApplyConfiguration) *WebhookConversionApplyConfiguration { b.ClientConfig = value return b } // WithConversionReviewVersions adds the given value to the ConversionReviewVersions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ConversionReviewVersions field. func (b *WebhookConversionApplyConfiguration) WithConversionReviewVersions(values ...string) *WebhookConversionApplyConfiguration { for i := range values { b.ConversionReviewVersions = append(b.ConversionReviewVersions, values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // CustomResourceSubresourceScaleApplyConfiguration represents a declarative configuration of the CustomResourceSubresourceScale type for use // with apply. type CustomResourceSubresourceScaleApplyConfiguration struct { SpecReplicasPath *string `json:"specReplicasPath,omitempty"` StatusReplicasPath *string `json:"statusReplicasPath,omitempty"` LabelSelectorPath *string `json:"labelSelectorPath,omitempty"` } // CustomResourceSubresourceScaleApplyConfiguration constructs a declarative configuration of the CustomResourceSubresourceScale type for use with // apply. func CustomResourceSubresourceScale() *CustomResourceSubresourceScaleApplyConfiguration { return &CustomResourceSubresourceScaleApplyConfiguration{} } // WithSpecReplicasPath sets the SpecReplicasPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SpecReplicasPath field is set to the value of the last call. func (b *CustomResourceSubresourceScaleApplyConfiguration) WithSpecReplicasPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { b.SpecReplicasPath = &value return b } // WithStatusReplicasPath sets the StatusReplicasPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StatusReplicasPath field is set to the value of the last call. func (b *CustomResourceSubresourceScaleApplyConfiguration) WithStatusReplicasPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { b.StatusReplicasPath = &value return b } // WithLabelSelectorPath sets the LabelSelectorPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LabelSelectorPath field is set to the value of the last call. func (b *CustomResourceSubresourceScaleApplyConfiguration) WithLabelSelectorPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { b.LabelSelectorPath = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourceconversion.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourceconversion.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) // CustomResourceConversionApplyConfiguration represents a declarative configuration of the CustomResourceConversion type for use // with apply. type CustomResourceConversionApplyConfiguration struct { Strategy *apiextensionsv1.ConversionStrategyType `json:"strategy,omitempty"` Webhook *WebhookConversionApplyConfiguration `json:"webhook,omitempty"` } // CustomResourceConversionApplyConfiguration constructs a declarative configuration of the CustomResourceConversion type for use with // apply. func CustomResourceConversion() *CustomResourceConversionApplyConfiguration { return &CustomResourceConversionApplyConfiguration{} } // WithStrategy sets the Strategy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Strategy field is set to the value of the last call. func (b *CustomResourceConversionApplyConfiguration) WithStrategy(value apiextensionsv1.ConversionStrategyType) *CustomResourceConversionApplyConfiguration { b.Strategy = &value return b } // WithWebhook sets the Webhook field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Webhook field is set to the value of the last call. func (b *CustomResourceConversionApplyConfiguration) WithWebhook(value *WebhookConversionApplyConfiguration) *CustomResourceConversionApplyConfiguration { b.Webhook = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) // CustomResourceDefinitionSpecApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionSpec type for use // with apply. type CustomResourceDefinitionSpecApplyConfiguration struct { Group *string `json:"group,omitempty"` Names *CustomResourceDefinitionNamesApplyConfiguration `json:"names,omitempty"` Scope *apiextensionsv1.ResourceScope `json:"scope,omitempty"` Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` } // CustomResourceDefinitionSpecApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionSpec type for use with // apply. func CustomResourceDefinitionSpec() *CustomResourceDefinitionSpecApplyConfiguration { return &CustomResourceDefinitionSpecApplyConfiguration{} } // WithGroup sets the Group field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Group field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithGroup(value string) *CustomResourceDefinitionSpecApplyConfiguration { b.Group = &value return b } // WithNames sets the Names field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Names field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { b.Names = value return b } // WithScope sets the Scope field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Scope field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithScope(value apiextensionsv1.ResourceScope) *CustomResourceDefinitionSpecApplyConfiguration { b.Scope = &value return b } // WithVersions adds the given value to the Versions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Versions field. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithVersions(values ...*CustomResourceDefinitionVersionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithVersions") } b.Versions = append(b.Versions, *values[i]) } return b } // WithConversion sets the Conversion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Conversion field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithConversion(value *CustomResourceConversionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { b.Conversion = value return b } // WithPreserveUnknownFields sets the PreserveUnknownFields field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PreserveUnknownFields field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithPreserveUnknownFields(value bool) *CustomResourceDefinitionSpecApplyConfiguration { b.PreserveUnknownFields = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // CustomResourceDefinitionVersionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionVersion type for use // with apply. type CustomResourceDefinitionVersionApplyConfiguration struct { Name *string `json:"name,omitempty"` Served *bool `json:"served,omitempty"` Storage *bool `json:"storage,omitempty"` Deprecated *bool `json:"deprecated,omitempty"` DeprecationWarning *string `json:"deprecationWarning,omitempty"` Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` } // CustomResourceDefinitionVersionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionVersion type for use with // apply. func CustomResourceDefinitionVersion() *CustomResourceDefinitionVersionApplyConfiguration { return &CustomResourceDefinitionVersionApplyConfiguration{} } // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithName(value string) *CustomResourceDefinitionVersionApplyConfiguration { b.Name = &value return b } // WithServed sets the Served field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Served field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithServed(value bool) *CustomResourceDefinitionVersionApplyConfiguration { b.Served = &value return b } // WithStorage sets the Storage field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Storage field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithStorage(value bool) *CustomResourceDefinitionVersionApplyConfiguration { b.Storage = &value return b } // WithDeprecated sets the Deprecated field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Deprecated field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecated(value bool) *CustomResourceDefinitionVersionApplyConfiguration { b.Deprecated = &value return b } // WithDeprecationWarning sets the DeprecationWarning field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeprecationWarning field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecationWarning(value string) *CustomResourceDefinitionVersionApplyConfiguration { b.DeprecationWarning = &value return b } // WithSchema sets the Schema field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Schema field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSchema(value *CustomResourceValidationApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { b.Schema = value return b } // WithSubresources sets the Subresources field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Subresources field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSubresources(value *CustomResourceSubresourcesApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { b.Subresources = value return b } // WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithAdditionalPrinterColumns(values ...*CustomResourceColumnDefinitionApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithAdditionalPrinterColumns") } b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, *values[i]) } return b } // WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the SelectableFields field. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithSelectableFields") } b.SelectableFields = append(b.SelectableFields, *values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) // CustomResourceSubresourcesApplyConfiguration represents a declarative configuration of the CustomResourceSubresources type for use // with apply. type CustomResourceSubresourcesApplyConfiguration struct { Status *apiextensionsv1.CustomResourceSubresourceStatus `json:"status,omitempty"` Scale *CustomResourceSubresourceScaleApplyConfiguration `json:"scale,omitempty"` } // CustomResourceSubresourcesApplyConfiguration constructs a declarative configuration of the CustomResourceSubresources type for use with // apply. func CustomResourceSubresources() *CustomResourceSubresourcesApplyConfiguration { return &CustomResourceSubresourcesApplyConfiguration{} } // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. func (b *CustomResourceSubresourcesApplyConfiguration) WithStatus(value apiextensionsv1.CustomResourceSubresourceStatus) *CustomResourceSubresourcesApplyConfiguration { b.Status = &value return b } // WithScale sets the Scale field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Scale field is set to the value of the last call. func (b *CustomResourceSubresourcesApplyConfiguration) WithScale(value *CustomResourceSubresourceScaleApplyConfiguration) *CustomResourceSubresourcesApplyConfiguration { b.Scale = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/validationrule.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/validationrule.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) // ValidationRuleApplyConfiguration represents a declarative configuration of the ValidationRule type for use // with apply. type ValidationRuleApplyConfiguration struct { Rule *string `json:"rule,omitempty"` Message *string `json:"message,omitempty"` MessageExpression *string `json:"messageExpression,omitempty"` Reason *apiextensionsv1.FieldValueErrorReason `json:"reason,omitempty"` FieldPath *string `json:"fieldPath,omitempty"` OptionalOldSelf *bool `json:"optionalOldSelf,omitempty"` } // ValidationRuleApplyConfiguration constructs a declarative configuration of the ValidationRule type for use with // apply. func ValidationRule() *ValidationRuleApplyConfiguration { return &ValidationRuleApplyConfiguration{} } // WithRule sets the Rule field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Rule field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithRule(value string) *ValidationRuleApplyConfiguration { b.Rule = &value return b } // WithMessage sets the Message field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Message field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithMessage(value string) *ValidationRuleApplyConfiguration { b.Message = &value return b } // WithMessageExpression sets the MessageExpression field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MessageExpression field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithMessageExpression(value string) *ValidationRuleApplyConfiguration { b.MessageExpression = &value return b } // WithReason sets the Reason field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Reason field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithReason(value apiextensionsv1.FieldValueErrorReason) *ValidationRuleApplyConfiguration { b.Reason = &value return b } // WithFieldPath sets the FieldPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FieldPath field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithFieldPath(value string) *ValidationRuleApplyConfiguration { b.FieldPath = &value return b } // WithOptionalOldSelf sets the OptionalOldSelf field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OptionalOldSelf field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithOptionalOldSelf(value bool) *ValidationRuleApplyConfiguration { b.OptionalOldSelf = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // CustomResourceValidationApplyConfiguration represents a declarative configuration of the CustomResourceValidation type for use // with apply. type CustomResourceValidationApplyConfiguration struct { OpenAPIV3Schema *JSONSchemaPropsApplyConfiguration `json:"openAPIV3Schema,omitempty"` } // CustomResourceValidationApplyConfiguration constructs a declarative configuration of the CustomResourceValidation type for use with // apply. func CustomResourceValidation() *CustomResourceValidationApplyConfiguration { return &CustomResourceValidationApplyConfiguration{} } // WithOpenAPIV3Schema sets the OpenAPIV3Schema field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OpenAPIV3Schema field is set to the value of the last call. func (b *CustomResourceValidationApplyConfiguration) WithOpenAPIV3Schema(value *JSONSchemaPropsApplyConfiguration) *CustomResourceValidationApplyConfiguration { b.OpenAPIV3Schema = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // CustomResourceDefinitionConditionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionCondition type for use // with apply. type CustomResourceDefinitionConditionApplyConfiguration struct { Type *apiextensionsv1.CustomResourceDefinitionConditionType `json:"type,omitempty"` Status *apiextensionsv1.ConditionStatus `json:"status,omitempty"` LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` Reason *string `json:"reason,omitempty"` Message *string `json:"message,omitempty"` } // CustomResourceDefinitionConditionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionCondition type for use with // apply. func CustomResourceDefinitionCondition() *CustomResourceDefinitionConditionApplyConfiguration { return &CustomResourceDefinitionConditionApplyConfiguration{} } // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. func (b *CustomResourceDefinitionConditionApplyConfiguration) WithType(value apiextensionsv1.CustomResourceDefinitionConditionType) *CustomResourceDefinitionConditionApplyConfiguration { b.Type = &value return b } // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. func (b *CustomResourceDefinitionConditionApplyConfiguration) WithStatus(value apiextensionsv1.ConditionStatus) *CustomResourceDefinitionConditionApplyConfiguration { b.Status = &value return b } // WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LastTransitionTime field is set to the value of the last call. func (b *CustomResourceDefinitionConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *CustomResourceDefinitionConditionApplyConfiguration { b.LastTransitionTime = &value return b } // WithReason sets the Reason field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Reason field is set to the value of the last call. func (b *CustomResourceDefinitionConditionApplyConfiguration) WithReason(value string) *CustomResourceDefinitionConditionApplyConfiguration { b.Reason = &value return b } // WithMessage sets the Message field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Message field is set to the value of the last call. func (b *CustomResourceDefinitionConditionApplyConfiguration) WithMessage(value string) *CustomResourceDefinitionConditionApplyConfiguration { b.Message = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // CustomResourceColumnDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceColumnDefinition type for use // with apply. type CustomResourceColumnDefinitionApplyConfiguration struct { Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` Format *string `json:"format,omitempty"` Description *string `json:"description,omitempty"` Priority *int32 `json:"priority,omitempty"` JSONPath *string `json:"jsonPath,omitempty"` } // CustomResourceColumnDefinitionApplyConfiguration constructs a declarative configuration of the CustomResourceColumnDefinition type for use with // apply. func CustomResourceColumnDefinition() *CustomResourceColumnDefinitionApplyConfiguration { return &CustomResourceColumnDefinitionApplyConfiguration{} } // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithName(value string) *CustomResourceColumnDefinitionApplyConfiguration { b.Name = &value return b } // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithType(value string) *CustomResourceColumnDefinitionApplyConfiguration { b.Type = &value return b } // WithFormat sets the Format field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Format field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithFormat(value string) *CustomResourceColumnDefinitionApplyConfiguration { b.Format = &value return b } // WithDescription sets the Description field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Description field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithDescription(value string) *CustomResourceColumnDefinitionApplyConfiguration { b.Description = &value return b } // WithPriority sets the Priority field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Priority field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithPriority(value int32) *CustomResourceColumnDefinitionApplyConfiguration { b.Priority = &value return b } // WithJSONPath sets the JSONPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the JSONPath field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithJSONPath(value string) *CustomResourceColumnDefinitionApplyConfiguration { b.JSONPath = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/externaldocumentation.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/externaldocumentation.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // ExternalDocumentationApplyConfiguration represents a declarative configuration of the ExternalDocumentation type for use // with apply. type ExternalDocumentationApplyConfiguration struct { Description *string `json:"description,omitempty"` URL *string `json:"url,omitempty"` } // ExternalDocumentationApplyConfiguration constructs a declarative configuration of the ExternalDocumentation type for use with // apply. func ExternalDocumentation() *ExternalDocumentationApplyConfiguration { return &ExternalDocumentationApplyConfiguration{} } // WithDescription sets the Description field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Description field is set to the value of the last call. func (b *ExternalDocumentationApplyConfiguration) WithDescription(value string) *ExternalDocumentationApplyConfiguration { b.Description = &value return b } // WithURL sets the URL field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the URL field is set to the value of the last call. func (b *ExternalDocumentationApplyConfiguration) WithURL(value string) *ExternalDocumentationApplyConfiguration { b.URL = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // CustomResourceDefinitionStatusApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionStatus type for use // with apply. type CustomResourceDefinitionStatusApplyConfiguration struct { Conditions []CustomResourceDefinitionConditionApplyConfiguration `json:"conditions,omitempty"` AcceptedNames *CustomResourceDefinitionNamesApplyConfiguration `json:"acceptedNames,omitempty"` StoredVersions []string `json:"storedVersions,omitempty"` } // CustomResourceDefinitionStatusApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionStatus type for use with // apply. func CustomResourceDefinitionStatus() *CustomResourceDefinitionStatusApplyConfiguration { return &CustomResourceDefinitionStatusApplyConfiguration{} } // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. func (b *CustomResourceDefinitionStatusApplyConfiguration) WithConditions(values ...*CustomResourceDefinitionConditionApplyConfiguration) *CustomResourceDefinitionStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") } b.Conditions = append(b.Conditions, *values[i]) } return b } // WithAcceptedNames sets the AcceptedNames field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AcceptedNames field is set to the value of the last call. func (b *CustomResourceDefinitionStatusApplyConfiguration) WithAcceptedNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionStatusApplyConfiguration { b.AcceptedNames = value return b } // WithStoredVersions adds the given value to the StoredVersions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the StoredVersions field. func (b *CustomResourceDefinitionStatusApplyConfiguration) WithStoredVersions(values ...string) *CustomResourceDefinitionStatusApplyConfiguration { for i := range values { b.StoredVersions = append(b.StoredVersions, values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // CustomResourceDefinitionNamesApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionNames type for use // with apply. type CustomResourceDefinitionNamesApplyConfiguration struct { Plural *string `json:"plural,omitempty"` Singular *string `json:"singular,omitempty"` ShortNames []string `json:"shortNames,omitempty"` Kind *string `json:"kind,omitempty"` ListKind *string `json:"listKind,omitempty"` Categories []string `json:"categories,omitempty"` } // CustomResourceDefinitionNamesApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionNames type for use with // apply. func CustomResourceDefinitionNames() *CustomResourceDefinitionNamesApplyConfiguration { return &CustomResourceDefinitionNamesApplyConfiguration{} } // WithPlural sets the Plural field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Plural field is set to the value of the last call. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithPlural(value string) *CustomResourceDefinitionNamesApplyConfiguration { b.Plural = &value return b } // WithSingular sets the Singular field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Singular field is set to the value of the last call. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithSingular(value string) *CustomResourceDefinitionNamesApplyConfiguration { b.Singular = &value return b } // WithShortNames adds the given value to the ShortNames field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ShortNames field. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithShortNames(values ...string) *CustomResourceDefinitionNamesApplyConfiguration { for i := range values { b.ShortNames = append(b.ShortNames, values[i]) } return b } // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithKind(value string) *CustomResourceDefinitionNamesApplyConfiguration { b.Kind = &value return b } // WithListKind sets the ListKind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ListKind field is set to the value of the last call. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithListKind(value string) *CustomResourceDefinitionNamesApplyConfiguration { b.ListKind = &value return b } // WithCategories adds the given value to the Categories field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Categories field. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithCategories(values ...string) *CustomResourceDefinitionNamesApplyConfiguration { for i := range values { b.Categories = append(b.Categories, values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) // JSONSchemaPropsApplyConfiguration represents a declarative configuration of the JSONSchemaProps type for use // with apply. type JSONSchemaPropsApplyConfiguration struct { ID *string `json:"id,omitempty"` Schema *apiextensionsv1.JSONSchemaURL `json:"$schema,omitempty"` Ref *string `json:"$ref,omitempty"` Description *string `json:"description,omitempty"` Type *string `json:"type,omitempty"` Format *string `json:"format,omitempty"` Title *string `json:"title,omitempty"` Default *apiextensionsv1.JSON `json:"default,omitempty"` Maximum *float64 `json:"maximum,omitempty"` ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` Minimum *float64 `json:"minimum,omitempty"` ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` MaxLength *int64 `json:"maxLength,omitempty"` MinLength *int64 `json:"minLength,omitempty"` Pattern *string `json:"pattern,omitempty"` MaxItems *int64 `json:"maxItems,omitempty"` MinItems *int64 `json:"minItems,omitempty"` UniqueItems *bool `json:"uniqueItems,omitempty"` MultipleOf *float64 `json:"multipleOf,omitempty"` Enum []apiextensionsv1.JSON `json:"enum,omitempty"` MaxProperties *int64 `json:"maxProperties,omitempty"` MinProperties *int64 `json:"minProperties,omitempty"` Required []string `json:"required,omitempty"` Items *apiextensionsv1.JSONSchemaPropsOrArray `json:"items,omitempty"` AllOf []JSONSchemaPropsApplyConfiguration `json:"allOf,omitempty"` OneOf []JSONSchemaPropsApplyConfiguration `json:"oneOf,omitempty"` AnyOf []JSONSchemaPropsApplyConfiguration `json:"anyOf,omitempty"` Not *JSONSchemaPropsApplyConfiguration `json:"not,omitempty"` Properties map[string]JSONSchemaPropsApplyConfiguration `json:"properties,omitempty"` AdditionalProperties *apiextensionsv1.JSONSchemaPropsOrBool `json:"additionalProperties,omitempty"` PatternProperties map[string]JSONSchemaPropsApplyConfiguration `json:"patternProperties,omitempty"` Dependencies *apiextensionsv1.JSONSchemaDependencies `json:"dependencies,omitempty"` AdditionalItems *apiextensionsv1.JSONSchemaPropsOrBool `json:"additionalItems,omitempty"` Definitions *apiextensionsv1.JSONSchemaDefinitions `json:"definitions,omitempty"` ExternalDocs *ExternalDocumentationApplyConfiguration `json:"externalDocs,omitempty"` Example *apiextensionsv1.JSON `json:"example,omitempty"` Nullable *bool `json:"nullable,omitempty"` XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty"` XEmbeddedResource *bool `json:"x-kubernetes-embedded-resource,omitempty"` XIntOrString *bool `json:"x-kubernetes-int-or-string,omitempty"` XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty"` XListType *string `json:"x-kubernetes-list-type,omitempty"` XMapType *string `json:"x-kubernetes-map-type,omitempty"` XValidations *apiextensionsv1.ValidationRules `json:"x-kubernetes-validations,omitempty"` } // JSONSchemaPropsApplyConfiguration constructs a declarative configuration of the JSONSchemaProps type for use with // apply. func JSONSchemaProps() *JSONSchemaPropsApplyConfiguration { return &JSONSchemaPropsApplyConfiguration{} } // WithID sets the ID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ID field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithID(value string) *JSONSchemaPropsApplyConfiguration { b.ID = &value return b } // WithSchema sets the Schema field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Schema field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithSchema(value apiextensionsv1.JSONSchemaURL) *JSONSchemaPropsApplyConfiguration { b.Schema = &value return b } // WithRef sets the Ref field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Ref field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithRef(value string) *JSONSchemaPropsApplyConfiguration { b.Ref = &value return b } // WithDescription sets the Description field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Description field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithDescription(value string) *JSONSchemaPropsApplyConfiguration { b.Description = &value return b } // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithType(value string) *JSONSchemaPropsApplyConfiguration { b.Type = &value return b } // WithFormat sets the Format field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Format field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithFormat(value string) *JSONSchemaPropsApplyConfiguration { b.Format = &value return b } // WithTitle sets the Title field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Title field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithTitle(value string) *JSONSchemaPropsApplyConfiguration { b.Title = &value return b } // WithDefault sets the Default field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Default field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithDefault(value apiextensionsv1.JSON) *JSONSchemaPropsApplyConfiguration { b.Default = &value return b } // WithMaximum sets the Maximum field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Maximum field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMaximum(value float64) *JSONSchemaPropsApplyConfiguration { b.Maximum = &value return b } // WithExclusiveMaximum sets the ExclusiveMaximum field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ExclusiveMaximum field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithExclusiveMaximum(value bool) *JSONSchemaPropsApplyConfiguration { b.ExclusiveMaximum = &value return b } // WithMinimum sets the Minimum field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Minimum field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMinimum(value float64) *JSONSchemaPropsApplyConfiguration { b.Minimum = &value return b } // WithExclusiveMinimum sets the ExclusiveMinimum field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ExclusiveMinimum field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithExclusiveMinimum(value bool) *JSONSchemaPropsApplyConfiguration { b.ExclusiveMinimum = &value return b } // WithMaxLength sets the MaxLength field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MaxLength field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMaxLength(value int64) *JSONSchemaPropsApplyConfiguration { b.MaxLength = &value return b } // WithMinLength sets the MinLength field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinLength field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMinLength(value int64) *JSONSchemaPropsApplyConfiguration { b.MinLength = &value return b } // WithPattern sets the Pattern field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Pattern field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithPattern(value string) *JSONSchemaPropsApplyConfiguration { b.Pattern = &value return b } // WithMaxItems sets the MaxItems field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MaxItems field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMaxItems(value int64) *JSONSchemaPropsApplyConfiguration { b.MaxItems = &value return b } // WithMinItems sets the MinItems field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinItems field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMinItems(value int64) *JSONSchemaPropsApplyConfiguration { b.MinItems = &value return b } // WithUniqueItems sets the UniqueItems field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UniqueItems field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithUniqueItems(value bool) *JSONSchemaPropsApplyConfiguration { b.UniqueItems = &value return b } // WithMultipleOf sets the MultipleOf field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MultipleOf field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMultipleOf(value float64) *JSONSchemaPropsApplyConfiguration { b.MultipleOf = &value return b } // WithEnum adds the given value to the Enum field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Enum field. func (b *JSONSchemaPropsApplyConfiguration) WithEnum(values ...apiextensionsv1.JSON) *JSONSchemaPropsApplyConfiguration { for i := range values { b.Enum = append(b.Enum, values[i]) } return b } // WithMaxProperties sets the MaxProperties field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MaxProperties field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMaxProperties(value int64) *JSONSchemaPropsApplyConfiguration { b.MaxProperties = &value return b } // WithMinProperties sets the MinProperties field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinProperties field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMinProperties(value int64) *JSONSchemaPropsApplyConfiguration { b.MinProperties = &value return b } // WithRequired adds the given value to the Required field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Required field. func (b *JSONSchemaPropsApplyConfiguration) WithRequired(values ...string) *JSONSchemaPropsApplyConfiguration { for i := range values { b.Required = append(b.Required, values[i]) } return b } // WithItems sets the Items field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Items field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithItems(value apiextensionsv1.JSONSchemaPropsOrArray) *JSONSchemaPropsApplyConfiguration { b.Items = &value return b } // WithAllOf adds the given value to the AllOf field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AllOf field. func (b *JSONSchemaPropsApplyConfiguration) WithAllOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithAllOf") } b.AllOf = append(b.AllOf, *values[i]) } return b } // WithOneOf adds the given value to the OneOf field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OneOf field. func (b *JSONSchemaPropsApplyConfiguration) WithOneOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithOneOf") } b.OneOf = append(b.OneOf, *values[i]) } return b } // WithAnyOf adds the given value to the AnyOf field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AnyOf field. func (b *JSONSchemaPropsApplyConfiguration) WithAnyOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithAnyOf") } b.AnyOf = append(b.AnyOf, *values[i]) } return b } // WithNot sets the Not field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Not field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithNot(value *JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { b.Not = value return b } // WithProperties puts the entries into the Properties field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Properties field, // overwriting an existing map entries in Properties field with the same key. func (b *JSONSchemaPropsApplyConfiguration) WithProperties(entries map[string]JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { if b.Properties == nil && len(entries) > 0 { b.Properties = make(map[string]JSONSchemaPropsApplyConfiguration, len(entries)) } for k, v := range entries { b.Properties[k] = v } return b } // WithAdditionalProperties sets the AdditionalProperties field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AdditionalProperties field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithAdditionalProperties(value apiextensionsv1.JSONSchemaPropsOrBool) *JSONSchemaPropsApplyConfiguration { b.AdditionalProperties = &value return b } // WithPatternProperties puts the entries into the PatternProperties field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the PatternProperties field, // overwriting an existing map entries in PatternProperties field with the same key. func (b *JSONSchemaPropsApplyConfiguration) WithPatternProperties(entries map[string]JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { if b.PatternProperties == nil && len(entries) > 0 { b.PatternProperties = make(map[string]JSONSchemaPropsApplyConfiguration, len(entries)) } for k, v := range entries { b.PatternProperties[k] = v } return b } // WithDependencies sets the Dependencies field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Dependencies field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithDependencies(value apiextensionsv1.JSONSchemaDependencies) *JSONSchemaPropsApplyConfiguration { b.Dependencies = &value return b } // WithAdditionalItems sets the AdditionalItems field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AdditionalItems field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithAdditionalItems(value apiextensionsv1.JSONSchemaPropsOrBool) *JSONSchemaPropsApplyConfiguration { b.AdditionalItems = &value return b } // WithDefinitions sets the Definitions field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Definitions field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithDefinitions(value apiextensionsv1.JSONSchemaDefinitions) *JSONSchemaPropsApplyConfiguration { b.Definitions = &value return b } // WithExternalDocs sets the ExternalDocs field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ExternalDocs field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithExternalDocs(value *ExternalDocumentationApplyConfiguration) *JSONSchemaPropsApplyConfiguration { b.ExternalDocs = value return b } // WithExample sets the Example field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Example field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithExample(value apiextensionsv1.JSON) *JSONSchemaPropsApplyConfiguration { b.Example = &value return b } // WithNullable sets the Nullable field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Nullable field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithNullable(value bool) *JSONSchemaPropsApplyConfiguration { b.Nullable = &value return b } // WithXPreserveUnknownFields sets the XPreserveUnknownFields field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XPreserveUnknownFields field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXPreserveUnknownFields(value bool) *JSONSchemaPropsApplyConfiguration { b.XPreserveUnknownFields = &value return b } // WithXEmbeddedResource sets the XEmbeddedResource field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XEmbeddedResource field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXEmbeddedResource(value bool) *JSONSchemaPropsApplyConfiguration { b.XEmbeddedResource = &value return b } // WithXIntOrString sets the XIntOrString field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XIntOrString field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXIntOrString(value bool) *JSONSchemaPropsApplyConfiguration { b.XIntOrString = &value return b } // WithXListMapKeys adds the given value to the XListMapKeys field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the XListMapKeys field. func (b *JSONSchemaPropsApplyConfiguration) WithXListMapKeys(values ...string) *JSONSchemaPropsApplyConfiguration { for i := range values { b.XListMapKeys = append(b.XListMapKeys, values[i]) } return b } // WithXListType sets the XListType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XListType field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXListType(value string) *JSONSchemaPropsApplyConfiguration { b.XListType = &value return b } // WithXMapType sets the XMapType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XMapType field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXMapType(value string) *JSONSchemaPropsApplyConfiguration { b.XMapType = &value return b } // WithXValidations sets the XValidations field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XValidations field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXValidations(value apiextensionsv1.ValidationRules) *JSONSchemaPropsApplyConfiguration { b.XValidations = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CustomResourceDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceDefinition type for use // with apply. type CustomResourceDefinitionApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *CustomResourceDefinitionSpecApplyConfiguration `json:"spec,omitempty"` Status *CustomResourceDefinitionStatusApplyConfiguration `json:"status,omitempty"` } // CustomResourceDefinition constructs a declarative configuration of the CustomResourceDefinition type for use with // apply. func CustomResourceDefinition(name string) *CustomResourceDefinitionApplyConfiguration { b := &CustomResourceDefinitionApplyConfiguration{} b.WithName(name) b.WithKind("CustomResourceDefinition") b.WithAPIVersion("apiextensions.k8s.io/v1") return b } // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithKind(value string) *CustomResourceDefinitionApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithAPIVersion(value string) *CustomResourceDefinitionApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithName(value string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GenerateName field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithGenerateName(value string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Namespace field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithNamespace(value string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithUID(value types.UID) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithResourceVersion(value string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Generation field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithGeneration(value int64) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *CustomResourceDefinitionApplyConfiguration) WithLabels(entries map[string]string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *CustomResourceDefinitionApplyConfiguration) WithAnnotations(entries map[string]string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. func (b *CustomResourceDefinitionApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Finalizers field. func (b *CustomResourceDefinitionApplyConfiguration) WithFinalizers(values ...string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CustomResourceDefinitionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Spec field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithSpec(value *CustomResourceDefinitionSpecApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { b.Spec = value return b } // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithStatus(value *CustomResourceDefinitionStatusApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { b.Status = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *CustomResourceDefinitionApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // SelectableFieldApplyConfiguration represents a declarative configuration of the SelectableField type for use // with apply. type SelectableFieldApplyConfiguration struct { JSONPath *string `json:"jsonPath,omitempty"` } // SelectableFieldApplyConfiguration constructs a declarative configuration of the SelectableField type for use with // apply. func SelectableField() *SelectableFieldApplyConfiguration { return &SelectableFieldApplyConfiguration{} } // WithJSONPath sets the JSONPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the JSONPath field is set to the value of the last call. func (b *SelectableFieldApplyConfiguration) WithJSONPath(value string) *SelectableFieldApplyConfiguration { b.JSONPath = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // WebhookClientConfigApplyConfiguration represents a declarative configuration of the WebhookClientConfig type for use // with apply. type WebhookClientConfigApplyConfiguration struct { URL *string `json:"url,omitempty"` Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` CABundle []byte `json:"caBundle,omitempty"` } // WebhookClientConfigApplyConfiguration constructs a declarative configuration of the WebhookClientConfig type for use with // apply. func WebhookClientConfig() *WebhookClientConfigApplyConfiguration { return &WebhookClientConfigApplyConfiguration{} } // WithURL sets the URL field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the URL field is set to the value of the last call. func (b *WebhookClientConfigApplyConfiguration) WithURL(value string) *WebhookClientConfigApplyConfiguration { b.URL = &value return b } // WithService sets the Service field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Service field is set to the value of the last call. func (b *WebhookClientConfigApplyConfiguration) WithService(value *ServiceReferenceApplyConfiguration) *WebhookClientConfigApplyConfiguration { b.Service = value return b } // WithCABundle adds the given value to the CABundle field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the CABundle field. func (b *WebhookClientConfigApplyConfiguration) WithCABundle(values ...byte) *WebhookClientConfigApplyConfiguration { for i := range values { b.CABundle = append(b.CABundle, values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/servicereference.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/servicereference.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 // ServiceReferenceApplyConfiguration represents a declarative configuration of the ServiceReference type for use // with apply. type ServiceReferenceApplyConfiguration struct { Namespace *string `json:"namespace,omitempty"` Name *string `json:"name,omitempty"` Path *string `json:"path,omitempty"` Port *int32 `json:"port,omitempty"` } // ServiceReferenceApplyConfiguration constructs a declarative configuration of the ServiceReference type for use with // apply. func ServiceReference() *ServiceReferenceApplyConfiguration { return &ServiceReferenceApplyConfiguration{} } // WithNamespace sets the Namespace field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Namespace field is set to the value of the last call. func (b *ServiceReferenceApplyConfiguration) WithNamespace(value string) *ServiceReferenceApplyConfiguration { b.Namespace = &value return b } // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *ServiceReferenceApplyConfiguration) WithName(value string) *ServiceReferenceApplyConfiguration { b.Name = &value return b } // WithPath sets the Path field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Path field is set to the value of the last call. func (b *ServiceReferenceApplyConfiguration) WithPath(value string) *ServiceReferenceApplyConfiguration { b.Path = &value return b } // WithPort sets the Port field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Port field is set to the value of the last call. func (b *ServiceReferenceApplyConfiguration) WithPort(value int32) *ServiceReferenceApplyConfiguration { b.Port = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresourcescale.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresourcescale.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 // CustomResourceSubresourceScaleApplyConfiguration represents a declarative configuration of the CustomResourceSubresourceScale type for use // with apply. type CustomResourceSubresourceScaleApplyConfiguration struct { SpecReplicasPath *string `json:"specReplicasPath,omitempty"` StatusReplicasPath *string `json:"statusReplicasPath,omitempty"` LabelSelectorPath *string `json:"labelSelectorPath,omitempty"` } // CustomResourceSubresourceScaleApplyConfiguration constructs a declarative configuration of the CustomResourceSubresourceScale type for use with // apply. func CustomResourceSubresourceScale() *CustomResourceSubresourceScaleApplyConfiguration { return &CustomResourceSubresourceScaleApplyConfiguration{} } // WithSpecReplicasPath sets the SpecReplicasPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SpecReplicasPath field is set to the value of the last call. func (b *CustomResourceSubresourceScaleApplyConfiguration) WithSpecReplicasPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { b.SpecReplicasPath = &value return b } // WithStatusReplicasPath sets the StatusReplicasPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StatusReplicasPath field is set to the value of the last call. func (b *CustomResourceSubresourceScaleApplyConfiguration) WithStatusReplicasPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { b.StatusReplicasPath = &value return b } // WithLabelSelectorPath sets the LabelSelectorPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LabelSelectorPath field is set to the value of the last call. func (b *CustomResourceSubresourceScaleApplyConfiguration) WithLabelSelectorPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { b.LabelSelectorPath = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourceconversion.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourceconversion.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 import ( apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" ) // CustomResourceConversionApplyConfiguration represents a declarative configuration of the CustomResourceConversion type for use // with apply. type CustomResourceConversionApplyConfiguration struct { Strategy *apiextensionsv1beta1.ConversionStrategyType `json:"strategy,omitempty"` WebhookClientConfig *WebhookClientConfigApplyConfiguration `json:"webhookClientConfig,omitempty"` ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty"` } // CustomResourceConversionApplyConfiguration constructs a declarative configuration of the CustomResourceConversion type for use with // apply. func CustomResourceConversion() *CustomResourceConversionApplyConfiguration { return &CustomResourceConversionApplyConfiguration{} } // WithStrategy sets the Strategy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Strategy field is set to the value of the last call. func (b *CustomResourceConversionApplyConfiguration) WithStrategy(value apiextensionsv1beta1.ConversionStrategyType) *CustomResourceConversionApplyConfiguration { b.Strategy = &value return b } // WithWebhookClientConfig sets the WebhookClientConfig field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the WebhookClientConfig field is set to the value of the last call. func (b *CustomResourceConversionApplyConfiguration) WithWebhookClientConfig(value *WebhookClientConfigApplyConfiguration) *CustomResourceConversionApplyConfiguration { b.WebhookClientConfig = value return b } // WithConversionReviewVersions adds the given value to the ConversionReviewVersions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ConversionReviewVersions field. func (b *CustomResourceConversionApplyConfiguration) WithConversionReviewVersions(values ...string) *CustomResourceConversionApplyConfiguration { for i := range values { b.ConversionReviewVersions = append(b.ConversionReviewVersions, values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 import ( apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" ) // CustomResourceDefinitionSpecApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionSpec type for use // with apply. type CustomResourceDefinitionSpecApplyConfiguration struct { Group *string `json:"group,omitempty"` Version *string `json:"version,omitempty"` Names *CustomResourceDefinitionNamesApplyConfiguration `json:"names,omitempty"` Scope *apiextensionsv1beta1.ResourceScope `json:"scope,omitempty"` Validation *CustomResourceValidationApplyConfiguration `json:"validation,omitempty"` Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` } // CustomResourceDefinitionSpecApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionSpec type for use with // apply. func CustomResourceDefinitionSpec() *CustomResourceDefinitionSpecApplyConfiguration { return &CustomResourceDefinitionSpecApplyConfiguration{} } // WithGroup sets the Group field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Group field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithGroup(value string) *CustomResourceDefinitionSpecApplyConfiguration { b.Group = &value return b } // WithVersion sets the Version field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithVersion(value string) *CustomResourceDefinitionSpecApplyConfiguration { b.Version = &value return b } // WithNames sets the Names field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Names field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { b.Names = value return b } // WithScope sets the Scope field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Scope field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithScope(value apiextensionsv1beta1.ResourceScope) *CustomResourceDefinitionSpecApplyConfiguration { b.Scope = &value return b } // WithValidation sets the Validation field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Validation field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithValidation(value *CustomResourceValidationApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { b.Validation = value return b } // WithSubresources sets the Subresources field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Subresources field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithSubresources(value *CustomResourceSubresourcesApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { b.Subresources = value return b } // WithVersions adds the given value to the Versions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Versions field. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithVersions(values ...*CustomResourceDefinitionVersionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithVersions") } b.Versions = append(b.Versions, *values[i]) } return b } // WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithAdditionalPrinterColumns(values ...*CustomResourceColumnDefinitionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithAdditionalPrinterColumns") } b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, *values[i]) } return b } // WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the SelectableFields field. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithSelectableFields") } b.SelectableFields = append(b.SelectableFields, *values[i]) } return b } // WithConversion sets the Conversion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Conversion field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithConversion(value *CustomResourceConversionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { b.Conversion = value return b } // WithPreserveUnknownFields sets the PreserveUnknownFields field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PreserveUnknownFields field is set to the value of the last call. func (b *CustomResourceDefinitionSpecApplyConfiguration) WithPreserveUnknownFields(value bool) *CustomResourceDefinitionSpecApplyConfiguration { b.PreserveUnknownFields = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 // CustomResourceDefinitionVersionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionVersion type for use // with apply. type CustomResourceDefinitionVersionApplyConfiguration struct { Name *string `json:"name,omitempty"` Served *bool `json:"served,omitempty"` Storage *bool `json:"storage,omitempty"` Deprecated *bool `json:"deprecated,omitempty"` DeprecationWarning *string `json:"deprecationWarning,omitempty"` Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` } // CustomResourceDefinitionVersionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionVersion type for use with // apply. func CustomResourceDefinitionVersion() *CustomResourceDefinitionVersionApplyConfiguration { return &CustomResourceDefinitionVersionApplyConfiguration{} } // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithName(value string) *CustomResourceDefinitionVersionApplyConfiguration { b.Name = &value return b } // WithServed sets the Served field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Served field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithServed(value bool) *CustomResourceDefinitionVersionApplyConfiguration { b.Served = &value return b } // WithStorage sets the Storage field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Storage field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithStorage(value bool) *CustomResourceDefinitionVersionApplyConfiguration { b.Storage = &value return b } // WithDeprecated sets the Deprecated field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Deprecated field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecated(value bool) *CustomResourceDefinitionVersionApplyConfiguration { b.Deprecated = &value return b } // WithDeprecationWarning sets the DeprecationWarning field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeprecationWarning field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecationWarning(value string) *CustomResourceDefinitionVersionApplyConfiguration { b.DeprecationWarning = &value return b } // WithSchema sets the Schema field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Schema field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSchema(value *CustomResourceValidationApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { b.Schema = value return b } // WithSubresources sets the Subresources field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Subresources field is set to the value of the last call. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSubresources(value *CustomResourceSubresourcesApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { b.Subresources = value return b } // WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithAdditionalPrinterColumns(values ...*CustomResourceColumnDefinitionApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithAdditionalPrinterColumns") } b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, *values[i]) } return b } // WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the SelectableFields field. func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithSelectableFields") } b.SelectableFields = append(b.SelectableFields, *values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresources.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresources.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 import ( apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" ) // CustomResourceSubresourcesApplyConfiguration represents a declarative configuration of the CustomResourceSubresources type for use // with apply. type CustomResourceSubresourcesApplyConfiguration struct { Status *apiextensionsv1beta1.CustomResourceSubresourceStatus `json:"status,omitempty"` Scale *CustomResourceSubresourceScaleApplyConfiguration `json:"scale,omitempty"` } // CustomResourceSubresourcesApplyConfiguration constructs a declarative configuration of the CustomResourceSubresources type for use with // apply. func CustomResourceSubresources() *CustomResourceSubresourcesApplyConfiguration { return &CustomResourceSubresourcesApplyConfiguration{} } // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. func (b *CustomResourceSubresourcesApplyConfiguration) WithStatus(value apiextensionsv1beta1.CustomResourceSubresourceStatus) *CustomResourceSubresourcesApplyConfiguration { b.Status = &value return b } // WithScale sets the Scale field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Scale field is set to the value of the last call. func (b *CustomResourceSubresourcesApplyConfiguration) WithScale(value *CustomResourceSubresourceScaleApplyConfiguration) *CustomResourceSubresourcesApplyConfiguration { b.Scale = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/validationrule.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/validationrule.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 import ( apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" ) // ValidationRuleApplyConfiguration represents a declarative configuration of the ValidationRule type for use // with apply. type ValidationRuleApplyConfiguration struct { Rule *string `json:"rule,omitempty"` Message *string `json:"message,omitempty"` MessageExpression *string `json:"messageExpression,omitempty"` Reason *apiextensionsv1beta1.FieldValueErrorReason `json:"reason,omitempty"` FieldPath *string `json:"fieldPath,omitempty"` OptionalOldSelf *bool `json:"optionalOldSelf,omitempty"` } // ValidationRuleApplyConfiguration constructs a declarative configuration of the ValidationRule type for use with // apply. func ValidationRule() *ValidationRuleApplyConfiguration { return &ValidationRuleApplyConfiguration{} } // WithRule sets the Rule field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Rule field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithRule(value string) *ValidationRuleApplyConfiguration { b.Rule = &value return b } // WithMessage sets the Message field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Message field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithMessage(value string) *ValidationRuleApplyConfiguration { b.Message = &value return b } // WithMessageExpression sets the MessageExpression field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MessageExpression field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithMessageExpression(value string) *ValidationRuleApplyConfiguration { b.MessageExpression = &value return b } // WithReason sets the Reason field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Reason field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithReason(value apiextensionsv1beta1.FieldValueErrorReason) *ValidationRuleApplyConfiguration { b.Reason = &value return b } // WithFieldPath sets the FieldPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FieldPath field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithFieldPath(value string) *ValidationRuleApplyConfiguration { b.FieldPath = &value return b } // WithOptionalOldSelf sets the OptionalOldSelf field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OptionalOldSelf field is set to the value of the last call. func (b *ValidationRuleApplyConfiguration) WithOptionalOldSelf(value bool) *ValidationRuleApplyConfiguration { b.OptionalOldSelf = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcevalidation.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcevalidation.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 // CustomResourceValidationApplyConfiguration represents a declarative configuration of the CustomResourceValidation type for use // with apply. type CustomResourceValidationApplyConfiguration struct { OpenAPIV3Schema *JSONSchemaPropsApplyConfiguration `json:"openAPIV3Schema,omitempty"` } // CustomResourceValidationApplyConfiguration constructs a declarative configuration of the CustomResourceValidation type for use with // apply. func CustomResourceValidation() *CustomResourceValidationApplyConfiguration { return &CustomResourceValidationApplyConfiguration{} } // WithOpenAPIV3Schema sets the OpenAPIV3Schema field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OpenAPIV3Schema field is set to the value of the last call. func (b *CustomResourceValidationApplyConfiguration) WithOpenAPIV3Schema(value *JSONSchemaPropsApplyConfiguration) *CustomResourceValidationApplyConfiguration { b.OpenAPIV3Schema = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitioncondition.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitioncondition.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 import ( apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // CustomResourceDefinitionConditionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionCondition type for use // with apply. type CustomResourceDefinitionConditionApplyConfiguration struct { Type *apiextensionsv1beta1.CustomResourceDefinitionConditionType `json:"type,omitempty"` Status *apiextensionsv1beta1.ConditionStatus `json:"status,omitempty"` LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` Reason *string `json:"reason,omitempty"` Message *string `json:"message,omitempty"` } // CustomResourceDefinitionConditionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionCondition type for use with // apply. func CustomResourceDefinitionCondition() *CustomResourceDefinitionConditionApplyConfiguration { return &CustomResourceDefinitionConditionApplyConfiguration{} } // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. func (b *CustomResourceDefinitionConditionApplyConfiguration) WithType(value apiextensionsv1beta1.CustomResourceDefinitionConditionType) *CustomResourceDefinitionConditionApplyConfiguration { b.Type = &value return b } // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. func (b *CustomResourceDefinitionConditionApplyConfiguration) WithStatus(value apiextensionsv1beta1.ConditionStatus) *CustomResourceDefinitionConditionApplyConfiguration { b.Status = &value return b } // WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LastTransitionTime field is set to the value of the last call. func (b *CustomResourceDefinitionConditionApplyConfiguration) WithLastTransitionTime(value v1.Time) *CustomResourceDefinitionConditionApplyConfiguration { b.LastTransitionTime = &value return b } // WithReason sets the Reason field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Reason field is set to the value of the last call. func (b *CustomResourceDefinitionConditionApplyConfiguration) WithReason(value string) *CustomResourceDefinitionConditionApplyConfiguration { b.Reason = &value return b } // WithMessage sets the Message field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Message field is set to the value of the last call. func (b *CustomResourceDefinitionConditionApplyConfiguration) WithMessage(value string) *CustomResourceDefinitionConditionApplyConfiguration { b.Message = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcecolumndefinition.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcecolumndefinition.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 // CustomResourceColumnDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceColumnDefinition type for use // with apply. type CustomResourceColumnDefinitionApplyConfiguration struct { Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` Format *string `json:"format,omitempty"` Description *string `json:"description,omitempty"` Priority *int32 `json:"priority,omitempty"` JSONPath *string `json:"JSONPath,omitempty"` } // CustomResourceColumnDefinitionApplyConfiguration constructs a declarative configuration of the CustomResourceColumnDefinition type for use with // apply. func CustomResourceColumnDefinition() *CustomResourceColumnDefinitionApplyConfiguration { return &CustomResourceColumnDefinitionApplyConfiguration{} } // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithName(value string) *CustomResourceColumnDefinitionApplyConfiguration { b.Name = &value return b } // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithType(value string) *CustomResourceColumnDefinitionApplyConfiguration { b.Type = &value return b } // WithFormat sets the Format field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Format field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithFormat(value string) *CustomResourceColumnDefinitionApplyConfiguration { b.Format = &value return b } // WithDescription sets the Description field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Description field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithDescription(value string) *CustomResourceColumnDefinitionApplyConfiguration { b.Description = &value return b } // WithPriority sets the Priority field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Priority field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithPriority(value int32) *CustomResourceColumnDefinitionApplyConfiguration { b.Priority = &value return b } // WithJSONPath sets the JSONPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the JSONPath field is set to the value of the last call. func (b *CustomResourceColumnDefinitionApplyConfiguration) WithJSONPath(value string) *CustomResourceColumnDefinitionApplyConfiguration { b.JSONPath = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/externaldocumentation.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/externaldocumentation.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 // ExternalDocumentationApplyConfiguration represents a declarative configuration of the ExternalDocumentation type for use // with apply. type ExternalDocumentationApplyConfiguration struct { Description *string `json:"description,omitempty"` URL *string `json:"url,omitempty"` } // ExternalDocumentationApplyConfiguration constructs a declarative configuration of the ExternalDocumentation type for use with // apply. func ExternalDocumentation() *ExternalDocumentationApplyConfiguration { return &ExternalDocumentationApplyConfiguration{} } // WithDescription sets the Description field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Description field is set to the value of the last call. func (b *ExternalDocumentationApplyConfiguration) WithDescription(value string) *ExternalDocumentationApplyConfiguration { b.Description = &value return b } // WithURL sets the URL field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the URL field is set to the value of the last call. func (b *ExternalDocumentationApplyConfiguration) WithURL(value string) *ExternalDocumentationApplyConfiguration { b.URL = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionstatus.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionstatus.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 // CustomResourceDefinitionStatusApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionStatus type for use // with apply. type CustomResourceDefinitionStatusApplyConfiguration struct { Conditions []CustomResourceDefinitionConditionApplyConfiguration `json:"conditions,omitempty"` AcceptedNames *CustomResourceDefinitionNamesApplyConfiguration `json:"acceptedNames,omitempty"` StoredVersions []string `json:"storedVersions,omitempty"` } // CustomResourceDefinitionStatusApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionStatus type for use with // apply. func CustomResourceDefinitionStatus() *CustomResourceDefinitionStatusApplyConfiguration { return &CustomResourceDefinitionStatusApplyConfiguration{} } // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. func (b *CustomResourceDefinitionStatusApplyConfiguration) WithConditions(values ...*CustomResourceDefinitionConditionApplyConfiguration) *CustomResourceDefinitionStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") } b.Conditions = append(b.Conditions, *values[i]) } return b } // WithAcceptedNames sets the AcceptedNames field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AcceptedNames field is set to the value of the last call. func (b *CustomResourceDefinitionStatusApplyConfiguration) WithAcceptedNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionStatusApplyConfiguration { b.AcceptedNames = value return b } // WithStoredVersions adds the given value to the StoredVersions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the StoredVersions field. func (b *CustomResourceDefinitionStatusApplyConfiguration) WithStoredVersions(values ...string) *CustomResourceDefinitionStatusApplyConfiguration { for i := range values { b.StoredVersions = append(b.StoredVersions, values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionnames.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionnames.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 // CustomResourceDefinitionNamesApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionNames type for use // with apply. type CustomResourceDefinitionNamesApplyConfiguration struct { Plural *string `json:"plural,omitempty"` Singular *string `json:"singular,omitempty"` ShortNames []string `json:"shortNames,omitempty"` Kind *string `json:"kind,omitempty"` ListKind *string `json:"listKind,omitempty"` Categories []string `json:"categories,omitempty"` } // CustomResourceDefinitionNamesApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionNames type for use with // apply. func CustomResourceDefinitionNames() *CustomResourceDefinitionNamesApplyConfiguration { return &CustomResourceDefinitionNamesApplyConfiguration{} } // WithPlural sets the Plural field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Plural field is set to the value of the last call. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithPlural(value string) *CustomResourceDefinitionNamesApplyConfiguration { b.Plural = &value return b } // WithSingular sets the Singular field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Singular field is set to the value of the last call. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithSingular(value string) *CustomResourceDefinitionNamesApplyConfiguration { b.Singular = &value return b } // WithShortNames adds the given value to the ShortNames field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ShortNames field. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithShortNames(values ...string) *CustomResourceDefinitionNamesApplyConfiguration { for i := range values { b.ShortNames = append(b.ShortNames, values[i]) } return b } // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithKind(value string) *CustomResourceDefinitionNamesApplyConfiguration { b.Kind = &value return b } // WithListKind sets the ListKind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ListKind field is set to the value of the last call. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithListKind(value string) *CustomResourceDefinitionNamesApplyConfiguration { b.ListKind = &value return b } // WithCategories adds the given value to the Categories field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Categories field. func (b *CustomResourceDefinitionNamesApplyConfiguration) WithCategories(values ...string) *CustomResourceDefinitionNamesApplyConfiguration { for i := range values { b.Categories = append(b.Categories, values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 import ( apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" ) // JSONSchemaPropsApplyConfiguration represents a declarative configuration of the JSONSchemaProps type for use // with apply. type JSONSchemaPropsApplyConfiguration struct { ID *string `json:"id,omitempty"` Schema *apiextensionsv1beta1.JSONSchemaURL `json:"$schema,omitempty"` Ref *string `json:"$ref,omitempty"` Description *string `json:"description,omitempty"` Type *string `json:"type,omitempty"` Format *string `json:"format,omitempty"` Title *string `json:"title,omitempty"` Default *apiextensionsv1beta1.JSON `json:"default,omitempty"` Maximum *float64 `json:"maximum,omitempty"` ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` Minimum *float64 `json:"minimum,omitempty"` ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` MaxLength *int64 `json:"maxLength,omitempty"` MinLength *int64 `json:"minLength,omitempty"` Pattern *string `json:"pattern,omitempty"` MaxItems *int64 `json:"maxItems,omitempty"` MinItems *int64 `json:"minItems,omitempty"` UniqueItems *bool `json:"uniqueItems,omitempty"` MultipleOf *float64 `json:"multipleOf,omitempty"` Enum []apiextensionsv1beta1.JSON `json:"enum,omitempty"` MaxProperties *int64 `json:"maxProperties,omitempty"` MinProperties *int64 `json:"minProperties,omitempty"` Required []string `json:"required,omitempty"` Items *apiextensionsv1beta1.JSONSchemaPropsOrArray `json:"items,omitempty"` AllOf []JSONSchemaPropsApplyConfiguration `json:"allOf,omitempty"` OneOf []JSONSchemaPropsApplyConfiguration `json:"oneOf,omitempty"` AnyOf []JSONSchemaPropsApplyConfiguration `json:"anyOf,omitempty"` Not *JSONSchemaPropsApplyConfiguration `json:"not,omitempty"` Properties map[string]JSONSchemaPropsApplyConfiguration `json:"properties,omitempty"` AdditionalProperties *apiextensionsv1beta1.JSONSchemaPropsOrBool `json:"additionalProperties,omitempty"` PatternProperties map[string]JSONSchemaPropsApplyConfiguration `json:"patternProperties,omitempty"` Dependencies *apiextensionsv1beta1.JSONSchemaDependencies `json:"dependencies,omitempty"` AdditionalItems *apiextensionsv1beta1.JSONSchemaPropsOrBool `json:"additionalItems,omitempty"` Definitions *apiextensionsv1beta1.JSONSchemaDefinitions `json:"definitions,omitempty"` ExternalDocs *ExternalDocumentationApplyConfiguration `json:"externalDocs,omitempty"` Example *apiextensionsv1beta1.JSON `json:"example,omitempty"` Nullable *bool `json:"nullable,omitempty"` XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty"` XEmbeddedResource *bool `json:"x-kubernetes-embedded-resource,omitempty"` XIntOrString *bool `json:"x-kubernetes-int-or-string,omitempty"` XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty"` XListType *string `json:"x-kubernetes-list-type,omitempty"` XMapType *string `json:"x-kubernetes-map-type,omitempty"` XValidations *apiextensionsv1beta1.ValidationRules `json:"x-kubernetes-validations,omitempty"` } // JSONSchemaPropsApplyConfiguration constructs a declarative configuration of the JSONSchemaProps type for use with // apply. func JSONSchemaProps() *JSONSchemaPropsApplyConfiguration { return &JSONSchemaPropsApplyConfiguration{} } // WithID sets the ID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ID field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithID(value string) *JSONSchemaPropsApplyConfiguration { b.ID = &value return b } // WithSchema sets the Schema field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Schema field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithSchema(value apiextensionsv1beta1.JSONSchemaURL) *JSONSchemaPropsApplyConfiguration { b.Schema = &value return b } // WithRef sets the Ref field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Ref field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithRef(value string) *JSONSchemaPropsApplyConfiguration { b.Ref = &value return b } // WithDescription sets the Description field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Description field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithDescription(value string) *JSONSchemaPropsApplyConfiguration { b.Description = &value return b } // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithType(value string) *JSONSchemaPropsApplyConfiguration { b.Type = &value return b } // WithFormat sets the Format field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Format field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithFormat(value string) *JSONSchemaPropsApplyConfiguration { b.Format = &value return b } // WithTitle sets the Title field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Title field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithTitle(value string) *JSONSchemaPropsApplyConfiguration { b.Title = &value return b } // WithDefault sets the Default field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Default field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithDefault(value apiextensionsv1beta1.JSON) *JSONSchemaPropsApplyConfiguration { b.Default = &value return b } // WithMaximum sets the Maximum field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Maximum field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMaximum(value float64) *JSONSchemaPropsApplyConfiguration { b.Maximum = &value return b } // WithExclusiveMaximum sets the ExclusiveMaximum field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ExclusiveMaximum field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithExclusiveMaximum(value bool) *JSONSchemaPropsApplyConfiguration { b.ExclusiveMaximum = &value return b } // WithMinimum sets the Minimum field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Minimum field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMinimum(value float64) *JSONSchemaPropsApplyConfiguration { b.Minimum = &value return b } // WithExclusiveMinimum sets the ExclusiveMinimum field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ExclusiveMinimum field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithExclusiveMinimum(value bool) *JSONSchemaPropsApplyConfiguration { b.ExclusiveMinimum = &value return b } // WithMaxLength sets the MaxLength field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MaxLength field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMaxLength(value int64) *JSONSchemaPropsApplyConfiguration { b.MaxLength = &value return b } // WithMinLength sets the MinLength field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinLength field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMinLength(value int64) *JSONSchemaPropsApplyConfiguration { b.MinLength = &value return b } // WithPattern sets the Pattern field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Pattern field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithPattern(value string) *JSONSchemaPropsApplyConfiguration { b.Pattern = &value return b } // WithMaxItems sets the MaxItems field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MaxItems field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMaxItems(value int64) *JSONSchemaPropsApplyConfiguration { b.MaxItems = &value return b } // WithMinItems sets the MinItems field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinItems field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMinItems(value int64) *JSONSchemaPropsApplyConfiguration { b.MinItems = &value return b } // WithUniqueItems sets the UniqueItems field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UniqueItems field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithUniqueItems(value bool) *JSONSchemaPropsApplyConfiguration { b.UniqueItems = &value return b } // WithMultipleOf sets the MultipleOf field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MultipleOf field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMultipleOf(value float64) *JSONSchemaPropsApplyConfiguration { b.MultipleOf = &value return b } // WithEnum adds the given value to the Enum field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Enum field. func (b *JSONSchemaPropsApplyConfiguration) WithEnum(values ...apiextensionsv1beta1.JSON) *JSONSchemaPropsApplyConfiguration { for i := range values { b.Enum = append(b.Enum, values[i]) } return b } // WithMaxProperties sets the MaxProperties field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MaxProperties field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMaxProperties(value int64) *JSONSchemaPropsApplyConfiguration { b.MaxProperties = &value return b } // WithMinProperties sets the MinProperties field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinProperties field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithMinProperties(value int64) *JSONSchemaPropsApplyConfiguration { b.MinProperties = &value return b } // WithRequired adds the given value to the Required field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Required field. func (b *JSONSchemaPropsApplyConfiguration) WithRequired(values ...string) *JSONSchemaPropsApplyConfiguration { for i := range values { b.Required = append(b.Required, values[i]) } return b } // WithItems sets the Items field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Items field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithItems(value apiextensionsv1beta1.JSONSchemaPropsOrArray) *JSONSchemaPropsApplyConfiguration { b.Items = &value return b } // WithAllOf adds the given value to the AllOf field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AllOf field. func (b *JSONSchemaPropsApplyConfiguration) WithAllOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithAllOf") } b.AllOf = append(b.AllOf, *values[i]) } return b } // WithOneOf adds the given value to the OneOf field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OneOf field. func (b *JSONSchemaPropsApplyConfiguration) WithOneOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithOneOf") } b.OneOf = append(b.OneOf, *values[i]) } return b } // WithAnyOf adds the given value to the AnyOf field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AnyOf field. func (b *JSONSchemaPropsApplyConfiguration) WithAnyOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithAnyOf") } b.AnyOf = append(b.AnyOf, *values[i]) } return b } // WithNot sets the Not field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Not field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithNot(value *JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { b.Not = value return b } // WithProperties puts the entries into the Properties field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Properties field, // overwriting an existing map entries in Properties field with the same key. func (b *JSONSchemaPropsApplyConfiguration) WithProperties(entries map[string]JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { if b.Properties == nil && len(entries) > 0 { b.Properties = make(map[string]JSONSchemaPropsApplyConfiguration, len(entries)) } for k, v := range entries { b.Properties[k] = v } return b } // WithAdditionalProperties sets the AdditionalProperties field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AdditionalProperties field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithAdditionalProperties(value apiextensionsv1beta1.JSONSchemaPropsOrBool) *JSONSchemaPropsApplyConfiguration { b.AdditionalProperties = &value return b } // WithPatternProperties puts the entries into the PatternProperties field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the PatternProperties field, // overwriting an existing map entries in PatternProperties field with the same key. func (b *JSONSchemaPropsApplyConfiguration) WithPatternProperties(entries map[string]JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { if b.PatternProperties == nil && len(entries) > 0 { b.PatternProperties = make(map[string]JSONSchemaPropsApplyConfiguration, len(entries)) } for k, v := range entries { b.PatternProperties[k] = v } return b } // WithDependencies sets the Dependencies field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Dependencies field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithDependencies(value apiextensionsv1beta1.JSONSchemaDependencies) *JSONSchemaPropsApplyConfiguration { b.Dependencies = &value return b } // WithAdditionalItems sets the AdditionalItems field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AdditionalItems field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithAdditionalItems(value apiextensionsv1beta1.JSONSchemaPropsOrBool) *JSONSchemaPropsApplyConfiguration { b.AdditionalItems = &value return b } // WithDefinitions sets the Definitions field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Definitions field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithDefinitions(value apiextensionsv1beta1.JSONSchemaDefinitions) *JSONSchemaPropsApplyConfiguration { b.Definitions = &value return b } // WithExternalDocs sets the ExternalDocs field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ExternalDocs field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithExternalDocs(value *ExternalDocumentationApplyConfiguration) *JSONSchemaPropsApplyConfiguration { b.ExternalDocs = value return b } // WithExample sets the Example field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Example field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithExample(value apiextensionsv1beta1.JSON) *JSONSchemaPropsApplyConfiguration { b.Example = &value return b } // WithNullable sets the Nullable field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Nullable field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithNullable(value bool) *JSONSchemaPropsApplyConfiguration { b.Nullable = &value return b } // WithXPreserveUnknownFields sets the XPreserveUnknownFields field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XPreserveUnknownFields field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXPreserveUnknownFields(value bool) *JSONSchemaPropsApplyConfiguration { b.XPreserveUnknownFields = &value return b } // WithXEmbeddedResource sets the XEmbeddedResource field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XEmbeddedResource field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXEmbeddedResource(value bool) *JSONSchemaPropsApplyConfiguration { b.XEmbeddedResource = &value return b } // WithXIntOrString sets the XIntOrString field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XIntOrString field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXIntOrString(value bool) *JSONSchemaPropsApplyConfiguration { b.XIntOrString = &value return b } // WithXListMapKeys adds the given value to the XListMapKeys field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the XListMapKeys field. func (b *JSONSchemaPropsApplyConfiguration) WithXListMapKeys(values ...string) *JSONSchemaPropsApplyConfiguration { for i := range values { b.XListMapKeys = append(b.XListMapKeys, values[i]) } return b } // WithXListType sets the XListType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XListType field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXListType(value string) *JSONSchemaPropsApplyConfiguration { b.XListType = &value return b } // WithXMapType sets the XMapType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XMapType field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXMapType(value string) *JSONSchemaPropsApplyConfiguration { b.XMapType = &value return b } // WithXValidations sets the XValidations field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the XValidations field is set to the value of the last call. func (b *JSONSchemaPropsApplyConfiguration) WithXValidations(value apiextensionsv1beta1.ValidationRules) *JSONSchemaPropsApplyConfiguration { b.XValidations = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinition.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinition.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CustomResourceDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceDefinition type for use // with apply. type CustomResourceDefinitionApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *CustomResourceDefinitionSpecApplyConfiguration `json:"spec,omitempty"` Status *CustomResourceDefinitionStatusApplyConfiguration `json:"status,omitempty"` } // CustomResourceDefinition constructs a declarative configuration of the CustomResourceDefinition type for use with // apply. func CustomResourceDefinition(name string) *CustomResourceDefinitionApplyConfiguration { b := &CustomResourceDefinitionApplyConfiguration{} b.WithName(name) b.WithKind("CustomResourceDefinition") b.WithAPIVersion("apiextensions.k8s.io/v1beta1") return b } // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithKind(value string) *CustomResourceDefinitionApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithAPIVersion(value string) *CustomResourceDefinitionApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithName(value string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GenerateName field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithGenerateName(value string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Namespace field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithNamespace(value string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithUID(value types.UID) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithResourceVersion(value string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Generation field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithGeneration(value int64) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *CustomResourceDefinitionApplyConfiguration) WithLabels(entries map[string]string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *CustomResourceDefinitionApplyConfiguration) WithAnnotations(entries map[string]string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. func (b *CustomResourceDefinitionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Finalizers field. func (b *CustomResourceDefinitionApplyConfiguration) WithFinalizers(values ...string) *CustomResourceDefinitionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CustomResourceDefinitionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Spec field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithSpec(value *CustomResourceDefinitionSpecApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { b.Spec = value return b } // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. func (b *CustomResourceDefinitionApplyConfiguration) WithStatus(value *CustomResourceDefinitionStatusApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { b.Status = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *CustomResourceDefinitionApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go
vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go
/* Copyright The Kubernetes Authors. 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. */ // Code generated by applyconfiguration-gen. DO NOT EDIT. package v1beta1 // SelectableFieldApplyConfiguration represents a declarative configuration of the SelectableField type for use // with apply. type SelectableFieldApplyConfiguration struct { JSONPath *string `json:"jsonPath,omitempty"` } // SelectableFieldApplyConfiguration constructs a declarative configuration of the SelectableField type for use with // apply. func SelectableField() *SelectableFieldApplyConfiguration { return &SelectableFieldApplyConfiguration{} } // WithJSONPath sets the JSONPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the JSONPath field is set to the value of the last call. func (b *SelectableFieldApplyConfiguration) WithJSONPath(value string) *SelectableFieldApplyConfiguration { b.JSONPath = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false