/
model_gcp_vpc_peer_v2.go
66 lines (51 loc) · 1.91 KB
/
model_gcp_vpc_peer_v2.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
/*
* Instaclustr API Documentation
*
*
*
* API version: Current
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package openapi
// GcpVpcPeerV2 - Definition of an GCP VPC Peering request to allow privately routed connections to a target data centre.
type GcpVpcPeerV2 struct {
// The project ID of the owner of the accepter VPC.
PeerProjectId string `json:"peerProjectId"`
// The subnets for the peering VPC.
PeerSubnets []string `json:"peerSubnets"`
// Reason for Peering Connection Failure.
FailureReason string `json:"failureReason,omitempty"`
// GCP Project ID of the Data Centre.
DataCentreProjectId string `json:"dataCentreProjectId,omitempty"`
// Name of the Peering Connection.
Name string `json:"name,omitempty"`
// ID of the VPC peering connection.
Id string `json:"id,omitempty"`
// Vpc Network Name of the Data Centre VPC.
DataCentreVpcNetworkName string `json:"dataCentreVpcNetworkName,omitempty"`
// The name of the VPC Network you wish to peer to.
PeerVpcNetworkName string `json:"peerVpcNetworkName"`
// Status of the VPC Peering Connection. Values can be `GENESIS`, `PROVISIONING`, `FAILED`, `INACTIVE`, `ACTIVE` or `UNKNOWN`.
StatusCode string `json:"statusCode,omitempty"`
// ID of the Cluster Data Centre.
CdcId string `json:"cdcId"`
}
// AssertGcpVpcPeerV2Required checks if the required fields are not zero-ed
func AssertGcpVpcPeerV2Required(obj GcpVpcPeerV2) error {
elements := map[string]interface{}{
"peerProjectId": obj.PeerProjectId,
"peerSubnets": obj.PeerSubnets,
"peerVpcNetworkName": obj.PeerVpcNetworkName,
"cdcId": obj.CdcId,
}
for name, el := range elements {
if isZero := IsZeroValue(el); isZero {
return &RequiredError{Field: name}
}
}
return nil
}
// AssertGcpVpcPeerV2Constraints checks if the values respects the defined constraints
func AssertGcpVpcPeerV2Constraints(obj GcpVpcPeerV2) error {
return nil
}