/
dne_rule.go
73 lines (48 loc) · 2.86 KB
/
dne_rule.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
/* Copyright © 2017 VMware, Inc. All Rights Reserved.
SPDX-License-Identifier: BSD-2-Clause
Generated by: https://github.com/swagger-api/swagger-codegen.git */
package manager
import (
"github.com/vmware/go-vmware-nsxt/common"
)
type DneRule struct {
// The server will populate this field when returing the resource. Ignored on PUT and POST.
Links []common.ResourceLink `json:"_links,omitempty"`
Schema string `json:"_schema,omitempty"`
Self *common.SelfResourceLink `json:"_self,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 int64 `json:"_revision"`
Owner *common.OwnerResourceLink `json:"_owner,omitempty"`
// Description of this resource
Description string `json:"description,omitempty"`
// Defaults to ID if not set
DisplayName string `json:"display_name,omitempty"`
// Identifier of the resource
Id string `json:"id,omitempty"`
// The type of this resource.
ResourceType string `json:"resource_type,omitempty"`
// This is a read-only field that for UI display purpose only. It is to show what type of protection the rule's key policy provides.
Action string `json:"action,omitempty"`
// List of object where rule will be enforced. The section level field overrides this one. Null will be treated as any.
AppliedTos []common.ResourceReference `json:"applied_tos,omitempty"`
// User notes specific to the rule.
Comments string `json:"comments,omitempty"`
// List of the destinations. Null will be treated as any.
Destinations []common.ResourceReference `json:"destinations,omitempty"`
// Flag to disable rule. Disabled rule will only be persisted but never provisioned/realized.
Disabled bool `json:"disabled,omitempty"`
// Type of IP packet that should be matched while enforcing the rule.
IpProtocol string `json:"ip_protocol,omitempty"`
// Identifier of key policy. Section's key policy, if exists, overrides Rule's key policy.
KeyPolicyIdentifier string `json:"key_policy_identifier,omitempty"`
// A display name of rule's key policy. This is a read-only field for UI display purpose only. If not set by user, this name will be key policy's UUID.
KeyPolicyName string `json:"key_policy_name,omitempty"`
// Flag to enable packet logging. Default is disabled.
Logged bool `json:"logged,omitempty"`
// User level field which will be printed in CLI and packet logs.
RuleTag string `json:"rule_tag,omitempty"`
// List of the services. Null will be treated as any.
Services []DneService `json:"services,omitempty"`
// List of sources. Null will be treated as any.
Sources []common.ResourceReference `json:"sources,omitempty"`
}