-
Notifications
You must be signed in to change notification settings - Fork 142
/
imagepolicyspec.go
38 lines (32 loc) · 1.55 KB
/
imagepolicyspec.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
v1alpha1 "github.com/openshift/api/config/v1alpha1"
)
// ImagePolicySpecApplyConfiguration represents an declarative configuration of the ImagePolicySpec type for use
// with apply.
type ImagePolicySpecApplyConfiguration struct {
Scopes []v1alpha1.ImageScope `json:"scopes,omitempty"`
Policy *PolicyApplyConfiguration `json:"policy,omitempty"`
}
// ImagePolicySpecApplyConfiguration constructs an declarative configuration of the ImagePolicySpec type for use with
// apply.
func ImagePolicySpec() *ImagePolicySpecApplyConfiguration {
return &ImagePolicySpecApplyConfiguration{}
}
// WithScopes adds the given value to the Scopes 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 Scopes field.
func (b *ImagePolicySpecApplyConfiguration) WithScopes(values ...v1alpha1.ImageScope) *ImagePolicySpecApplyConfiguration {
for i := range values {
b.Scopes = append(b.Scopes, values[i])
}
return b
}
// WithPolicy sets the Policy 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 Policy field is set to the value of the last call.
func (b *ImagePolicySpecApplyConfiguration) WithPolicy(value *PolicyApplyConfiguration) *ImagePolicySpecApplyConfiguration {
b.Policy = value
return b
}