generated from crossplane/upjet-provider-template
/
zz_policynatrule_types.go
executable file
·243 lines (167 loc) · 8.75 KB
/
zz_policynatrule_types.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
/*
Copyright 2022 Upbound Inc.
*/
// Code generated by upjet. DO NOT EDIT.
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type ContextObservation struct {
// Id of the project which the resource belongs to.
ProjectID *string `json:"projectId,omitempty" tf:"project_id,omitempty"`
}
type ContextParameters struct {
// Id of the project which the resource belongs to.
// +kubebuilder:validation:Required
ProjectID *string `json:"projectId" tf:"project_id,omitempty"`
}
type PolicyNatRuleObservation struct {
// The action for the NAT Rule
Action *string `json:"action,omitempty" tf:"action,omitempty"`
// Resource context
Context []ContextObservation `json:"context,omitempty" tf:"context,omitempty"`
// Description for this resource
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// The destination network(s) for the NAT Rule
DestinationNetworks []*string `json:"destinationNetworks,omitempty" tf:"destination_networks,omitempty"`
// Display name for this resource
DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"`
// Enable/disable the rule
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
// Firewall match flag
FirewallMatch *string `json:"firewallMatch,omitempty" tf:"firewall_match,omitempty"`
// The NSX-T Policy path to the Tier0 or Tier1 Gateway for this resource
GatewayPath *string `json:"gatewayPath,omitempty" tf:"gateway_path,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Enable/disable the logging of rule
Logging *bool `json:"logging,omitempty" tf:"logging,omitempty"`
// NSX ID for this resource
NsxID *string `json:"nsxId,omitempty" tf:"nsx_id,omitempty"`
// Policy path for this resource
Path *string `json:"path,omitempty" tf:"path,omitempty"`
// The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
Revision *float64 `json:"revision,omitempty" tf:"revision,omitempty"`
// The sequence_number decides the rule_priority of a NAT rule. Valid range [0-2147483647]
RulePriority *float64 `json:"rulePriority,omitempty" tf:"rule_priority,omitempty"`
// Policy paths to interfaces or labels where the NAT Rule is enforced
Scope []*string `json:"scope,omitempty" tf:"scope,omitempty"`
// Policy path of Service on which the NAT rule will be applied
Service *string `json:"service,omitempty" tf:"service,omitempty"`
// The source network(s) for the NAT Rule
SourceNetworks []*string `json:"sourceNetworks,omitempty" tf:"source_networks,omitempty"`
// Set of opaque identifiers meaningful to the user
Tag []PolicyNatRuleTagObservation `json:"tag,omitempty" tf:"tag,omitempty"`
// The translated network(s) for the NAT Rule
TranslatedNetworks []*string `json:"translatedNetworks,omitempty" tf:"translated_networks,omitempty"`
// Port number or port range. DNAT only
TranslatedPorts *string `json:"translatedPorts,omitempty" tf:"translated_ports,omitempty"`
}
type PolicyNatRuleParameters struct {
// The action for the NAT Rule
// +kubebuilder:validation:Optional
Action *string `json:"action,omitempty" tf:"action,omitempty"`
// Resource context
// +kubebuilder:validation:Optional
Context []ContextParameters `json:"context,omitempty" tf:"context,omitempty"`
// Description for this resource
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// The destination network(s) for the NAT Rule
// +kubebuilder:validation:Optional
DestinationNetworks []*string `json:"destinationNetworks,omitempty" tf:"destination_networks,omitempty"`
// Display name for this resource
// +kubebuilder:validation:Optional
DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"`
// Enable/disable the rule
// +kubebuilder:validation:Optional
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
// Firewall match flag
// +kubebuilder:validation:Optional
FirewallMatch *string `json:"firewallMatch,omitempty" tf:"firewall_match,omitempty"`
// The NSX-T Policy path to the Tier0 or Tier1 Gateway for this resource
// +kubebuilder:validation:Optional
GatewayPath *string `json:"gatewayPath,omitempty" tf:"gateway_path,omitempty"`
// Enable/disable the logging of rule
// +kubebuilder:validation:Optional
Logging *bool `json:"logging,omitempty" tf:"logging,omitempty"`
// NSX ID for this resource
// +kubebuilder:validation:Optional
NsxID *string `json:"nsxId,omitempty" tf:"nsx_id,omitempty"`
// The sequence_number decides the rule_priority of a NAT rule. Valid range [0-2147483647]
// +kubebuilder:validation:Optional
RulePriority *float64 `json:"rulePriority,omitempty" tf:"rule_priority,omitempty"`
// Policy paths to interfaces or labels where the NAT Rule is enforced
// +kubebuilder:validation:Optional
Scope []*string `json:"scope,omitempty" tf:"scope,omitempty"`
// Policy path of Service on which the NAT rule will be applied
// +kubebuilder:validation:Optional
Service *string `json:"service,omitempty" tf:"service,omitempty"`
// The source network(s) for the NAT Rule
// +kubebuilder:validation:Optional
SourceNetworks []*string `json:"sourceNetworks,omitempty" tf:"source_networks,omitempty"`
// Set of opaque identifiers meaningful to the user
// +kubebuilder:validation:Optional
Tag []PolicyNatRuleTagParameters `json:"tag,omitempty" tf:"tag,omitempty"`
// The translated network(s) for the NAT Rule
// +kubebuilder:validation:Optional
TranslatedNetworks []*string `json:"translatedNetworks,omitempty" tf:"translated_networks,omitempty"`
// Port number or port range. DNAT only
// +kubebuilder:validation:Optional
TranslatedPorts *string `json:"translatedPorts,omitempty" tf:"translated_ports,omitempty"`
}
type PolicyNatRuleTagObservation struct {
Scope *string `json:"scope,omitempty" tf:"scope,omitempty"`
Tag *string `json:"tag,omitempty" tf:"tag,omitempty"`
}
type PolicyNatRuleTagParameters struct {
// +kubebuilder:validation:Optional
Scope *string `json:"scope,omitempty" tf:"scope,omitempty"`
// +kubebuilder:validation:Optional
Tag *string `json:"tag,omitempty" tf:"tag,omitempty"`
}
// PolicyNatRuleSpec defines the desired state of PolicyNatRule
type PolicyNatRuleSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider PolicyNatRuleParameters `json:"forProvider"`
}
// PolicyNatRuleStatus defines the observed state of PolicyNatRule.
type PolicyNatRuleStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider PolicyNatRuleObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// PolicyNatRule is the Schema for the PolicyNatRules API. <no value>
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,nsxt}
type PolicyNatRule struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.action)",message="action is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.displayName)",message="displayName is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.gatewayPath)",message="gatewayPath is a required parameter"
Spec PolicyNatRuleSpec `json:"spec"`
Status PolicyNatRuleStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// PolicyNatRuleList contains a list of PolicyNatRules
type PolicyNatRuleList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []PolicyNatRule `json:"items"`
}
// Repository type metadata.
var (
PolicyNatRule_Kind = "PolicyNatRule"
PolicyNatRule_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: PolicyNatRule_Kind}.String()
PolicyNatRule_KindAPIVersion = PolicyNatRule_Kind + "." + CRDGroupVersion.String()
PolicyNatRule_GroupVersionKind = CRDGroupVersion.WithKind(PolicyNatRule_Kind)
)
func init() {
SchemeBuilder.Register(&PolicyNatRule{}, &PolicyNatRuleList{})
}