deleteoptions.go 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 v1
  15. import (
  16. metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  17. )
  18. // DeleteOptionsApplyConfiguration represents an declarative configuration of the DeleteOptions type for use
  19. // with apply.
  20. type DeleteOptionsApplyConfiguration struct {
  21. TypeMetaApplyConfiguration `json:",inline"`
  22. GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"`
  23. Preconditions *PreconditionsApplyConfiguration `json:"preconditions,omitempty"`
  24. OrphanDependents *bool `json:"orphanDependents,omitempty"`
  25. PropagationPolicy *metav1.DeletionPropagation `json:"propagationPolicy,omitempty"`
  26. DryRun []string `json:"dryRun,omitempty"`
  27. }
  28. // DeleteOptionsApplyConfiguration constructs an declarative configuration of the DeleteOptions type for use with
  29. // apply.
  30. func DeleteOptions() *DeleteOptionsApplyConfiguration {
  31. b := &DeleteOptionsApplyConfiguration{}
  32. b.WithKind("DeleteOptions")
  33. b.WithAPIVersion("meta.k8s.io/v1")
  34. return b
  35. }
  36. // WithKind sets the Kind field in the declarative configuration to the given value
  37. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  38. // If called multiple times, the Kind field is set to the value of the last call.
  39. func (b *DeleteOptionsApplyConfiguration) WithKind(value string) *DeleteOptionsApplyConfiguration {
  40. b.Kind = &value
  41. return b
  42. }
  43. // WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
  44. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  45. // If called multiple times, the APIVersion field is set to the value of the last call.
  46. func (b *DeleteOptionsApplyConfiguration) WithAPIVersion(value string) *DeleteOptionsApplyConfiguration {
  47. b.APIVersion = &value
  48. return b
  49. }
  50. // WithGracePeriodSeconds sets the GracePeriodSeconds field in the declarative configuration to the given value
  51. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  52. // If called multiple times, the GracePeriodSeconds field is set to the value of the last call.
  53. func (b *DeleteOptionsApplyConfiguration) WithGracePeriodSeconds(value int64) *DeleteOptionsApplyConfiguration {
  54. b.GracePeriodSeconds = &value
  55. return b
  56. }
  57. // WithPreconditions sets the Preconditions field in the declarative configuration to the given value
  58. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  59. // If called multiple times, the Preconditions field is set to the value of the last call.
  60. func (b *DeleteOptionsApplyConfiguration) WithPreconditions(value *PreconditionsApplyConfiguration) *DeleteOptionsApplyConfiguration {
  61. b.Preconditions = value
  62. return b
  63. }
  64. // WithOrphanDependents sets the OrphanDependents field in the declarative configuration to the given value
  65. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  66. // If called multiple times, the OrphanDependents field is set to the value of the last call.
  67. func (b *DeleteOptionsApplyConfiguration) WithOrphanDependents(value bool) *DeleteOptionsApplyConfiguration {
  68. b.OrphanDependents = &value
  69. return b
  70. }
  71. // WithPropagationPolicy sets the PropagationPolicy field in the declarative configuration to the given value
  72. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  73. // If called multiple times, the PropagationPolicy field is set to the value of the last call.
  74. func (b *DeleteOptionsApplyConfiguration) WithPropagationPolicy(value metav1.DeletionPropagation) *DeleteOptionsApplyConfiguration {
  75. b.PropagationPolicy = &value
  76. return b
  77. }
  78. // WithDryRun adds the given value to the DryRun field in the declarative configuration
  79. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
  80. // If called multiple times, values provided by each call will be appended to the DryRun field.
  81. func (b *DeleteOptionsApplyConfiguration) WithDryRun(values ...string) *DeleteOptionsApplyConfiguration {
  82. for i := range values {
  83. b.DryRun = append(b.DryRun, values[i])
  84. }
  85. return b
  86. }