1package network
2
3import (
4	"github.com/liquidweb/liquidweb-go/types"
5)
6
7// VIPParams is the set of parameters used when creating or updating a VIP.
8type VIPParams struct {
9	Domain     string `json:"domain,omitempty"`
10	Zone       int    `json:"zone,omitempty"`
11	UniqID     string `json:"uniq_id,omitempty"`
12	SubAccount string `json:"subaccnt,omitempty"`
13}
14
15// VIP is the resource representing a VIP entry.
16type VIP struct {
17	Domain       string                 `json:"domain,omitempty"`
18	Active       types.NumericalBoolean `json:"active,omitempty"`
19	ActiveStatus string                 `json:"activeStatus,omitempty"`
20	UniqID       string                 `json:"uniq_id,omitempty"`
21	Destroyed    string                 `json:"destroyed,omitempty"`
22	IP           string                 `json:"ip,omitempty"`
23}
24
25// VIPDeletion represents the API result when deleting a VIP.
26type VIPDeletion struct {
27	Destroyed string `json:"destroyed"`
28}
29
30// VIPNewStatus represents a VIP's status when new.
31const VIPNewStatus = "New"
32
33// VIPActiveStatus represents a VIP's status when active.
34const VIPActiveStatus = "Active"
35
36// VIPDisabledStatus represents a VIP's status when disabled.
37const VIPDisabledStatus = "Disabled"
38
39// VIPTerminatedStatus represents a VIP's status when terminated.
40const VIPTerminatedStatus = "Terminated"
41
42// VIPPendingTermination represents a VIP's status when termination is pending.
43const VIPPendingTermination = "Pending-Termination"
44
45// VIPPendingActivation represents a VIP's status when activation is pending.
46const VIPPendingActivation = "Pending-Activation"
47
48// VIPPendingPayment represents a VIP's status when payment is pending.
49const VIPPendingPayment = "Pending-Payment"
50
51// VIPBucketPart represents a VIP's status when termination is pending.
52const VIPBucketPart = "BucketPart"
53
54// VIPPendingConfig represents a VIP's status when configuration is pending.
55const VIPPendingConfig = "Pending-Config"
56
57// PendingStatuses is an array of strings representing the different statuses a
58// VIP can be in before it is active.
59var PendingStatuses = []string{
60	VIPNewStatus,
61	VIPPendingTermination,
62	VIPPendingActivation,
63	VIPPendingPayment,
64	VIPPendingConfig,
65}
66