/
openstack_size.go
61 lines (47 loc) · 1.61 KB
/
openstack_size.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
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// OpenstackSize OpenstackSize is the object representing openstack's sizes.
//
// swagger:model OpenstackSize
type OpenstackSize struct {
// Disk is the amount of root disk, measured in GB
Disk int64 `json:"disk,omitempty"`
// IsPublic indicates whether the size is public (available to all projects) or scoped to a set of projects
IsPublic bool `json:"isPublic,omitempty"`
// MemoryTotalBytes is the amount of memory, measured in MB
Memory int64 `json:"memory,omitempty"`
// Region specifies the geographic region in which the size resides
Region string `json:"region,omitempty"`
// Slug holds the name of the size
Slug string `json:"slug,omitempty"`
// Swap is the amount of swap space, measured in MB
Swap int64 `json:"swap,omitempty"`
// VCPUs indicates how many (virtual) CPUs are available for this flavor
VCPUs int64 `json:"vcpus,omitempty"`
}
// Validate validates this openstack size
func (m *OpenstackSize) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *OpenstackSize) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *OpenstackSize) UnmarshalBinary(b []byte) error {
var res OpenstackSize
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}