1// Copyright 2016-2020 The Libsacloud Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package sacloud
16
17// Zone ゾーン
18type Zone struct {
19	*Resource       // ID
20	propName        // 名称
21	propDescription // 説明
22	propRegion      // リージョン
23
24	IsDummy bool `json:",omitempty"` // IsDummy ダミーフラグ
25
26	VNCProxy struct { // VNCProxy VPCプロキシ
27		HostName  string `json:",omitempty"` // HostName ホスト名
28		IPAddress string `json:",omitempty"` // IPAddress IPアドレス
29	} `json:",omitempty"`
30
31	FTPServer struct { // FTPServer FTPサーバー
32		HostName  string `json:",omitempty"` // HostName ホスト名
33		IPAddress string `json:",omitempty"` // IPAddress IPアドレス
34	} `json:",omitempty"`
35}
36
37// ZoneIsDummy ダミーフラグ 取得
38func (z *Zone) ZoneIsDummy() bool {
39	return z.IsDummy
40}
41
42// GetVNCProxyHostName VNCプロキシホスト名 取得
43func (z *Zone) GetVNCProxyHostName() string {
44	return z.VNCProxy.HostName
45}
46
47// GetVPCProxyIPAddress VNCプロキシIPアドレス 取得
48func (z *Zone) GetVPCProxyIPAddress() string {
49	return z.VNCProxy.IPAddress
50}
51
52// GetFTPHostName FTPサーバーホスト名 取得
53func (z *Zone) GetFTPHostName() string {
54	return z.FTPServer.HostName
55}
56
57// GetFTPServerIPAddress FTPサーバーIPアドレス 取得
58func (z *Zone) GetFTPServerIPAddress() string {
59	return z.FTPServer.IPAddress
60}
61