/
enum_apiservice_vnet_type.go
66 lines (49 loc) · 1.31 KB
/
enum_apiservice_vnet_type.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
// Code generated by go generate; DO NOT EDIT.
package inzure
import (
"fmt"
azpkg "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)
type APIServiceVNetType int
const (
APIServiceVNetTypeNone APIServiceVNetType = 0
APIServiceVNetTypeExternal APIServiceVNetType = 1
APIServiceVNetTypeInternal APIServiceVNetType = 2
)
func (it *APIServiceVNetType) FromAzure(az *azpkg.VirtualNetworkType) {
if (az == nil) {
*it = APIServiceVNetType(0)
return
}
switch(*az) {
case azpkg.VirtualNetworkTypeNone:
*it = APIServiceVNetTypeNone
case azpkg.VirtualNetworkTypeExternal:
*it = APIServiceVNetTypeExternal
case azpkg.VirtualNetworkTypeInternal:
*it = APIServiceVNetTypeInternal
default:
*it = APIServiceVNetType(0)
}
}
func (it APIServiceVNetType) IsNone() bool {
return it == APIServiceVNetTypeNone
}
func (it APIServiceVNetType) IsExternal() bool {
return it == APIServiceVNetTypeExternal
}
func (it APIServiceVNetType) IsInternal() bool {
return it == APIServiceVNetTypeInternal
}
func (it APIServiceVNetType) String() string {
switch (it) {
case APIServiceVNetTypeNone:
return "None"
case APIServiceVNetTypeExternal:
return "External"
case APIServiceVNetTypeInternal:
return "Internal"
default:
return fmt.Sprintf("APIServiceVNetType(%d)", it)
}
}