mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-14 21:43:27 +00:00
extended resource backed by DRA: codegen
Kubernetes-commit: 3068b60b830fb77694300c2274144de13a220481
This commit is contained in:
parent
bb115818ba
commit
3b7d818a7f
@ -0,0 +1,57 @@
|
||||
/*
|
||||
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
|
||||
|
||||
// ContainerExtendedResourceRequestApplyConfiguration represents a declarative configuration of the ContainerExtendedResourceRequest type for use
|
||||
// with apply.
|
||||
type ContainerExtendedResourceRequestApplyConfiguration struct {
|
||||
ContainerName *string `json:"containerName,omitempty"`
|
||||
ResourceName *string `json:"resourceName,omitempty"`
|
||||
RequestName *string `json:"requestName,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerExtendedResourceRequestApplyConfiguration constructs a declarative configuration of the ContainerExtendedResourceRequest type for use with
|
||||
// apply.
|
||||
func ContainerExtendedResourceRequest() *ContainerExtendedResourceRequestApplyConfiguration {
|
||||
return &ContainerExtendedResourceRequestApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithContainerName sets the ContainerName 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 ContainerName field is set to the value of the last call.
|
||||
func (b *ContainerExtendedResourceRequestApplyConfiguration) WithContainerName(value string) *ContainerExtendedResourceRequestApplyConfiguration {
|
||||
b.ContainerName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceName sets the ResourceName 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 ResourceName field is set to the value of the last call.
|
||||
func (b *ContainerExtendedResourceRequestApplyConfiguration) WithResourceName(value string) *ContainerExtendedResourceRequestApplyConfiguration {
|
||||
b.ResourceName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRequestName sets the RequestName 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 RequestName field is set to the value of the last call.
|
||||
func (b *ContainerExtendedResourceRequestApplyConfiguration) WithRequestName(value string) *ContainerExtendedResourceRequestApplyConfiguration {
|
||||
b.RequestName = &value
|
||||
return b
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
/*
|
||||
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
|
||||
|
||||
// PodExtendedResourceClaimStatusApplyConfiguration represents a declarative configuration of the PodExtendedResourceClaimStatus type for use
|
||||
// with apply.
|
||||
type PodExtendedResourceClaimStatusApplyConfiguration struct {
|
||||
RequestMappings []ContainerExtendedResourceRequestApplyConfiguration `json:"requestMappings,omitempty"`
|
||||
ResourceClaimName *string `json:"resourceClaimName,omitempty"`
|
||||
}
|
||||
|
||||
// PodExtendedResourceClaimStatusApplyConfiguration constructs a declarative configuration of the PodExtendedResourceClaimStatus type for use with
|
||||
// apply.
|
||||
func PodExtendedResourceClaimStatus() *PodExtendedResourceClaimStatusApplyConfiguration {
|
||||
return &PodExtendedResourceClaimStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithRequestMappings adds the given value to the RequestMappings 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 RequestMappings field.
|
||||
func (b *PodExtendedResourceClaimStatusApplyConfiguration) WithRequestMappings(values ...*ContainerExtendedResourceRequestApplyConfiguration) *PodExtendedResourceClaimStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRequestMappings")
|
||||
}
|
||||
b.RequestMappings = append(b.RequestMappings, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceClaimName sets the ResourceClaimName 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 ResourceClaimName field is set to the value of the last call.
|
||||
func (b *PodExtendedResourceClaimStatusApplyConfiguration) WithResourceClaimName(value string) *PodExtendedResourceClaimStatusApplyConfiguration {
|
||||
b.ResourceClaimName = &value
|
||||
return b
|
||||
}
|
@ -43,6 +43,7 @@ type PodStatusApplyConfiguration struct {
|
||||
EphemeralContainerStatuses []ContainerStatusApplyConfiguration `json:"ephemeralContainerStatuses,omitempty"`
|
||||
Resize *corev1.PodResizeStatus `json:"resize,omitempty"`
|
||||
ResourceClaimStatuses []PodResourceClaimStatusApplyConfiguration `json:"resourceClaimStatuses,omitempty"`
|
||||
ExtendedResourceClaimStatus *PodExtendedResourceClaimStatusApplyConfiguration `json:"extendedResourceClaimStatus,omitempty"`
|
||||
}
|
||||
|
||||
// PodStatusApplyConfiguration constructs a declarative configuration of the PodStatus type for use with
|
||||
@ -221,3 +222,11 @@ func (b *PodStatusApplyConfiguration) WithResourceClaimStatuses(values ...*PodRe
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExtendedResourceClaimStatus sets the ExtendedResourceClaimStatus 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 ExtendedResourceClaimStatus field is set to the value of the last call.
|
||||
func (b *PodStatusApplyConfiguration) WithExtendedResourceClaimStatus(value *PodExtendedResourceClaimStatusApplyConfiguration) *PodStatusApplyConfiguration {
|
||||
b.ExtendedResourceClaimStatus = value
|
||||
return b
|
||||
}
|
||||
|
@ -5379,6 +5379,21 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: workingDir
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.core.v1.ContainerExtendedResourceRequest
|
||||
map:
|
||||
fields:
|
||||
- name: containerName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: requestName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: resourceName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.core.v1.ContainerImage
|
||||
map:
|
||||
fields:
|
||||
@ -7323,6 +7338,19 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: value
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.core.v1.PodExtendedResourceClaimStatus
|
||||
map:
|
||||
fields:
|
||||
- name: requestMappings
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.core.v1.ContainerExtendedResourceRequest
|
||||
elementRelationship: atomic
|
||||
- name: resourceClaimName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.core.v1.PodIP
|
||||
map:
|
||||
fields:
|
||||
@ -7628,6 +7656,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.core.v1.ContainerStatus
|
||||
elementRelationship: atomic
|
||||
- name: extendedResourceClaimStatus
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.PodExtendedResourceClaimStatus
|
||||
- name: hostIP
|
||||
type:
|
||||
scalar: string
|
||||
@ -13005,6 +13036,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1.DeviceClassConfiguration
|
||||
elementRelationship: atomic
|
||||
- name: extendedResourceName
|
||||
type:
|
||||
scalar: string
|
||||
- name: selectors
|
||||
type:
|
||||
list:
|
||||
@ -13701,6 +13735,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceClassConfiguration
|
||||
elementRelationship: atomic
|
||||
- name: extendedResourceName
|
||||
type:
|
||||
scalar: string
|
||||
- name: selectors
|
||||
type:
|
||||
list:
|
||||
@ -14307,6 +14344,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta2.DeviceClassConfiguration
|
||||
elementRelationship: atomic
|
||||
- name: extendedResourceName
|
||||
type:
|
||||
scalar: string
|
||||
- name: selectors
|
||||
type:
|
||||
list:
|
||||
|
@ -23,6 +23,7 @@ package v1
|
||||
type DeviceClassSpecApplyConfiguration struct {
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
Config []DeviceClassConfigurationApplyConfiguration `json:"config,omitempty"`
|
||||
ExtendedResourceName *string `json:"extendedResourceName,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceClassSpecApplyConfiguration constructs a declarative configuration of the DeviceClassSpec type for use with
|
||||
@ -56,3 +57,11 @@ func (b *DeviceClassSpecApplyConfiguration) WithConfig(values ...*DeviceClassCon
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExtendedResourceName sets the ExtendedResourceName 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 ExtendedResourceName field is set to the value of the last call.
|
||||
func (b *DeviceClassSpecApplyConfiguration) WithExtendedResourceName(value string) *DeviceClassSpecApplyConfiguration {
|
||||
b.ExtendedResourceName = &value
|
||||
return b
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ package v1beta1
|
||||
type DeviceClassSpecApplyConfiguration struct {
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
Config []DeviceClassConfigurationApplyConfiguration `json:"config,omitempty"`
|
||||
ExtendedResourceName *string `json:"extendedResourceName,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceClassSpecApplyConfiguration constructs a declarative configuration of the DeviceClassSpec type for use with
|
||||
@ -56,3 +57,11 @@ func (b *DeviceClassSpecApplyConfiguration) WithConfig(values ...*DeviceClassCon
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExtendedResourceName sets the ExtendedResourceName 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 ExtendedResourceName field is set to the value of the last call.
|
||||
func (b *DeviceClassSpecApplyConfiguration) WithExtendedResourceName(value string) *DeviceClassSpecApplyConfiguration {
|
||||
b.ExtendedResourceName = &value
|
||||
return b
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ package v1beta2
|
||||
type DeviceClassSpecApplyConfiguration struct {
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
Config []DeviceClassConfigurationApplyConfiguration `json:"config,omitempty"`
|
||||
ExtendedResourceName *string `json:"extendedResourceName,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceClassSpecApplyConfiguration constructs a declarative configuration of the DeviceClassSpec type for use with
|
||||
@ -56,3 +57,11 @@ func (b *DeviceClassSpecApplyConfiguration) WithConfig(values ...*DeviceClassCon
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithExtendedResourceName sets the ExtendedResourceName 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 ExtendedResourceName field is set to the value of the last call.
|
||||
func (b *DeviceClassSpecApplyConfiguration) WithExtendedResourceName(value string) *DeviceClassSpecApplyConfiguration {
|
||||
b.ExtendedResourceName = &value
|
||||
return b
|
||||
}
|
||||
|
@ -720,6 +720,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscorev1.ConfigMapVolumeSourceApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("Container"):
|
||||
return &applyconfigurationscorev1.ContainerApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("ContainerExtendedResourceRequest"):
|
||||
return &applyconfigurationscorev1.ContainerExtendedResourceRequestApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("ContainerImage"):
|
||||
return &applyconfigurationscorev1.ContainerImageApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("ContainerPort"):
|
||||
@ -930,6 +932,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscorev1.PodDNSConfigApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("PodDNSConfigOption"):
|
||||
return &applyconfigurationscorev1.PodDNSConfigOptionApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("PodExtendedResourceClaimStatus"):
|
||||
return &applyconfigurationscorev1.PodExtendedResourceClaimStatusApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("PodIP"):
|
||||
return &applyconfigurationscorev1.PodIPApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("PodOS"):
|
||||
|
Loading…
Reference in New Issue
Block a user