Class: Latitude::API::Resources::VirtualNetwork

Inherits:
APIResource
  • Object
show all
Extended by:
Operations::Create, Operations::Delete, Operations::List, Operations::Retrieve, Operations::Update
Defined in:
lib/latitude/api/resources/virtual_network.rb

Defined Under Namespace

Classes: Assignment, Region, Site

Constant Summary

Constants inherited from APIResource

APIResource::READ_ONLY_ATTRIBUTES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#id, #meta, #path_params, #raw_data, #type

Method Summary

Methods included from Operations::List

all, list

Methods included from Operations::Create

create

Methods included from Operations::Retrieve

retrieve

Methods included from Operations::Update

update

Methods included from Operations::Delete

delete

Methods inherited from APIResource

#==, #[], #[]=, #as_json, #attributes, #changed?, class_url, config_source, construct_from, #delete, execute_request, extract_path_params, #hash, id_prefix, #initialize, #inspect, instance_url, #method_missing, path_param_keys, #refresh, resource_path, resource_type, #resource_url, #respond_to_missing?, #save, #to_h, #unsaved_attributes, with_config, #write_attribute

Methods included from Attributes::ClassMethods

#attribute, #attribute_specs

Methods included from Attributes::InstanceMethods

#attribute_spec, #read_attribute, #wrap_attribute

Constructor Details

This class inherits a constructor from Latitude::API::APIResource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Latitude::API::APIResource

Instance Attribute Details

#assignments_countInteger

Returns:



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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/latitude/api/resources/virtual_network.rb', line 24

class VirtualNetwork < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

  attribute :tags, [Objects::Tag]
  attribute :vid, :integer
  attribute :name, :string
  attribute :description, :string
  attribute :site, :string
  attribute :created_at, :time, read_only: true
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :assignments_count, :integer

  resource_type "virtual_networks"
  resource_path "/virtual_networks"
  id_prefix     "vlan_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete

  # @!attribute [rw] virtual_network_id

  #   @return [String]

  # @!attribute [rw] vid

  #   @return [Integer]

  # @!attribute [rw] description

  #   @return [String]

  # @!attribute [rw] status

  #   @return [String]

  # @!attribute [rw] server

  #   @return [Server]

  # @!attribute [rw] server_id

  #   @return [String]

  class Assignment < APIResource

      # @!attribute [r] id

      #   @return [String]

      # @!attribute [r] hostname

      #   @return [String]

      # @!attribute [r] label

      #   @return [String]

      # @!attribute [r] locked

      #   @return [Boolean]

      # @!attribute [r] status

      #   @return [String]

    class Server < APIObject

      attribute :id, :string, read_only: true

      attribute :hostname, :string, read_only: true

      attribute :label, :string, read_only: true

      attribute :locked, :boolean, read_only: true

      attribute :status, :string, read_only: true

    end


    attribute :virtual_network_id, :string

    attribute :vid, :integer

    attribute :description, :string

    attribute :status, :string

    attribute :server, Server

    attribute :server_id, :string

    resource_type "virtual_network_assignment"
    resource_path "/virtual_networks/assignments"

    extend Operations::List
    extend Operations::Delete

    class << self
      def create(params = {}, opts = {})
        body = JSONAPI.encode(type: resource_type, attributes: params)
        parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
        construct_from(parsed, opts: opts)
      end
    end
  end
end

#created_atTime (readonly)

Returns:



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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/latitude/api/resources/virtual_network.rb', line 24

class VirtualNetwork < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

  attribute :tags, [Objects::Tag]
  attribute :vid, :integer
  attribute :name, :string
  attribute :description, :string
  attribute :site, :string
  attribute :created_at, :time, read_only: true
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :assignments_count, :integer

  resource_type "virtual_networks"
  resource_path "/virtual_networks"
  id_prefix     "vlan_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete

  # @!attribute [rw] virtual_network_id

  #   @return [String]

  # @!attribute [rw] vid

  #   @return [Integer]

  # @!attribute [rw] description

  #   @return [String]

  # @!attribute [rw] status

  #   @return [String]

  # @!attribute [rw] server

  #   @return [Server]

  # @!attribute [rw] server_id

  #   @return [String]

  class Assignment < APIResource

      # @!attribute [r] id

      #   @return [String]

      # @!attribute [r] hostname

      #   @return [String]

      # @!attribute [r] label

      #   @return [String]

      # @!attribute [r] locked

      #   @return [Boolean]

      # @!attribute [r] status

      #   @return [String]

    class Server < APIObject

      attribute :id, :string, read_only: true

      attribute :hostname, :string, read_only: true

      attribute :label, :string, read_only: true

      attribute :locked, :boolean, read_only: true

      attribute :status, :string, read_only: true

    end


    attribute :virtual_network_id, :string

    attribute :vid, :integer

    attribute :description, :string

    attribute :status, :string

    attribute :server, Server

    attribute :server_id, :string

    resource_type "virtual_network_assignment"
    resource_path "/virtual_networks/assignments"

    extend Operations::List
    extend Operations::Delete

    class << self
      def create(params = {}, opts = {})
        body = JSONAPI.encode(type: resource_type, attributes: params)
        parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
        construct_from(parsed, opts: opts)
      end
    end
  end
end

#descriptionObject



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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/latitude/api/resources/virtual_network.rb', line 24

class VirtualNetwork < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

  attribute :tags, [Objects::Tag]
  attribute :vid, :integer
  attribute :name, :string
  attribute :description, :string
  attribute :site, :string
  attribute :created_at, :time, read_only: true
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :assignments_count, :integer

  resource_type "virtual_networks"
  resource_path "/virtual_networks"
  id_prefix     "vlan_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete

  # @!attribute [rw] virtual_network_id

  #   @return [String]

  # @!attribute [rw] vid

  #   @return [Integer]

  # @!attribute [rw] description

  #   @return [String]

  # @!attribute [rw] status

  #   @return [String]

  # @!attribute [rw] server

  #   @return [Server]

  # @!attribute [rw] server_id

  #   @return [String]

  class Assignment < APIResource

      # @!attribute [r] id

      #   @return [String]

      # @!attribute [r] hostname

      #   @return [String]

      # @!attribute [r] label

      #   @return [String]

      # @!attribute [r] locked

      #   @return [Boolean]

      # @!attribute [r] status

      #   @return [String]

    class Server < APIObject

      attribute :id, :string, read_only: true

      attribute :hostname, :string, read_only: true

      attribute :label, :string, read_only: true

      attribute :locked, :boolean, read_only: true

      attribute :status, :string, read_only: true

    end


    attribute :virtual_network_id, :string

    attribute :vid, :integer

    attribute :description, :string

    attribute :status, :string

    attribute :server, Server

    attribute :server_id, :string

    resource_type "virtual_network_assignment"
    resource_path "/virtual_networks/assignments"

    extend Operations::List
    extend Operations::Delete

    class << self
      def create(params = {}, opts = {})
        body = JSONAPI.encode(type: resource_type, attributes: params)
        parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
        construct_from(parsed, opts: opts)
      end
    end
  end
end

#nameString

Returns:



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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/latitude/api/resources/virtual_network.rb', line 24

class VirtualNetwork < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

  attribute :tags, [Objects::Tag]
  attribute :vid, :integer
  attribute :name, :string
  attribute :description, :string
  attribute :site, :string
  attribute :created_at, :time, read_only: true
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :assignments_count, :integer

  resource_type "virtual_networks"
  resource_path "/virtual_networks"
  id_prefix     "vlan_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete

  # @!attribute [rw] virtual_network_id

  #   @return [String]

  # @!attribute [rw] vid

  #   @return [Integer]

  # @!attribute [rw] description

  #   @return [String]

  # @!attribute [rw] status

  #   @return [String]

  # @!attribute [rw] server

  #   @return [Server]

  # @!attribute [rw] server_id

  #   @return [String]

  class Assignment < APIResource

      # @!attribute [r] id

      #   @return [String]

      # @!attribute [r] hostname

      #   @return [String]

      # @!attribute [r] label

      #   @return [String]

      # @!attribute [r] locked

      #   @return [Boolean]

      # @!attribute [r] status

      #   @return [String]

    class Server < APIObject

      attribute :id, :string, read_only: true

      attribute :hostname, :string, read_only: true

      attribute :label, :string, read_only: true

      attribute :locked, :boolean, read_only: true

      attribute :status, :string, read_only: true

    end


    attribute :virtual_network_id, :string

    attribute :vid, :integer

    attribute :description, :string

    attribute :status, :string

    attribute :server, Server

    attribute :server_id, :string

    resource_type "virtual_network_assignment"
    resource_path "/virtual_networks/assignments"

    extend Operations::List
    extend Operations::Delete

    class << self
      def create(params = {}, opts = {})
        body = JSONAPI.encode(type: resource_type, attributes: params)
        parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
        construct_from(parsed, opts: opts)
      end
    end
  end
end

#projectLatitude::API::Objects::Project

Returns:



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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/latitude/api/resources/virtual_network.rb', line 24

class VirtualNetwork < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

  attribute :tags, [Objects::Tag]
  attribute :vid, :integer
  attribute :name, :string
  attribute :description, :string
  attribute :site, :string
  attribute :created_at, :time, read_only: true
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :assignments_count, :integer

  resource_type "virtual_networks"
  resource_path "/virtual_networks"
  id_prefix     "vlan_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete

  # @!attribute [rw] virtual_network_id

  #   @return [String]

  # @!attribute [rw] vid

  #   @return [Integer]

  # @!attribute [rw] description

  #   @return [String]

  # @!attribute [rw] status

  #   @return [String]

  # @!attribute [rw] server

  #   @return [Server]

  # @!attribute [rw] server_id

  #   @return [String]

  class Assignment < APIResource

      # @!attribute [r] id

      #   @return [String]

      # @!attribute [r] hostname

      #   @return [String]

      # @!attribute [r] label

      #   @return [String]

      # @!attribute [r] locked

      #   @return [Boolean]

      # @!attribute [r] status

      #   @return [String]

    class Server < APIObject

      attribute :id, :string, read_only: true

      attribute :hostname, :string, read_only: true

      attribute :label, :string, read_only: true

      attribute :locked, :boolean, read_only: true

      attribute :status, :string, read_only: true

    end


    attribute :virtual_network_id, :string

    attribute :vid, :integer

    attribute :description, :string

    attribute :status, :string

    attribute :server, Server

    attribute :server_id, :string

    resource_type "virtual_network_assignment"
    resource_path "/virtual_networks/assignments"

    extend Operations::List
    extend Operations::Delete

    class << self
      def create(params = {}, opts = {})
        body = JSONAPI.encode(type: resource_type, attributes: params)
        parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
        construct_from(parsed, opts: opts)
      end
    end
  end
end

#regionRegion

Returns:



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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/latitude/api/resources/virtual_network.rb', line 24

class VirtualNetwork < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

  attribute :tags, [Objects::Tag]
  attribute :vid, :integer
  attribute :name, :string
  attribute :description, :string
  attribute :site, :string
  attribute :created_at, :time, read_only: true
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :assignments_count, :integer

  resource_type "virtual_networks"
  resource_path "/virtual_networks"
  id_prefix     "vlan_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete

  # @!attribute [rw] virtual_network_id

  #   @return [String]

  # @!attribute [rw] vid

  #   @return [Integer]

  # @!attribute [rw] description

  #   @return [String]

  # @!attribute [rw] status

  #   @return [String]

  # @!attribute [rw] server

  #   @return [Server]

  # @!attribute [rw] server_id

  #   @return [String]

  class Assignment < APIResource

      # @!attribute [r] id

      #   @return [String]

      # @!attribute [r] hostname

      #   @return [String]

      # @!attribute [r] label

      #   @return [String]

      # @!attribute [r] locked

      #   @return [Boolean]

      # @!attribute [r] status

      #   @return [String]

    class Server < APIObject

      attribute :id, :string, read_only: true

      attribute :hostname, :string, read_only: true

      attribute :label, :string, read_only: true

      attribute :locked, :boolean, read_only: true

      attribute :status, :string, read_only: true

    end


    attribute :virtual_network_id, :string

    attribute :vid, :integer

    attribute :description, :string

    attribute :status, :string

    attribute :server, Server

    attribute :server_id, :string

    resource_type "virtual_network_assignment"
    resource_path "/virtual_networks/assignments"

    extend Operations::List
    extend Operations::Delete

    class << self
      def create(params = {}, opts = {})
        body = JSONAPI.encode(type: resource_type, attributes: params)
        parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
        construct_from(parsed, opts: opts)
      end
    end
  end
end

#serverObject



# File 'lib/latitude/api/resources/virtual_network.rb', line 88


#server_idObject



# File 'lib/latitude/api/resources/virtual_network.rb', line 92


#siteString

Returns:



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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/latitude/api/resources/virtual_network.rb', line 24

class VirtualNetwork < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

  attribute :tags, [Objects::Tag]
  attribute :vid, :integer
  attribute :name, :string
  attribute :description, :string
  attribute :site, :string
  attribute :created_at, :time, read_only: true
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :assignments_count, :integer

  resource_type "virtual_networks"
  resource_path "/virtual_networks"
  id_prefix     "vlan_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete

  # @!attribute [rw] virtual_network_id

  #   @return [String]

  # @!attribute [rw] vid

  #   @return [Integer]

  # @!attribute [rw] description

  #   @return [String]

  # @!attribute [rw] status

  #   @return [String]

  # @!attribute [rw] server

  #   @return [Server]

  # @!attribute [rw] server_id

  #   @return [String]

  class Assignment < APIResource

      # @!attribute [r] id

      #   @return [String]

      # @!attribute [r] hostname

      #   @return [String]

      # @!attribute [r] label

      #   @return [String]

      # @!attribute [r] locked

      #   @return [Boolean]

      # @!attribute [r] status

      #   @return [String]

    class Server < APIObject

      attribute :id, :string, read_only: true

      attribute :hostname, :string, read_only: true

      attribute :label, :string, read_only: true

      attribute :locked, :boolean, read_only: true

      attribute :status, :string, read_only: true

    end


    attribute :virtual_network_id, :string

    attribute :vid, :integer

    attribute :description, :string

    attribute :status, :string

    attribute :server, Server

    attribute :server_id, :string

    resource_type "virtual_network_assignment"
    resource_path "/virtual_networks/assignments"

    extend Operations::List
    extend Operations::Delete

    class << self
      def create(params = {}, opts = {})
        body = JSONAPI.encode(type: resource_type, attributes: params)
        parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
        construct_from(parsed, opts: opts)
      end
    end
  end
end

#statusObject



# File 'lib/latitude/api/resources/virtual_network.rb', line 84


#tagsArray<Latitude::API::Objects::Tag>

Returns:



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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/latitude/api/resources/virtual_network.rb', line 24

class VirtualNetwork < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

  attribute :tags, [Objects::Tag]
  attribute :vid, :integer
  attribute :name, :string
  attribute :description, :string
  attribute :site, :string
  attribute :created_at, :time, read_only: true
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :assignments_count, :integer

  resource_type "virtual_networks"
  resource_path "/virtual_networks"
  id_prefix     "vlan_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete

  # @!attribute [rw] virtual_network_id

  #   @return [String]

  # @!attribute [rw] vid

  #   @return [Integer]

  # @!attribute [rw] description

  #   @return [String]

  # @!attribute [rw] status

  #   @return [String]

  # @!attribute [rw] server

  #   @return [Server]

  # @!attribute [rw] server_id

  #   @return [String]

  class Assignment < APIResource

      # @!attribute [r] id

      #   @return [String]

      # @!attribute [r] hostname

      #   @return [String]

      # @!attribute [r] label

      #   @return [String]

      # @!attribute [r] locked

      #   @return [Boolean]

      # @!attribute [r] status

      #   @return [String]

    class Server < APIObject

      attribute :id, :string, read_only: true

      attribute :hostname, :string, read_only: true

      attribute :label, :string, read_only: true

      attribute :locked, :boolean, read_only: true

      attribute :status, :string, read_only: true

    end


    attribute :virtual_network_id, :string

    attribute :vid, :integer

    attribute :description, :string

    attribute :status, :string

    attribute :server, Server

    attribute :server_id, :string

    resource_type "virtual_network_assignment"
    resource_path "/virtual_networks/assignments"

    extend Operations::List
    extend Operations::Delete

    class << self
      def create(params = {}, opts = {})
        body = JSONAPI.encode(type: resource_type, attributes: params)
        parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
        construct_from(parsed, opts: opts)
      end
    end
  end
end

#vidObject



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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/latitude/api/resources/virtual_network.rb', line 24

class VirtualNetwork < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

  attribute :tags, [Objects::Tag]
  attribute :vid, :integer
  attribute :name, :string
  attribute :description, :string
  attribute :site, :string
  attribute :created_at, :time, read_only: true
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :assignments_count, :integer

  resource_type "virtual_networks"
  resource_path "/virtual_networks"
  id_prefix     "vlan_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete

  # @!attribute [rw] virtual_network_id

  #   @return [String]

  # @!attribute [rw] vid

  #   @return [Integer]

  # @!attribute [rw] description

  #   @return [String]

  # @!attribute [rw] status

  #   @return [String]

  # @!attribute [rw] server

  #   @return [Server]

  # @!attribute [rw] server_id

  #   @return [String]

  class Assignment < APIResource

      # @!attribute [r] id

      #   @return [String]

      # @!attribute [r] hostname

      #   @return [String]

      # @!attribute [r] label

      #   @return [String]

      # @!attribute [r] locked

      #   @return [Boolean]

      # @!attribute [r] status

      #   @return [String]

    class Server < APIObject

      attribute :id, :string, read_only: true

      attribute :hostname, :string, read_only: true

      attribute :label, :string, read_only: true

      attribute :locked, :boolean, read_only: true

      attribute :status, :string, read_only: true

    end


    attribute :virtual_network_id, :string

    attribute :vid, :integer

    attribute :description, :string

    attribute :status, :string

    attribute :server, Server

    attribute :server_id, :string

    resource_type "virtual_network_assignment"
    resource_path "/virtual_networks/assignments"

    extend Operations::List
    extend Operations::Delete

    class << self
      def create(params = {}, opts = {})
        body = JSONAPI.encode(type: resource_type, attributes: params)
        parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
        construct_from(parsed, opts: opts)
      end
    end
  end
end

#virtual_network_idObject



# File 'lib/latitude/api/resources/virtual_network.rb', line 72