mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-15 14:03:09 +00:00
Update generated code for resource.k8s.io/v1alpha2
Signed-off-by: Kevin Klues <kklues@nvidia.com> Kubernetes-commit: 452f345c472a206b148bbe7e4e27f772841dc363
This commit is contained in:
parent
e023fb8815
commit
ff60d1bd90
@ -11411,9 +11411,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: availableOnNodes
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.NodeSelector
|
||||
- name: resourceHandle
|
||||
- name: resourceHandles
|
||||
type:
|
||||
scalar: string
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha2.ResourceHandle
|
||||
elementRelationship: atomic
|
||||
- name: shareable
|
||||
type:
|
||||
scalar: boolean
|
||||
@ -11627,6 +11630,15 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: namespace
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1alpha2.ResourceHandle
|
||||
map:
|
||||
fields:
|
||||
- name: data
|
||||
type:
|
||||
scalar: string
|
||||
- name: driverName
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.scheduling.v1.PriorityClass
|
||||
map:
|
||||
fields:
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
// AllocationResultApplyConfiguration represents an declarative configuration of the AllocationResult type for use
|
||||
// with apply.
|
||||
type AllocationResultApplyConfiguration struct {
|
||||
ResourceHandle *string `json:"resourceHandle,omitempty"`
|
||||
ResourceHandles []ResourceHandleApplyConfiguration `json:"resourceHandles,omitempty"`
|
||||
AvailableOnNodes *v1.NodeSelectorApplyConfiguration `json:"availableOnNodes,omitempty"`
|
||||
Shareable *bool `json:"shareable,omitempty"`
|
||||
}
|
||||
@ -36,11 +36,16 @@ func AllocationResult() *AllocationResultApplyConfiguration {
|
||||
return &AllocationResultApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithResourceHandle sets the ResourceHandle 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 ResourceHandle field is set to the value of the last call.
|
||||
func (b *AllocationResultApplyConfiguration) WithResourceHandle(value string) *AllocationResultApplyConfiguration {
|
||||
b.ResourceHandle = &value
|
||||
// WithResourceHandles adds the given value to the ResourceHandles 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 ResourceHandles field.
|
||||
func (b *AllocationResultApplyConfiguration) WithResourceHandles(values ...*ResourceHandleApplyConfiguration) *AllocationResultApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithResourceHandles")
|
||||
}
|
||||
b.ResourceHandles = append(b.ResourceHandles, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
|
48
applyconfigurations/resource/v1alpha2/resourcehandle.go
Normal file
48
applyconfigurations/resource/v1alpha2/resourcehandle.go
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// ResourceHandleApplyConfiguration represents an declarative configuration of the ResourceHandle type for use
|
||||
// with apply.
|
||||
type ResourceHandleApplyConfiguration struct {
|
||||
DriverName *string `json:"driverName,omitempty"`
|
||||
Data *string `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceHandleApplyConfiguration constructs an declarative configuration of the ResourceHandle type for use with
|
||||
// apply.
|
||||
func ResourceHandle() *ResourceHandleApplyConfiguration {
|
||||
return &ResourceHandleApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithDriverName sets the DriverName 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 DriverName field is set to the value of the last call.
|
||||
func (b *ResourceHandleApplyConfiguration) WithDriverName(value string) *ResourceHandleApplyConfiguration {
|
||||
b.DriverName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithData sets the Data 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 Data field is set to the value of the last call.
|
||||
func (b *ResourceHandleApplyConfiguration) WithData(value string) *ResourceHandleApplyConfiguration {
|
||||
b.Data = &value
|
||||
return b
|
||||
}
|
@ -1483,6 +1483,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &resourcev1alpha2.ResourceClassApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParametersReference"):
|
||||
return &resourcev1alpha2.ResourceClassParametersReferenceApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceHandle"):
|
||||
return &resourcev1alpha2.ResourceHandleApplyConfiguration{}
|
||||
|
||||
// Group=scheduling.k8s.io, Version=v1
|
||||
case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"):
|
||||
|
Loading…
Reference in New Issue
Block a user