resourceclaimstatus.go 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 v1alpha2
  15. // ResourceClaimStatusApplyConfiguration represents an declarative configuration of the ResourceClaimStatus type for use
  16. // with apply.
  17. type ResourceClaimStatusApplyConfiguration struct {
  18. DriverName *string `json:"driverName,omitempty"`
  19. Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
  20. ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
  21. DeallocationRequested *bool `json:"deallocationRequested,omitempty"`
  22. }
  23. // ResourceClaimStatusApplyConfiguration constructs an declarative configuration of the ResourceClaimStatus type for use with
  24. // apply.
  25. func ResourceClaimStatus() *ResourceClaimStatusApplyConfiguration {
  26. return &ResourceClaimStatusApplyConfiguration{}
  27. }
  28. // WithDriverName sets the DriverName 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 DriverName field is set to the value of the last call.
  31. func (b *ResourceClaimStatusApplyConfiguration) WithDriverName(value string) *ResourceClaimStatusApplyConfiguration {
  32. b.DriverName = &value
  33. return b
  34. }
  35. // WithAllocation sets the Allocation 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 Allocation field is set to the value of the last call.
  38. func (b *ResourceClaimStatusApplyConfiguration) WithAllocation(value *AllocationResultApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
  39. b.Allocation = value
  40. return b
  41. }
  42. // WithReservedFor adds the given value to the ReservedFor 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 ReservedFor field.
  45. func (b *ResourceClaimStatusApplyConfiguration) WithReservedFor(values ...*ResourceClaimConsumerReferenceApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
  46. for i := range values {
  47. if values[i] == nil {
  48. panic("nil value passed to WithReservedFor")
  49. }
  50. b.ReservedFor = append(b.ReservedFor, *values[i])
  51. }
  52. return b
  53. }
  54. // WithDeallocationRequested sets the DeallocationRequested field in the declarative configuration to the given value
  55. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  56. // If called multiple times, the DeallocationRequested field is set to the value of the last call.
  57. func (b *ResourceClaimStatusApplyConfiguration) WithDeallocationRequested(value bool) *ResourceClaimStatusApplyConfiguration {
  58. b.DeallocationRequested = &value
  59. return b
  60. }