csinodedriver.go 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Code generated by applyconfiguration-gen. DO NOT EDIT.
  14. package v1beta1
  15. // CSINodeDriverApplyConfiguration represents an declarative configuration of the CSINodeDriver type for use
  16. // with apply.
  17. type CSINodeDriverApplyConfiguration struct {
  18. Name *string `json:"name,omitempty"`
  19. NodeID *string `json:"nodeID,omitempty"`
  20. TopologyKeys []string `json:"topologyKeys,omitempty"`
  21. Allocatable *VolumeNodeResourcesApplyConfiguration `json:"allocatable,omitempty"`
  22. }
  23. // CSINodeDriverApplyConfiguration constructs an declarative configuration of the CSINodeDriver type for use with
  24. // apply.
  25. func CSINodeDriver() *CSINodeDriverApplyConfiguration {
  26. return &CSINodeDriverApplyConfiguration{}
  27. }
  28. // WithName sets the Name field in the declarative configuration to the given value
  29. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  30. // If called multiple times, the Name field is set to the value of the last call.
  31. func (b *CSINodeDriverApplyConfiguration) WithName(value string) *CSINodeDriverApplyConfiguration {
  32. b.Name = &value
  33. return b
  34. }
  35. // WithNodeID sets the NodeID field in the declarative configuration to the given value
  36. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  37. // If called multiple times, the NodeID field is set to the value of the last call.
  38. func (b *CSINodeDriverApplyConfiguration) WithNodeID(value string) *CSINodeDriverApplyConfiguration {
  39. b.NodeID = &value
  40. return b
  41. }
  42. // WithTopologyKeys adds the given value to the TopologyKeys field in the declarative configuration
  43. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
  44. // If called multiple times, values provided by each call will be appended to the TopologyKeys field.
  45. func (b *CSINodeDriverApplyConfiguration) WithTopologyKeys(values ...string) *CSINodeDriverApplyConfiguration {
  46. for i := range values {
  47. b.TopologyKeys = append(b.TopologyKeys, values[i])
  48. }
  49. return b
  50. }
  51. // WithAllocatable sets the Allocatable field in the declarative configuration to the given value
  52. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  53. // If called multiple times, the Allocatable field is set to the value of the last call.
  54. func (b *CSINodeDriverApplyConfiguration) WithAllocatable(value *VolumeNodeResourcesApplyConfiguration) *CSINodeDriverApplyConfiguration {
  55. b.Allocatable = value
  56. return b
  57. }