virtcontainers: clh: Re-generate the client code

This patch re-generates the client code for Cloud Hypervisor with the
updated `openapi-generator` v5.2.1.

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2021-08-23 10:07:14 -07:00
parent 80fba4d637
commit 46eb07e14f
74 changed files with 13379 additions and 755 deletions

View File

@ -0,0 +1,78 @@
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
api/openapi.yaml
api_default.go
client.go
configuration.go
docs/BalloonConfig.md
docs/CmdLineConfig.md
docs/ConsoleConfig.md
docs/CpuTopology.md
docs/CpusConfig.md
docs/DefaultApi.md
docs/DeviceConfig.md
docs/DeviceNode.md
docs/DiskConfig.md
docs/FsConfig.md
docs/InitramfsConfig.md
docs/KernelConfig.md
docs/MemoryConfig.md
docs/MemoryZoneConfig.md
docs/NetConfig.md
docs/NumaConfig.md
docs/NumaDistance.md
docs/PciDeviceInfo.md
docs/PmemConfig.md
docs/RateLimiterConfig.md
docs/RestoreConfig.md
docs/RngConfig.md
docs/SgxEpcConfig.md
docs/TokenBucket.md
docs/VmAddDevice.md
docs/VmConfig.md
docs/VmInfo.md
docs/VmRemoveDevice.md
docs/VmResize.md
docs/VmResizeZone.md
docs/VmSnapshotConfig.md
docs/VmmPingResponse.md
docs/VsockConfig.md
git_push.sh
go.mod
go.sum
model_balloon_config.go
model_cmd_line_config.go
model_console_config.go
model_cpu_topology.go
model_cpus_config.go
model_device_config.go
model_device_node.go
model_disk_config.go
model_fs_config.go
model_initramfs_config.go
model_kernel_config.go
model_memory_config.go
model_memory_zone_config.go
model_net_config.go
model_numa_config.go
model_numa_distance.go
model_pci_device_info.go
model_pmem_config.go
model_rate_limiter_config.go
model_restore_config.go
model_rng_config.go
model_sgx_epc_config.go
model_token_bucket.go
model_vm_add_device.go
model_vm_config.go
model_vm_info.go
model_vm_remove_device.go
model_vm_resize.go
model_vm_resize_zone.go
model_vm_snapshot_config.go
model_vmm_ping_response.go
model_vsock_config.go
response.go
utils.go

View File

@ -17,13 +17,59 @@ Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional
```
Put the package under your project folder and add the following in import:
```golang
import "./openapi"
import sw "./openapi"
```
To use a proxy, set the environment variable `HTTP_PROXY`:
```golang
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
```
## Configuration of Server URL
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
### Select Server Configuration
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
```
### Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
Note, enum values are always validated and all unused variables are silently ignored.
### URLs Configuration per Operation
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
An operation is uniquely identifield by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
```
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
```
## Documentation for API Endpoints
@ -98,6 +144,21 @@ Class | Method | HTTP request | Description
Endpoints do not require authorization.
## Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains
a number of utility functions to easily obtain pointers to values of basic types.
Each of these functions takes a value of the given basic type and returns a pointer to it:
* `PtrBool`
* `PtrInt`
* `PtrInt32`
* `PtrInt64`
* `PtrFloat`
* `PtrFloat32`
* `PtrFloat64`
* `PtrString`
* `PtrTime`
## Author

View File

@ -1,11 +1,12 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
@ -100,7 +101,7 @@ func selectHeaderAccept(accepts []string) string {
return strings.Join(accepts, ",")
}
// contains is a case insenstive match, finding needle in a haystack
// contains is a case insensitive match, finding needle in a haystack
func contains(haystack []string, needle string) bool {
for _, a := range haystack {
if strings.ToLower(a) == strings.ToLower(needle) {
@ -179,15 +180,9 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
}
log.Printf("\n%s\n", string(dump))
}
return resp, err
}
// ChangeBasePath changes base path to allow switching to mocks
func (c *APIClient) ChangeBasePath(path string) {
c.cfg.BasePath = path
}
// Allow modification of underlying config for alternate implementations and testing
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
func (c *APIClient) GetConfig() *Configuration {
@ -354,7 +349,6 @@ func (c *APIClient) prepareRequest(
for header, value := range c.cfg.DefaultHeader {
localVarRequest.Header.Add(header, value)
}
return localVarRequest, nil
}
@ -382,7 +376,15 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
return nil
}
if jsonCheck.MatchString(contentType) {
if err = json.Unmarshal(b, v); err != nil {
if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
if err = unmarshalObj.UnmarshalJSON(b); err != nil {
return err
}
} else {
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
}
} else if err = json.Unmarshal(b, v); err != nil { // simple model
return err
}
return nil
@ -420,6 +422,8 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e
if reader, ok := body.(io.Reader); ok {
_, err = bodyBuf.ReadFrom(reader)
} else if fp, ok := body.(**os.File); ok {
_, err = bodyBuf.ReadFrom(*fp)
} else if b, ok := body.([]byte); ok {
_, err = bodyBuf.Write(b)
} else if s, ok := body.(string); ok {

View File

@ -1,15 +1,17 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"context"
"fmt"
"net/http"
"strings"
@ -35,8 +37,23 @@ var (
// ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAccessToken = contextKey("accesstoken")
// ContextAPIKey takes an APIKey as authentication for the request
ContextAPIKey = contextKey("apikey")
// ContextAPIKeys takes a string apikey as authentication for the request
ContextAPIKeys = contextKey("apiKeys")
// ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
ContextHttpSignatureAuth = contextKey("httpsignature")
// ContextServerIndex uses a server configuration from the index.
ContextServerIndex = contextKey("serverIndex")
// ContextOperationServerIndices uses a server configuration from the index mapping.
ContextOperationServerIndices = contextKey("serverOperationIndices")
// ContextServerVariables overrides a server configuration variables.
ContextServerVariables = contextKey("serverVariables")
// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
ContextOperationServerVariables = contextKey("serverOperationVariables")
)
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
@ -60,36 +77,39 @@ type ServerVariable struct {
// ServerConfiguration stores the information about a server
type ServerConfiguration struct {
Url string
URL string
Description string
Variables map[string]ServerVariable
}
// ServerConfigurations stores multiple ServerConfiguration items
type ServerConfigurations []ServerConfiguration
// Configuration stores the configuration of the API client
type Configuration struct {
BasePath string `json:"basePath,omitempty"`
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
Debug bool `json:"debug,omitempty"`
Servers []ServerConfiguration
HTTPClient *http.Client
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
Debug bool `json:"debug,omitempty"`
Servers ServerConfigurations
OperationServers map[string]ServerConfigurations
HTTPClient *http.Client
}
// NewConfiguration returns a new Configuration object
func NewConfiguration() *Configuration {
cfg := &Configuration{
BasePath: "http://localhost/api/v1",
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Servers: []ServerConfiguration{
Servers: ServerConfigurations{
{
Url: "http://localhost/api/v1",
URL: "http://localhost/api/v1",
Description: "No description provided",
},
},
OperationServers: map[string]ServerConfigurations{},
}
return cfg
}
@ -99,13 +119,13 @@ func (c *Configuration) AddDefaultHeader(key string, value string) {
c.DefaultHeader[key] = value
}
// ServerUrl returns URL based on server settings
func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error) {
if index < 0 || len(c.Servers) <= index {
return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers)-1)
// URL formats template on a index using given variables
func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) {
if index < 0 || len(sc) <= index {
return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1)
}
server := c.Servers[index]
url := server.Url
server := sc[index]
url := server.URL
// go through variables and replace placeholders
for name, variable := range server.Variables {
@ -126,3 +146,84 @@ func (c *Configuration) ServerUrl(index int, variables map[string]string) (strin
}
return url, nil
}
// ServerURL returns URL based on server settings
func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) {
return c.Servers.URL(index, variables)
}
func getServerIndex(ctx context.Context) (int, error) {
si := ctx.Value(ContextServerIndex)
if si != nil {
if index, ok := si.(int); ok {
return index, nil
}
return 0, reportError("Invalid type %T should be int", si)
}
return 0, nil
}
func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
osi := ctx.Value(ContextOperationServerIndices)
if osi != nil {
if operationIndices, ok := osi.(map[string]int); !ok {
return 0, reportError("Invalid type %T should be map[string]int", osi)
} else {
index, ok := operationIndices[endpoint]
if ok {
return index, nil
}
}
}
return getServerIndex(ctx)
}
func getServerVariables(ctx context.Context) (map[string]string, error) {
sv := ctx.Value(ContextServerVariables)
if sv != nil {
if variables, ok := sv.(map[string]string); ok {
return variables, nil
}
return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv)
}
return nil, nil
}
func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
osv := ctx.Value(ContextOperationServerVariables)
if osv != nil {
if operationVariables, ok := osv.(map[string]map[string]string); !ok {
return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
} else {
variables, ok := operationVariables[endpoint]
if ok {
return variables, nil
}
}
}
return getServerVariables(ctx)
}
// ServerURLWithContext returns a new server URL given an endpoint
func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {
sc, ok := c.OperationServers[endpoint]
if !ok {
sc = c.Servers
}
if ctx == nil {
return sc.URL(0, nil)
}
index, err := getServerOperationIndex(ctx, endpoint)
if err != nil {
return "", err
}
variables, err := getServerOperationVariables(ctx, endpoint)
if err != nil {
return "", err
}
return sc.URL(index, variables)
}

View File

@ -5,7 +5,72 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Size** | **int64** | |
**DeflateOnOom** | **bool** | Whether the balloon should deflate when the guest is under memory pressure. | [optional] [default to false]
**DeflateOnOom** | Pointer to **bool** | Whether the balloon should deflate when the guest is under memory pressure. | [optional] [default to false]
## Methods
### NewBalloonConfig
`func NewBalloonConfig(size int64, ) *BalloonConfig`
NewBalloonConfig instantiates a new BalloonConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewBalloonConfigWithDefaults
`func NewBalloonConfigWithDefaults() *BalloonConfig`
NewBalloonConfigWithDefaults instantiates a new BalloonConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSize
`func (o *BalloonConfig) GetSize() int64`
GetSize returns the Size field if non-nil, zero value otherwise.
### GetSizeOk
`func (o *BalloonConfig) GetSizeOk() (*int64, bool)`
GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSize
`func (o *BalloonConfig) SetSize(v int64)`
SetSize sets Size field to given value.
### GetDeflateOnOom
`func (o *BalloonConfig) GetDeflateOnOom() bool`
GetDeflateOnOom returns the DeflateOnOom field if non-nil, zero value otherwise.
### GetDeflateOnOomOk
`func (o *BalloonConfig) GetDeflateOnOomOk() (*bool, bool)`
GetDeflateOnOomOk returns a tuple with the DeflateOnOom field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDeflateOnOom
`func (o *BalloonConfig) SetDeflateOnOom(v bool)`
SetDeflateOnOom sets DeflateOnOom field to given value.
### HasDeflateOnOom
`func (o *BalloonConfig) HasDeflateOnOom() bool`
HasDeflateOnOom returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -6,6 +6,46 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Args** | **string** | |
## Methods
### NewCmdLineConfig
`func NewCmdLineConfig(args string, ) *CmdLineConfig`
NewCmdLineConfig instantiates a new CmdLineConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCmdLineConfigWithDefaults
`func NewCmdLineConfigWithDefaults() *CmdLineConfig`
NewCmdLineConfigWithDefaults instantiates a new CmdLineConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetArgs
`func (o *CmdLineConfig) GetArgs() string`
GetArgs returns the Args field if non-nil, zero value otherwise.
### GetArgsOk
`func (o *CmdLineConfig) GetArgsOk() (*string, bool)`
GetArgsOk returns a tuple with the Args field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetArgs
`func (o *CmdLineConfig) SetArgs(v string)`
SetArgs sets Args field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,9 +4,99 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**File** | **string** | | [optional]
**File** | Pointer to **string** | | [optional]
**Mode** | **string** | |
**Iommu** | **bool** | | [optional] [default to false]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
## Methods
### NewConsoleConfig
`func NewConsoleConfig(mode string, ) *ConsoleConfig`
NewConsoleConfig instantiates a new ConsoleConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewConsoleConfigWithDefaults
`func NewConsoleConfigWithDefaults() *ConsoleConfig`
NewConsoleConfigWithDefaults instantiates a new ConsoleConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetFile
`func (o *ConsoleConfig) GetFile() string`
GetFile returns the File field if non-nil, zero value otherwise.
### GetFileOk
`func (o *ConsoleConfig) GetFileOk() (*string, bool)`
GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFile
`func (o *ConsoleConfig) SetFile(v string)`
SetFile sets File field to given value.
### HasFile
`func (o *ConsoleConfig) HasFile() bool`
HasFile returns a boolean if a field has been set.
### GetMode
`func (o *ConsoleConfig) GetMode() string`
GetMode returns the Mode field if non-nil, zero value otherwise.
### GetModeOk
`func (o *ConsoleConfig) GetModeOk() (*string, bool)`
GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMode
`func (o *ConsoleConfig) SetMode(v string)`
SetMode sets Mode field to given value.
### GetIommu
`func (o *ConsoleConfig) GetIommu() bool`
GetIommu returns the Iommu field if non-nil, zero value otherwise.
### GetIommuOk
`func (o *ConsoleConfig) GetIommuOk() (*bool, bool)`
GetIommuOk returns a tuple with the Iommu field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetIommu
`func (o *ConsoleConfig) SetIommu(v bool)`
SetIommu sets Iommu field to given value.
### HasIommu
`func (o *ConsoleConfig) HasIommu() bool`
HasIommu returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,10 +4,130 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ThreadsPerCore** | **int32** | | [optional]
**CoresPerDie** | **int32** | | [optional]
**DiesPerPackage** | **int32** | | [optional]
**Packages** | **int32** | | [optional]
**ThreadsPerCore** | Pointer to **int32** | | [optional]
**CoresPerDie** | Pointer to **int32** | | [optional]
**DiesPerPackage** | Pointer to **int32** | | [optional]
**Packages** | Pointer to **int32** | | [optional]
## Methods
### NewCpuTopology
`func NewCpuTopology() *CpuTopology`
NewCpuTopology instantiates a new CpuTopology object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCpuTopologyWithDefaults
`func NewCpuTopologyWithDefaults() *CpuTopology`
NewCpuTopologyWithDefaults instantiates a new CpuTopology object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetThreadsPerCore
`func (o *CpuTopology) GetThreadsPerCore() int32`
GetThreadsPerCore returns the ThreadsPerCore field if non-nil, zero value otherwise.
### GetThreadsPerCoreOk
`func (o *CpuTopology) GetThreadsPerCoreOk() (*int32, bool)`
GetThreadsPerCoreOk returns a tuple with the ThreadsPerCore field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetThreadsPerCore
`func (o *CpuTopology) SetThreadsPerCore(v int32)`
SetThreadsPerCore sets ThreadsPerCore field to given value.
### HasThreadsPerCore
`func (o *CpuTopology) HasThreadsPerCore() bool`
HasThreadsPerCore returns a boolean if a field has been set.
### GetCoresPerDie
`func (o *CpuTopology) GetCoresPerDie() int32`
GetCoresPerDie returns the CoresPerDie field if non-nil, zero value otherwise.
### GetCoresPerDieOk
`func (o *CpuTopology) GetCoresPerDieOk() (*int32, bool)`
GetCoresPerDieOk returns a tuple with the CoresPerDie field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCoresPerDie
`func (o *CpuTopology) SetCoresPerDie(v int32)`
SetCoresPerDie sets CoresPerDie field to given value.
### HasCoresPerDie
`func (o *CpuTopology) HasCoresPerDie() bool`
HasCoresPerDie returns a boolean if a field has been set.
### GetDiesPerPackage
`func (o *CpuTopology) GetDiesPerPackage() int32`
GetDiesPerPackage returns the DiesPerPackage field if non-nil, zero value otherwise.
### GetDiesPerPackageOk
`func (o *CpuTopology) GetDiesPerPackageOk() (*int32, bool)`
GetDiesPerPackageOk returns a tuple with the DiesPerPackage field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDiesPerPackage
`func (o *CpuTopology) SetDiesPerPackage(v int32)`
SetDiesPerPackage sets DiesPerPackage field to given value.
### HasDiesPerPackage
`func (o *CpuTopology) HasDiesPerPackage() bool`
HasDiesPerPackage returns a boolean if a field has been set.
### GetPackages
`func (o *CpuTopology) GetPackages() int32`
GetPackages returns the Packages field if non-nil, zero value otherwise.
### GetPackagesOk
`func (o *CpuTopology) GetPackagesOk() (*int32, bool)`
GetPackagesOk returns a tuple with the Packages field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPackages
`func (o *CpuTopology) SetPackages(v int32)`
SetPackages sets Packages field to given value.
### HasPackages
`func (o *CpuTopology) HasPackages() bool`
HasPackages returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -6,8 +6,118 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**BootVcpus** | **int32** | | [default to 1]
**MaxVcpus** | **int32** | | [default to 1]
**Topology** | [**CpuTopology**](CpuTopology.md) | | [optional]
**MaxPhysBits** | **int32** | | [optional]
**Topology** | Pointer to [**CpuTopology**](CpuTopology.md) | | [optional]
**MaxPhysBits** | Pointer to **int32** | | [optional]
## Methods
### NewCpusConfig
`func NewCpusConfig(bootVcpus int32, maxVcpus int32, ) *CpusConfig`
NewCpusConfig instantiates a new CpusConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCpusConfigWithDefaults
`func NewCpusConfigWithDefaults() *CpusConfig`
NewCpusConfigWithDefaults instantiates a new CpusConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetBootVcpus
`func (o *CpusConfig) GetBootVcpus() int32`
GetBootVcpus returns the BootVcpus field if non-nil, zero value otherwise.
### GetBootVcpusOk
`func (o *CpusConfig) GetBootVcpusOk() (*int32, bool)`
GetBootVcpusOk returns a tuple with the BootVcpus field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetBootVcpus
`func (o *CpusConfig) SetBootVcpus(v int32)`
SetBootVcpus sets BootVcpus field to given value.
### GetMaxVcpus
`func (o *CpusConfig) GetMaxVcpus() int32`
GetMaxVcpus returns the MaxVcpus field if non-nil, zero value otherwise.
### GetMaxVcpusOk
`func (o *CpusConfig) GetMaxVcpusOk() (*int32, bool)`
GetMaxVcpusOk returns a tuple with the MaxVcpus field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMaxVcpus
`func (o *CpusConfig) SetMaxVcpus(v int32)`
SetMaxVcpus sets MaxVcpus field to given value.
### GetTopology
`func (o *CpusConfig) GetTopology() CpuTopology`
GetTopology returns the Topology field if non-nil, zero value otherwise.
### GetTopologyOk
`func (o *CpusConfig) GetTopologyOk() (*CpuTopology, bool)`
GetTopologyOk returns a tuple with the Topology field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTopology
`func (o *CpusConfig) SetTopology(v CpuTopology)`
SetTopology sets Topology field to given value.
### HasTopology
`func (o *CpusConfig) HasTopology() bool`
HasTopology returns a boolean if a field has been set.
### GetMaxPhysBits
`func (o *CpusConfig) GetMaxPhysBits() int32`
GetMaxPhysBits returns the MaxPhysBits field if non-nil, zero value otherwise.
### GetMaxPhysBitsOk
`func (o *CpusConfig) GetMaxPhysBitsOk() (*int32, bool)`
GetMaxPhysBitsOk returns a tuple with the MaxPhysBits field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMaxPhysBits
`func (o *CpusConfig) SetMaxPhysBits(v int32)`
SetMaxPhysBits sets MaxPhysBits field to given value.
### HasMaxPhysBits
`func (o *CpusConfig) HasMaxPhysBits() bool`
HasMaxPhysBits returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,8 +5,98 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Path** | **string** | |
**Iommu** | **bool** | | [optional] [default to false]
**Id** | **string** | | [optional]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
**Id** | Pointer to **string** | | [optional]
## Methods
### NewDeviceConfig
`func NewDeviceConfig(path string, ) *DeviceConfig`
NewDeviceConfig instantiates a new DeviceConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDeviceConfigWithDefaults
`func NewDeviceConfigWithDefaults() *DeviceConfig`
NewDeviceConfigWithDefaults instantiates a new DeviceConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetPath
`func (o *DeviceConfig) GetPath() string`
GetPath returns the Path field if non-nil, zero value otherwise.
### GetPathOk
`func (o *DeviceConfig) GetPathOk() (*string, bool)`
GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPath
`func (o *DeviceConfig) SetPath(v string)`
SetPath sets Path field to given value.
### GetIommu
`func (o *DeviceConfig) GetIommu() bool`
GetIommu returns the Iommu field if non-nil, zero value otherwise.
### GetIommuOk
`func (o *DeviceConfig) GetIommuOk() (*bool, bool)`
GetIommuOk returns a tuple with the Iommu field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetIommu
`func (o *DeviceConfig) SetIommu(v bool)`
SetIommu sets Iommu field to given value.
### HasIommu
`func (o *DeviceConfig) HasIommu() bool`
HasIommu returns a boolean if a field has been set.
### GetId
`func (o *DeviceConfig) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *DeviceConfig) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *DeviceConfig) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *DeviceConfig) HasId() bool`
HasId returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,10 +4,130 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [optional]
**Resources** | **[]map[string]interface{}** | | [optional]
**Children** | **[]string** | | [optional]
**PciBdf** | **int32** | | [optional]
**Id** | Pointer to **string** | | [optional]
**Resources** | Pointer to **[]map[string]interface{}** | | [optional]
**Children** | Pointer to **[]string** | | [optional]
**PciBdf** | Pointer to **int32** | | [optional]
## Methods
### NewDeviceNode
`func NewDeviceNode() *DeviceNode`
NewDeviceNode instantiates a new DeviceNode object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDeviceNodeWithDefaults
`func NewDeviceNodeWithDefaults() *DeviceNode`
NewDeviceNodeWithDefaults instantiates a new DeviceNode object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *DeviceNode) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *DeviceNode) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *DeviceNode) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *DeviceNode) HasId() bool`
HasId returns a boolean if a field has been set.
### GetResources
`func (o *DeviceNode) GetResources() []map[string]interface{}`
GetResources returns the Resources field if non-nil, zero value otherwise.
### GetResourcesOk
`func (o *DeviceNode) GetResourcesOk() (*[]map[string]interface{}, bool)`
GetResourcesOk returns a tuple with the Resources field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetResources
`func (o *DeviceNode) SetResources(v []map[string]interface{})`
SetResources sets Resources field to given value.
### HasResources
`func (o *DeviceNode) HasResources() bool`
HasResources returns a boolean if a field has been set.
### GetChildren
`func (o *DeviceNode) GetChildren() []string`
GetChildren returns the Children field if non-nil, zero value otherwise.
### GetChildrenOk
`func (o *DeviceNode) GetChildrenOk() (*[]string, bool)`
GetChildrenOk returns a tuple with the Children field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetChildren
`func (o *DeviceNode) SetChildren(v []string)`
SetChildren sets Children field to given value.
### HasChildren
`func (o *DeviceNode) HasChildren() bool`
HasChildren returns a boolean if a field has been set.
### GetPciBdf
`func (o *DeviceNode) GetPciBdf() int32`
GetPciBdf returns the PciBdf field if non-nil, zero value otherwise.
### GetPciBdfOk
`func (o *DeviceNode) GetPciBdfOk() (*int32, bool)`
GetPciBdfOk returns a tuple with the PciBdf field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPciBdf
`func (o *DeviceNode) SetPciBdf(v int32)`
SetPciBdf sets PciBdf field to given value.
### HasPciBdf
`func (o *DeviceNode) HasPciBdf() bool`
HasPciBdf returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,16 +5,306 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Path** | **string** | |
**Readonly** | **bool** | | [optional] [default to false]
**Direct** | **bool** | | [optional] [default to false]
**Iommu** | **bool** | | [optional] [default to false]
**NumQueues** | **int32** | | [optional] [default to 1]
**QueueSize** | **int32** | | [optional] [default to 128]
**VhostUser** | **bool** | | [optional] [default to false]
**VhostSocket** | **string** | | [optional]
**PollQueue** | **bool** | | [optional] [default to true]
**RateLimiterConfig** | [**RateLimiterConfig**](RateLimiterConfig.md) | | [optional]
**Id** | **string** | | [optional]
**Readonly** | Pointer to **bool** | | [optional] [default to false]
**Direct** | Pointer to **bool** | | [optional] [default to false]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
**NumQueues** | Pointer to **int32** | | [optional] [default to 1]
**QueueSize** | Pointer to **int32** | | [optional] [default to 128]
**VhostUser** | Pointer to **bool** | | [optional] [default to false]
**VhostSocket** | Pointer to **string** | | [optional]
**PollQueue** | Pointer to **bool** | | [optional] [default to true]
**RateLimiterConfig** | Pointer to [**RateLimiterConfig**](RateLimiterConfig.md) | | [optional]
**Id** | Pointer to **string** | | [optional]
## Methods
### NewDiskConfig
`func NewDiskConfig(path string, ) *DiskConfig`
NewDiskConfig instantiates a new DiskConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDiskConfigWithDefaults
`func NewDiskConfigWithDefaults() *DiskConfig`
NewDiskConfigWithDefaults instantiates a new DiskConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetPath
`func (o *DiskConfig) GetPath() string`
GetPath returns the Path field if non-nil, zero value otherwise.
### GetPathOk
`func (o *DiskConfig) GetPathOk() (*string, bool)`
GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPath
`func (o *DiskConfig) SetPath(v string)`
SetPath sets Path field to given value.
### GetReadonly
`func (o *DiskConfig) GetReadonly() bool`
GetReadonly returns the Readonly field if non-nil, zero value otherwise.
### GetReadonlyOk
`func (o *DiskConfig) GetReadonlyOk() (*bool, bool)`
GetReadonlyOk returns a tuple with the Readonly field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetReadonly
`func (o *DiskConfig) SetReadonly(v bool)`
SetReadonly sets Readonly field to given value.
### HasReadonly
`func (o *DiskConfig) HasReadonly() bool`
HasReadonly returns a boolean if a field has been set.
### GetDirect
`func (o *DiskConfig) GetDirect() bool`
GetDirect returns the Direct field if non-nil, zero value otherwise.
### GetDirectOk
`func (o *DiskConfig) GetDirectOk() (*bool, bool)`
GetDirectOk returns a tuple with the Direct field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDirect
`func (o *DiskConfig) SetDirect(v bool)`
SetDirect sets Direct field to given value.
### HasDirect
`func (o *DiskConfig) HasDirect() bool`
HasDirect returns a boolean if a field has been set.
### GetIommu
`func (o *DiskConfig) GetIommu() bool`
GetIommu returns the Iommu field if non-nil, zero value otherwise.
### GetIommuOk
`func (o *DiskConfig) GetIommuOk() (*bool, bool)`
GetIommuOk returns a tuple with the Iommu field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetIommu
`func (o *DiskConfig) SetIommu(v bool)`
SetIommu sets Iommu field to given value.
### HasIommu
`func (o *DiskConfig) HasIommu() bool`
HasIommu returns a boolean if a field has been set.
### GetNumQueues
`func (o *DiskConfig) GetNumQueues() int32`
GetNumQueues returns the NumQueues field if non-nil, zero value otherwise.
### GetNumQueuesOk
`func (o *DiskConfig) GetNumQueuesOk() (*int32, bool)`
GetNumQueuesOk returns a tuple with the NumQueues field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetNumQueues
`func (o *DiskConfig) SetNumQueues(v int32)`
SetNumQueues sets NumQueues field to given value.
### HasNumQueues
`func (o *DiskConfig) HasNumQueues() bool`
HasNumQueues returns a boolean if a field has been set.
### GetQueueSize
`func (o *DiskConfig) GetQueueSize() int32`
GetQueueSize returns the QueueSize field if non-nil, zero value otherwise.
### GetQueueSizeOk
`func (o *DiskConfig) GetQueueSizeOk() (*int32, bool)`
GetQueueSizeOk returns a tuple with the QueueSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetQueueSize
`func (o *DiskConfig) SetQueueSize(v int32)`
SetQueueSize sets QueueSize field to given value.
### HasQueueSize
`func (o *DiskConfig) HasQueueSize() bool`
HasQueueSize returns a boolean if a field has been set.
### GetVhostUser
`func (o *DiskConfig) GetVhostUser() bool`
GetVhostUser returns the VhostUser field if non-nil, zero value otherwise.
### GetVhostUserOk
`func (o *DiskConfig) GetVhostUserOk() (*bool, bool)`
GetVhostUserOk returns a tuple with the VhostUser field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetVhostUser
`func (o *DiskConfig) SetVhostUser(v bool)`
SetVhostUser sets VhostUser field to given value.
### HasVhostUser
`func (o *DiskConfig) HasVhostUser() bool`
HasVhostUser returns a boolean if a field has been set.
### GetVhostSocket
`func (o *DiskConfig) GetVhostSocket() string`
GetVhostSocket returns the VhostSocket field if non-nil, zero value otherwise.
### GetVhostSocketOk
`func (o *DiskConfig) GetVhostSocketOk() (*string, bool)`
GetVhostSocketOk returns a tuple with the VhostSocket field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetVhostSocket
`func (o *DiskConfig) SetVhostSocket(v string)`
SetVhostSocket sets VhostSocket field to given value.
### HasVhostSocket
`func (o *DiskConfig) HasVhostSocket() bool`
HasVhostSocket returns a boolean if a field has been set.
### GetPollQueue
`func (o *DiskConfig) GetPollQueue() bool`
GetPollQueue returns the PollQueue field if non-nil, zero value otherwise.
### GetPollQueueOk
`func (o *DiskConfig) GetPollQueueOk() (*bool, bool)`
GetPollQueueOk returns a tuple with the PollQueue field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPollQueue
`func (o *DiskConfig) SetPollQueue(v bool)`
SetPollQueue sets PollQueue field to given value.
### HasPollQueue
`func (o *DiskConfig) HasPollQueue() bool`
HasPollQueue returns a boolean if a field has been set.
### GetRateLimiterConfig
`func (o *DiskConfig) GetRateLimiterConfig() RateLimiterConfig`
GetRateLimiterConfig returns the RateLimiterConfig field if non-nil, zero value otherwise.
### GetRateLimiterConfigOk
`func (o *DiskConfig) GetRateLimiterConfigOk() (*RateLimiterConfig, bool)`
GetRateLimiterConfigOk returns a tuple with the RateLimiterConfig field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRateLimiterConfig
`func (o *DiskConfig) SetRateLimiterConfig(v RateLimiterConfig)`
SetRateLimiterConfig sets RateLimiterConfig field to given value.
### HasRateLimiterConfig
`func (o *DiskConfig) HasRateLimiterConfig() bool`
HasRateLimiterConfig returns a boolean if a field has been set.
### GetId
`func (o *DiskConfig) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *DiskConfig) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *DiskConfig) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *DiskConfig) HasId() bool`
HasId returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -10,7 +10,172 @@ Name | Type | Description | Notes
**QueueSize** | **int32** | | [default to 1024]
**Dax** | **bool** | | [default to true]
**CacheSize** | **int64** | |
**Id** | **string** | | [optional]
**Id** | Pointer to **string** | | [optional]
## Methods
### NewFsConfig
`func NewFsConfig(tag string, socket string, numQueues int32, queueSize int32, dax bool, cacheSize int64, ) *FsConfig`
NewFsConfig instantiates a new FsConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewFsConfigWithDefaults
`func NewFsConfigWithDefaults() *FsConfig`
NewFsConfigWithDefaults instantiates a new FsConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetTag
`func (o *FsConfig) GetTag() string`
GetTag returns the Tag field if non-nil, zero value otherwise.
### GetTagOk
`func (o *FsConfig) GetTagOk() (*string, bool)`
GetTagOk returns a tuple with the Tag field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTag
`func (o *FsConfig) SetTag(v string)`
SetTag sets Tag field to given value.
### GetSocket
`func (o *FsConfig) GetSocket() string`
GetSocket returns the Socket field if non-nil, zero value otherwise.
### GetSocketOk
`func (o *FsConfig) GetSocketOk() (*string, bool)`
GetSocketOk returns a tuple with the Socket field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSocket
`func (o *FsConfig) SetSocket(v string)`
SetSocket sets Socket field to given value.
### GetNumQueues
`func (o *FsConfig) GetNumQueues() int32`
GetNumQueues returns the NumQueues field if non-nil, zero value otherwise.
### GetNumQueuesOk
`func (o *FsConfig) GetNumQueuesOk() (*int32, bool)`
GetNumQueuesOk returns a tuple with the NumQueues field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetNumQueues
`func (o *FsConfig) SetNumQueues(v int32)`
SetNumQueues sets NumQueues field to given value.
### GetQueueSize
`func (o *FsConfig) GetQueueSize() int32`
GetQueueSize returns the QueueSize field if non-nil, zero value otherwise.
### GetQueueSizeOk
`func (o *FsConfig) GetQueueSizeOk() (*int32, bool)`
GetQueueSizeOk returns a tuple with the QueueSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetQueueSize
`func (o *FsConfig) SetQueueSize(v int32)`
SetQueueSize sets QueueSize field to given value.
### GetDax
`func (o *FsConfig) GetDax() bool`
GetDax returns the Dax field if non-nil, zero value otherwise.
### GetDaxOk
`func (o *FsConfig) GetDaxOk() (*bool, bool)`
GetDaxOk returns a tuple with the Dax field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDax
`func (o *FsConfig) SetDax(v bool)`
SetDax sets Dax field to given value.
### GetCacheSize
`func (o *FsConfig) GetCacheSize() int64`
GetCacheSize returns the CacheSize field if non-nil, zero value otherwise.
### GetCacheSizeOk
`func (o *FsConfig) GetCacheSizeOk() (*int64, bool)`
GetCacheSizeOk returns a tuple with the CacheSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCacheSize
`func (o *FsConfig) SetCacheSize(v int64)`
SetCacheSize sets CacheSize field to given value.
### GetId
`func (o *FsConfig) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *FsConfig) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *FsConfig) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *FsConfig) HasId() bool`
HasId returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -6,6 +6,46 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Path** | **string** | |
## Methods
### NewInitramfsConfig
`func NewInitramfsConfig(path string, ) *InitramfsConfig`
NewInitramfsConfig instantiates a new InitramfsConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewInitramfsConfigWithDefaults
`func NewInitramfsConfigWithDefaults() *InitramfsConfig`
NewInitramfsConfigWithDefaults instantiates a new InitramfsConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetPath
`func (o *InitramfsConfig) GetPath() string`
GetPath returns the Path field if non-nil, zero value otherwise.
### GetPathOk
`func (o *InitramfsConfig) GetPathOk() (*string, bool)`
GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPath
`func (o *InitramfsConfig) SetPath(v string)`
SetPath sets Path field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -6,6 +6,46 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Path** | **string** | |
## Methods
### NewKernelConfig
`func NewKernelConfig(path string, ) *KernelConfig`
NewKernelConfig instantiates a new KernelConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewKernelConfigWithDefaults
`func NewKernelConfigWithDefaults() *KernelConfig`
NewKernelConfigWithDefaults instantiates a new KernelConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetPath
`func (o *KernelConfig) GetPath() string`
GetPath returns the Path field if non-nil, zero value otherwise.
### GetPathOk
`func (o *KernelConfig) GetPathOk() (*string, bool)`
GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPath
`func (o *KernelConfig) SetPath(v string)`
SetPath sets Path field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,14 +5,254 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Size** | **int64** | |
**HotplugSize** | **int64** | | [optional]
**HotpluggedSize** | **int64** | | [optional]
**Mergeable** | **bool** | | [optional] [default to false]
**HotplugMethod** | **string** | | [optional] [default to acpi]
**Shared** | **bool** | | [optional] [default to false]
**Hugepages** | **bool** | | [optional] [default to false]
**HugepageSize** | **int64** | | [optional]
**Zones** | [**[]MemoryZoneConfig**](MemoryZoneConfig.md) | | [optional]
**HotplugSize** | Pointer to **int64** | | [optional]
**HotpluggedSize** | Pointer to **int64** | | [optional]
**Mergeable** | Pointer to **bool** | | [optional] [default to false]
**HotplugMethod** | Pointer to **string** | | [optional] [default to "acpi"]
**Shared** | Pointer to **bool** | | [optional] [default to false]
**Hugepages** | Pointer to **bool** | | [optional] [default to false]
**HugepageSize** | Pointer to **int64** | | [optional]
**Zones** | Pointer to [**[]MemoryZoneConfig**](MemoryZoneConfig.md) | | [optional]
## Methods
### NewMemoryConfig
`func NewMemoryConfig(size int64, ) *MemoryConfig`
NewMemoryConfig instantiates a new MemoryConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewMemoryConfigWithDefaults
`func NewMemoryConfigWithDefaults() *MemoryConfig`
NewMemoryConfigWithDefaults instantiates a new MemoryConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSize
`func (o *MemoryConfig) GetSize() int64`
GetSize returns the Size field if non-nil, zero value otherwise.
### GetSizeOk
`func (o *MemoryConfig) GetSizeOk() (*int64, bool)`
GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSize
`func (o *MemoryConfig) SetSize(v int64)`
SetSize sets Size field to given value.
### GetHotplugSize
`func (o *MemoryConfig) GetHotplugSize() int64`
GetHotplugSize returns the HotplugSize field if non-nil, zero value otherwise.
### GetHotplugSizeOk
`func (o *MemoryConfig) GetHotplugSizeOk() (*int64, bool)`
GetHotplugSizeOk returns a tuple with the HotplugSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHotplugSize
`func (o *MemoryConfig) SetHotplugSize(v int64)`
SetHotplugSize sets HotplugSize field to given value.
### HasHotplugSize
`func (o *MemoryConfig) HasHotplugSize() bool`
HasHotplugSize returns a boolean if a field has been set.
### GetHotpluggedSize
`func (o *MemoryConfig) GetHotpluggedSize() int64`
GetHotpluggedSize returns the HotpluggedSize field if non-nil, zero value otherwise.
### GetHotpluggedSizeOk
`func (o *MemoryConfig) GetHotpluggedSizeOk() (*int64, bool)`
GetHotpluggedSizeOk returns a tuple with the HotpluggedSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHotpluggedSize
`func (o *MemoryConfig) SetHotpluggedSize(v int64)`
SetHotpluggedSize sets HotpluggedSize field to given value.
### HasHotpluggedSize
`func (o *MemoryConfig) HasHotpluggedSize() bool`
HasHotpluggedSize returns a boolean if a field has been set.
### GetMergeable
`func (o *MemoryConfig) GetMergeable() bool`
GetMergeable returns the Mergeable field if non-nil, zero value otherwise.
### GetMergeableOk
`func (o *MemoryConfig) GetMergeableOk() (*bool, bool)`
GetMergeableOk returns a tuple with the Mergeable field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMergeable
`func (o *MemoryConfig) SetMergeable(v bool)`
SetMergeable sets Mergeable field to given value.
### HasMergeable
`func (o *MemoryConfig) HasMergeable() bool`
HasMergeable returns a boolean if a field has been set.
### GetHotplugMethod
`func (o *MemoryConfig) GetHotplugMethod() string`
GetHotplugMethod returns the HotplugMethod field if non-nil, zero value otherwise.
### GetHotplugMethodOk
`func (o *MemoryConfig) GetHotplugMethodOk() (*string, bool)`
GetHotplugMethodOk returns a tuple with the HotplugMethod field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHotplugMethod
`func (o *MemoryConfig) SetHotplugMethod(v string)`
SetHotplugMethod sets HotplugMethod field to given value.
### HasHotplugMethod
`func (o *MemoryConfig) HasHotplugMethod() bool`
HasHotplugMethod returns a boolean if a field has been set.
### GetShared
`func (o *MemoryConfig) GetShared() bool`
GetShared returns the Shared field if non-nil, zero value otherwise.
### GetSharedOk
`func (o *MemoryConfig) GetSharedOk() (*bool, bool)`
GetSharedOk returns a tuple with the Shared field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetShared
`func (o *MemoryConfig) SetShared(v bool)`
SetShared sets Shared field to given value.
### HasShared
`func (o *MemoryConfig) HasShared() bool`
HasShared returns a boolean if a field has been set.
### GetHugepages
`func (o *MemoryConfig) GetHugepages() bool`
GetHugepages returns the Hugepages field if non-nil, zero value otherwise.
### GetHugepagesOk
`func (o *MemoryConfig) GetHugepagesOk() (*bool, bool)`
GetHugepagesOk returns a tuple with the Hugepages field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHugepages
`func (o *MemoryConfig) SetHugepages(v bool)`
SetHugepages sets Hugepages field to given value.
### HasHugepages
`func (o *MemoryConfig) HasHugepages() bool`
HasHugepages returns a boolean if a field has been set.
### GetHugepageSize
`func (o *MemoryConfig) GetHugepageSize() int64`
GetHugepageSize returns the HugepageSize field if non-nil, zero value otherwise.
### GetHugepageSizeOk
`func (o *MemoryConfig) GetHugepageSizeOk() (*int64, bool)`
GetHugepageSizeOk returns a tuple with the HugepageSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHugepageSize
`func (o *MemoryConfig) SetHugepageSize(v int64)`
SetHugepageSize sets HugepageSize field to given value.
### HasHugepageSize
`func (o *MemoryConfig) HasHugepageSize() bool`
HasHugepageSize returns a boolean if a field has been set.
### GetZones
`func (o *MemoryConfig) GetZones() []MemoryZoneConfig`
GetZones returns the Zones field if non-nil, zero value otherwise.
### GetZonesOk
`func (o *MemoryConfig) GetZonesOk() (*[]MemoryZoneConfig, bool)`
GetZonesOk returns a tuple with the Zones field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetZones
`func (o *MemoryConfig) SetZones(v []MemoryZoneConfig)`
SetZones sets Zones field to given value.
### HasZones
`func (o *MemoryConfig) HasZones() bool`
HasZones returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -6,14 +6,274 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | |
**Size** | **int64** | |
**File** | **string** | | [optional]
**Mergeable** | **bool** | | [optional] [default to false]
**Shared** | **bool** | | [optional] [default to false]
**Hugepages** | **bool** | | [optional] [default to false]
**HugepageSize** | **int64** | | [optional]
**HostNumaNode** | **int32** | | [optional]
**HotplugSize** | **int64** | | [optional]
**HotpluggedSize** | **int64** | | [optional]
**File** | Pointer to **string** | | [optional]
**Mergeable** | Pointer to **bool** | | [optional] [default to false]
**Shared** | Pointer to **bool** | | [optional] [default to false]
**Hugepages** | Pointer to **bool** | | [optional] [default to false]
**HugepageSize** | Pointer to **int64** | | [optional]
**HostNumaNode** | Pointer to **int32** | | [optional]
**HotplugSize** | Pointer to **int64** | | [optional]
**HotpluggedSize** | Pointer to **int64** | | [optional]
## Methods
### NewMemoryZoneConfig
`func NewMemoryZoneConfig(id string, size int64, ) *MemoryZoneConfig`
NewMemoryZoneConfig instantiates a new MemoryZoneConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewMemoryZoneConfigWithDefaults
`func NewMemoryZoneConfigWithDefaults() *MemoryZoneConfig`
NewMemoryZoneConfigWithDefaults instantiates a new MemoryZoneConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *MemoryZoneConfig) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *MemoryZoneConfig) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *MemoryZoneConfig) SetId(v string)`
SetId sets Id field to given value.
### GetSize
`func (o *MemoryZoneConfig) GetSize() int64`
GetSize returns the Size field if non-nil, zero value otherwise.
### GetSizeOk
`func (o *MemoryZoneConfig) GetSizeOk() (*int64, bool)`
GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSize
`func (o *MemoryZoneConfig) SetSize(v int64)`
SetSize sets Size field to given value.
### GetFile
`func (o *MemoryZoneConfig) GetFile() string`
GetFile returns the File field if non-nil, zero value otherwise.
### GetFileOk
`func (o *MemoryZoneConfig) GetFileOk() (*string, bool)`
GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFile
`func (o *MemoryZoneConfig) SetFile(v string)`
SetFile sets File field to given value.
### HasFile
`func (o *MemoryZoneConfig) HasFile() bool`
HasFile returns a boolean if a field has been set.
### GetMergeable
`func (o *MemoryZoneConfig) GetMergeable() bool`
GetMergeable returns the Mergeable field if non-nil, zero value otherwise.
### GetMergeableOk
`func (o *MemoryZoneConfig) GetMergeableOk() (*bool, bool)`
GetMergeableOk returns a tuple with the Mergeable field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMergeable
`func (o *MemoryZoneConfig) SetMergeable(v bool)`
SetMergeable sets Mergeable field to given value.
### HasMergeable
`func (o *MemoryZoneConfig) HasMergeable() bool`
HasMergeable returns a boolean if a field has been set.
### GetShared
`func (o *MemoryZoneConfig) GetShared() bool`
GetShared returns the Shared field if non-nil, zero value otherwise.
### GetSharedOk
`func (o *MemoryZoneConfig) GetSharedOk() (*bool, bool)`
GetSharedOk returns a tuple with the Shared field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetShared
`func (o *MemoryZoneConfig) SetShared(v bool)`
SetShared sets Shared field to given value.
### HasShared
`func (o *MemoryZoneConfig) HasShared() bool`
HasShared returns a boolean if a field has been set.
### GetHugepages
`func (o *MemoryZoneConfig) GetHugepages() bool`
GetHugepages returns the Hugepages field if non-nil, zero value otherwise.
### GetHugepagesOk
`func (o *MemoryZoneConfig) GetHugepagesOk() (*bool, bool)`
GetHugepagesOk returns a tuple with the Hugepages field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHugepages
`func (o *MemoryZoneConfig) SetHugepages(v bool)`
SetHugepages sets Hugepages field to given value.
### HasHugepages
`func (o *MemoryZoneConfig) HasHugepages() bool`
HasHugepages returns a boolean if a field has been set.
### GetHugepageSize
`func (o *MemoryZoneConfig) GetHugepageSize() int64`
GetHugepageSize returns the HugepageSize field if non-nil, zero value otherwise.
### GetHugepageSizeOk
`func (o *MemoryZoneConfig) GetHugepageSizeOk() (*int64, bool)`
GetHugepageSizeOk returns a tuple with the HugepageSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHugepageSize
`func (o *MemoryZoneConfig) SetHugepageSize(v int64)`
SetHugepageSize sets HugepageSize field to given value.
### HasHugepageSize
`func (o *MemoryZoneConfig) HasHugepageSize() bool`
HasHugepageSize returns a boolean if a field has been set.
### GetHostNumaNode
`func (o *MemoryZoneConfig) GetHostNumaNode() int32`
GetHostNumaNode returns the HostNumaNode field if non-nil, zero value otherwise.
### GetHostNumaNodeOk
`func (o *MemoryZoneConfig) GetHostNumaNodeOk() (*int32, bool)`
GetHostNumaNodeOk returns a tuple with the HostNumaNode field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHostNumaNode
`func (o *MemoryZoneConfig) SetHostNumaNode(v int32)`
SetHostNumaNode sets HostNumaNode field to given value.
### HasHostNumaNode
`func (o *MemoryZoneConfig) HasHostNumaNode() bool`
HasHostNumaNode returns a boolean if a field has been set.
### GetHotplugSize
`func (o *MemoryZoneConfig) GetHotplugSize() int64`
GetHotplugSize returns the HotplugSize field if non-nil, zero value otherwise.
### GetHotplugSizeOk
`func (o *MemoryZoneConfig) GetHotplugSizeOk() (*int64, bool)`
GetHotplugSizeOk returns a tuple with the HotplugSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHotplugSize
`func (o *MemoryZoneConfig) SetHotplugSize(v int64)`
SetHotplugSize sets HotplugSize field to given value.
### HasHotplugSize
`func (o *MemoryZoneConfig) HasHotplugSize() bool`
HasHotplugSize returns a boolean if a field has been set.
### GetHotpluggedSize
`func (o *MemoryZoneConfig) GetHotpluggedSize() int64`
GetHotpluggedSize returns the HotpluggedSize field if non-nil, zero value otherwise.
### GetHotpluggedSizeOk
`func (o *MemoryZoneConfig) GetHotpluggedSizeOk() (*int64, bool)`
GetHotpluggedSizeOk returns a tuple with the HotpluggedSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHotpluggedSize
`func (o *MemoryZoneConfig) SetHotpluggedSize(v int64)`
SetHotpluggedSize sets HotpluggedSize field to given value.
### HasHotpluggedSize
`func (o *MemoryZoneConfig) HasHotpluggedSize() bool`
HasHotpluggedSize returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,19 +4,364 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Tap** | **string** | | [optional] [default to ]
**Ip** | **string** | | [optional] [default to 192.168.249.1]
**Mask** | **string** | | [optional] [default to 255.255.255.0]
**Mac** | **string** | | [optional]
**Iommu** | **bool** | | [optional] [default to false]
**NumQueues** | **int32** | | [optional] [default to 2]
**QueueSize** | **int32** | | [optional] [default to 256]
**VhostUser** | **bool** | | [optional] [default to false]
**VhostSocket** | **string** | | [optional]
**VhostMode** | **string** | | [optional] [default to client]
**Id** | **string** | | [optional]
**Fd** | **[]int32** | | [optional]
**RateLimiterConfig** | [**RateLimiterConfig**](RateLimiterConfig.md) | | [optional]
**Tap** | Pointer to **string** | | [optional] [default to ""]
**Ip** | Pointer to **string** | | [optional] [default to "192.168.249.1"]
**Mask** | Pointer to **string** | | [optional] [default to "255.255.255.0"]
**Mac** | Pointer to **string** | | [optional]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
**NumQueues** | Pointer to **int32** | | [optional] [default to 2]
**QueueSize** | Pointer to **int32** | | [optional] [default to 256]
**VhostUser** | Pointer to **bool** | | [optional] [default to false]
**VhostSocket** | Pointer to **string** | | [optional]
**VhostMode** | Pointer to **string** | | [optional] [default to "client"]
**Id** | Pointer to **string** | | [optional]
**Fd** | Pointer to **[]int32** | | [optional]
**RateLimiterConfig** | Pointer to [**RateLimiterConfig**](RateLimiterConfig.md) | | [optional]
## Methods
### NewNetConfig
`func NewNetConfig() *NetConfig`
NewNetConfig instantiates a new NetConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNetConfigWithDefaults
`func NewNetConfigWithDefaults() *NetConfig`
NewNetConfigWithDefaults instantiates a new NetConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetTap
`func (o *NetConfig) GetTap() string`
GetTap returns the Tap field if non-nil, zero value otherwise.
### GetTapOk
`func (o *NetConfig) GetTapOk() (*string, bool)`
GetTapOk returns a tuple with the Tap field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTap
`func (o *NetConfig) SetTap(v string)`
SetTap sets Tap field to given value.
### HasTap
`func (o *NetConfig) HasTap() bool`
HasTap returns a boolean if a field has been set.
### GetIp
`func (o *NetConfig) GetIp() string`
GetIp returns the Ip field if non-nil, zero value otherwise.
### GetIpOk
`func (o *NetConfig) GetIpOk() (*string, bool)`
GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetIp
`func (o *NetConfig) SetIp(v string)`
SetIp sets Ip field to given value.
### HasIp
`func (o *NetConfig) HasIp() bool`
HasIp returns a boolean if a field has been set.
### GetMask
`func (o *NetConfig) GetMask() string`
GetMask returns the Mask field if non-nil, zero value otherwise.
### GetMaskOk
`func (o *NetConfig) GetMaskOk() (*string, bool)`
GetMaskOk returns a tuple with the Mask field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMask
`func (o *NetConfig) SetMask(v string)`
SetMask sets Mask field to given value.
### HasMask
`func (o *NetConfig) HasMask() bool`
HasMask returns a boolean if a field has been set.
### GetMac
`func (o *NetConfig) GetMac() string`
GetMac returns the Mac field if non-nil, zero value otherwise.
### GetMacOk
`func (o *NetConfig) GetMacOk() (*string, bool)`
GetMacOk returns a tuple with the Mac field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMac
`func (o *NetConfig) SetMac(v string)`
SetMac sets Mac field to given value.
### HasMac
`func (o *NetConfig) HasMac() bool`
HasMac returns a boolean if a field has been set.
### GetIommu
`func (o *NetConfig) GetIommu() bool`
GetIommu returns the Iommu field if non-nil, zero value otherwise.
### GetIommuOk
`func (o *NetConfig) GetIommuOk() (*bool, bool)`
GetIommuOk returns a tuple with the Iommu field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetIommu
`func (o *NetConfig) SetIommu(v bool)`
SetIommu sets Iommu field to given value.
### HasIommu
`func (o *NetConfig) HasIommu() bool`
HasIommu returns a boolean if a field has been set.
### GetNumQueues
`func (o *NetConfig) GetNumQueues() int32`
GetNumQueues returns the NumQueues field if non-nil, zero value otherwise.
### GetNumQueuesOk
`func (o *NetConfig) GetNumQueuesOk() (*int32, bool)`
GetNumQueuesOk returns a tuple with the NumQueues field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetNumQueues
`func (o *NetConfig) SetNumQueues(v int32)`
SetNumQueues sets NumQueues field to given value.
### HasNumQueues
`func (o *NetConfig) HasNumQueues() bool`
HasNumQueues returns a boolean if a field has been set.
### GetQueueSize
`func (o *NetConfig) GetQueueSize() int32`
GetQueueSize returns the QueueSize field if non-nil, zero value otherwise.
### GetQueueSizeOk
`func (o *NetConfig) GetQueueSizeOk() (*int32, bool)`
GetQueueSizeOk returns a tuple with the QueueSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetQueueSize
`func (o *NetConfig) SetQueueSize(v int32)`
SetQueueSize sets QueueSize field to given value.
### HasQueueSize
`func (o *NetConfig) HasQueueSize() bool`
HasQueueSize returns a boolean if a field has been set.
### GetVhostUser
`func (o *NetConfig) GetVhostUser() bool`
GetVhostUser returns the VhostUser field if non-nil, zero value otherwise.
### GetVhostUserOk
`func (o *NetConfig) GetVhostUserOk() (*bool, bool)`
GetVhostUserOk returns a tuple with the VhostUser field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetVhostUser
`func (o *NetConfig) SetVhostUser(v bool)`
SetVhostUser sets VhostUser field to given value.
### HasVhostUser
`func (o *NetConfig) HasVhostUser() bool`
HasVhostUser returns a boolean if a field has been set.
### GetVhostSocket
`func (o *NetConfig) GetVhostSocket() string`
GetVhostSocket returns the VhostSocket field if non-nil, zero value otherwise.
### GetVhostSocketOk
`func (o *NetConfig) GetVhostSocketOk() (*string, bool)`
GetVhostSocketOk returns a tuple with the VhostSocket field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetVhostSocket
`func (o *NetConfig) SetVhostSocket(v string)`
SetVhostSocket sets VhostSocket field to given value.
### HasVhostSocket
`func (o *NetConfig) HasVhostSocket() bool`
HasVhostSocket returns a boolean if a field has been set.
### GetVhostMode
`func (o *NetConfig) GetVhostMode() string`
GetVhostMode returns the VhostMode field if non-nil, zero value otherwise.
### GetVhostModeOk
`func (o *NetConfig) GetVhostModeOk() (*string, bool)`
GetVhostModeOk returns a tuple with the VhostMode field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetVhostMode
`func (o *NetConfig) SetVhostMode(v string)`
SetVhostMode sets VhostMode field to given value.
### HasVhostMode
`func (o *NetConfig) HasVhostMode() bool`
HasVhostMode returns a boolean if a field has been set.
### GetId
`func (o *NetConfig) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *NetConfig) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *NetConfig) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *NetConfig) HasId() bool`
HasId returns a boolean if a field has been set.
### GetFd
`func (o *NetConfig) GetFd() []int32`
GetFd returns the Fd field if non-nil, zero value otherwise.
### GetFdOk
`func (o *NetConfig) GetFdOk() (*[]int32, bool)`
GetFdOk returns a tuple with the Fd field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFd
`func (o *NetConfig) SetFd(v []int32)`
SetFd sets Fd field to given value.
### HasFd
`func (o *NetConfig) HasFd() bool`
HasFd returns a boolean if a field has been set.
### GetRateLimiterConfig
`func (o *NetConfig) GetRateLimiterConfig() RateLimiterConfig`
GetRateLimiterConfig returns the RateLimiterConfig field if non-nil, zero value otherwise.
### GetRateLimiterConfigOk
`func (o *NetConfig) GetRateLimiterConfigOk() (*RateLimiterConfig, bool)`
GetRateLimiterConfigOk returns a tuple with the RateLimiterConfig field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRateLimiterConfig
`func (o *NetConfig) SetRateLimiterConfig(v RateLimiterConfig)`
SetRateLimiterConfig sets RateLimiterConfig field to given value.
### HasRateLimiterConfig
`func (o *NetConfig) HasRateLimiterConfig() bool`
HasRateLimiterConfig returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,10 +5,150 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**GuestNumaId** | **int32** | |
**Cpus** | **[]int32** | | [optional]
**Distances** | [**[]NumaDistance**](NumaDistance.md) | | [optional]
**MemoryZones** | **[]string** | | [optional]
**SgxEpcSections** | **[]string** | | [optional]
**Cpus** | Pointer to **[]int32** | | [optional]
**Distances** | Pointer to [**[]NumaDistance**](NumaDistance.md) | | [optional]
**MemoryZones** | Pointer to **[]string** | | [optional]
**SgxEpcSections** | Pointer to **[]string** | | [optional]
## Methods
### NewNumaConfig
`func NewNumaConfig(guestNumaId int32, ) *NumaConfig`
NewNumaConfig instantiates a new NumaConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNumaConfigWithDefaults
`func NewNumaConfigWithDefaults() *NumaConfig`
NewNumaConfigWithDefaults instantiates a new NumaConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetGuestNumaId
`func (o *NumaConfig) GetGuestNumaId() int32`
GetGuestNumaId returns the GuestNumaId field if non-nil, zero value otherwise.
### GetGuestNumaIdOk
`func (o *NumaConfig) GetGuestNumaIdOk() (*int32, bool)`
GetGuestNumaIdOk returns a tuple with the GuestNumaId field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetGuestNumaId
`func (o *NumaConfig) SetGuestNumaId(v int32)`
SetGuestNumaId sets GuestNumaId field to given value.
### GetCpus
`func (o *NumaConfig) GetCpus() []int32`
GetCpus returns the Cpus field if non-nil, zero value otherwise.
### GetCpusOk
`func (o *NumaConfig) GetCpusOk() (*[]int32, bool)`
GetCpusOk returns a tuple with the Cpus field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCpus
`func (o *NumaConfig) SetCpus(v []int32)`
SetCpus sets Cpus field to given value.
### HasCpus
`func (o *NumaConfig) HasCpus() bool`
HasCpus returns a boolean if a field has been set.
### GetDistances
`func (o *NumaConfig) GetDistances() []NumaDistance`
GetDistances returns the Distances field if non-nil, zero value otherwise.
### GetDistancesOk
`func (o *NumaConfig) GetDistancesOk() (*[]NumaDistance, bool)`
GetDistancesOk returns a tuple with the Distances field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDistances
`func (o *NumaConfig) SetDistances(v []NumaDistance)`
SetDistances sets Distances field to given value.
### HasDistances
`func (o *NumaConfig) HasDistances() bool`
HasDistances returns a boolean if a field has been set.
### GetMemoryZones
`func (o *NumaConfig) GetMemoryZones() []string`
GetMemoryZones returns the MemoryZones field if non-nil, zero value otherwise.
### GetMemoryZonesOk
`func (o *NumaConfig) GetMemoryZonesOk() (*[]string, bool)`
GetMemoryZonesOk returns a tuple with the MemoryZones field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMemoryZones
`func (o *NumaConfig) SetMemoryZones(v []string)`
SetMemoryZones sets MemoryZones field to given value.
### HasMemoryZones
`func (o *NumaConfig) HasMemoryZones() bool`
HasMemoryZones returns a boolean if a field has been set.
### GetSgxEpcSections
`func (o *NumaConfig) GetSgxEpcSections() []string`
GetSgxEpcSections returns the SgxEpcSections field if non-nil, zero value otherwise.
### GetSgxEpcSectionsOk
`func (o *NumaConfig) GetSgxEpcSectionsOk() (*[]string, bool)`
GetSgxEpcSectionsOk returns a tuple with the SgxEpcSections field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSgxEpcSections
`func (o *NumaConfig) SetSgxEpcSections(v []string)`
SetSgxEpcSections sets SgxEpcSections field to given value.
### HasSgxEpcSections
`func (o *NumaConfig) HasSgxEpcSections() bool`
HasSgxEpcSections returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -7,6 +7,66 @@ Name | Type | Description | Notes
**Destination** | **int32** | |
**Distance** | **int32** | |
## Methods
### NewNumaDistance
`func NewNumaDistance(destination int32, distance int32, ) *NumaDistance`
NewNumaDistance instantiates a new NumaDistance object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNumaDistanceWithDefaults
`func NewNumaDistanceWithDefaults() *NumaDistance`
NewNumaDistanceWithDefaults instantiates a new NumaDistance object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetDestination
`func (o *NumaDistance) GetDestination() int32`
GetDestination returns the Destination field if non-nil, zero value otherwise.
### GetDestinationOk
`func (o *NumaDistance) GetDestinationOk() (*int32, bool)`
GetDestinationOk returns a tuple with the Destination field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDestination
`func (o *NumaDistance) SetDestination(v int32)`
SetDestination sets Destination field to given value.
### GetDistance
`func (o *NumaDistance) GetDistance() int32`
GetDistance returns the Distance field if non-nil, zero value otherwise.
### GetDistanceOk
`func (o *NumaDistance) GetDistanceOk() (*int32, bool)`
GetDistanceOk returns a tuple with the Distance field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDistance
`func (o *NumaDistance) SetDistance(v int32)`
SetDistance sets Distance field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -7,6 +7,66 @@ Name | Type | Description | Notes
**Id** | **string** | |
**Bdf** | **string** | |
## Methods
### NewPciDeviceInfo
`func NewPciDeviceInfo(id string, bdf string, ) *PciDeviceInfo`
NewPciDeviceInfo instantiates a new PciDeviceInfo object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewPciDeviceInfoWithDefaults
`func NewPciDeviceInfoWithDefaults() *PciDeviceInfo`
NewPciDeviceInfoWithDefaults instantiates a new PciDeviceInfo object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *PciDeviceInfo) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *PciDeviceInfo) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *PciDeviceInfo) SetId(v string)`
SetId sets Id field to given value.
### GetBdf
`func (o *PciDeviceInfo) GetBdf() string`
GetBdf returns the Bdf field if non-nil, zero value otherwise.
### GetBdfOk
`func (o *PciDeviceInfo) GetBdfOk() (*string, bool)`
GetBdfOk returns a tuple with the Bdf field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetBdf
`func (o *PciDeviceInfo) SetBdf(v string)`
SetBdf sets Bdf field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,11 +5,176 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**File** | **string** | |
**Size** | **int64** | | [optional]
**Iommu** | **bool** | | [optional] [default to false]
**Mergeable** | **bool** | | [optional] [default to false]
**DiscardWrites** | **bool** | | [optional] [default to false]
**Id** | **string** | | [optional]
**Size** | Pointer to **int64** | | [optional]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
**Mergeable** | Pointer to **bool** | | [optional] [default to false]
**DiscardWrites** | Pointer to **bool** | | [optional] [default to false]
**Id** | Pointer to **string** | | [optional]
## Methods
### NewPmemConfig
`func NewPmemConfig(file string, ) *PmemConfig`
NewPmemConfig instantiates a new PmemConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewPmemConfigWithDefaults
`func NewPmemConfigWithDefaults() *PmemConfig`
NewPmemConfigWithDefaults instantiates a new PmemConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetFile
`func (o *PmemConfig) GetFile() string`
GetFile returns the File field if non-nil, zero value otherwise.
### GetFileOk
`func (o *PmemConfig) GetFileOk() (*string, bool)`
GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFile
`func (o *PmemConfig) SetFile(v string)`
SetFile sets File field to given value.
### GetSize
`func (o *PmemConfig) GetSize() int64`
GetSize returns the Size field if non-nil, zero value otherwise.
### GetSizeOk
`func (o *PmemConfig) GetSizeOk() (*int64, bool)`
GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSize
`func (o *PmemConfig) SetSize(v int64)`
SetSize sets Size field to given value.
### HasSize
`func (o *PmemConfig) HasSize() bool`
HasSize returns a boolean if a field has been set.
### GetIommu
`func (o *PmemConfig) GetIommu() bool`
GetIommu returns the Iommu field if non-nil, zero value otherwise.
### GetIommuOk
`func (o *PmemConfig) GetIommuOk() (*bool, bool)`
GetIommuOk returns a tuple with the Iommu field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetIommu
`func (o *PmemConfig) SetIommu(v bool)`
SetIommu sets Iommu field to given value.
### HasIommu
`func (o *PmemConfig) HasIommu() bool`
HasIommu returns a boolean if a field has been set.
### GetMergeable
`func (o *PmemConfig) GetMergeable() bool`
GetMergeable returns the Mergeable field if non-nil, zero value otherwise.
### GetMergeableOk
`func (o *PmemConfig) GetMergeableOk() (*bool, bool)`
GetMergeableOk returns a tuple with the Mergeable field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMergeable
`func (o *PmemConfig) SetMergeable(v bool)`
SetMergeable sets Mergeable field to given value.
### HasMergeable
`func (o *PmemConfig) HasMergeable() bool`
HasMergeable returns a boolean if a field has been set.
### GetDiscardWrites
`func (o *PmemConfig) GetDiscardWrites() bool`
GetDiscardWrites returns the DiscardWrites field if non-nil, zero value otherwise.
### GetDiscardWritesOk
`func (o *PmemConfig) GetDiscardWritesOk() (*bool, bool)`
GetDiscardWritesOk returns a tuple with the DiscardWrites field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDiscardWrites
`func (o *PmemConfig) SetDiscardWrites(v bool)`
SetDiscardWrites sets DiscardWrites field to given value.
### HasDiscardWrites
`func (o *PmemConfig) HasDiscardWrites() bool`
HasDiscardWrites returns a boolean if a field has been set.
### GetId
`func (o *PmemConfig) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *PmemConfig) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *PmemConfig) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *PmemConfig) HasId() bool`
HasId returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,8 +4,78 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Bandwidth** | [**TokenBucket**](TokenBucket.md) | | [optional]
**Ops** | [**TokenBucket**](TokenBucket.md) | | [optional]
**Bandwidth** | Pointer to [**TokenBucket**](TokenBucket.md) | | [optional]
**Ops** | Pointer to [**TokenBucket**](TokenBucket.md) | | [optional]
## Methods
### NewRateLimiterConfig
`func NewRateLimiterConfig() *RateLimiterConfig`
NewRateLimiterConfig instantiates a new RateLimiterConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewRateLimiterConfigWithDefaults
`func NewRateLimiterConfigWithDefaults() *RateLimiterConfig`
NewRateLimiterConfigWithDefaults instantiates a new RateLimiterConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetBandwidth
`func (o *RateLimiterConfig) GetBandwidth() TokenBucket`
GetBandwidth returns the Bandwidth field if non-nil, zero value otherwise.
### GetBandwidthOk
`func (o *RateLimiterConfig) GetBandwidthOk() (*TokenBucket, bool)`
GetBandwidthOk returns a tuple with the Bandwidth field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetBandwidth
`func (o *RateLimiterConfig) SetBandwidth(v TokenBucket)`
SetBandwidth sets Bandwidth field to given value.
### HasBandwidth
`func (o *RateLimiterConfig) HasBandwidth() bool`
HasBandwidth returns a boolean if a field has been set.
### GetOps
`func (o *RateLimiterConfig) GetOps() TokenBucket`
GetOps returns the Ops field if non-nil, zero value otherwise.
### GetOpsOk
`func (o *RateLimiterConfig) GetOpsOk() (*TokenBucket, bool)`
GetOpsOk returns a tuple with the Ops field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetOps
`func (o *RateLimiterConfig) SetOps(v TokenBucket)`
SetOps sets Ops field to given value.
### HasOps
`func (o *RateLimiterConfig) HasOps() bool`
HasOps returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,72 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**SourceUrl** | **string** | |
**Prefault** | **bool** | | [optional]
**Prefault** | Pointer to **bool** | | [optional]
## Methods
### NewRestoreConfig
`func NewRestoreConfig(sourceUrl string, ) *RestoreConfig`
NewRestoreConfig instantiates a new RestoreConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewRestoreConfigWithDefaults
`func NewRestoreConfigWithDefaults() *RestoreConfig`
NewRestoreConfigWithDefaults instantiates a new RestoreConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSourceUrl
`func (o *RestoreConfig) GetSourceUrl() string`
GetSourceUrl returns the SourceUrl field if non-nil, zero value otherwise.
### GetSourceUrlOk
`func (o *RestoreConfig) GetSourceUrlOk() (*string, bool)`
GetSourceUrlOk returns a tuple with the SourceUrl field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSourceUrl
`func (o *RestoreConfig) SetSourceUrl(v string)`
SetSourceUrl sets SourceUrl field to given value.
### GetPrefault
`func (o *RestoreConfig) GetPrefault() bool`
GetPrefault returns the Prefault field if non-nil, zero value otherwise.
### GetPrefaultOk
`func (o *RestoreConfig) GetPrefaultOk() (*bool, bool)`
GetPrefaultOk returns a tuple with the Prefault field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPrefault
`func (o *RestoreConfig) SetPrefault(v bool)`
SetPrefault sets Prefault field to given value.
### HasPrefault
`func (o *RestoreConfig) HasPrefault() bool`
HasPrefault returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,8 +4,73 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Src** | **string** | | [default to /dev/urandom]
**Iommu** | **bool** | | [optional] [default to false]
**Src** | **string** | | [default to "/dev/urandom"]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
## Methods
### NewRngConfig
`func NewRngConfig(src string, ) *RngConfig`
NewRngConfig instantiates a new RngConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewRngConfigWithDefaults
`func NewRngConfigWithDefaults() *RngConfig`
NewRngConfigWithDefaults instantiates a new RngConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSrc
`func (o *RngConfig) GetSrc() string`
GetSrc returns the Src field if non-nil, zero value otherwise.
### GetSrcOk
`func (o *RngConfig) GetSrcOk() (*string, bool)`
GetSrcOk returns a tuple with the Src field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSrc
`func (o *RngConfig) SetSrc(v string)`
SetSrc sets Src field to given value.
### GetIommu
`func (o *RngConfig) GetIommu() bool`
GetIommu returns the Iommu field if non-nil, zero value otherwise.
### GetIommuOk
`func (o *RngConfig) GetIommuOk() (*bool, bool)`
GetIommuOk returns a tuple with the Iommu field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetIommu
`func (o *RngConfig) SetIommu(v bool)`
SetIommu sets Iommu field to given value.
### HasIommu
`func (o *RngConfig) HasIommu() bool`
HasIommu returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -6,7 +6,92 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | |
**Size** | **int64** | |
**Prefault** | **bool** | | [optional] [default to false]
**Prefault** | Pointer to **bool** | | [optional] [default to false]
## Methods
### NewSgxEpcConfig
`func NewSgxEpcConfig(id string, size int64, ) *SgxEpcConfig`
NewSgxEpcConfig instantiates a new SgxEpcConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewSgxEpcConfigWithDefaults
`func NewSgxEpcConfigWithDefaults() *SgxEpcConfig`
NewSgxEpcConfigWithDefaults instantiates a new SgxEpcConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *SgxEpcConfig) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *SgxEpcConfig) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *SgxEpcConfig) SetId(v string)`
SetId sets Id field to given value.
### GetSize
`func (o *SgxEpcConfig) GetSize() int64`
GetSize returns the Size field if non-nil, zero value otherwise.
### GetSizeOk
`func (o *SgxEpcConfig) GetSizeOk() (*int64, bool)`
GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSize
`func (o *SgxEpcConfig) SetSize(v int64)`
SetSize sets Size field to given value.
### GetPrefault
`func (o *SgxEpcConfig) GetPrefault() bool`
GetPrefault returns the Prefault field if non-nil, zero value otherwise.
### GetPrefaultOk
`func (o *SgxEpcConfig) GetPrefaultOk() (*bool, bool)`
GetPrefaultOk returns a tuple with the Prefault field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPrefault
`func (o *SgxEpcConfig) SetPrefault(v bool)`
SetPrefault sets Prefault field to given value.
### HasPrefault
`func (o *SgxEpcConfig) HasPrefault() bool`
HasPrefault returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,9 +5,94 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Size** | **int64** | The total number of tokens this bucket can hold. |
**OneTimeBurst** | **int64** | The initial size of a token bucket. | [optional]
**OneTimeBurst** | Pointer to **int64** | The initial size of a token bucket. | [optional]
**RefillTime** | **int64** | The amount of milliseconds it takes for the bucket to refill. |
## Methods
### NewTokenBucket
`func NewTokenBucket(size int64, refillTime int64, ) *TokenBucket`
NewTokenBucket instantiates a new TokenBucket object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewTokenBucketWithDefaults
`func NewTokenBucketWithDefaults() *TokenBucket`
NewTokenBucketWithDefaults instantiates a new TokenBucket object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSize
`func (o *TokenBucket) GetSize() int64`
GetSize returns the Size field if non-nil, zero value otherwise.
### GetSizeOk
`func (o *TokenBucket) GetSizeOk() (*int64, bool)`
GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSize
`func (o *TokenBucket) SetSize(v int64)`
SetSize sets Size field to given value.
### GetOneTimeBurst
`func (o *TokenBucket) GetOneTimeBurst() int64`
GetOneTimeBurst returns the OneTimeBurst field if non-nil, zero value otherwise.
### GetOneTimeBurstOk
`func (o *TokenBucket) GetOneTimeBurstOk() (*int64, bool)`
GetOneTimeBurstOk returns a tuple with the OneTimeBurst field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetOneTimeBurst
`func (o *TokenBucket) SetOneTimeBurst(v int64)`
SetOneTimeBurst sets OneTimeBurst field to given value.
### HasOneTimeBurst
`func (o *TokenBucket) HasOneTimeBurst() bool`
HasOneTimeBurst returns a boolean if a field has been set.
### GetRefillTime
`func (o *TokenBucket) GetRefillTime() int64`
GetRefillTime returns the RefillTime field if non-nil, zero value otherwise.
### GetRefillTimeOk
`func (o *TokenBucket) GetRefillTimeOk() (*int64, bool)`
GetRefillTimeOk returns a tuple with the RefillTime field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRefillTime
`func (o *TokenBucket) SetRefillTime(v int64)`
SetRefillTime sets RefillTime field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,9 +4,104 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Path** | **string** | | [optional]
**Iommu** | **bool** | | [optional] [default to false]
**Id** | **string** | | [optional]
**Path** | Pointer to **string** | | [optional]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
**Id** | Pointer to **string** | | [optional]
## Methods
### NewVmAddDevice
`func NewVmAddDevice() *VmAddDevice`
NewVmAddDevice instantiates a new VmAddDevice object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewVmAddDeviceWithDefaults
`func NewVmAddDeviceWithDefaults() *VmAddDevice`
NewVmAddDeviceWithDefaults instantiates a new VmAddDevice object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetPath
`func (o *VmAddDevice) GetPath() string`
GetPath returns the Path field if non-nil, zero value otherwise.
### GetPathOk
`func (o *VmAddDevice) GetPathOk() (*string, bool)`
GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPath
`func (o *VmAddDevice) SetPath(v string)`
SetPath sets Path field to given value.
### HasPath
`func (o *VmAddDevice) HasPath() bool`
HasPath returns a boolean if a field has been set.
### GetIommu
`func (o *VmAddDevice) GetIommu() bool`
GetIommu returns the Iommu field if non-nil, zero value otherwise.
### GetIommuOk
`func (o *VmAddDevice) GetIommuOk() (*bool, bool)`
GetIommuOk returns a tuple with the Iommu field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetIommu
`func (o *VmAddDevice) SetIommu(v bool)`
SetIommu sets Iommu field to given value.
### HasIommu
`func (o *VmAddDevice) HasIommu() bool`
HasIommu returns a boolean if a field has been set.
### GetId
`func (o *VmAddDevice) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *VmAddDevice) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *VmAddDevice) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *VmAddDevice) HasId() bool`
HasId returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,25 +4,525 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Cpus** | [**CpusConfig**](CpusConfig.md) | | [optional]
**Memory** | [**MemoryConfig**](MemoryConfig.md) | | [optional]
**Cpus** | Pointer to [**CpusConfig**](CpusConfig.md) | | [optional]
**Memory** | Pointer to [**MemoryConfig**](MemoryConfig.md) | | [optional]
**Kernel** | [**KernelConfig**](KernelConfig.md) | |
**Initramfs** | Pointer to [**InitramfsConfig**](InitramfsConfig.md) | | [optional]
**Cmdline** | [**CmdLineConfig**](CmdLineConfig.md) | | [optional]
**Disks** | [**[]DiskConfig**](DiskConfig.md) | | [optional]
**Net** | [**[]NetConfig**](NetConfig.md) | | [optional]
**Rng** | [**RngConfig**](RngConfig.md) | | [optional]
**Balloon** | [**BalloonConfig**](BalloonConfig.md) | | [optional]
**Fs** | [**[]FsConfig**](FsConfig.md) | | [optional]
**Pmem** | [**[]PmemConfig**](PmemConfig.md) | | [optional]
**Serial** | [**ConsoleConfig**](ConsoleConfig.md) | | [optional]
**Console** | [**ConsoleConfig**](ConsoleConfig.md) | | [optional]
**Devices** | [**[]DeviceConfig**](DeviceConfig.md) | | [optional]
**Vsock** | [**VsockConfig**](VsockConfig.md) | | [optional]
**SgxEpc** | [**[]SgxEpcConfig**](SgxEpcConfig.md) | | [optional]
**Numa** | [**[]NumaConfig**](NumaConfig.md) | | [optional]
**Iommu** | **bool** | | [optional] [default to false]
**Watchdog** | **bool** | | [optional] [default to false]
**Initramfs** | Pointer to [**NullableInitramfsConfig**](InitramfsConfig.md) | | [optional]
**Cmdline** | Pointer to [**CmdLineConfig**](CmdLineConfig.md) | | [optional]
**Disks** | Pointer to [**[]DiskConfig**](DiskConfig.md) | | [optional]
**Net** | Pointer to [**[]NetConfig**](NetConfig.md) | | [optional]
**Rng** | Pointer to [**RngConfig**](RngConfig.md) | | [optional]
**Balloon** | Pointer to [**BalloonConfig**](BalloonConfig.md) | | [optional]
**Fs** | Pointer to [**[]FsConfig**](FsConfig.md) | | [optional]
**Pmem** | Pointer to [**[]PmemConfig**](PmemConfig.md) | | [optional]
**Serial** | Pointer to [**ConsoleConfig**](ConsoleConfig.md) | | [optional]
**Console** | Pointer to [**ConsoleConfig**](ConsoleConfig.md) | | [optional]
**Devices** | Pointer to [**[]DeviceConfig**](DeviceConfig.md) | | [optional]
**Vsock** | Pointer to [**VsockConfig**](VsockConfig.md) | | [optional]
**SgxEpc** | Pointer to [**[]SgxEpcConfig**](SgxEpcConfig.md) | | [optional]
**Numa** | Pointer to [**[]NumaConfig**](NumaConfig.md) | | [optional]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
**Watchdog** | Pointer to **bool** | | [optional] [default to false]
## Methods
### NewVmConfig
`func NewVmConfig(kernel KernelConfig, ) *VmConfig`
NewVmConfig instantiates a new VmConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewVmConfigWithDefaults
`func NewVmConfigWithDefaults() *VmConfig`
NewVmConfigWithDefaults instantiates a new VmConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCpus
`func (o *VmConfig) GetCpus() CpusConfig`
GetCpus returns the Cpus field if non-nil, zero value otherwise.
### GetCpusOk
`func (o *VmConfig) GetCpusOk() (*CpusConfig, bool)`
GetCpusOk returns a tuple with the Cpus field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCpus
`func (o *VmConfig) SetCpus(v CpusConfig)`
SetCpus sets Cpus field to given value.
### HasCpus
`func (o *VmConfig) HasCpus() bool`
HasCpus returns a boolean if a field has been set.
### GetMemory
`func (o *VmConfig) GetMemory() MemoryConfig`
GetMemory returns the Memory field if non-nil, zero value otherwise.
### GetMemoryOk
`func (o *VmConfig) GetMemoryOk() (*MemoryConfig, bool)`
GetMemoryOk returns a tuple with the Memory field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMemory
`func (o *VmConfig) SetMemory(v MemoryConfig)`
SetMemory sets Memory field to given value.
### HasMemory
`func (o *VmConfig) HasMemory() bool`
HasMemory returns a boolean if a field has been set.
### GetKernel
`func (o *VmConfig) GetKernel() KernelConfig`
GetKernel returns the Kernel field if non-nil, zero value otherwise.
### GetKernelOk
`func (o *VmConfig) GetKernelOk() (*KernelConfig, bool)`
GetKernelOk returns a tuple with the Kernel field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetKernel
`func (o *VmConfig) SetKernel(v KernelConfig)`
SetKernel sets Kernel field to given value.
### GetInitramfs
`func (o *VmConfig) GetInitramfs() InitramfsConfig`
GetInitramfs returns the Initramfs field if non-nil, zero value otherwise.
### GetInitramfsOk
`func (o *VmConfig) GetInitramfsOk() (*InitramfsConfig, bool)`
GetInitramfsOk returns a tuple with the Initramfs field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetInitramfs
`func (o *VmConfig) SetInitramfs(v InitramfsConfig)`
SetInitramfs sets Initramfs field to given value.
### HasInitramfs
`func (o *VmConfig) HasInitramfs() bool`
HasInitramfs returns a boolean if a field has been set.
### SetInitramfsNil
`func (o *VmConfig) SetInitramfsNil(b bool)`
SetInitramfsNil sets the value for Initramfs to be an explicit nil
### UnsetInitramfs
`func (o *VmConfig) UnsetInitramfs()`
UnsetInitramfs ensures that no value is present for Initramfs, not even an explicit nil
### GetCmdline
`func (o *VmConfig) GetCmdline() CmdLineConfig`
GetCmdline returns the Cmdline field if non-nil, zero value otherwise.
### GetCmdlineOk
`func (o *VmConfig) GetCmdlineOk() (*CmdLineConfig, bool)`
GetCmdlineOk returns a tuple with the Cmdline field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCmdline
`func (o *VmConfig) SetCmdline(v CmdLineConfig)`
SetCmdline sets Cmdline field to given value.
### HasCmdline
`func (o *VmConfig) HasCmdline() bool`
HasCmdline returns a boolean if a field has been set.
### GetDisks
`func (o *VmConfig) GetDisks() []DiskConfig`
GetDisks returns the Disks field if non-nil, zero value otherwise.
### GetDisksOk
`func (o *VmConfig) GetDisksOk() (*[]DiskConfig, bool)`
GetDisksOk returns a tuple with the Disks field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDisks
`func (o *VmConfig) SetDisks(v []DiskConfig)`
SetDisks sets Disks field to given value.
### HasDisks
`func (o *VmConfig) HasDisks() bool`
HasDisks returns a boolean if a field has been set.
### GetNet
`func (o *VmConfig) GetNet() []NetConfig`
GetNet returns the Net field if non-nil, zero value otherwise.
### GetNetOk
`func (o *VmConfig) GetNetOk() (*[]NetConfig, bool)`
GetNetOk returns a tuple with the Net field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetNet
`func (o *VmConfig) SetNet(v []NetConfig)`
SetNet sets Net field to given value.
### HasNet
`func (o *VmConfig) HasNet() bool`
HasNet returns a boolean if a field has been set.
### GetRng
`func (o *VmConfig) GetRng() RngConfig`
GetRng returns the Rng field if non-nil, zero value otherwise.
### GetRngOk
`func (o *VmConfig) GetRngOk() (*RngConfig, bool)`
GetRngOk returns a tuple with the Rng field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRng
`func (o *VmConfig) SetRng(v RngConfig)`
SetRng sets Rng field to given value.
### HasRng
`func (o *VmConfig) HasRng() bool`
HasRng returns a boolean if a field has been set.
### GetBalloon
`func (o *VmConfig) GetBalloon() BalloonConfig`
GetBalloon returns the Balloon field if non-nil, zero value otherwise.
### GetBalloonOk
`func (o *VmConfig) GetBalloonOk() (*BalloonConfig, bool)`
GetBalloonOk returns a tuple with the Balloon field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetBalloon
`func (o *VmConfig) SetBalloon(v BalloonConfig)`
SetBalloon sets Balloon field to given value.
### HasBalloon
`func (o *VmConfig) HasBalloon() bool`
HasBalloon returns a boolean if a field has been set.
### GetFs
`func (o *VmConfig) GetFs() []FsConfig`
GetFs returns the Fs field if non-nil, zero value otherwise.
### GetFsOk
`func (o *VmConfig) GetFsOk() (*[]FsConfig, bool)`
GetFsOk returns a tuple with the Fs field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFs
`func (o *VmConfig) SetFs(v []FsConfig)`
SetFs sets Fs field to given value.
### HasFs
`func (o *VmConfig) HasFs() bool`
HasFs returns a boolean if a field has been set.
### GetPmem
`func (o *VmConfig) GetPmem() []PmemConfig`
GetPmem returns the Pmem field if non-nil, zero value otherwise.
### GetPmemOk
`func (o *VmConfig) GetPmemOk() (*[]PmemConfig, bool)`
GetPmemOk returns a tuple with the Pmem field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPmem
`func (o *VmConfig) SetPmem(v []PmemConfig)`
SetPmem sets Pmem field to given value.
### HasPmem
`func (o *VmConfig) HasPmem() bool`
HasPmem returns a boolean if a field has been set.
### GetSerial
`func (o *VmConfig) GetSerial() ConsoleConfig`
GetSerial returns the Serial field if non-nil, zero value otherwise.
### GetSerialOk
`func (o *VmConfig) GetSerialOk() (*ConsoleConfig, bool)`
GetSerialOk returns a tuple with the Serial field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSerial
`func (o *VmConfig) SetSerial(v ConsoleConfig)`
SetSerial sets Serial field to given value.
### HasSerial
`func (o *VmConfig) HasSerial() bool`
HasSerial returns a boolean if a field has been set.
### GetConsole
`func (o *VmConfig) GetConsole() ConsoleConfig`
GetConsole returns the Console field if non-nil, zero value otherwise.
### GetConsoleOk
`func (o *VmConfig) GetConsoleOk() (*ConsoleConfig, bool)`
GetConsoleOk returns a tuple with the Console field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetConsole
`func (o *VmConfig) SetConsole(v ConsoleConfig)`
SetConsole sets Console field to given value.
### HasConsole
`func (o *VmConfig) HasConsole() bool`
HasConsole returns a boolean if a field has been set.
### GetDevices
`func (o *VmConfig) GetDevices() []DeviceConfig`
GetDevices returns the Devices field if non-nil, zero value otherwise.
### GetDevicesOk
`func (o *VmConfig) GetDevicesOk() (*[]DeviceConfig, bool)`
GetDevicesOk returns a tuple with the Devices field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDevices
`func (o *VmConfig) SetDevices(v []DeviceConfig)`
SetDevices sets Devices field to given value.
### HasDevices
`func (o *VmConfig) HasDevices() bool`
HasDevices returns a boolean if a field has been set.
### GetVsock
`func (o *VmConfig) GetVsock() VsockConfig`
GetVsock returns the Vsock field if non-nil, zero value otherwise.
### GetVsockOk
`func (o *VmConfig) GetVsockOk() (*VsockConfig, bool)`
GetVsockOk returns a tuple with the Vsock field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetVsock
`func (o *VmConfig) SetVsock(v VsockConfig)`
SetVsock sets Vsock field to given value.
### HasVsock
`func (o *VmConfig) HasVsock() bool`
HasVsock returns a boolean if a field has been set.
### GetSgxEpc
`func (o *VmConfig) GetSgxEpc() []SgxEpcConfig`
GetSgxEpc returns the SgxEpc field if non-nil, zero value otherwise.
### GetSgxEpcOk
`func (o *VmConfig) GetSgxEpcOk() (*[]SgxEpcConfig, bool)`
GetSgxEpcOk returns a tuple with the SgxEpc field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSgxEpc
`func (o *VmConfig) SetSgxEpc(v []SgxEpcConfig)`
SetSgxEpc sets SgxEpc field to given value.
### HasSgxEpc
`func (o *VmConfig) HasSgxEpc() bool`
HasSgxEpc returns a boolean if a field has been set.
### GetNuma
`func (o *VmConfig) GetNuma() []NumaConfig`
GetNuma returns the Numa field if non-nil, zero value otherwise.
### GetNumaOk
`func (o *VmConfig) GetNumaOk() (*[]NumaConfig, bool)`
GetNumaOk returns a tuple with the Numa field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetNuma
`func (o *VmConfig) SetNuma(v []NumaConfig)`
SetNuma sets Numa field to given value.
### HasNuma
`func (o *VmConfig) HasNuma() bool`
HasNuma returns a boolean if a field has been set.
### GetIommu
`func (o *VmConfig) GetIommu() bool`
GetIommu returns the Iommu field if non-nil, zero value otherwise.
### GetIommuOk
`func (o *VmConfig) GetIommuOk() (*bool, bool)`
GetIommuOk returns a tuple with the Iommu field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetIommu
`func (o *VmConfig) SetIommu(v bool)`
SetIommu sets Iommu field to given value.
### HasIommu
`func (o *VmConfig) HasIommu() bool`
HasIommu returns a boolean if a field has been set.
### GetWatchdog
`func (o *VmConfig) GetWatchdog() bool`
GetWatchdog returns the Watchdog field if non-nil, zero value otherwise.
### GetWatchdogOk
`func (o *VmConfig) GetWatchdogOk() (*bool, bool)`
GetWatchdogOk returns a tuple with the Watchdog field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetWatchdog
`func (o *VmConfig) SetWatchdog(v bool)`
SetWatchdog sets Watchdog field to given value.
### HasWatchdog
`func (o *VmConfig) HasWatchdog() bool`
HasWatchdog returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -6,8 +6,118 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Config** | [**VmConfig**](VmConfig.md) | |
**State** | **string** | |
**MemoryActualSize** | **int64** | | [optional]
**DeviceTree** | [**map[string]DeviceNode**](DeviceNode.md) | | [optional]
**MemoryActualSize** | Pointer to **int64** | | [optional]
**DeviceTree** | Pointer to [**map[string]DeviceNode**](DeviceNode.md) | | [optional]
## Methods
### NewVmInfo
`func NewVmInfo(config VmConfig, state string, ) *VmInfo`
NewVmInfo instantiates a new VmInfo object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewVmInfoWithDefaults
`func NewVmInfoWithDefaults() *VmInfo`
NewVmInfoWithDefaults instantiates a new VmInfo object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetConfig
`func (o *VmInfo) GetConfig() VmConfig`
GetConfig returns the Config field if non-nil, zero value otherwise.
### GetConfigOk
`func (o *VmInfo) GetConfigOk() (*VmConfig, bool)`
GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetConfig
`func (o *VmInfo) SetConfig(v VmConfig)`
SetConfig sets Config field to given value.
### GetState
`func (o *VmInfo) GetState() string`
GetState returns the State field if non-nil, zero value otherwise.
### GetStateOk
`func (o *VmInfo) GetStateOk() (*string, bool)`
GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetState
`func (o *VmInfo) SetState(v string)`
SetState sets State field to given value.
### GetMemoryActualSize
`func (o *VmInfo) GetMemoryActualSize() int64`
GetMemoryActualSize returns the MemoryActualSize field if non-nil, zero value otherwise.
### GetMemoryActualSizeOk
`func (o *VmInfo) GetMemoryActualSizeOk() (*int64, bool)`
GetMemoryActualSizeOk returns a tuple with the MemoryActualSize field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMemoryActualSize
`func (o *VmInfo) SetMemoryActualSize(v int64)`
SetMemoryActualSize sets MemoryActualSize field to given value.
### HasMemoryActualSize
`func (o *VmInfo) HasMemoryActualSize() bool`
HasMemoryActualSize returns a boolean if a field has been set.
### GetDeviceTree
`func (o *VmInfo) GetDeviceTree() map[string]DeviceNode`
GetDeviceTree returns the DeviceTree field if non-nil, zero value otherwise.
### GetDeviceTreeOk
`func (o *VmInfo) GetDeviceTreeOk() (*map[string]DeviceNode, bool)`
GetDeviceTreeOk returns a tuple with the DeviceTree field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDeviceTree
`func (o *VmInfo) SetDeviceTree(v map[string]DeviceNode)`
SetDeviceTree sets DeviceTree field to given value.
### HasDeviceTree
`func (o *VmInfo) HasDeviceTree() bool`
HasDeviceTree returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,7 +4,52 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [optional]
**Id** | Pointer to **string** | | [optional]
## Methods
### NewVmRemoveDevice
`func NewVmRemoveDevice() *VmRemoveDevice`
NewVmRemoveDevice instantiates a new VmRemoveDevice object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewVmRemoveDeviceWithDefaults
`func NewVmRemoveDeviceWithDefaults() *VmRemoveDevice`
NewVmRemoveDeviceWithDefaults instantiates a new VmRemoveDevice object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *VmRemoveDevice) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *VmRemoveDevice) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *VmRemoveDevice) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *VmRemoveDevice) HasId() bool`
HasId returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,9 +4,104 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**DesiredVcpus** | **int32** | | [optional]
**DesiredRam** | **int64** | desired memory ram in bytes | [optional]
**DesiredBalloon** | **int64** | desired balloon size in bytes | [optional]
**DesiredVcpus** | Pointer to **int32** | | [optional]
**DesiredRam** | Pointer to **int64** | desired memory ram in bytes | [optional]
**DesiredBalloon** | Pointer to **int64** | desired balloon size in bytes | [optional]
## Methods
### NewVmResize
`func NewVmResize() *VmResize`
NewVmResize instantiates a new VmResize object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewVmResizeWithDefaults
`func NewVmResizeWithDefaults() *VmResize`
NewVmResizeWithDefaults instantiates a new VmResize object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetDesiredVcpus
`func (o *VmResize) GetDesiredVcpus() int32`
GetDesiredVcpus returns the DesiredVcpus field if non-nil, zero value otherwise.
### GetDesiredVcpusOk
`func (o *VmResize) GetDesiredVcpusOk() (*int32, bool)`
GetDesiredVcpusOk returns a tuple with the DesiredVcpus field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDesiredVcpus
`func (o *VmResize) SetDesiredVcpus(v int32)`
SetDesiredVcpus sets DesiredVcpus field to given value.
### HasDesiredVcpus
`func (o *VmResize) HasDesiredVcpus() bool`
HasDesiredVcpus returns a boolean if a field has been set.
### GetDesiredRam
`func (o *VmResize) GetDesiredRam() int64`
GetDesiredRam returns the DesiredRam field if non-nil, zero value otherwise.
### GetDesiredRamOk
`func (o *VmResize) GetDesiredRamOk() (*int64, bool)`
GetDesiredRamOk returns a tuple with the DesiredRam field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDesiredRam
`func (o *VmResize) SetDesiredRam(v int64)`
SetDesiredRam sets DesiredRam field to given value.
### HasDesiredRam
`func (o *VmResize) HasDesiredRam() bool`
HasDesiredRam returns a boolean if a field has been set.
### GetDesiredBalloon
`func (o *VmResize) GetDesiredBalloon() int64`
GetDesiredBalloon returns the DesiredBalloon field if non-nil, zero value otherwise.
### GetDesiredBalloonOk
`func (o *VmResize) GetDesiredBalloonOk() (*int64, bool)`
GetDesiredBalloonOk returns a tuple with the DesiredBalloon field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDesiredBalloon
`func (o *VmResize) SetDesiredBalloon(v int64)`
SetDesiredBalloon sets DesiredBalloon field to given value.
### HasDesiredBalloon
`func (o *VmResize) HasDesiredBalloon() bool`
HasDesiredBalloon returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,8 +4,78 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [optional]
**DesiredRam** | **int64** | desired memory zone size in bytes | [optional]
**Id** | Pointer to **string** | | [optional]
**DesiredRam** | Pointer to **int64** | desired memory zone size in bytes | [optional]
## Methods
### NewVmResizeZone
`func NewVmResizeZone() *VmResizeZone`
NewVmResizeZone instantiates a new VmResizeZone object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewVmResizeZoneWithDefaults
`func NewVmResizeZoneWithDefaults() *VmResizeZone`
NewVmResizeZoneWithDefaults instantiates a new VmResizeZone object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *VmResizeZone) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *VmResizeZone) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *VmResizeZone) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *VmResizeZone) HasId() bool`
HasId returns a boolean if a field has been set.
### GetDesiredRam
`func (o *VmResizeZone) GetDesiredRam() int64`
GetDesiredRam returns the DesiredRam field if non-nil, zero value otherwise.
### GetDesiredRamOk
`func (o *VmResizeZone) GetDesiredRamOk() (*int64, bool)`
GetDesiredRamOk returns a tuple with the DesiredRam field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDesiredRam
`func (o *VmResizeZone) SetDesiredRam(v int64)`
SetDesiredRam sets DesiredRam field to given value.
### HasDesiredRam
`func (o *VmResizeZone) HasDesiredRam() bool`
HasDesiredRam returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,7 +4,52 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**DestinationUrl** | **string** | | [optional]
**DestinationUrl** | Pointer to **string** | | [optional]
## Methods
### NewVmSnapshotConfig
`func NewVmSnapshotConfig() *VmSnapshotConfig`
NewVmSnapshotConfig instantiates a new VmSnapshotConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewVmSnapshotConfigWithDefaults
`func NewVmSnapshotConfigWithDefaults() *VmSnapshotConfig`
NewVmSnapshotConfigWithDefaults instantiates a new VmSnapshotConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetDestinationUrl
`func (o *VmSnapshotConfig) GetDestinationUrl() string`
GetDestinationUrl returns the DestinationUrl field if non-nil, zero value otherwise.
### GetDestinationUrlOk
`func (o *VmSnapshotConfig) GetDestinationUrlOk() (*string, bool)`
GetDestinationUrlOk returns a tuple with the DestinationUrl field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDestinationUrl
`func (o *VmSnapshotConfig) SetDestinationUrl(v string)`
SetDestinationUrl sets DestinationUrl field to given value.
### HasDestinationUrl
`func (o *VmSnapshotConfig) HasDestinationUrl() bool`
HasDestinationUrl returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -6,6 +6,46 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Version** | **string** | |
## Methods
### NewVmmPingResponse
`func NewVmmPingResponse(version string, ) *VmmPingResponse`
NewVmmPingResponse instantiates a new VmmPingResponse object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewVmmPingResponseWithDefaults
`func NewVmmPingResponseWithDefaults() *VmmPingResponse`
NewVmmPingResponseWithDefaults instantiates a new VmmPingResponse object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetVersion
`func (o *VmmPingResponse) GetVersion() string`
GetVersion returns the Version field if non-nil, zero value otherwise.
### GetVersionOk
`func (o *VmmPingResponse) GetVersionOk() (*string, bool)`
GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetVersion
`func (o *VmmPingResponse) SetVersion(v string)`
SetVersion sets Version field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -6,8 +6,118 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Cid** | **int64** | Guest Vsock CID |
**Socket** | **string** | Path to UNIX domain socket, used to proxy vsock connections. |
**Iommu** | **bool** | | [optional] [default to false]
**Id** | **string** | | [optional]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
**Id** | Pointer to **string** | | [optional]
## Methods
### NewVsockConfig
`func NewVsockConfig(cid int64, socket string, ) *VsockConfig`
NewVsockConfig instantiates a new VsockConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewVsockConfigWithDefaults
`func NewVsockConfigWithDefaults() *VsockConfig`
NewVsockConfigWithDefaults instantiates a new VsockConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCid
`func (o *VsockConfig) GetCid() int64`
GetCid returns the Cid field if non-nil, zero value otherwise.
### GetCidOk
`func (o *VsockConfig) GetCidOk() (*int64, bool)`
GetCidOk returns a tuple with the Cid field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCid
`func (o *VsockConfig) SetCid(v int64)`
SetCid sets Cid field to given value.
### GetSocket
`func (o *VsockConfig) GetSocket() string`
GetSocket returns the Socket field if non-nil, zero value otherwise.
### GetSocketOk
`func (o *VsockConfig) GetSocketOk() (*string, bool)`
GetSocketOk returns a tuple with the Socket field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSocket
`func (o *VsockConfig) SetSocket(v string)`
SetSocket sets Socket field to given value.
### GetIommu
`func (o *VsockConfig) GetIommu() bool`
GetIommu returns the Iommu field if non-nil, zero value otherwise.
### GetIommuOk
`func (o *VsockConfig) GetIommuOk() (*bool, bool)`
GetIommuOk returns a tuple with the Iommu field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetIommu
`func (o *VsockConfig) SetIommu(v bool)`
SetIommu sets Iommu field to given value.
### HasIommu
`func (o *VsockConfig) HasIommu() bool`
HasIommu returns a boolean if a field has been set.
### GetId
`func (o *VsockConfig) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *VsockConfig) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *VsockConfig) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *VsockConfig) HasId() bool`
HasId returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,8 +1,4 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/aws/aws-sdk-go v1.26.3 h1:szQdfJcUBAhQT0zZEx4sxoDuWb7iScoucxCiVxDmaBk=
github.com/aws/aws-sdk-go v1.26.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=

View File

@ -1,17 +1,147 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// BalloonConfig struct for BalloonConfig
type BalloonConfig struct {
Size int64 `json:"size"`
// Whether the balloon should deflate when the guest is under memory pressure.
DeflateOnOom bool `json:"deflate_on_oom,omitempty"`
DeflateOnOom *bool `json:"deflate_on_oom,omitempty"`
}
// NewBalloonConfig instantiates a new BalloonConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewBalloonConfig(size int64) *BalloonConfig {
this := BalloonConfig{}
this.Size = size
var deflateOnOom bool = false
this.DeflateOnOom = &deflateOnOom
return &this
}
// NewBalloonConfigWithDefaults instantiates a new BalloonConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewBalloonConfigWithDefaults() *BalloonConfig {
this := BalloonConfig{}
var deflateOnOom bool = false
this.DeflateOnOom = &deflateOnOom
return &this
}
// GetSize returns the Size field value
func (o *BalloonConfig) GetSize() int64 {
if o == nil {
var ret int64
return ret
}
return o.Size
}
// GetSizeOk returns a tuple with the Size field value
// and a boolean to check if the value has been set.
func (o *BalloonConfig) GetSizeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Size, true
}
// SetSize sets field value
func (o *BalloonConfig) SetSize(v int64) {
o.Size = v
}
// GetDeflateOnOom returns the DeflateOnOom field value if set, zero value otherwise.
func (o *BalloonConfig) GetDeflateOnOom() bool {
if o == nil || o.DeflateOnOom == nil {
var ret bool
return ret
}
return *o.DeflateOnOom
}
// GetDeflateOnOomOk returns a tuple with the DeflateOnOom field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BalloonConfig) GetDeflateOnOomOk() (*bool, bool) {
if o == nil || o.DeflateOnOom == nil {
return nil, false
}
return o.DeflateOnOom, true
}
// HasDeflateOnOom returns a boolean if a field has been set.
func (o *BalloonConfig) HasDeflateOnOom() bool {
if o != nil && o.DeflateOnOom != nil {
return true
}
return false
}
// SetDeflateOnOom gets a reference to the given bool and assigns it to the DeflateOnOom field.
func (o *BalloonConfig) SetDeflateOnOom(v bool) {
o.DeflateOnOom = &v
}
func (o BalloonConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["size"] = o.Size
}
if o.DeflateOnOom != nil {
toSerialize["deflate_on_oom"] = o.DeflateOnOom
}
return json.Marshal(toSerialize)
}
type NullableBalloonConfig struct {
value *BalloonConfig
isSet bool
}
func (v NullableBalloonConfig) Get() *BalloonConfig {
return v.value
}
func (v *NullableBalloonConfig) Set(val *BalloonConfig) {
v.value = val
v.isSet = true
}
func (v NullableBalloonConfig) IsSet() bool {
return v.isSet
}
func (v *NullableBalloonConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBalloonConfig(val *BalloonConfig) *NullableBalloonConfig {
return &NullableBalloonConfig{value: val, isSet: true}
}
func (v NullableBalloonConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBalloonConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,15 +1,106 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// CmdLineConfig struct for CmdLineConfig
type CmdLineConfig struct {
Args string `json:"args"`
}
// NewCmdLineConfig instantiates a new CmdLineConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCmdLineConfig(args string) *CmdLineConfig {
this := CmdLineConfig{}
this.Args = args
return &this
}
// NewCmdLineConfigWithDefaults instantiates a new CmdLineConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCmdLineConfigWithDefaults() *CmdLineConfig {
this := CmdLineConfig{}
return &this
}
// GetArgs returns the Args field value
func (o *CmdLineConfig) GetArgs() string {
if o == nil {
var ret string
return ret
}
return o.Args
}
// GetArgsOk returns a tuple with the Args field value
// and a boolean to check if the value has been set.
func (o *CmdLineConfig) GetArgsOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Args, true
}
// SetArgs sets field value
func (o *CmdLineConfig) SetArgs(v string) {
o.Args = v
}
func (o CmdLineConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["args"] = o.Args
}
return json.Marshal(toSerialize)
}
type NullableCmdLineConfig struct {
value *CmdLineConfig
isSet bool
}
func (v NullableCmdLineConfig) Get() *CmdLineConfig {
return v.value
}
func (v *NullableCmdLineConfig) Set(val *CmdLineConfig) {
v.value = val
v.isSet = true
}
func (v NullableCmdLineConfig) IsSet() bool {
return v.isSet
}
func (v *NullableCmdLineConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCmdLineConfig(val *CmdLineConfig) *NullableCmdLineConfig {
return &NullableCmdLineConfig{value: val, isSet: true}
}
func (v NullableCmdLineConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCmdLineConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,17 +1,182 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// ConsoleConfig struct for ConsoleConfig
type ConsoleConfig struct {
File string `json:"file,omitempty"`
Mode string `json:"mode"`
Iommu bool `json:"iommu,omitempty"`
File *string `json:"file,omitempty"`
Mode string `json:"mode"`
Iommu *bool `json:"iommu,omitempty"`
}
// NewConsoleConfig instantiates a new ConsoleConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewConsoleConfig(mode string) *ConsoleConfig {
this := ConsoleConfig{}
this.Mode = mode
var iommu bool = false
this.Iommu = &iommu
return &this
}
// NewConsoleConfigWithDefaults instantiates a new ConsoleConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewConsoleConfigWithDefaults() *ConsoleConfig {
this := ConsoleConfig{}
var iommu bool = false
this.Iommu = &iommu
return &this
}
// GetFile returns the File field value if set, zero value otherwise.
func (o *ConsoleConfig) GetFile() string {
if o == nil || o.File == nil {
var ret string
return ret
}
return *o.File
}
// GetFileOk returns a tuple with the File field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConsoleConfig) GetFileOk() (*string, bool) {
if o == nil || o.File == nil {
return nil, false
}
return o.File, true
}
// HasFile returns a boolean if a field has been set.
func (o *ConsoleConfig) HasFile() bool {
if o != nil && o.File != nil {
return true
}
return false
}
// SetFile gets a reference to the given string and assigns it to the File field.
func (o *ConsoleConfig) SetFile(v string) {
o.File = &v
}
// GetMode returns the Mode field value
func (o *ConsoleConfig) GetMode() string {
if o == nil {
var ret string
return ret
}
return o.Mode
}
// GetModeOk returns a tuple with the Mode field value
// and a boolean to check if the value has been set.
func (o *ConsoleConfig) GetModeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Mode, true
}
// SetMode sets field value
func (o *ConsoleConfig) SetMode(v string) {
o.Mode = v
}
// GetIommu returns the Iommu field value if set, zero value otherwise.
func (o *ConsoleConfig) GetIommu() bool {
if o == nil || o.Iommu == nil {
var ret bool
return ret
}
return *o.Iommu
}
// GetIommuOk returns a tuple with the Iommu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConsoleConfig) GetIommuOk() (*bool, bool) {
if o == nil || o.Iommu == nil {
return nil, false
}
return o.Iommu, true
}
// HasIommu returns a boolean if a field has been set.
func (o *ConsoleConfig) HasIommu() bool {
if o != nil && o.Iommu != nil {
return true
}
return false
}
// SetIommu gets a reference to the given bool and assigns it to the Iommu field.
func (o *ConsoleConfig) SetIommu(v bool) {
o.Iommu = &v
}
func (o ConsoleConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.File != nil {
toSerialize["file"] = o.File
}
if true {
toSerialize["mode"] = o.Mode
}
if o.Iommu != nil {
toSerialize["iommu"] = o.Iommu
}
return json.Marshal(toSerialize)
}
type NullableConsoleConfig struct {
value *ConsoleConfig
isSet bool
}
func (v NullableConsoleConfig) Get() *ConsoleConfig {
return v.value
}
func (v *NullableConsoleConfig) Set(val *ConsoleConfig) {
v.value = val
v.isSet = true
}
func (v NullableConsoleConfig) IsSet() bool {
return v.isSet
}
func (v *NullableConsoleConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableConsoleConfig(val *ConsoleConfig) *NullableConsoleConfig {
return &NullableConsoleConfig{value: val, isSet: true}
}
func (v NullableConsoleConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableConsoleConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,18 +1,221 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// CpuTopology struct for CpuTopology
type CpuTopology struct {
ThreadsPerCore int32 `json:"threads_per_core,omitempty"`
CoresPerDie int32 `json:"cores_per_die,omitempty"`
DiesPerPackage int32 `json:"dies_per_package,omitempty"`
Packages int32 `json:"packages,omitempty"`
ThreadsPerCore *int32 `json:"threads_per_core,omitempty"`
CoresPerDie *int32 `json:"cores_per_die,omitempty"`
DiesPerPackage *int32 `json:"dies_per_package,omitempty"`
Packages *int32 `json:"packages,omitempty"`
}
// NewCpuTopology instantiates a new CpuTopology object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCpuTopology() *CpuTopology {
this := CpuTopology{}
return &this
}
// NewCpuTopologyWithDefaults instantiates a new CpuTopology object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCpuTopologyWithDefaults() *CpuTopology {
this := CpuTopology{}
return &this
}
// GetThreadsPerCore returns the ThreadsPerCore field value if set, zero value otherwise.
func (o *CpuTopology) GetThreadsPerCore() int32 {
if o == nil || o.ThreadsPerCore == nil {
var ret int32
return ret
}
return *o.ThreadsPerCore
}
// GetThreadsPerCoreOk returns a tuple with the ThreadsPerCore field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CpuTopology) GetThreadsPerCoreOk() (*int32, bool) {
if o == nil || o.ThreadsPerCore == nil {
return nil, false
}
return o.ThreadsPerCore, true
}
// HasThreadsPerCore returns a boolean if a field has been set.
func (o *CpuTopology) HasThreadsPerCore() bool {
if o != nil && o.ThreadsPerCore != nil {
return true
}
return false
}
// SetThreadsPerCore gets a reference to the given int32 and assigns it to the ThreadsPerCore field.
func (o *CpuTopology) SetThreadsPerCore(v int32) {
o.ThreadsPerCore = &v
}
// GetCoresPerDie returns the CoresPerDie field value if set, zero value otherwise.
func (o *CpuTopology) GetCoresPerDie() int32 {
if o == nil || o.CoresPerDie == nil {
var ret int32
return ret
}
return *o.CoresPerDie
}
// GetCoresPerDieOk returns a tuple with the CoresPerDie field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CpuTopology) GetCoresPerDieOk() (*int32, bool) {
if o == nil || o.CoresPerDie == nil {
return nil, false
}
return o.CoresPerDie, true
}
// HasCoresPerDie returns a boolean if a field has been set.
func (o *CpuTopology) HasCoresPerDie() bool {
if o != nil && o.CoresPerDie != nil {
return true
}
return false
}
// SetCoresPerDie gets a reference to the given int32 and assigns it to the CoresPerDie field.
func (o *CpuTopology) SetCoresPerDie(v int32) {
o.CoresPerDie = &v
}
// GetDiesPerPackage returns the DiesPerPackage field value if set, zero value otherwise.
func (o *CpuTopology) GetDiesPerPackage() int32 {
if o == nil || o.DiesPerPackage == nil {
var ret int32
return ret
}
return *o.DiesPerPackage
}
// GetDiesPerPackageOk returns a tuple with the DiesPerPackage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CpuTopology) GetDiesPerPackageOk() (*int32, bool) {
if o == nil || o.DiesPerPackage == nil {
return nil, false
}
return o.DiesPerPackage, true
}
// HasDiesPerPackage returns a boolean if a field has been set.
func (o *CpuTopology) HasDiesPerPackage() bool {
if o != nil && o.DiesPerPackage != nil {
return true
}
return false
}
// SetDiesPerPackage gets a reference to the given int32 and assigns it to the DiesPerPackage field.
func (o *CpuTopology) SetDiesPerPackage(v int32) {
o.DiesPerPackage = &v
}
// GetPackages returns the Packages field value if set, zero value otherwise.
func (o *CpuTopology) GetPackages() int32 {
if o == nil || o.Packages == nil {
var ret int32
return ret
}
return *o.Packages
}
// GetPackagesOk returns a tuple with the Packages field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CpuTopology) GetPackagesOk() (*int32, bool) {
if o == nil || o.Packages == nil {
return nil, false
}
return o.Packages, true
}
// HasPackages returns a boolean if a field has been set.
func (o *CpuTopology) HasPackages() bool {
if o != nil && o.Packages != nil {
return true
}
return false
}
// SetPackages gets a reference to the given int32 and assigns it to the Packages field.
func (o *CpuTopology) SetPackages(v int32) {
o.Packages = &v
}
func (o CpuTopology) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.ThreadsPerCore != nil {
toSerialize["threads_per_core"] = o.ThreadsPerCore
}
if o.CoresPerDie != nil {
toSerialize["cores_per_die"] = o.CoresPerDie
}
if o.DiesPerPackage != nil {
toSerialize["dies_per_package"] = o.DiesPerPackage
}
if o.Packages != nil {
toSerialize["packages"] = o.Packages
}
return json.Marshal(toSerialize)
}
type NullableCpuTopology struct {
value *CpuTopology
isSet bool
}
func (v NullableCpuTopology) Get() *CpuTopology {
return v.value
}
func (v *NullableCpuTopology) Set(val *CpuTopology) {
v.value = val
v.isSet = true
}
func (v NullableCpuTopology) IsSet() bool {
return v.isSet
}
func (v *NullableCpuTopology) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCpuTopology(val *CpuTopology) *NullableCpuTopology {
return &NullableCpuTopology{value: val, isSet: true}
}
func (v NullableCpuTopology) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCpuTopology) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,18 +1,211 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// CpusConfig struct for CpusConfig
type CpusConfig struct {
BootVcpus int32 `json:"boot_vcpus"`
MaxVcpus int32 `json:"max_vcpus"`
Topology CpuTopology `json:"topology,omitempty"`
MaxPhysBits int32 `json:"max_phys_bits,omitempty"`
BootVcpus int32 `json:"boot_vcpus"`
MaxVcpus int32 `json:"max_vcpus"`
Topology *CpuTopology `json:"topology,omitempty"`
MaxPhysBits *int32 `json:"max_phys_bits,omitempty"`
}
// NewCpusConfig instantiates a new CpusConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCpusConfig(bootVcpus int32, maxVcpus int32) *CpusConfig {
this := CpusConfig{}
this.BootVcpus = bootVcpus
this.MaxVcpus = maxVcpus
return &this
}
// NewCpusConfigWithDefaults instantiates a new CpusConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCpusConfigWithDefaults() *CpusConfig {
this := CpusConfig{}
var bootVcpus int32 = 1
this.BootVcpus = bootVcpus
var maxVcpus int32 = 1
this.MaxVcpus = maxVcpus
return &this
}
// GetBootVcpus returns the BootVcpus field value
func (o *CpusConfig) GetBootVcpus() int32 {
if o == nil {
var ret int32
return ret
}
return o.BootVcpus
}
// GetBootVcpusOk returns a tuple with the BootVcpus field value
// and a boolean to check if the value has been set.
func (o *CpusConfig) GetBootVcpusOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.BootVcpus, true
}
// SetBootVcpus sets field value
func (o *CpusConfig) SetBootVcpus(v int32) {
o.BootVcpus = v
}
// GetMaxVcpus returns the MaxVcpus field value
func (o *CpusConfig) GetMaxVcpus() int32 {
if o == nil {
var ret int32
return ret
}
return o.MaxVcpus
}
// GetMaxVcpusOk returns a tuple with the MaxVcpus field value
// and a boolean to check if the value has been set.
func (o *CpusConfig) GetMaxVcpusOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.MaxVcpus, true
}
// SetMaxVcpus sets field value
func (o *CpusConfig) SetMaxVcpus(v int32) {
o.MaxVcpus = v
}
// GetTopology returns the Topology field value if set, zero value otherwise.
func (o *CpusConfig) GetTopology() CpuTopology {
if o == nil || o.Topology == nil {
var ret CpuTopology
return ret
}
return *o.Topology
}
// GetTopologyOk returns a tuple with the Topology field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CpusConfig) GetTopologyOk() (*CpuTopology, bool) {
if o == nil || o.Topology == nil {
return nil, false
}
return o.Topology, true
}
// HasTopology returns a boolean if a field has been set.
func (o *CpusConfig) HasTopology() bool {
if o != nil && o.Topology != nil {
return true
}
return false
}
// SetTopology gets a reference to the given CpuTopology and assigns it to the Topology field.
func (o *CpusConfig) SetTopology(v CpuTopology) {
o.Topology = &v
}
// GetMaxPhysBits returns the MaxPhysBits field value if set, zero value otherwise.
func (o *CpusConfig) GetMaxPhysBits() int32 {
if o == nil || o.MaxPhysBits == nil {
var ret int32
return ret
}
return *o.MaxPhysBits
}
// GetMaxPhysBitsOk returns a tuple with the MaxPhysBits field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CpusConfig) GetMaxPhysBitsOk() (*int32, bool) {
if o == nil || o.MaxPhysBits == nil {
return nil, false
}
return o.MaxPhysBits, true
}
// HasMaxPhysBits returns a boolean if a field has been set.
func (o *CpusConfig) HasMaxPhysBits() bool {
if o != nil && o.MaxPhysBits != nil {
return true
}
return false
}
// SetMaxPhysBits gets a reference to the given int32 and assigns it to the MaxPhysBits field.
func (o *CpusConfig) SetMaxPhysBits(v int32) {
o.MaxPhysBits = &v
}
func (o CpusConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["boot_vcpus"] = o.BootVcpus
}
if true {
toSerialize["max_vcpus"] = o.MaxVcpus
}
if o.Topology != nil {
toSerialize["topology"] = o.Topology
}
if o.MaxPhysBits != nil {
toSerialize["max_phys_bits"] = o.MaxPhysBits
}
return json.Marshal(toSerialize)
}
type NullableCpusConfig struct {
value *CpusConfig
isSet bool
}
func (v NullableCpusConfig) Get() *CpusConfig {
return v.value
}
func (v *NullableCpusConfig) Set(val *CpusConfig) {
v.value = val
v.isSet = true
}
func (v NullableCpusConfig) IsSet() bool {
return v.isSet
}
func (v *NullableCpusConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCpusConfig(val *CpusConfig) *NullableCpusConfig {
return &NullableCpusConfig{value: val, isSet: true}
}
func (v NullableCpusConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCpusConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,17 +1,182 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// DeviceConfig struct for DeviceConfig
type DeviceConfig struct {
Path string `json:"path"`
Iommu bool `json:"iommu,omitempty"`
Id string `json:"id,omitempty"`
Path string `json:"path"`
Iommu *bool `json:"iommu,omitempty"`
Id *string `json:"id,omitempty"`
}
// NewDeviceConfig instantiates a new DeviceConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDeviceConfig(path string) *DeviceConfig {
this := DeviceConfig{}
this.Path = path
var iommu bool = false
this.Iommu = &iommu
return &this
}
// NewDeviceConfigWithDefaults instantiates a new DeviceConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDeviceConfigWithDefaults() *DeviceConfig {
this := DeviceConfig{}
var iommu bool = false
this.Iommu = &iommu
return &this
}
// GetPath returns the Path field value
func (o *DeviceConfig) GetPath() string {
if o == nil {
var ret string
return ret
}
return o.Path
}
// GetPathOk returns a tuple with the Path field value
// and a boolean to check if the value has been set.
func (o *DeviceConfig) GetPathOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Path, true
}
// SetPath sets field value
func (o *DeviceConfig) SetPath(v string) {
o.Path = v
}
// GetIommu returns the Iommu field value if set, zero value otherwise.
func (o *DeviceConfig) GetIommu() bool {
if o == nil || o.Iommu == nil {
var ret bool
return ret
}
return *o.Iommu
}
// GetIommuOk returns a tuple with the Iommu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceConfig) GetIommuOk() (*bool, bool) {
if o == nil || o.Iommu == nil {
return nil, false
}
return o.Iommu, true
}
// HasIommu returns a boolean if a field has been set.
func (o *DeviceConfig) HasIommu() bool {
if o != nil && o.Iommu != nil {
return true
}
return false
}
// SetIommu gets a reference to the given bool and assigns it to the Iommu field.
func (o *DeviceConfig) SetIommu(v bool) {
o.Iommu = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *DeviceConfig) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceConfig) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *DeviceConfig) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *DeviceConfig) SetId(v string) {
o.Id = &v
}
func (o DeviceConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["path"] = o.Path
}
if o.Iommu != nil {
toSerialize["iommu"] = o.Iommu
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
return json.Marshal(toSerialize)
}
type NullableDeviceConfig struct {
value *DeviceConfig
isSet bool
}
func (v NullableDeviceConfig) Get() *DeviceConfig {
return v.value
}
func (v *NullableDeviceConfig) Set(val *DeviceConfig) {
v.value = val
v.isSet = true
}
func (v NullableDeviceConfig) IsSet() bool {
return v.isSet
}
func (v *NullableDeviceConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeviceConfig(val *DeviceConfig) *NullableDeviceConfig {
return &NullableDeviceConfig{value: val, isSet: true}
}
func (v NullableDeviceConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeviceConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,18 +1,221 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// DeviceNode struct for DeviceNode
type DeviceNode struct {
Id string `json:"id,omitempty"`
Resources []map[string]interface{} `json:"resources,omitempty"`
Children []string `json:"children,omitempty"`
PciBdf int32 `json:"pci_bdf,omitempty"`
Id *string `json:"id,omitempty"`
Resources *[]map[string]interface{} `json:"resources,omitempty"`
Children *[]string `json:"children,omitempty"`
PciBdf *int32 `json:"pci_bdf,omitempty"`
}
// NewDeviceNode instantiates a new DeviceNode object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDeviceNode() *DeviceNode {
this := DeviceNode{}
return &this
}
// NewDeviceNodeWithDefaults instantiates a new DeviceNode object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDeviceNodeWithDefaults() *DeviceNode {
this := DeviceNode{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *DeviceNode) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceNode) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *DeviceNode) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *DeviceNode) SetId(v string) {
o.Id = &v
}
// GetResources returns the Resources field value if set, zero value otherwise.
func (o *DeviceNode) GetResources() []map[string]interface{} {
if o == nil || o.Resources == nil {
var ret []map[string]interface{}
return ret
}
return *o.Resources
}
// GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceNode) GetResourcesOk() (*[]map[string]interface{}, bool) {
if o == nil || o.Resources == nil {
return nil, false
}
return o.Resources, true
}
// HasResources returns a boolean if a field has been set.
func (o *DeviceNode) HasResources() bool {
if o != nil && o.Resources != nil {
return true
}
return false
}
// SetResources gets a reference to the given []map[string]interface{} and assigns it to the Resources field.
func (o *DeviceNode) SetResources(v []map[string]interface{}) {
o.Resources = &v
}
// GetChildren returns the Children field value if set, zero value otherwise.
func (o *DeviceNode) GetChildren() []string {
if o == nil || o.Children == nil {
var ret []string
return ret
}
return *o.Children
}
// GetChildrenOk returns a tuple with the Children field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceNode) GetChildrenOk() (*[]string, bool) {
if o == nil || o.Children == nil {
return nil, false
}
return o.Children, true
}
// HasChildren returns a boolean if a field has been set.
func (o *DeviceNode) HasChildren() bool {
if o != nil && o.Children != nil {
return true
}
return false
}
// SetChildren gets a reference to the given []string and assigns it to the Children field.
func (o *DeviceNode) SetChildren(v []string) {
o.Children = &v
}
// GetPciBdf returns the PciBdf field value if set, zero value otherwise.
func (o *DeviceNode) GetPciBdf() int32 {
if o == nil || o.PciBdf == nil {
var ret int32
return ret
}
return *o.PciBdf
}
// GetPciBdfOk returns a tuple with the PciBdf field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceNode) GetPciBdfOk() (*int32, bool) {
if o == nil || o.PciBdf == nil {
return nil, false
}
return o.PciBdf, true
}
// HasPciBdf returns a boolean if a field has been set.
func (o *DeviceNode) HasPciBdf() bool {
if o != nil && o.PciBdf != nil {
return true
}
return false
}
// SetPciBdf gets a reference to the given int32 and assigns it to the PciBdf field.
func (o *DeviceNode) SetPciBdf(v int32) {
o.PciBdf = &v
}
func (o DeviceNode) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.Resources != nil {
toSerialize["resources"] = o.Resources
}
if o.Children != nil {
toSerialize["children"] = o.Children
}
if o.PciBdf != nil {
toSerialize["pci_bdf"] = o.PciBdf
}
return json.Marshal(toSerialize)
}
type NullableDeviceNode struct {
value *DeviceNode
isSet bool
}
func (v NullableDeviceNode) Get() *DeviceNode {
return v.value
}
func (v *NullableDeviceNode) Set(val *DeviceNode) {
v.value = val
v.isSet = true
}
func (v NullableDeviceNode) IsSet() bool {
return v.isSet
}
func (v *NullableDeviceNode) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeviceNode(val *DeviceNode) *NullableDeviceNode {
return &NullableDeviceNode{value: val, isSet: true}
}
func (v NullableDeviceNode) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeviceNode) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,25 +1,494 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// DiskConfig struct for DiskConfig
type DiskConfig struct {
Path string `json:"path"`
Readonly bool `json:"readonly,omitempty"`
Direct bool `json:"direct,omitempty"`
Iommu bool `json:"iommu,omitempty"`
NumQueues int32 `json:"num_queues,omitempty"`
QueueSize int32 `json:"queue_size,omitempty"`
VhostUser bool `json:"vhost_user,omitempty"`
VhostSocket string `json:"vhost_socket,omitempty"`
PollQueue bool `json:"poll_queue,omitempty"`
RateLimiterConfig RateLimiterConfig `json:"rate_limiter_config,omitempty"`
Id string `json:"id,omitempty"`
Path string `json:"path"`
Readonly *bool `json:"readonly,omitempty"`
Direct *bool `json:"direct,omitempty"`
Iommu *bool `json:"iommu,omitempty"`
NumQueues *int32 `json:"num_queues,omitempty"`
QueueSize *int32 `json:"queue_size,omitempty"`
VhostUser *bool `json:"vhost_user,omitempty"`
VhostSocket *string `json:"vhost_socket,omitempty"`
PollQueue *bool `json:"poll_queue,omitempty"`
RateLimiterConfig *RateLimiterConfig `json:"rate_limiter_config,omitempty"`
Id *string `json:"id,omitempty"`
}
// NewDiskConfig instantiates a new DiskConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDiskConfig(path string) *DiskConfig {
this := DiskConfig{}
this.Path = path
var readonly bool = false
this.Readonly = &readonly
var direct bool = false
this.Direct = &direct
var iommu bool = false
this.Iommu = &iommu
var numQueues int32 = 1
this.NumQueues = &numQueues
var queueSize int32 = 128
this.QueueSize = &queueSize
var vhostUser bool = false
this.VhostUser = &vhostUser
var pollQueue bool = true
this.PollQueue = &pollQueue
return &this
}
// NewDiskConfigWithDefaults instantiates a new DiskConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDiskConfigWithDefaults() *DiskConfig {
this := DiskConfig{}
var readonly bool = false
this.Readonly = &readonly
var direct bool = false
this.Direct = &direct
var iommu bool = false
this.Iommu = &iommu
var numQueues int32 = 1
this.NumQueues = &numQueues
var queueSize int32 = 128
this.QueueSize = &queueSize
var vhostUser bool = false
this.VhostUser = &vhostUser
var pollQueue bool = true
this.PollQueue = &pollQueue
return &this
}
// GetPath returns the Path field value
func (o *DiskConfig) GetPath() string {
if o == nil {
var ret string
return ret
}
return o.Path
}
// GetPathOk returns a tuple with the Path field value
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetPathOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Path, true
}
// SetPath sets field value
func (o *DiskConfig) SetPath(v string) {
o.Path = v
}
// GetReadonly returns the Readonly field value if set, zero value otherwise.
func (o *DiskConfig) GetReadonly() bool {
if o == nil || o.Readonly == nil {
var ret bool
return ret
}
return *o.Readonly
}
// GetReadonlyOk returns a tuple with the Readonly field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetReadonlyOk() (*bool, bool) {
if o == nil || o.Readonly == nil {
return nil, false
}
return o.Readonly, true
}
// HasReadonly returns a boolean if a field has been set.
func (o *DiskConfig) HasReadonly() bool {
if o != nil && o.Readonly != nil {
return true
}
return false
}
// SetReadonly gets a reference to the given bool and assigns it to the Readonly field.
func (o *DiskConfig) SetReadonly(v bool) {
o.Readonly = &v
}
// GetDirect returns the Direct field value if set, zero value otherwise.
func (o *DiskConfig) GetDirect() bool {
if o == nil || o.Direct == nil {
var ret bool
return ret
}
return *o.Direct
}
// GetDirectOk returns a tuple with the Direct field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetDirectOk() (*bool, bool) {
if o == nil || o.Direct == nil {
return nil, false
}
return o.Direct, true
}
// HasDirect returns a boolean if a field has been set.
func (o *DiskConfig) HasDirect() bool {
if o != nil && o.Direct != nil {
return true
}
return false
}
// SetDirect gets a reference to the given bool and assigns it to the Direct field.
func (o *DiskConfig) SetDirect(v bool) {
o.Direct = &v
}
// GetIommu returns the Iommu field value if set, zero value otherwise.
func (o *DiskConfig) GetIommu() bool {
if o == nil || o.Iommu == nil {
var ret bool
return ret
}
return *o.Iommu
}
// GetIommuOk returns a tuple with the Iommu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetIommuOk() (*bool, bool) {
if o == nil || o.Iommu == nil {
return nil, false
}
return o.Iommu, true
}
// HasIommu returns a boolean if a field has been set.
func (o *DiskConfig) HasIommu() bool {
if o != nil && o.Iommu != nil {
return true
}
return false
}
// SetIommu gets a reference to the given bool and assigns it to the Iommu field.
func (o *DiskConfig) SetIommu(v bool) {
o.Iommu = &v
}
// GetNumQueues returns the NumQueues field value if set, zero value otherwise.
func (o *DiskConfig) GetNumQueues() int32 {
if o == nil || o.NumQueues == nil {
var ret int32
return ret
}
return *o.NumQueues
}
// GetNumQueuesOk returns a tuple with the NumQueues field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetNumQueuesOk() (*int32, bool) {
if o == nil || o.NumQueues == nil {
return nil, false
}
return o.NumQueues, true
}
// HasNumQueues returns a boolean if a field has been set.
func (o *DiskConfig) HasNumQueues() bool {
if o != nil && o.NumQueues != nil {
return true
}
return false
}
// SetNumQueues gets a reference to the given int32 and assigns it to the NumQueues field.
func (o *DiskConfig) SetNumQueues(v int32) {
o.NumQueues = &v
}
// GetQueueSize returns the QueueSize field value if set, zero value otherwise.
func (o *DiskConfig) GetQueueSize() int32 {
if o == nil || o.QueueSize == nil {
var ret int32
return ret
}
return *o.QueueSize
}
// GetQueueSizeOk returns a tuple with the QueueSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetQueueSizeOk() (*int32, bool) {
if o == nil || o.QueueSize == nil {
return nil, false
}
return o.QueueSize, true
}
// HasQueueSize returns a boolean if a field has been set.
func (o *DiskConfig) HasQueueSize() bool {
if o != nil && o.QueueSize != nil {
return true
}
return false
}
// SetQueueSize gets a reference to the given int32 and assigns it to the QueueSize field.
func (o *DiskConfig) SetQueueSize(v int32) {
o.QueueSize = &v
}
// GetVhostUser returns the VhostUser field value if set, zero value otherwise.
func (o *DiskConfig) GetVhostUser() bool {
if o == nil || o.VhostUser == nil {
var ret bool
return ret
}
return *o.VhostUser
}
// GetVhostUserOk returns a tuple with the VhostUser field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetVhostUserOk() (*bool, bool) {
if o == nil || o.VhostUser == nil {
return nil, false
}
return o.VhostUser, true
}
// HasVhostUser returns a boolean if a field has been set.
func (o *DiskConfig) HasVhostUser() bool {
if o != nil && o.VhostUser != nil {
return true
}
return false
}
// SetVhostUser gets a reference to the given bool and assigns it to the VhostUser field.
func (o *DiskConfig) SetVhostUser(v bool) {
o.VhostUser = &v
}
// GetVhostSocket returns the VhostSocket field value if set, zero value otherwise.
func (o *DiskConfig) GetVhostSocket() string {
if o == nil || o.VhostSocket == nil {
var ret string
return ret
}
return *o.VhostSocket
}
// GetVhostSocketOk returns a tuple with the VhostSocket field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetVhostSocketOk() (*string, bool) {
if o == nil || o.VhostSocket == nil {
return nil, false
}
return o.VhostSocket, true
}
// HasVhostSocket returns a boolean if a field has been set.
func (o *DiskConfig) HasVhostSocket() bool {
if o != nil && o.VhostSocket != nil {
return true
}
return false
}
// SetVhostSocket gets a reference to the given string and assigns it to the VhostSocket field.
func (o *DiskConfig) SetVhostSocket(v string) {
o.VhostSocket = &v
}
// GetPollQueue returns the PollQueue field value if set, zero value otherwise.
func (o *DiskConfig) GetPollQueue() bool {
if o == nil || o.PollQueue == nil {
var ret bool
return ret
}
return *o.PollQueue
}
// GetPollQueueOk returns a tuple with the PollQueue field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetPollQueueOk() (*bool, bool) {
if o == nil || o.PollQueue == nil {
return nil, false
}
return o.PollQueue, true
}
// HasPollQueue returns a boolean if a field has been set.
func (o *DiskConfig) HasPollQueue() bool {
if o != nil && o.PollQueue != nil {
return true
}
return false
}
// SetPollQueue gets a reference to the given bool and assigns it to the PollQueue field.
func (o *DiskConfig) SetPollQueue(v bool) {
o.PollQueue = &v
}
// GetRateLimiterConfig returns the RateLimiterConfig field value if set, zero value otherwise.
func (o *DiskConfig) GetRateLimiterConfig() RateLimiterConfig {
if o == nil || o.RateLimiterConfig == nil {
var ret RateLimiterConfig
return ret
}
return *o.RateLimiterConfig
}
// GetRateLimiterConfigOk returns a tuple with the RateLimiterConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetRateLimiterConfigOk() (*RateLimiterConfig, bool) {
if o == nil || o.RateLimiterConfig == nil {
return nil, false
}
return o.RateLimiterConfig, true
}
// HasRateLimiterConfig returns a boolean if a field has been set.
func (o *DiskConfig) HasRateLimiterConfig() bool {
if o != nil && o.RateLimiterConfig != nil {
return true
}
return false
}
// SetRateLimiterConfig gets a reference to the given RateLimiterConfig and assigns it to the RateLimiterConfig field.
func (o *DiskConfig) SetRateLimiterConfig(v RateLimiterConfig) {
o.RateLimiterConfig = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *DiskConfig) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DiskConfig) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *DiskConfig) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *DiskConfig) SetId(v string) {
o.Id = &v
}
func (o DiskConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["path"] = o.Path
}
if o.Readonly != nil {
toSerialize["readonly"] = o.Readonly
}
if o.Direct != nil {
toSerialize["direct"] = o.Direct
}
if o.Iommu != nil {
toSerialize["iommu"] = o.Iommu
}
if o.NumQueues != nil {
toSerialize["num_queues"] = o.NumQueues
}
if o.QueueSize != nil {
toSerialize["queue_size"] = o.QueueSize
}
if o.VhostUser != nil {
toSerialize["vhost_user"] = o.VhostUser
}
if o.VhostSocket != nil {
toSerialize["vhost_socket"] = o.VhostSocket
}
if o.PollQueue != nil {
toSerialize["poll_queue"] = o.PollQueue
}
if o.RateLimiterConfig != nil {
toSerialize["rate_limiter_config"] = o.RateLimiterConfig
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
return json.Marshal(toSerialize)
}
type NullableDiskConfig struct {
value *DiskConfig
isSet bool
}
func (v NullableDiskConfig) Get() *DiskConfig {
return v.value
}
func (v *NullableDiskConfig) Set(val *DiskConfig) {
v.value = val
v.isSet = true
}
func (v NullableDiskConfig) IsSet() bool {
return v.isSet
}
func (v *NullableDiskConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDiskConfig(val *DiskConfig) *NullableDiskConfig {
return &NullableDiskConfig{value: val, isSet: true}
}
func (v NullableDiskConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDiskConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,21 +1,293 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// FsConfig struct for FsConfig
type FsConfig struct {
Tag string `json:"tag"`
Socket string `json:"socket"`
NumQueues int32 `json:"num_queues"`
QueueSize int32 `json:"queue_size"`
Dax bool `json:"dax"`
CacheSize int64 `json:"cache_size"`
Id string `json:"id,omitempty"`
Tag string `json:"tag"`
Socket string `json:"socket"`
NumQueues int32 `json:"num_queues"`
QueueSize int32 `json:"queue_size"`
Dax bool `json:"dax"`
CacheSize int64 `json:"cache_size"`
Id *string `json:"id,omitempty"`
}
// NewFsConfig instantiates a new FsConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewFsConfig(tag string, socket string, numQueues int32, queueSize int32, dax bool, cacheSize int64) *FsConfig {
this := FsConfig{}
this.Tag = tag
this.Socket = socket
this.NumQueues = numQueues
this.QueueSize = queueSize
this.Dax = dax
this.CacheSize = cacheSize
return &this
}
// NewFsConfigWithDefaults instantiates a new FsConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewFsConfigWithDefaults() *FsConfig {
this := FsConfig{}
var numQueues int32 = 1
this.NumQueues = numQueues
var queueSize int32 = 1024
this.QueueSize = queueSize
var dax bool = true
this.Dax = dax
return &this
}
// GetTag returns the Tag field value
func (o *FsConfig) GetTag() string {
if o == nil {
var ret string
return ret
}
return o.Tag
}
// GetTagOk returns a tuple with the Tag field value
// and a boolean to check if the value has been set.
func (o *FsConfig) GetTagOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Tag, true
}
// SetTag sets field value
func (o *FsConfig) SetTag(v string) {
o.Tag = v
}
// GetSocket returns the Socket field value
func (o *FsConfig) GetSocket() string {
if o == nil {
var ret string
return ret
}
return o.Socket
}
// GetSocketOk returns a tuple with the Socket field value
// and a boolean to check if the value has been set.
func (o *FsConfig) GetSocketOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Socket, true
}
// SetSocket sets field value
func (o *FsConfig) SetSocket(v string) {
o.Socket = v
}
// GetNumQueues returns the NumQueues field value
func (o *FsConfig) GetNumQueues() int32 {
if o == nil {
var ret int32
return ret
}
return o.NumQueues
}
// GetNumQueuesOk returns a tuple with the NumQueues field value
// and a boolean to check if the value has been set.
func (o *FsConfig) GetNumQueuesOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.NumQueues, true
}
// SetNumQueues sets field value
func (o *FsConfig) SetNumQueues(v int32) {
o.NumQueues = v
}
// GetQueueSize returns the QueueSize field value
func (o *FsConfig) GetQueueSize() int32 {
if o == nil {
var ret int32
return ret
}
return o.QueueSize
}
// GetQueueSizeOk returns a tuple with the QueueSize field value
// and a boolean to check if the value has been set.
func (o *FsConfig) GetQueueSizeOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.QueueSize, true
}
// SetQueueSize sets field value
func (o *FsConfig) SetQueueSize(v int32) {
o.QueueSize = v
}
// GetDax returns the Dax field value
func (o *FsConfig) GetDax() bool {
if o == nil {
var ret bool
return ret
}
return o.Dax
}
// GetDaxOk returns a tuple with the Dax field value
// and a boolean to check if the value has been set.
func (o *FsConfig) GetDaxOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Dax, true
}
// SetDax sets field value
func (o *FsConfig) SetDax(v bool) {
o.Dax = v
}
// GetCacheSize returns the CacheSize field value
func (o *FsConfig) GetCacheSize() int64 {
if o == nil {
var ret int64
return ret
}
return o.CacheSize
}
// GetCacheSizeOk returns a tuple with the CacheSize field value
// and a boolean to check if the value has been set.
func (o *FsConfig) GetCacheSizeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.CacheSize, true
}
// SetCacheSize sets field value
func (o *FsConfig) SetCacheSize(v int64) {
o.CacheSize = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *FsConfig) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FsConfig) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *FsConfig) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *FsConfig) SetId(v string) {
o.Id = &v
}
func (o FsConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["tag"] = o.Tag
}
if true {
toSerialize["socket"] = o.Socket
}
if true {
toSerialize["num_queues"] = o.NumQueues
}
if true {
toSerialize["queue_size"] = o.QueueSize
}
if true {
toSerialize["dax"] = o.Dax
}
if true {
toSerialize["cache_size"] = o.CacheSize
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
return json.Marshal(toSerialize)
}
type NullableFsConfig struct {
value *FsConfig
isSet bool
}
func (v NullableFsConfig) Get() *FsConfig {
return v.value
}
func (v *NullableFsConfig) Set(val *FsConfig) {
v.value = val
v.isSet = true
}
func (v NullableFsConfig) IsSet() bool {
return v.isSet
}
func (v *NullableFsConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFsConfig(val *FsConfig) *NullableFsConfig {
return &NullableFsConfig{value: val, isSet: true}
}
func (v NullableFsConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFsConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,15 +1,106 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// InitramfsConfig struct for InitramfsConfig
type InitramfsConfig struct {
Path string `json:"path"`
}
// NewInitramfsConfig instantiates a new InitramfsConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInitramfsConfig(path string) *InitramfsConfig {
this := InitramfsConfig{}
this.Path = path
return &this
}
// NewInitramfsConfigWithDefaults instantiates a new InitramfsConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewInitramfsConfigWithDefaults() *InitramfsConfig {
this := InitramfsConfig{}
return &this
}
// GetPath returns the Path field value
func (o *InitramfsConfig) GetPath() string {
if o == nil {
var ret string
return ret
}
return o.Path
}
// GetPathOk returns a tuple with the Path field value
// and a boolean to check if the value has been set.
func (o *InitramfsConfig) GetPathOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Path, true
}
// SetPath sets field value
func (o *InitramfsConfig) SetPath(v string) {
o.Path = v
}
func (o InitramfsConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["path"] = o.Path
}
return json.Marshal(toSerialize)
}
type NullableInitramfsConfig struct {
value *InitramfsConfig
isSet bool
}
func (v NullableInitramfsConfig) Get() *InitramfsConfig {
return v.value
}
func (v *NullableInitramfsConfig) Set(val *InitramfsConfig) {
v.value = val
v.isSet = true
}
func (v NullableInitramfsConfig) IsSet() bool {
return v.isSet
}
func (v *NullableInitramfsConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInitramfsConfig(val *InitramfsConfig) *NullableInitramfsConfig {
return &NullableInitramfsConfig{value: val, isSet: true}
}
func (v NullableInitramfsConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInitramfsConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,15 +1,106 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// KernelConfig struct for KernelConfig
type KernelConfig struct {
Path string `json:"path"`
}
// NewKernelConfig instantiates a new KernelConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewKernelConfig(path string) *KernelConfig {
this := KernelConfig{}
this.Path = path
return &this
}
// NewKernelConfigWithDefaults instantiates a new KernelConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewKernelConfigWithDefaults() *KernelConfig {
this := KernelConfig{}
return &this
}
// GetPath returns the Path field value
func (o *KernelConfig) GetPath() string {
if o == nil {
var ret string
return ret
}
return o.Path
}
// GetPathOk returns a tuple with the Path field value
// and a boolean to check if the value has been set.
func (o *KernelConfig) GetPathOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Path, true
}
// SetPath sets field value
func (o *KernelConfig) SetPath(v string) {
o.Path = v
}
func (o KernelConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["path"] = o.Path
}
return json.Marshal(toSerialize)
}
type NullableKernelConfig struct {
value *KernelConfig
isSet bool
}
func (v NullableKernelConfig) Get() *KernelConfig {
return v.value
}
func (v *NullableKernelConfig) Set(val *KernelConfig) {
v.value = val
v.isSet = true
}
func (v NullableKernelConfig) IsSet() bool {
return v.isSet
}
func (v *NullableKernelConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableKernelConfig(val *KernelConfig) *NullableKernelConfig {
return &NullableKernelConfig{value: val, isSet: true}
}
func (v NullableKernelConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableKernelConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,23 +1,410 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// MemoryConfig struct for MemoryConfig
type MemoryConfig struct {
Size int64 `json:"size"`
HotplugSize int64 `json:"hotplug_size,omitempty"`
HotpluggedSize int64 `json:"hotplugged_size,omitempty"`
Mergeable bool `json:"mergeable,omitempty"`
HotplugMethod string `json:"hotplug_method,omitempty"`
Shared bool `json:"shared,omitempty"`
Hugepages bool `json:"hugepages,omitempty"`
HugepageSize int64 `json:"hugepage_size,omitempty"`
Zones []MemoryZoneConfig `json:"zones,omitempty"`
Size int64 `json:"size"`
HotplugSize *int64 `json:"hotplug_size,omitempty"`
HotpluggedSize *int64 `json:"hotplugged_size,omitempty"`
Mergeable *bool `json:"mergeable,omitempty"`
HotplugMethod *string `json:"hotplug_method,omitempty"`
Shared *bool `json:"shared,omitempty"`
Hugepages *bool `json:"hugepages,omitempty"`
HugepageSize *int64 `json:"hugepage_size,omitempty"`
Zones *[]MemoryZoneConfig `json:"zones,omitempty"`
}
// NewMemoryConfig instantiates a new MemoryConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewMemoryConfig(size int64) *MemoryConfig {
this := MemoryConfig{}
this.Size = size
var mergeable bool = false
this.Mergeable = &mergeable
var hotplugMethod string = "acpi"
this.HotplugMethod = &hotplugMethod
var shared bool = false
this.Shared = &shared
var hugepages bool = false
this.Hugepages = &hugepages
return &this
}
// NewMemoryConfigWithDefaults instantiates a new MemoryConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewMemoryConfigWithDefaults() *MemoryConfig {
this := MemoryConfig{}
var mergeable bool = false
this.Mergeable = &mergeable
var hotplugMethod string = "acpi"
this.HotplugMethod = &hotplugMethod
var shared bool = false
this.Shared = &shared
var hugepages bool = false
this.Hugepages = &hugepages
return &this
}
// GetSize returns the Size field value
func (o *MemoryConfig) GetSize() int64 {
if o == nil {
var ret int64
return ret
}
return o.Size
}
// GetSizeOk returns a tuple with the Size field value
// and a boolean to check if the value has been set.
func (o *MemoryConfig) GetSizeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Size, true
}
// SetSize sets field value
func (o *MemoryConfig) SetSize(v int64) {
o.Size = v
}
// GetHotplugSize returns the HotplugSize field value if set, zero value otherwise.
func (o *MemoryConfig) GetHotplugSize() int64 {
if o == nil || o.HotplugSize == nil {
var ret int64
return ret
}
return *o.HotplugSize
}
// GetHotplugSizeOk returns a tuple with the HotplugSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryConfig) GetHotplugSizeOk() (*int64, bool) {
if o == nil || o.HotplugSize == nil {
return nil, false
}
return o.HotplugSize, true
}
// HasHotplugSize returns a boolean if a field has been set.
func (o *MemoryConfig) HasHotplugSize() bool {
if o != nil && o.HotplugSize != nil {
return true
}
return false
}
// SetHotplugSize gets a reference to the given int64 and assigns it to the HotplugSize field.
func (o *MemoryConfig) SetHotplugSize(v int64) {
o.HotplugSize = &v
}
// GetHotpluggedSize returns the HotpluggedSize field value if set, zero value otherwise.
func (o *MemoryConfig) GetHotpluggedSize() int64 {
if o == nil || o.HotpluggedSize == nil {
var ret int64
return ret
}
return *o.HotpluggedSize
}
// GetHotpluggedSizeOk returns a tuple with the HotpluggedSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryConfig) GetHotpluggedSizeOk() (*int64, bool) {
if o == nil || o.HotpluggedSize == nil {
return nil, false
}
return o.HotpluggedSize, true
}
// HasHotpluggedSize returns a boolean if a field has been set.
func (o *MemoryConfig) HasHotpluggedSize() bool {
if o != nil && o.HotpluggedSize != nil {
return true
}
return false
}
// SetHotpluggedSize gets a reference to the given int64 and assigns it to the HotpluggedSize field.
func (o *MemoryConfig) SetHotpluggedSize(v int64) {
o.HotpluggedSize = &v
}
// GetMergeable returns the Mergeable field value if set, zero value otherwise.
func (o *MemoryConfig) GetMergeable() bool {
if o == nil || o.Mergeable == nil {
var ret bool
return ret
}
return *o.Mergeable
}
// GetMergeableOk returns a tuple with the Mergeable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryConfig) GetMergeableOk() (*bool, bool) {
if o == nil || o.Mergeable == nil {
return nil, false
}
return o.Mergeable, true
}
// HasMergeable returns a boolean if a field has been set.
func (o *MemoryConfig) HasMergeable() bool {
if o != nil && o.Mergeable != nil {
return true
}
return false
}
// SetMergeable gets a reference to the given bool and assigns it to the Mergeable field.
func (o *MemoryConfig) SetMergeable(v bool) {
o.Mergeable = &v
}
// GetHotplugMethod returns the HotplugMethod field value if set, zero value otherwise.
func (o *MemoryConfig) GetHotplugMethod() string {
if o == nil || o.HotplugMethod == nil {
var ret string
return ret
}
return *o.HotplugMethod
}
// GetHotplugMethodOk returns a tuple with the HotplugMethod field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryConfig) GetHotplugMethodOk() (*string, bool) {
if o == nil || o.HotplugMethod == nil {
return nil, false
}
return o.HotplugMethod, true
}
// HasHotplugMethod returns a boolean if a field has been set.
func (o *MemoryConfig) HasHotplugMethod() bool {
if o != nil && o.HotplugMethod != nil {
return true
}
return false
}
// SetHotplugMethod gets a reference to the given string and assigns it to the HotplugMethod field.
func (o *MemoryConfig) SetHotplugMethod(v string) {
o.HotplugMethod = &v
}
// GetShared returns the Shared field value if set, zero value otherwise.
func (o *MemoryConfig) GetShared() bool {
if o == nil || o.Shared == nil {
var ret bool
return ret
}
return *o.Shared
}
// GetSharedOk returns a tuple with the Shared field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryConfig) GetSharedOk() (*bool, bool) {
if o == nil || o.Shared == nil {
return nil, false
}
return o.Shared, true
}
// HasShared returns a boolean if a field has been set.
func (o *MemoryConfig) HasShared() bool {
if o != nil && o.Shared != nil {
return true
}
return false
}
// SetShared gets a reference to the given bool and assigns it to the Shared field.
func (o *MemoryConfig) SetShared(v bool) {
o.Shared = &v
}
// GetHugepages returns the Hugepages field value if set, zero value otherwise.
func (o *MemoryConfig) GetHugepages() bool {
if o == nil || o.Hugepages == nil {
var ret bool
return ret
}
return *o.Hugepages
}
// GetHugepagesOk returns a tuple with the Hugepages field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryConfig) GetHugepagesOk() (*bool, bool) {
if o == nil || o.Hugepages == nil {
return nil, false
}
return o.Hugepages, true
}
// HasHugepages returns a boolean if a field has been set.
func (o *MemoryConfig) HasHugepages() bool {
if o != nil && o.Hugepages != nil {
return true
}
return false
}
// SetHugepages gets a reference to the given bool and assigns it to the Hugepages field.
func (o *MemoryConfig) SetHugepages(v bool) {
o.Hugepages = &v
}
// GetHugepageSize returns the HugepageSize field value if set, zero value otherwise.
func (o *MemoryConfig) GetHugepageSize() int64 {
if o == nil || o.HugepageSize == nil {
var ret int64
return ret
}
return *o.HugepageSize
}
// GetHugepageSizeOk returns a tuple with the HugepageSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryConfig) GetHugepageSizeOk() (*int64, bool) {
if o == nil || o.HugepageSize == nil {
return nil, false
}
return o.HugepageSize, true
}
// HasHugepageSize returns a boolean if a field has been set.
func (o *MemoryConfig) HasHugepageSize() bool {
if o != nil && o.HugepageSize != nil {
return true
}
return false
}
// SetHugepageSize gets a reference to the given int64 and assigns it to the HugepageSize field.
func (o *MemoryConfig) SetHugepageSize(v int64) {
o.HugepageSize = &v
}
// GetZones returns the Zones field value if set, zero value otherwise.
func (o *MemoryConfig) GetZones() []MemoryZoneConfig {
if o == nil || o.Zones == nil {
var ret []MemoryZoneConfig
return ret
}
return *o.Zones
}
// GetZonesOk returns a tuple with the Zones field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryConfig) GetZonesOk() (*[]MemoryZoneConfig, bool) {
if o == nil || o.Zones == nil {
return nil, false
}
return o.Zones, true
}
// HasZones returns a boolean if a field has been set.
func (o *MemoryConfig) HasZones() bool {
if o != nil && o.Zones != nil {
return true
}
return false
}
// SetZones gets a reference to the given []MemoryZoneConfig and assigns it to the Zones field.
func (o *MemoryConfig) SetZones(v []MemoryZoneConfig) {
o.Zones = &v
}
func (o MemoryConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["size"] = o.Size
}
if o.HotplugSize != nil {
toSerialize["hotplug_size"] = o.HotplugSize
}
if o.HotpluggedSize != nil {
toSerialize["hotplugged_size"] = o.HotpluggedSize
}
if o.Mergeable != nil {
toSerialize["mergeable"] = o.Mergeable
}
if o.HotplugMethod != nil {
toSerialize["hotplug_method"] = o.HotplugMethod
}
if o.Shared != nil {
toSerialize["shared"] = o.Shared
}
if o.Hugepages != nil {
toSerialize["hugepages"] = o.Hugepages
}
if o.HugepageSize != nil {
toSerialize["hugepage_size"] = o.HugepageSize
}
if o.Zones != nil {
toSerialize["zones"] = o.Zones
}
return json.Marshal(toSerialize)
}
type NullableMemoryConfig struct {
value *MemoryConfig
isSet bool
}
func (v NullableMemoryConfig) Get() *MemoryConfig {
return v.value
}
func (v *NullableMemoryConfig) Set(val *MemoryConfig) {
v.value = val
v.isSet = true
}
func (v NullableMemoryConfig) IsSet() bool {
return v.isSet
}
func (v *NullableMemoryConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMemoryConfig(val *MemoryConfig) *NullableMemoryConfig {
return &NullableMemoryConfig{value: val, isSet: true}
}
func (v NullableMemoryConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMemoryConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,24 +1,435 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// MemoryZoneConfig struct for MemoryZoneConfig
type MemoryZoneConfig struct {
Id string `json:"id"`
Size int64 `json:"size"`
File string `json:"file,omitempty"`
Mergeable bool `json:"mergeable,omitempty"`
Shared bool `json:"shared,omitempty"`
Hugepages bool `json:"hugepages,omitempty"`
HugepageSize int64 `json:"hugepage_size,omitempty"`
HostNumaNode int32 `json:"host_numa_node,omitempty"`
HotplugSize int64 `json:"hotplug_size,omitempty"`
HotpluggedSize int64 `json:"hotplugged_size,omitempty"`
Id string `json:"id"`
Size int64 `json:"size"`
File *string `json:"file,omitempty"`
Mergeable *bool `json:"mergeable,omitempty"`
Shared *bool `json:"shared,omitempty"`
Hugepages *bool `json:"hugepages,omitempty"`
HugepageSize *int64 `json:"hugepage_size,omitempty"`
HostNumaNode *int32 `json:"host_numa_node,omitempty"`
HotplugSize *int64 `json:"hotplug_size,omitempty"`
HotpluggedSize *int64 `json:"hotplugged_size,omitempty"`
}
// NewMemoryZoneConfig instantiates a new MemoryZoneConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewMemoryZoneConfig(id string, size int64) *MemoryZoneConfig {
this := MemoryZoneConfig{}
this.Id = id
this.Size = size
var mergeable bool = false
this.Mergeable = &mergeable
var shared bool = false
this.Shared = &shared
var hugepages bool = false
this.Hugepages = &hugepages
return &this
}
// NewMemoryZoneConfigWithDefaults instantiates a new MemoryZoneConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewMemoryZoneConfigWithDefaults() *MemoryZoneConfig {
this := MemoryZoneConfig{}
var mergeable bool = false
this.Mergeable = &mergeable
var shared bool = false
this.Shared = &shared
var hugepages bool = false
this.Hugepages = &hugepages
return &this
}
// GetId returns the Id field value
func (o *MemoryZoneConfig) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *MemoryZoneConfig) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *MemoryZoneConfig) SetId(v string) {
o.Id = v
}
// GetSize returns the Size field value
func (o *MemoryZoneConfig) GetSize() int64 {
if o == nil {
var ret int64
return ret
}
return o.Size
}
// GetSizeOk returns a tuple with the Size field value
// and a boolean to check if the value has been set.
func (o *MemoryZoneConfig) GetSizeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Size, true
}
// SetSize sets field value
func (o *MemoryZoneConfig) SetSize(v int64) {
o.Size = v
}
// GetFile returns the File field value if set, zero value otherwise.
func (o *MemoryZoneConfig) GetFile() string {
if o == nil || o.File == nil {
var ret string
return ret
}
return *o.File
}
// GetFileOk returns a tuple with the File field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryZoneConfig) GetFileOk() (*string, bool) {
if o == nil || o.File == nil {
return nil, false
}
return o.File, true
}
// HasFile returns a boolean if a field has been set.
func (o *MemoryZoneConfig) HasFile() bool {
if o != nil && o.File != nil {
return true
}
return false
}
// SetFile gets a reference to the given string and assigns it to the File field.
func (o *MemoryZoneConfig) SetFile(v string) {
o.File = &v
}
// GetMergeable returns the Mergeable field value if set, zero value otherwise.
func (o *MemoryZoneConfig) GetMergeable() bool {
if o == nil || o.Mergeable == nil {
var ret bool
return ret
}
return *o.Mergeable
}
// GetMergeableOk returns a tuple with the Mergeable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryZoneConfig) GetMergeableOk() (*bool, bool) {
if o == nil || o.Mergeable == nil {
return nil, false
}
return o.Mergeable, true
}
// HasMergeable returns a boolean if a field has been set.
func (o *MemoryZoneConfig) HasMergeable() bool {
if o != nil && o.Mergeable != nil {
return true
}
return false
}
// SetMergeable gets a reference to the given bool and assigns it to the Mergeable field.
func (o *MemoryZoneConfig) SetMergeable(v bool) {
o.Mergeable = &v
}
// GetShared returns the Shared field value if set, zero value otherwise.
func (o *MemoryZoneConfig) GetShared() bool {
if o == nil || o.Shared == nil {
var ret bool
return ret
}
return *o.Shared
}
// GetSharedOk returns a tuple with the Shared field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryZoneConfig) GetSharedOk() (*bool, bool) {
if o == nil || o.Shared == nil {
return nil, false
}
return o.Shared, true
}
// HasShared returns a boolean if a field has been set.
func (o *MemoryZoneConfig) HasShared() bool {
if o != nil && o.Shared != nil {
return true
}
return false
}
// SetShared gets a reference to the given bool and assigns it to the Shared field.
func (o *MemoryZoneConfig) SetShared(v bool) {
o.Shared = &v
}
// GetHugepages returns the Hugepages field value if set, zero value otherwise.
func (o *MemoryZoneConfig) GetHugepages() bool {
if o == nil || o.Hugepages == nil {
var ret bool
return ret
}
return *o.Hugepages
}
// GetHugepagesOk returns a tuple with the Hugepages field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryZoneConfig) GetHugepagesOk() (*bool, bool) {
if o == nil || o.Hugepages == nil {
return nil, false
}
return o.Hugepages, true
}
// HasHugepages returns a boolean if a field has been set.
func (o *MemoryZoneConfig) HasHugepages() bool {
if o != nil && o.Hugepages != nil {
return true
}
return false
}
// SetHugepages gets a reference to the given bool and assigns it to the Hugepages field.
func (o *MemoryZoneConfig) SetHugepages(v bool) {
o.Hugepages = &v
}
// GetHugepageSize returns the HugepageSize field value if set, zero value otherwise.
func (o *MemoryZoneConfig) GetHugepageSize() int64 {
if o == nil || o.HugepageSize == nil {
var ret int64
return ret
}
return *o.HugepageSize
}
// GetHugepageSizeOk returns a tuple with the HugepageSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryZoneConfig) GetHugepageSizeOk() (*int64, bool) {
if o == nil || o.HugepageSize == nil {
return nil, false
}
return o.HugepageSize, true
}
// HasHugepageSize returns a boolean if a field has been set.
func (o *MemoryZoneConfig) HasHugepageSize() bool {
if o != nil && o.HugepageSize != nil {
return true
}
return false
}
// SetHugepageSize gets a reference to the given int64 and assigns it to the HugepageSize field.
func (o *MemoryZoneConfig) SetHugepageSize(v int64) {
o.HugepageSize = &v
}
// GetHostNumaNode returns the HostNumaNode field value if set, zero value otherwise.
func (o *MemoryZoneConfig) GetHostNumaNode() int32 {
if o == nil || o.HostNumaNode == nil {
var ret int32
return ret
}
return *o.HostNumaNode
}
// GetHostNumaNodeOk returns a tuple with the HostNumaNode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryZoneConfig) GetHostNumaNodeOk() (*int32, bool) {
if o == nil || o.HostNumaNode == nil {
return nil, false
}
return o.HostNumaNode, true
}
// HasHostNumaNode returns a boolean if a field has been set.
func (o *MemoryZoneConfig) HasHostNumaNode() bool {
if o != nil && o.HostNumaNode != nil {
return true
}
return false
}
// SetHostNumaNode gets a reference to the given int32 and assigns it to the HostNumaNode field.
func (o *MemoryZoneConfig) SetHostNumaNode(v int32) {
o.HostNumaNode = &v
}
// GetHotplugSize returns the HotplugSize field value if set, zero value otherwise.
func (o *MemoryZoneConfig) GetHotplugSize() int64 {
if o == nil || o.HotplugSize == nil {
var ret int64
return ret
}
return *o.HotplugSize
}
// GetHotplugSizeOk returns a tuple with the HotplugSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryZoneConfig) GetHotplugSizeOk() (*int64, bool) {
if o == nil || o.HotplugSize == nil {
return nil, false
}
return o.HotplugSize, true
}
// HasHotplugSize returns a boolean if a field has been set.
func (o *MemoryZoneConfig) HasHotplugSize() bool {
if o != nil && o.HotplugSize != nil {
return true
}
return false
}
// SetHotplugSize gets a reference to the given int64 and assigns it to the HotplugSize field.
func (o *MemoryZoneConfig) SetHotplugSize(v int64) {
o.HotplugSize = &v
}
// GetHotpluggedSize returns the HotpluggedSize field value if set, zero value otherwise.
func (o *MemoryZoneConfig) GetHotpluggedSize() int64 {
if o == nil || o.HotpluggedSize == nil {
var ret int64
return ret
}
return *o.HotpluggedSize
}
// GetHotpluggedSizeOk returns a tuple with the HotpluggedSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MemoryZoneConfig) GetHotpluggedSizeOk() (*int64, bool) {
if o == nil || o.HotpluggedSize == nil {
return nil, false
}
return o.HotpluggedSize, true
}
// HasHotpluggedSize returns a boolean if a field has been set.
func (o *MemoryZoneConfig) HasHotpluggedSize() bool {
if o != nil && o.HotpluggedSize != nil {
return true
}
return false
}
// SetHotpluggedSize gets a reference to the given int64 and assigns it to the HotpluggedSize field.
func (o *MemoryZoneConfig) SetHotpluggedSize(v int64) {
o.HotpluggedSize = &v
}
func (o MemoryZoneConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["id"] = o.Id
}
if true {
toSerialize["size"] = o.Size
}
if o.File != nil {
toSerialize["file"] = o.File
}
if o.Mergeable != nil {
toSerialize["mergeable"] = o.Mergeable
}
if o.Shared != nil {
toSerialize["shared"] = o.Shared
}
if o.Hugepages != nil {
toSerialize["hugepages"] = o.Hugepages
}
if o.HugepageSize != nil {
toSerialize["hugepage_size"] = o.HugepageSize
}
if o.HostNumaNode != nil {
toSerialize["host_numa_node"] = o.HostNumaNode
}
if o.HotplugSize != nil {
toSerialize["hotplug_size"] = o.HotplugSize
}
if o.HotpluggedSize != nil {
toSerialize["hotplugged_size"] = o.HotpluggedSize
}
return json.Marshal(toSerialize)
}
type NullableMemoryZoneConfig struct {
value *MemoryZoneConfig
isSet bool
}
func (v NullableMemoryZoneConfig) Get() *MemoryZoneConfig {
return v.value
}
func (v *NullableMemoryZoneConfig) Set(val *MemoryZoneConfig) {
v.value = val
v.isSet = true
}
func (v NullableMemoryZoneConfig) IsSet() bool {
return v.isSet
}
func (v *NullableMemoryZoneConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMemoryZoneConfig(val *MemoryZoneConfig) *NullableMemoryZoneConfig {
return &NullableMemoryZoneConfig{value: val, isSet: true}
}
func (v NullableMemoryZoneConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMemoryZoneConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,27 +1,577 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// NetConfig struct for NetConfig
type NetConfig struct {
Tap string `json:"tap,omitempty"`
Ip string `json:"ip,omitempty"`
Mask string `json:"mask,omitempty"`
Mac string `json:"mac,omitempty"`
Iommu bool `json:"iommu,omitempty"`
NumQueues int32 `json:"num_queues,omitempty"`
QueueSize int32 `json:"queue_size,omitempty"`
VhostUser bool `json:"vhost_user,omitempty"`
VhostSocket string `json:"vhost_socket,omitempty"`
VhostMode string `json:"vhost_mode,omitempty"`
Id string `json:"id,omitempty"`
Fd []int32 `json:"fd,omitempty"`
RateLimiterConfig RateLimiterConfig `json:"rate_limiter_config,omitempty"`
Tap *string `json:"tap,omitempty"`
Ip *string `json:"ip,omitempty"`
Mask *string `json:"mask,omitempty"`
Mac *string `json:"mac,omitempty"`
Iommu *bool `json:"iommu,omitempty"`
NumQueues *int32 `json:"num_queues,omitempty"`
QueueSize *int32 `json:"queue_size,omitempty"`
VhostUser *bool `json:"vhost_user,omitempty"`
VhostSocket *string `json:"vhost_socket,omitempty"`
VhostMode *string `json:"vhost_mode,omitempty"`
Id *string `json:"id,omitempty"`
Fd *[]int32 `json:"fd,omitempty"`
RateLimiterConfig *RateLimiterConfig `json:"rate_limiter_config,omitempty"`
}
// NewNetConfig instantiates a new NetConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewNetConfig() *NetConfig {
this := NetConfig{}
var tap string = ""
this.Tap = &tap
var ip string = "192.168.249.1"
this.Ip = &ip
var mask string = "255.255.255.0"
this.Mask = &mask
var iommu bool = false
this.Iommu = &iommu
var numQueues int32 = 2
this.NumQueues = &numQueues
var queueSize int32 = 256
this.QueueSize = &queueSize
var vhostUser bool = false
this.VhostUser = &vhostUser
var vhostMode string = "client"
this.VhostMode = &vhostMode
return &this
}
// NewNetConfigWithDefaults instantiates a new NetConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewNetConfigWithDefaults() *NetConfig {
this := NetConfig{}
var tap string = ""
this.Tap = &tap
var ip string = "192.168.249.1"
this.Ip = &ip
var mask string = "255.255.255.0"
this.Mask = &mask
var iommu bool = false
this.Iommu = &iommu
var numQueues int32 = 2
this.NumQueues = &numQueues
var queueSize int32 = 256
this.QueueSize = &queueSize
var vhostUser bool = false
this.VhostUser = &vhostUser
var vhostMode string = "client"
this.VhostMode = &vhostMode
return &this
}
// GetTap returns the Tap field value if set, zero value otherwise.
func (o *NetConfig) GetTap() string {
if o == nil || o.Tap == nil {
var ret string
return ret
}
return *o.Tap
}
// GetTapOk returns a tuple with the Tap field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetTapOk() (*string, bool) {
if o == nil || o.Tap == nil {
return nil, false
}
return o.Tap, true
}
// HasTap returns a boolean if a field has been set.
func (o *NetConfig) HasTap() bool {
if o != nil && o.Tap != nil {
return true
}
return false
}
// SetTap gets a reference to the given string and assigns it to the Tap field.
func (o *NetConfig) SetTap(v string) {
o.Tap = &v
}
// GetIp returns the Ip field value if set, zero value otherwise.
func (o *NetConfig) GetIp() string {
if o == nil || o.Ip == nil {
var ret string
return ret
}
return *o.Ip
}
// GetIpOk returns a tuple with the Ip field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetIpOk() (*string, bool) {
if o == nil || o.Ip == nil {
return nil, false
}
return o.Ip, true
}
// HasIp returns a boolean if a field has been set.
func (o *NetConfig) HasIp() bool {
if o != nil && o.Ip != nil {
return true
}
return false
}
// SetIp gets a reference to the given string and assigns it to the Ip field.
func (o *NetConfig) SetIp(v string) {
o.Ip = &v
}
// GetMask returns the Mask field value if set, zero value otherwise.
func (o *NetConfig) GetMask() string {
if o == nil || o.Mask == nil {
var ret string
return ret
}
return *o.Mask
}
// GetMaskOk returns a tuple with the Mask field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetMaskOk() (*string, bool) {
if o == nil || o.Mask == nil {
return nil, false
}
return o.Mask, true
}
// HasMask returns a boolean if a field has been set.
func (o *NetConfig) HasMask() bool {
if o != nil && o.Mask != nil {
return true
}
return false
}
// SetMask gets a reference to the given string and assigns it to the Mask field.
func (o *NetConfig) SetMask(v string) {
o.Mask = &v
}
// GetMac returns the Mac field value if set, zero value otherwise.
func (o *NetConfig) GetMac() string {
if o == nil || o.Mac == nil {
var ret string
return ret
}
return *o.Mac
}
// GetMacOk returns a tuple with the Mac field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetMacOk() (*string, bool) {
if o == nil || o.Mac == nil {
return nil, false
}
return o.Mac, true
}
// HasMac returns a boolean if a field has been set.
func (o *NetConfig) HasMac() bool {
if o != nil && o.Mac != nil {
return true
}
return false
}
// SetMac gets a reference to the given string and assigns it to the Mac field.
func (o *NetConfig) SetMac(v string) {
o.Mac = &v
}
// GetIommu returns the Iommu field value if set, zero value otherwise.
func (o *NetConfig) GetIommu() bool {
if o == nil || o.Iommu == nil {
var ret bool
return ret
}
return *o.Iommu
}
// GetIommuOk returns a tuple with the Iommu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetIommuOk() (*bool, bool) {
if o == nil || o.Iommu == nil {
return nil, false
}
return o.Iommu, true
}
// HasIommu returns a boolean if a field has been set.
func (o *NetConfig) HasIommu() bool {
if o != nil && o.Iommu != nil {
return true
}
return false
}
// SetIommu gets a reference to the given bool and assigns it to the Iommu field.
func (o *NetConfig) SetIommu(v bool) {
o.Iommu = &v
}
// GetNumQueues returns the NumQueues field value if set, zero value otherwise.
func (o *NetConfig) GetNumQueues() int32 {
if o == nil || o.NumQueues == nil {
var ret int32
return ret
}
return *o.NumQueues
}
// GetNumQueuesOk returns a tuple with the NumQueues field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetNumQueuesOk() (*int32, bool) {
if o == nil || o.NumQueues == nil {
return nil, false
}
return o.NumQueues, true
}
// HasNumQueues returns a boolean if a field has been set.
func (o *NetConfig) HasNumQueues() bool {
if o != nil && o.NumQueues != nil {
return true
}
return false
}
// SetNumQueues gets a reference to the given int32 and assigns it to the NumQueues field.
func (o *NetConfig) SetNumQueues(v int32) {
o.NumQueues = &v
}
// GetQueueSize returns the QueueSize field value if set, zero value otherwise.
func (o *NetConfig) GetQueueSize() int32 {
if o == nil || o.QueueSize == nil {
var ret int32
return ret
}
return *o.QueueSize
}
// GetQueueSizeOk returns a tuple with the QueueSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetQueueSizeOk() (*int32, bool) {
if o == nil || o.QueueSize == nil {
return nil, false
}
return o.QueueSize, true
}
// HasQueueSize returns a boolean if a field has been set.
func (o *NetConfig) HasQueueSize() bool {
if o != nil && o.QueueSize != nil {
return true
}
return false
}
// SetQueueSize gets a reference to the given int32 and assigns it to the QueueSize field.
func (o *NetConfig) SetQueueSize(v int32) {
o.QueueSize = &v
}
// GetVhostUser returns the VhostUser field value if set, zero value otherwise.
func (o *NetConfig) GetVhostUser() bool {
if o == nil || o.VhostUser == nil {
var ret bool
return ret
}
return *o.VhostUser
}
// GetVhostUserOk returns a tuple with the VhostUser field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetVhostUserOk() (*bool, bool) {
if o == nil || o.VhostUser == nil {
return nil, false
}
return o.VhostUser, true
}
// HasVhostUser returns a boolean if a field has been set.
func (o *NetConfig) HasVhostUser() bool {
if o != nil && o.VhostUser != nil {
return true
}
return false
}
// SetVhostUser gets a reference to the given bool and assigns it to the VhostUser field.
func (o *NetConfig) SetVhostUser(v bool) {
o.VhostUser = &v
}
// GetVhostSocket returns the VhostSocket field value if set, zero value otherwise.
func (o *NetConfig) GetVhostSocket() string {
if o == nil || o.VhostSocket == nil {
var ret string
return ret
}
return *o.VhostSocket
}
// GetVhostSocketOk returns a tuple with the VhostSocket field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetVhostSocketOk() (*string, bool) {
if o == nil || o.VhostSocket == nil {
return nil, false
}
return o.VhostSocket, true
}
// HasVhostSocket returns a boolean if a field has been set.
func (o *NetConfig) HasVhostSocket() bool {
if o != nil && o.VhostSocket != nil {
return true
}
return false
}
// SetVhostSocket gets a reference to the given string and assigns it to the VhostSocket field.
func (o *NetConfig) SetVhostSocket(v string) {
o.VhostSocket = &v
}
// GetVhostMode returns the VhostMode field value if set, zero value otherwise.
func (o *NetConfig) GetVhostMode() string {
if o == nil || o.VhostMode == nil {
var ret string
return ret
}
return *o.VhostMode
}
// GetVhostModeOk returns a tuple with the VhostMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetVhostModeOk() (*string, bool) {
if o == nil || o.VhostMode == nil {
return nil, false
}
return o.VhostMode, true
}
// HasVhostMode returns a boolean if a field has been set.
func (o *NetConfig) HasVhostMode() bool {
if o != nil && o.VhostMode != nil {
return true
}
return false
}
// SetVhostMode gets a reference to the given string and assigns it to the VhostMode field.
func (o *NetConfig) SetVhostMode(v string) {
o.VhostMode = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *NetConfig) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *NetConfig) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *NetConfig) SetId(v string) {
o.Id = &v
}
// GetFd returns the Fd field value if set, zero value otherwise.
func (o *NetConfig) GetFd() []int32 {
if o == nil || o.Fd == nil {
var ret []int32
return ret
}
return *o.Fd
}
// GetFdOk returns a tuple with the Fd field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetFdOk() (*[]int32, bool) {
if o == nil || o.Fd == nil {
return nil, false
}
return o.Fd, true
}
// HasFd returns a boolean if a field has been set.
func (o *NetConfig) HasFd() bool {
if o != nil && o.Fd != nil {
return true
}
return false
}
// SetFd gets a reference to the given []int32 and assigns it to the Fd field.
func (o *NetConfig) SetFd(v []int32) {
o.Fd = &v
}
// GetRateLimiterConfig returns the RateLimiterConfig field value if set, zero value otherwise.
func (o *NetConfig) GetRateLimiterConfig() RateLimiterConfig {
if o == nil || o.RateLimiterConfig == nil {
var ret RateLimiterConfig
return ret
}
return *o.RateLimiterConfig
}
// GetRateLimiterConfigOk returns a tuple with the RateLimiterConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetRateLimiterConfigOk() (*RateLimiterConfig, bool) {
if o == nil || o.RateLimiterConfig == nil {
return nil, false
}
return o.RateLimiterConfig, true
}
// HasRateLimiterConfig returns a boolean if a field has been set.
func (o *NetConfig) HasRateLimiterConfig() bool {
if o != nil && o.RateLimiterConfig != nil {
return true
}
return false
}
// SetRateLimiterConfig gets a reference to the given RateLimiterConfig and assigns it to the RateLimiterConfig field.
func (o *NetConfig) SetRateLimiterConfig(v RateLimiterConfig) {
o.RateLimiterConfig = &v
}
func (o NetConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Tap != nil {
toSerialize["tap"] = o.Tap
}
if o.Ip != nil {
toSerialize["ip"] = o.Ip
}
if o.Mask != nil {
toSerialize["mask"] = o.Mask
}
if o.Mac != nil {
toSerialize["mac"] = o.Mac
}
if o.Iommu != nil {
toSerialize["iommu"] = o.Iommu
}
if o.NumQueues != nil {
toSerialize["num_queues"] = o.NumQueues
}
if o.QueueSize != nil {
toSerialize["queue_size"] = o.QueueSize
}
if o.VhostUser != nil {
toSerialize["vhost_user"] = o.VhostUser
}
if o.VhostSocket != nil {
toSerialize["vhost_socket"] = o.VhostSocket
}
if o.VhostMode != nil {
toSerialize["vhost_mode"] = o.VhostMode
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.Fd != nil {
toSerialize["fd"] = o.Fd
}
if o.RateLimiterConfig != nil {
toSerialize["rate_limiter_config"] = o.RateLimiterConfig
}
return json.Marshal(toSerialize)
}
type NullableNetConfig struct {
value *NetConfig
isSet bool
}
func (v NullableNetConfig) Get() *NetConfig {
return v.value
}
func (v *NullableNetConfig) Set(val *NetConfig) {
v.value = val
v.isSet = true
}
func (v NullableNetConfig) IsSet() bool {
return v.isSet
}
func (v *NullableNetConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNetConfig(val *NetConfig) *NullableNetConfig {
return &NullableNetConfig{value: val, isSet: true}
}
func (v NullableNetConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNetConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,19 +1,250 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// NumaConfig struct for NumaConfig
type NumaConfig struct {
GuestNumaId int32 `json:"guest_numa_id"`
Cpus []int32 `json:"cpus,omitempty"`
Distances []NumaDistance `json:"distances,omitempty"`
MemoryZones []string `json:"memory_zones,omitempty"`
SgxEpcSections []string `json:"sgx_epc_sections,omitempty"`
GuestNumaId int32 `json:"guest_numa_id"`
Cpus *[]int32 `json:"cpus,omitempty"`
Distances *[]NumaDistance `json:"distances,omitempty"`
MemoryZones *[]string `json:"memory_zones,omitempty"`
SgxEpcSections *[]string `json:"sgx_epc_sections,omitempty"`
}
// NewNumaConfig instantiates a new NumaConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewNumaConfig(guestNumaId int32) *NumaConfig {
this := NumaConfig{}
this.GuestNumaId = guestNumaId
return &this
}
// NewNumaConfigWithDefaults instantiates a new NumaConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewNumaConfigWithDefaults() *NumaConfig {
this := NumaConfig{}
return &this
}
// GetGuestNumaId returns the GuestNumaId field value
func (o *NumaConfig) GetGuestNumaId() int32 {
if o == nil {
var ret int32
return ret
}
return o.GuestNumaId
}
// GetGuestNumaIdOk returns a tuple with the GuestNumaId field value
// and a boolean to check if the value has been set.
func (o *NumaConfig) GetGuestNumaIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.GuestNumaId, true
}
// SetGuestNumaId sets field value
func (o *NumaConfig) SetGuestNumaId(v int32) {
o.GuestNumaId = v
}
// GetCpus returns the Cpus field value if set, zero value otherwise.
func (o *NumaConfig) GetCpus() []int32 {
if o == nil || o.Cpus == nil {
var ret []int32
return ret
}
return *o.Cpus
}
// GetCpusOk returns a tuple with the Cpus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NumaConfig) GetCpusOk() (*[]int32, bool) {
if o == nil || o.Cpus == nil {
return nil, false
}
return o.Cpus, true
}
// HasCpus returns a boolean if a field has been set.
func (o *NumaConfig) HasCpus() bool {
if o != nil && o.Cpus != nil {
return true
}
return false
}
// SetCpus gets a reference to the given []int32 and assigns it to the Cpus field.
func (o *NumaConfig) SetCpus(v []int32) {
o.Cpus = &v
}
// GetDistances returns the Distances field value if set, zero value otherwise.
func (o *NumaConfig) GetDistances() []NumaDistance {
if o == nil || o.Distances == nil {
var ret []NumaDistance
return ret
}
return *o.Distances
}
// GetDistancesOk returns a tuple with the Distances field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NumaConfig) GetDistancesOk() (*[]NumaDistance, bool) {
if o == nil || o.Distances == nil {
return nil, false
}
return o.Distances, true
}
// HasDistances returns a boolean if a field has been set.
func (o *NumaConfig) HasDistances() bool {
if o != nil && o.Distances != nil {
return true
}
return false
}
// SetDistances gets a reference to the given []NumaDistance and assigns it to the Distances field.
func (o *NumaConfig) SetDistances(v []NumaDistance) {
o.Distances = &v
}
// GetMemoryZones returns the MemoryZones field value if set, zero value otherwise.
func (o *NumaConfig) GetMemoryZones() []string {
if o == nil || o.MemoryZones == nil {
var ret []string
return ret
}
return *o.MemoryZones
}
// GetMemoryZonesOk returns a tuple with the MemoryZones field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NumaConfig) GetMemoryZonesOk() (*[]string, bool) {
if o == nil || o.MemoryZones == nil {
return nil, false
}
return o.MemoryZones, true
}
// HasMemoryZones returns a boolean if a field has been set.
func (o *NumaConfig) HasMemoryZones() bool {
if o != nil && o.MemoryZones != nil {
return true
}
return false
}
// SetMemoryZones gets a reference to the given []string and assigns it to the MemoryZones field.
func (o *NumaConfig) SetMemoryZones(v []string) {
o.MemoryZones = &v
}
// GetSgxEpcSections returns the SgxEpcSections field value if set, zero value otherwise.
func (o *NumaConfig) GetSgxEpcSections() []string {
if o == nil || o.SgxEpcSections == nil {
var ret []string
return ret
}
return *o.SgxEpcSections
}
// GetSgxEpcSectionsOk returns a tuple with the SgxEpcSections field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NumaConfig) GetSgxEpcSectionsOk() (*[]string, bool) {
if o == nil || o.SgxEpcSections == nil {
return nil, false
}
return o.SgxEpcSections, true
}
// HasSgxEpcSections returns a boolean if a field has been set.
func (o *NumaConfig) HasSgxEpcSections() bool {
if o != nil && o.SgxEpcSections != nil {
return true
}
return false
}
// SetSgxEpcSections gets a reference to the given []string and assigns it to the SgxEpcSections field.
func (o *NumaConfig) SetSgxEpcSections(v []string) {
o.SgxEpcSections = &v
}
func (o NumaConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["guest_numa_id"] = o.GuestNumaId
}
if o.Cpus != nil {
toSerialize["cpus"] = o.Cpus
}
if o.Distances != nil {
toSerialize["distances"] = o.Distances
}
if o.MemoryZones != nil {
toSerialize["memory_zones"] = o.MemoryZones
}
if o.SgxEpcSections != nil {
toSerialize["sgx_epc_sections"] = o.SgxEpcSections
}
return json.Marshal(toSerialize)
}
type NullableNumaConfig struct {
value *NumaConfig
isSet bool
}
func (v NullableNumaConfig) Get() *NumaConfig {
return v.value
}
func (v *NullableNumaConfig) Set(val *NumaConfig) {
v.value = val
v.isSet = true
}
func (v NullableNumaConfig) IsSet() bool {
return v.isSet
}
func (v *NullableNumaConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNumaConfig(val *NumaConfig) *NullableNumaConfig {
return &NullableNumaConfig{value: val, isSet: true}
}
func (v NullableNumaConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNumaConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,16 +1,135 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// NumaDistance struct for NumaDistance
type NumaDistance struct {
Destination int32 `json:"destination"`
Distance int32 `json:"distance"`
}
// NewNumaDistance instantiates a new NumaDistance object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewNumaDistance(destination int32, distance int32) *NumaDistance {
this := NumaDistance{}
this.Destination = destination
this.Distance = distance
return &this
}
// NewNumaDistanceWithDefaults instantiates a new NumaDistance object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewNumaDistanceWithDefaults() *NumaDistance {
this := NumaDistance{}
return &this
}
// GetDestination returns the Destination field value
func (o *NumaDistance) GetDestination() int32 {
if o == nil {
var ret int32
return ret
}
return o.Destination
}
// GetDestinationOk returns a tuple with the Destination field value
// and a boolean to check if the value has been set.
func (o *NumaDistance) GetDestinationOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Destination, true
}
// SetDestination sets field value
func (o *NumaDistance) SetDestination(v int32) {
o.Destination = v
}
// GetDistance returns the Distance field value
func (o *NumaDistance) GetDistance() int32 {
if o == nil {
var ret int32
return ret
}
return o.Distance
}
// GetDistanceOk returns a tuple with the Distance field value
// and a boolean to check if the value has been set.
func (o *NumaDistance) GetDistanceOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Distance, true
}
// SetDistance sets field value
func (o *NumaDistance) SetDistance(v int32) {
o.Distance = v
}
func (o NumaDistance) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["destination"] = o.Destination
}
if true {
toSerialize["distance"] = o.Distance
}
return json.Marshal(toSerialize)
}
type NullableNumaDistance struct {
value *NumaDistance
isSet bool
}
func (v NullableNumaDistance) Get() *NumaDistance {
return v.value
}
func (v *NullableNumaDistance) Set(val *NumaDistance) {
v.value = val
v.isSet = true
}
func (v NullableNumaDistance) IsSet() bool {
return v.isSet
}
func (v *NullableNumaDistance) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNumaDistance(val *NumaDistance) *NullableNumaDistance {
return &NullableNumaDistance{value: val, isSet: true}
}
func (v NullableNumaDistance) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNumaDistance) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,16 +1,135 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// PciDeviceInfo Information about a PCI device
type PciDeviceInfo struct {
Id string `json:"id"`
Bdf string `json:"bdf"`
}
// NewPciDeviceInfo instantiates a new PciDeviceInfo object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewPciDeviceInfo(id string, bdf string) *PciDeviceInfo {
this := PciDeviceInfo{}
this.Id = id
this.Bdf = bdf
return &this
}
// NewPciDeviceInfoWithDefaults instantiates a new PciDeviceInfo object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewPciDeviceInfoWithDefaults() *PciDeviceInfo {
this := PciDeviceInfo{}
return &this
}
// GetId returns the Id field value
func (o *PciDeviceInfo) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *PciDeviceInfo) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *PciDeviceInfo) SetId(v string) {
o.Id = v
}
// GetBdf returns the Bdf field value
func (o *PciDeviceInfo) GetBdf() string {
if o == nil {
var ret string
return ret
}
return o.Bdf
}
// GetBdfOk returns a tuple with the Bdf field value
// and a boolean to check if the value has been set.
func (o *PciDeviceInfo) GetBdfOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Bdf, true
}
// SetBdf sets field value
func (o *PciDeviceInfo) SetBdf(v string) {
o.Bdf = v
}
func (o PciDeviceInfo) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["id"] = o.Id
}
if true {
toSerialize["bdf"] = o.Bdf
}
return json.Marshal(toSerialize)
}
type NullablePciDeviceInfo struct {
value *PciDeviceInfo
isSet bool
}
func (v NullablePciDeviceInfo) Get() *PciDeviceInfo {
return v.value
}
func (v *NullablePciDeviceInfo) Set(val *PciDeviceInfo) {
v.value = val
v.isSet = true
}
func (v NullablePciDeviceInfo) IsSet() bool {
return v.isSet
}
func (v *NullablePciDeviceInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePciDeviceInfo(val *PciDeviceInfo) *NullablePciDeviceInfo {
return &NullablePciDeviceInfo{value: val, isSet: true}
}
func (v NullablePciDeviceInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePciDeviceInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,20 +1,298 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// PmemConfig struct for PmemConfig
type PmemConfig struct {
File string `json:"file"`
Size int64 `json:"size,omitempty"`
Iommu bool `json:"iommu,omitempty"`
Mergeable bool `json:"mergeable,omitempty"`
DiscardWrites bool `json:"discard_writes,omitempty"`
Id string `json:"id,omitempty"`
File string `json:"file"`
Size *int64 `json:"size,omitempty"`
Iommu *bool `json:"iommu,omitempty"`
Mergeable *bool `json:"mergeable,omitempty"`
DiscardWrites *bool `json:"discard_writes,omitempty"`
Id *string `json:"id,omitempty"`
}
// NewPmemConfig instantiates a new PmemConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewPmemConfig(file string) *PmemConfig {
this := PmemConfig{}
this.File = file
var iommu bool = false
this.Iommu = &iommu
var mergeable bool = false
this.Mergeable = &mergeable
var discardWrites bool = false
this.DiscardWrites = &discardWrites
return &this
}
// NewPmemConfigWithDefaults instantiates a new PmemConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewPmemConfigWithDefaults() *PmemConfig {
this := PmemConfig{}
var iommu bool = false
this.Iommu = &iommu
var mergeable bool = false
this.Mergeable = &mergeable
var discardWrites bool = false
this.DiscardWrites = &discardWrites
return &this
}
// GetFile returns the File field value
func (o *PmemConfig) GetFile() string {
if o == nil {
var ret string
return ret
}
return o.File
}
// GetFileOk returns a tuple with the File field value
// and a boolean to check if the value has been set.
func (o *PmemConfig) GetFileOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.File, true
}
// SetFile sets field value
func (o *PmemConfig) SetFile(v string) {
o.File = v
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *PmemConfig) GetSize() int64 {
if o == nil || o.Size == nil {
var ret int64
return ret
}
return *o.Size
}
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PmemConfig) GetSizeOk() (*int64, bool) {
if o == nil || o.Size == nil {
return nil, false
}
return o.Size, true
}
// HasSize returns a boolean if a field has been set.
func (o *PmemConfig) HasSize() bool {
if o != nil && o.Size != nil {
return true
}
return false
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *PmemConfig) SetSize(v int64) {
o.Size = &v
}
// GetIommu returns the Iommu field value if set, zero value otherwise.
func (o *PmemConfig) GetIommu() bool {
if o == nil || o.Iommu == nil {
var ret bool
return ret
}
return *o.Iommu
}
// GetIommuOk returns a tuple with the Iommu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PmemConfig) GetIommuOk() (*bool, bool) {
if o == nil || o.Iommu == nil {
return nil, false
}
return o.Iommu, true
}
// HasIommu returns a boolean if a field has been set.
func (o *PmemConfig) HasIommu() bool {
if o != nil && o.Iommu != nil {
return true
}
return false
}
// SetIommu gets a reference to the given bool and assigns it to the Iommu field.
func (o *PmemConfig) SetIommu(v bool) {
o.Iommu = &v
}
// GetMergeable returns the Mergeable field value if set, zero value otherwise.
func (o *PmemConfig) GetMergeable() bool {
if o == nil || o.Mergeable == nil {
var ret bool
return ret
}
return *o.Mergeable
}
// GetMergeableOk returns a tuple with the Mergeable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PmemConfig) GetMergeableOk() (*bool, bool) {
if o == nil || o.Mergeable == nil {
return nil, false
}
return o.Mergeable, true
}
// HasMergeable returns a boolean if a field has been set.
func (o *PmemConfig) HasMergeable() bool {
if o != nil && o.Mergeable != nil {
return true
}
return false
}
// SetMergeable gets a reference to the given bool and assigns it to the Mergeable field.
func (o *PmemConfig) SetMergeable(v bool) {
o.Mergeable = &v
}
// GetDiscardWrites returns the DiscardWrites field value if set, zero value otherwise.
func (o *PmemConfig) GetDiscardWrites() bool {
if o == nil || o.DiscardWrites == nil {
var ret bool
return ret
}
return *o.DiscardWrites
}
// GetDiscardWritesOk returns a tuple with the DiscardWrites field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PmemConfig) GetDiscardWritesOk() (*bool, bool) {
if o == nil || o.DiscardWrites == nil {
return nil, false
}
return o.DiscardWrites, true
}
// HasDiscardWrites returns a boolean if a field has been set.
func (o *PmemConfig) HasDiscardWrites() bool {
if o != nil && o.DiscardWrites != nil {
return true
}
return false
}
// SetDiscardWrites gets a reference to the given bool and assigns it to the DiscardWrites field.
func (o *PmemConfig) SetDiscardWrites(v bool) {
o.DiscardWrites = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *PmemConfig) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PmemConfig) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *PmemConfig) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *PmemConfig) SetId(v string) {
o.Id = &v
}
func (o PmemConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["file"] = o.File
}
if o.Size != nil {
toSerialize["size"] = o.Size
}
if o.Iommu != nil {
toSerialize["iommu"] = o.Iommu
}
if o.Mergeable != nil {
toSerialize["mergeable"] = o.Mergeable
}
if o.DiscardWrites != nil {
toSerialize["discard_writes"] = o.DiscardWrites
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
return json.Marshal(toSerialize)
}
type NullablePmemConfig struct {
value *PmemConfig
isSet bool
}
func (v NullablePmemConfig) Get() *PmemConfig {
return v.value
}
func (v *NullablePmemConfig) Set(val *PmemConfig) {
v.value = val
v.isSet = true
}
func (v NullablePmemConfig) IsSet() bool {
return v.isSet
}
func (v *NullablePmemConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePmemConfig(val *PmemConfig) *NullablePmemConfig {
return &NullablePmemConfig{value: val, isSet: true}
}
func (v NullablePmemConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePmemConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,16 +1,149 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// RateLimiterConfig Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
type RateLimiterConfig struct {
Bandwidth TokenBucket `json:"bandwidth,omitempty"`
Ops TokenBucket `json:"ops,omitempty"`
Bandwidth *TokenBucket `json:"bandwidth,omitempty"`
Ops *TokenBucket `json:"ops,omitempty"`
}
// NewRateLimiterConfig instantiates a new RateLimiterConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewRateLimiterConfig() *RateLimiterConfig {
this := RateLimiterConfig{}
return &this
}
// NewRateLimiterConfigWithDefaults instantiates a new RateLimiterConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewRateLimiterConfigWithDefaults() *RateLimiterConfig {
this := RateLimiterConfig{}
return &this
}
// GetBandwidth returns the Bandwidth field value if set, zero value otherwise.
func (o *RateLimiterConfig) GetBandwidth() TokenBucket {
if o == nil || o.Bandwidth == nil {
var ret TokenBucket
return ret
}
return *o.Bandwidth
}
// GetBandwidthOk returns a tuple with the Bandwidth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RateLimiterConfig) GetBandwidthOk() (*TokenBucket, bool) {
if o == nil || o.Bandwidth == nil {
return nil, false
}
return o.Bandwidth, true
}
// HasBandwidth returns a boolean if a field has been set.
func (o *RateLimiterConfig) HasBandwidth() bool {
if o != nil && o.Bandwidth != nil {
return true
}
return false
}
// SetBandwidth gets a reference to the given TokenBucket and assigns it to the Bandwidth field.
func (o *RateLimiterConfig) SetBandwidth(v TokenBucket) {
o.Bandwidth = &v
}
// GetOps returns the Ops field value if set, zero value otherwise.
func (o *RateLimiterConfig) GetOps() TokenBucket {
if o == nil || o.Ops == nil {
var ret TokenBucket
return ret
}
return *o.Ops
}
// GetOpsOk returns a tuple with the Ops field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RateLimiterConfig) GetOpsOk() (*TokenBucket, bool) {
if o == nil || o.Ops == nil {
return nil, false
}
return o.Ops, true
}
// HasOps returns a boolean if a field has been set.
func (o *RateLimiterConfig) HasOps() bool {
if o != nil && o.Ops != nil {
return true
}
return false
}
// SetOps gets a reference to the given TokenBucket and assigns it to the Ops field.
func (o *RateLimiterConfig) SetOps(v TokenBucket) {
o.Ops = &v
}
func (o RateLimiterConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Bandwidth != nil {
toSerialize["bandwidth"] = o.Bandwidth
}
if o.Ops != nil {
toSerialize["ops"] = o.Ops
}
return json.Marshal(toSerialize)
}
type NullableRateLimiterConfig struct {
value *RateLimiterConfig
isSet bool
}
func (v NullableRateLimiterConfig) Get() *RateLimiterConfig {
return v.value
}
func (v *NullableRateLimiterConfig) Set(val *RateLimiterConfig) {
v.value = val
v.isSet = true
}
func (v NullableRateLimiterConfig) IsSet() bool {
return v.isSet
}
func (v *NullableRateLimiterConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRateLimiterConfig(val *RateLimiterConfig) *NullableRateLimiterConfig {
return &NullableRateLimiterConfig{value: val, isSet: true}
}
func (v NullableRateLimiterConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRateLimiterConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,16 +1,142 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// RestoreConfig struct for RestoreConfig
type RestoreConfig struct {
SourceUrl string `json:"source_url"`
Prefault bool `json:"prefault,omitempty"`
Prefault *bool `json:"prefault,omitempty"`
}
// NewRestoreConfig instantiates a new RestoreConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewRestoreConfig(sourceUrl string) *RestoreConfig {
this := RestoreConfig{}
this.SourceUrl = sourceUrl
return &this
}
// NewRestoreConfigWithDefaults instantiates a new RestoreConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewRestoreConfigWithDefaults() *RestoreConfig {
this := RestoreConfig{}
return &this
}
// GetSourceUrl returns the SourceUrl field value
func (o *RestoreConfig) GetSourceUrl() string {
if o == nil {
var ret string
return ret
}
return o.SourceUrl
}
// GetSourceUrlOk returns a tuple with the SourceUrl field value
// and a boolean to check if the value has been set.
func (o *RestoreConfig) GetSourceUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.SourceUrl, true
}
// SetSourceUrl sets field value
func (o *RestoreConfig) SetSourceUrl(v string) {
o.SourceUrl = v
}
// GetPrefault returns the Prefault field value if set, zero value otherwise.
func (o *RestoreConfig) GetPrefault() bool {
if o == nil || o.Prefault == nil {
var ret bool
return ret
}
return *o.Prefault
}
// GetPrefaultOk returns a tuple with the Prefault field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RestoreConfig) GetPrefaultOk() (*bool, bool) {
if o == nil || o.Prefault == nil {
return nil, false
}
return o.Prefault, true
}
// HasPrefault returns a boolean if a field has been set.
func (o *RestoreConfig) HasPrefault() bool {
if o != nil && o.Prefault != nil {
return true
}
return false
}
// SetPrefault gets a reference to the given bool and assigns it to the Prefault field.
func (o *RestoreConfig) SetPrefault(v bool) {
o.Prefault = &v
}
func (o RestoreConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["source_url"] = o.SourceUrl
}
if o.Prefault != nil {
toSerialize["prefault"] = o.Prefault
}
return json.Marshal(toSerialize)
}
type NullableRestoreConfig struct {
value *RestoreConfig
isSet bool
}
func (v NullableRestoreConfig) Get() *RestoreConfig {
return v.value
}
func (v *NullableRestoreConfig) Set(val *RestoreConfig) {
v.value = val
v.isSet = true
}
func (v NullableRestoreConfig) IsSet() bool {
return v.isSet
}
func (v *NullableRestoreConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRestoreConfig(val *RestoreConfig) *NullableRestoreConfig {
return &NullableRestoreConfig{value: val, isSet: true}
}
func (v NullableRestoreConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRestoreConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,16 +1,148 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// RngConfig struct for RngConfig
type RngConfig struct {
Src string `json:"src"`
Iommu bool `json:"iommu,omitempty"`
Iommu *bool `json:"iommu,omitempty"`
}
// NewRngConfig instantiates a new RngConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewRngConfig(src string) *RngConfig {
this := RngConfig{}
this.Src = src
var iommu bool = false
this.Iommu = &iommu
return &this
}
// NewRngConfigWithDefaults instantiates a new RngConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewRngConfigWithDefaults() *RngConfig {
this := RngConfig{}
var src string = "/dev/urandom"
this.Src = src
var iommu bool = false
this.Iommu = &iommu
return &this
}
// GetSrc returns the Src field value
func (o *RngConfig) GetSrc() string {
if o == nil {
var ret string
return ret
}
return o.Src
}
// GetSrcOk returns a tuple with the Src field value
// and a boolean to check if the value has been set.
func (o *RngConfig) GetSrcOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Src, true
}
// SetSrc sets field value
func (o *RngConfig) SetSrc(v string) {
o.Src = v
}
// GetIommu returns the Iommu field value if set, zero value otherwise.
func (o *RngConfig) GetIommu() bool {
if o == nil || o.Iommu == nil {
var ret bool
return ret
}
return *o.Iommu
}
// GetIommuOk returns a tuple with the Iommu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RngConfig) GetIommuOk() (*bool, bool) {
if o == nil || o.Iommu == nil {
return nil, false
}
return o.Iommu, true
}
// HasIommu returns a boolean if a field has been set.
func (o *RngConfig) HasIommu() bool {
if o != nil && o.Iommu != nil {
return true
}
return false
}
// SetIommu gets a reference to the given bool and assigns it to the Iommu field.
func (o *RngConfig) SetIommu(v bool) {
o.Iommu = &v
}
func (o RngConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["src"] = o.Src
}
if o.Iommu != nil {
toSerialize["iommu"] = o.Iommu
}
return json.Marshal(toSerialize)
}
type NullableRngConfig struct {
value *RngConfig
isSet bool
}
func (v NullableRngConfig) Get() *RngConfig {
return v.value
}
func (v *NullableRngConfig) Set(val *RngConfig) {
v.value = val
v.isSet = true
}
func (v NullableRngConfig) IsSet() bool {
return v.isSet
}
func (v *NullableRngConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRngConfig(val *RngConfig) *NullableRngConfig {
return &NullableRngConfig{value: val, isSet: true}
}
func (v NullableRngConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRngConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,17 +1,175 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// SgxEpcConfig struct for SgxEpcConfig
type SgxEpcConfig struct {
Id string `json:"id"`
Size int64 `json:"size"`
Prefault bool `json:"prefault,omitempty"`
Prefault *bool `json:"prefault,omitempty"`
}
// NewSgxEpcConfig instantiates a new SgxEpcConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewSgxEpcConfig(id string, size int64) *SgxEpcConfig {
this := SgxEpcConfig{}
this.Id = id
this.Size = size
var prefault bool = false
this.Prefault = &prefault
return &this
}
// NewSgxEpcConfigWithDefaults instantiates a new SgxEpcConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewSgxEpcConfigWithDefaults() *SgxEpcConfig {
this := SgxEpcConfig{}
var prefault bool = false
this.Prefault = &prefault
return &this
}
// GetId returns the Id field value
func (o *SgxEpcConfig) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *SgxEpcConfig) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *SgxEpcConfig) SetId(v string) {
o.Id = v
}
// GetSize returns the Size field value
func (o *SgxEpcConfig) GetSize() int64 {
if o == nil {
var ret int64
return ret
}
return o.Size
}
// GetSizeOk returns a tuple with the Size field value
// and a boolean to check if the value has been set.
func (o *SgxEpcConfig) GetSizeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Size, true
}
// SetSize sets field value
func (o *SgxEpcConfig) SetSize(v int64) {
o.Size = v
}
// GetPrefault returns the Prefault field value if set, zero value otherwise.
func (o *SgxEpcConfig) GetPrefault() bool {
if o == nil || o.Prefault == nil {
var ret bool
return ret
}
return *o.Prefault
}
// GetPrefaultOk returns a tuple with the Prefault field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SgxEpcConfig) GetPrefaultOk() (*bool, bool) {
if o == nil || o.Prefault == nil {
return nil, false
}
return o.Prefault, true
}
// HasPrefault returns a boolean if a field has been set.
func (o *SgxEpcConfig) HasPrefault() bool {
if o != nil && o.Prefault != nil {
return true
}
return false
}
// SetPrefault gets a reference to the given bool and assigns it to the Prefault field.
func (o *SgxEpcConfig) SetPrefault(v bool) {
o.Prefault = &v
}
func (o SgxEpcConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["id"] = o.Id
}
if true {
toSerialize["size"] = o.Size
}
if o.Prefault != nil {
toSerialize["prefault"] = o.Prefault
}
return json.Marshal(toSerialize)
}
type NullableSgxEpcConfig struct {
value *SgxEpcConfig
isSet bool
}
func (v NullableSgxEpcConfig) Get() *SgxEpcConfig {
return v.value
}
func (v *NullableSgxEpcConfig) Set(val *SgxEpcConfig) {
v.value = val
v.isSet = true
}
func (v NullableSgxEpcConfig) IsSet() bool {
return v.isSet
}
func (v *NullableSgxEpcConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSgxEpcConfig(val *SgxEpcConfig) *NullableSgxEpcConfig {
return &NullableSgxEpcConfig{value: val, isSet: true}
}
func (v NullableSgxEpcConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSgxEpcConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,20 +1,174 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// TokenBucket Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.
type TokenBucket struct {
// The total number of tokens this bucket can hold.
Size int64 `json:"size"`
// The initial size of a token bucket.
OneTimeBurst int64 `json:"one_time_burst,omitempty"`
OneTimeBurst *int64 `json:"one_time_burst,omitempty"`
// The amount of milliseconds it takes for the bucket to refill.
RefillTime int64 `json:"refill_time"`
}
// NewTokenBucket instantiates a new TokenBucket object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewTokenBucket(size int64, refillTime int64) *TokenBucket {
this := TokenBucket{}
this.Size = size
this.RefillTime = refillTime
return &this
}
// NewTokenBucketWithDefaults instantiates a new TokenBucket object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewTokenBucketWithDefaults() *TokenBucket {
this := TokenBucket{}
return &this
}
// GetSize returns the Size field value
func (o *TokenBucket) GetSize() int64 {
if o == nil {
var ret int64
return ret
}
return o.Size
}
// GetSizeOk returns a tuple with the Size field value
// and a boolean to check if the value has been set.
func (o *TokenBucket) GetSizeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Size, true
}
// SetSize sets field value
func (o *TokenBucket) SetSize(v int64) {
o.Size = v
}
// GetOneTimeBurst returns the OneTimeBurst field value if set, zero value otherwise.
func (o *TokenBucket) GetOneTimeBurst() int64 {
if o == nil || o.OneTimeBurst == nil {
var ret int64
return ret
}
return *o.OneTimeBurst
}
// GetOneTimeBurstOk returns a tuple with the OneTimeBurst field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TokenBucket) GetOneTimeBurstOk() (*int64, bool) {
if o == nil || o.OneTimeBurst == nil {
return nil, false
}
return o.OneTimeBurst, true
}
// HasOneTimeBurst returns a boolean if a field has been set.
func (o *TokenBucket) HasOneTimeBurst() bool {
if o != nil && o.OneTimeBurst != nil {
return true
}
return false
}
// SetOneTimeBurst gets a reference to the given int64 and assigns it to the OneTimeBurst field.
func (o *TokenBucket) SetOneTimeBurst(v int64) {
o.OneTimeBurst = &v
}
// GetRefillTime returns the RefillTime field value
func (o *TokenBucket) GetRefillTime() int64 {
if o == nil {
var ret int64
return ret
}
return o.RefillTime
}
// GetRefillTimeOk returns a tuple with the RefillTime field value
// and a boolean to check if the value has been set.
func (o *TokenBucket) GetRefillTimeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.RefillTime, true
}
// SetRefillTime sets field value
func (o *TokenBucket) SetRefillTime(v int64) {
o.RefillTime = v
}
func (o TokenBucket) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["size"] = o.Size
}
if o.OneTimeBurst != nil {
toSerialize["one_time_burst"] = o.OneTimeBurst
}
if true {
toSerialize["refill_time"] = o.RefillTime
}
return json.Marshal(toSerialize)
}
type NullableTokenBucket struct {
value *TokenBucket
isSet bool
}
func (v NullableTokenBucket) Get() *TokenBucket {
return v.value
}
func (v *NullableTokenBucket) Set(val *TokenBucket) {
v.value = val
v.isSet = true
}
func (v NullableTokenBucket) IsSet() bool {
return v.isSet
}
func (v *NullableTokenBucket) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTokenBucket(val *TokenBucket) *NullableTokenBucket {
return &NullableTokenBucket{value: val, isSet: true}
}
func (v NullableTokenBucket) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTokenBucket) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,17 +1,189 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// VmAddDevice struct for VmAddDevice
type VmAddDevice struct {
Path string `json:"path,omitempty"`
Iommu bool `json:"iommu,omitempty"`
Id string `json:"id,omitempty"`
Path *string `json:"path,omitempty"`
Iommu *bool `json:"iommu,omitempty"`
Id *string `json:"id,omitempty"`
}
// NewVmAddDevice instantiates a new VmAddDevice object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewVmAddDevice() *VmAddDevice {
this := VmAddDevice{}
var iommu bool = false
this.Iommu = &iommu
return &this
}
// NewVmAddDeviceWithDefaults instantiates a new VmAddDevice object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewVmAddDeviceWithDefaults() *VmAddDevice {
this := VmAddDevice{}
var iommu bool = false
this.Iommu = &iommu
return &this
}
// GetPath returns the Path field value if set, zero value otherwise.
func (o *VmAddDevice) GetPath() string {
if o == nil || o.Path == nil {
var ret string
return ret
}
return *o.Path
}
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmAddDevice) GetPathOk() (*string, bool) {
if o == nil || o.Path == nil {
return nil, false
}
return o.Path, true
}
// HasPath returns a boolean if a field has been set.
func (o *VmAddDevice) HasPath() bool {
if o != nil && o.Path != nil {
return true
}
return false
}
// SetPath gets a reference to the given string and assigns it to the Path field.
func (o *VmAddDevice) SetPath(v string) {
o.Path = &v
}
// GetIommu returns the Iommu field value if set, zero value otherwise.
func (o *VmAddDevice) GetIommu() bool {
if o == nil || o.Iommu == nil {
var ret bool
return ret
}
return *o.Iommu
}
// GetIommuOk returns a tuple with the Iommu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmAddDevice) GetIommuOk() (*bool, bool) {
if o == nil || o.Iommu == nil {
return nil, false
}
return o.Iommu, true
}
// HasIommu returns a boolean if a field has been set.
func (o *VmAddDevice) HasIommu() bool {
if o != nil && o.Iommu != nil {
return true
}
return false
}
// SetIommu gets a reference to the given bool and assigns it to the Iommu field.
func (o *VmAddDevice) SetIommu(v bool) {
o.Iommu = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *VmAddDevice) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmAddDevice) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *VmAddDevice) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *VmAddDevice) SetId(v string) {
o.Id = &v
}
func (o VmAddDevice) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Path != nil {
toSerialize["path"] = o.Path
}
if o.Iommu != nil {
toSerialize["iommu"] = o.Iommu
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
return json.Marshal(toSerialize)
}
type NullableVmAddDevice struct {
value *VmAddDevice
isSet bool
}
func (v NullableVmAddDevice) Get() *VmAddDevice {
return v.value
}
func (v *NullableVmAddDevice) Set(val *VmAddDevice) {
v.value = val
v.isSet = true
}
func (v NullableVmAddDevice) IsSet() bool {
return v.isSet
}
func (v *NullableVmAddDevice) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVmAddDevice(val *VmAddDevice) *NullableVmAddDevice {
return &NullableVmAddDevice{value: val, isSet: true}
}
func (v NullableVmAddDevice) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVmAddDevice) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,33 +1,773 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// VmConfig Virtual machine configuration
type VmConfig struct {
Cpus CpusConfig `json:"cpus,omitempty"`
Memory MemoryConfig `json:"memory,omitempty"`
Kernel KernelConfig `json:"kernel"`
Initramfs *InitramfsConfig `json:"initramfs,omitempty"`
Cmdline CmdLineConfig `json:"cmdline,omitempty"`
Disks []DiskConfig `json:"disks,omitempty"`
Net []NetConfig `json:"net,omitempty"`
Rng RngConfig `json:"rng,omitempty"`
Balloon BalloonConfig `json:"balloon,omitempty"`
Fs []FsConfig `json:"fs,omitempty"`
Pmem []PmemConfig `json:"pmem,omitempty"`
Serial ConsoleConfig `json:"serial,omitempty"`
Console ConsoleConfig `json:"console,omitempty"`
Devices []DeviceConfig `json:"devices,omitempty"`
Vsock VsockConfig `json:"vsock,omitempty"`
SgxEpc []SgxEpcConfig `json:"sgx_epc,omitempty"`
Numa []NumaConfig `json:"numa,omitempty"`
Iommu bool `json:"iommu,omitempty"`
Watchdog bool `json:"watchdog,omitempty"`
Cpus *CpusConfig `json:"cpus,omitempty"`
Memory *MemoryConfig `json:"memory,omitempty"`
Kernel KernelConfig `json:"kernel"`
Initramfs NullableInitramfsConfig `json:"initramfs,omitempty"`
Cmdline *CmdLineConfig `json:"cmdline,omitempty"`
Disks *[]DiskConfig `json:"disks,omitempty"`
Net *[]NetConfig `json:"net,omitempty"`
Rng *RngConfig `json:"rng,omitempty"`
Balloon *BalloonConfig `json:"balloon,omitempty"`
Fs *[]FsConfig `json:"fs,omitempty"`
Pmem *[]PmemConfig `json:"pmem,omitempty"`
Serial *ConsoleConfig `json:"serial,omitempty"`
Console *ConsoleConfig `json:"console,omitempty"`
Devices *[]DeviceConfig `json:"devices,omitempty"`
Vsock *VsockConfig `json:"vsock,omitempty"`
SgxEpc *[]SgxEpcConfig `json:"sgx_epc,omitempty"`
Numa *[]NumaConfig `json:"numa,omitempty"`
Iommu *bool `json:"iommu,omitempty"`
Watchdog *bool `json:"watchdog,omitempty"`
}
// NewVmConfig instantiates a new VmConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewVmConfig(kernel KernelConfig) *VmConfig {
this := VmConfig{}
this.Kernel = kernel
var iommu bool = false
this.Iommu = &iommu
var watchdog bool = false
this.Watchdog = &watchdog
return &this
}
// NewVmConfigWithDefaults instantiates a new VmConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewVmConfigWithDefaults() *VmConfig {
this := VmConfig{}
var iommu bool = false
this.Iommu = &iommu
var watchdog bool = false
this.Watchdog = &watchdog
return &this
}
// GetCpus returns the Cpus field value if set, zero value otherwise.
func (o *VmConfig) GetCpus() CpusConfig {
if o == nil || o.Cpus == nil {
var ret CpusConfig
return ret
}
return *o.Cpus
}
// GetCpusOk returns a tuple with the Cpus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetCpusOk() (*CpusConfig, bool) {
if o == nil || o.Cpus == nil {
return nil, false
}
return o.Cpus, true
}
// HasCpus returns a boolean if a field has been set.
func (o *VmConfig) HasCpus() bool {
if o != nil && o.Cpus != nil {
return true
}
return false
}
// SetCpus gets a reference to the given CpusConfig and assigns it to the Cpus field.
func (o *VmConfig) SetCpus(v CpusConfig) {
o.Cpus = &v
}
// GetMemory returns the Memory field value if set, zero value otherwise.
func (o *VmConfig) GetMemory() MemoryConfig {
if o == nil || o.Memory == nil {
var ret MemoryConfig
return ret
}
return *o.Memory
}
// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetMemoryOk() (*MemoryConfig, bool) {
if o == nil || o.Memory == nil {
return nil, false
}
return o.Memory, true
}
// HasMemory returns a boolean if a field has been set.
func (o *VmConfig) HasMemory() bool {
if o != nil && o.Memory != nil {
return true
}
return false
}
// SetMemory gets a reference to the given MemoryConfig and assigns it to the Memory field.
func (o *VmConfig) SetMemory(v MemoryConfig) {
o.Memory = &v
}
// GetKernel returns the Kernel field value
func (o *VmConfig) GetKernel() KernelConfig {
if o == nil {
var ret KernelConfig
return ret
}
return o.Kernel
}
// GetKernelOk returns a tuple with the Kernel field value
// and a boolean to check if the value has been set.
func (o *VmConfig) GetKernelOk() (*KernelConfig, bool) {
if o == nil {
return nil, false
}
return &o.Kernel, true
}
// SetKernel sets field value
func (o *VmConfig) SetKernel(v KernelConfig) {
o.Kernel = v
}
// GetInitramfs returns the Initramfs field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *VmConfig) GetInitramfs() InitramfsConfig {
if o == nil || o.Initramfs.Get() == nil {
var ret InitramfsConfig
return ret
}
return *o.Initramfs.Get()
}
// GetInitramfsOk returns a tuple with the Initramfs field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *VmConfig) GetInitramfsOk() (*InitramfsConfig, bool) {
if o == nil {
return nil, false
}
return o.Initramfs.Get(), o.Initramfs.IsSet()
}
// HasInitramfs returns a boolean if a field has been set.
func (o *VmConfig) HasInitramfs() bool {
if o != nil && o.Initramfs.IsSet() {
return true
}
return false
}
// SetInitramfs gets a reference to the given NullableInitramfsConfig and assigns it to the Initramfs field.
func (o *VmConfig) SetInitramfs(v InitramfsConfig) {
o.Initramfs.Set(&v)
}
// SetInitramfsNil sets the value for Initramfs to be an explicit nil
func (o *VmConfig) SetInitramfsNil() {
o.Initramfs.Set(nil)
}
// UnsetInitramfs ensures that no value is present for Initramfs, not even an explicit nil
func (o *VmConfig) UnsetInitramfs() {
o.Initramfs.Unset()
}
// GetCmdline returns the Cmdline field value if set, zero value otherwise.
func (o *VmConfig) GetCmdline() CmdLineConfig {
if o == nil || o.Cmdline == nil {
var ret CmdLineConfig
return ret
}
return *o.Cmdline
}
// GetCmdlineOk returns a tuple with the Cmdline field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetCmdlineOk() (*CmdLineConfig, bool) {
if o == nil || o.Cmdline == nil {
return nil, false
}
return o.Cmdline, true
}
// HasCmdline returns a boolean if a field has been set.
func (o *VmConfig) HasCmdline() bool {
if o != nil && o.Cmdline != nil {
return true
}
return false
}
// SetCmdline gets a reference to the given CmdLineConfig and assigns it to the Cmdline field.
func (o *VmConfig) SetCmdline(v CmdLineConfig) {
o.Cmdline = &v
}
// GetDisks returns the Disks field value if set, zero value otherwise.
func (o *VmConfig) GetDisks() []DiskConfig {
if o == nil || o.Disks == nil {
var ret []DiskConfig
return ret
}
return *o.Disks
}
// GetDisksOk returns a tuple with the Disks field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetDisksOk() (*[]DiskConfig, bool) {
if o == nil || o.Disks == nil {
return nil, false
}
return o.Disks, true
}
// HasDisks returns a boolean if a field has been set.
func (o *VmConfig) HasDisks() bool {
if o != nil && o.Disks != nil {
return true
}
return false
}
// SetDisks gets a reference to the given []DiskConfig and assigns it to the Disks field.
func (o *VmConfig) SetDisks(v []DiskConfig) {
o.Disks = &v
}
// GetNet returns the Net field value if set, zero value otherwise.
func (o *VmConfig) GetNet() []NetConfig {
if o == nil || o.Net == nil {
var ret []NetConfig
return ret
}
return *o.Net
}
// GetNetOk returns a tuple with the Net field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetNetOk() (*[]NetConfig, bool) {
if o == nil || o.Net == nil {
return nil, false
}
return o.Net, true
}
// HasNet returns a boolean if a field has been set.
func (o *VmConfig) HasNet() bool {
if o != nil && o.Net != nil {
return true
}
return false
}
// SetNet gets a reference to the given []NetConfig and assigns it to the Net field.
func (o *VmConfig) SetNet(v []NetConfig) {
o.Net = &v
}
// GetRng returns the Rng field value if set, zero value otherwise.
func (o *VmConfig) GetRng() RngConfig {
if o == nil || o.Rng == nil {
var ret RngConfig
return ret
}
return *o.Rng
}
// GetRngOk returns a tuple with the Rng field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetRngOk() (*RngConfig, bool) {
if o == nil || o.Rng == nil {
return nil, false
}
return o.Rng, true
}
// HasRng returns a boolean if a field has been set.
func (o *VmConfig) HasRng() bool {
if o != nil && o.Rng != nil {
return true
}
return false
}
// SetRng gets a reference to the given RngConfig and assigns it to the Rng field.
func (o *VmConfig) SetRng(v RngConfig) {
o.Rng = &v
}
// GetBalloon returns the Balloon field value if set, zero value otherwise.
func (o *VmConfig) GetBalloon() BalloonConfig {
if o == nil || o.Balloon == nil {
var ret BalloonConfig
return ret
}
return *o.Balloon
}
// GetBalloonOk returns a tuple with the Balloon field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetBalloonOk() (*BalloonConfig, bool) {
if o == nil || o.Balloon == nil {
return nil, false
}
return o.Balloon, true
}
// HasBalloon returns a boolean if a field has been set.
func (o *VmConfig) HasBalloon() bool {
if o != nil && o.Balloon != nil {
return true
}
return false
}
// SetBalloon gets a reference to the given BalloonConfig and assigns it to the Balloon field.
func (o *VmConfig) SetBalloon(v BalloonConfig) {
o.Balloon = &v
}
// GetFs returns the Fs field value if set, zero value otherwise.
func (o *VmConfig) GetFs() []FsConfig {
if o == nil || o.Fs == nil {
var ret []FsConfig
return ret
}
return *o.Fs
}
// GetFsOk returns a tuple with the Fs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetFsOk() (*[]FsConfig, bool) {
if o == nil || o.Fs == nil {
return nil, false
}
return o.Fs, true
}
// HasFs returns a boolean if a field has been set.
func (o *VmConfig) HasFs() bool {
if o != nil && o.Fs != nil {
return true
}
return false
}
// SetFs gets a reference to the given []FsConfig and assigns it to the Fs field.
func (o *VmConfig) SetFs(v []FsConfig) {
o.Fs = &v
}
// GetPmem returns the Pmem field value if set, zero value otherwise.
func (o *VmConfig) GetPmem() []PmemConfig {
if o == nil || o.Pmem == nil {
var ret []PmemConfig
return ret
}
return *o.Pmem
}
// GetPmemOk returns a tuple with the Pmem field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetPmemOk() (*[]PmemConfig, bool) {
if o == nil || o.Pmem == nil {
return nil, false
}
return o.Pmem, true
}
// HasPmem returns a boolean if a field has been set.
func (o *VmConfig) HasPmem() bool {
if o != nil && o.Pmem != nil {
return true
}
return false
}
// SetPmem gets a reference to the given []PmemConfig and assigns it to the Pmem field.
func (o *VmConfig) SetPmem(v []PmemConfig) {
o.Pmem = &v
}
// GetSerial returns the Serial field value if set, zero value otherwise.
func (o *VmConfig) GetSerial() ConsoleConfig {
if o == nil || o.Serial == nil {
var ret ConsoleConfig
return ret
}
return *o.Serial
}
// GetSerialOk returns a tuple with the Serial field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetSerialOk() (*ConsoleConfig, bool) {
if o == nil || o.Serial == nil {
return nil, false
}
return o.Serial, true
}
// HasSerial returns a boolean if a field has been set.
func (o *VmConfig) HasSerial() bool {
if o != nil && o.Serial != nil {
return true
}
return false
}
// SetSerial gets a reference to the given ConsoleConfig and assigns it to the Serial field.
func (o *VmConfig) SetSerial(v ConsoleConfig) {
o.Serial = &v
}
// GetConsole returns the Console field value if set, zero value otherwise.
func (o *VmConfig) GetConsole() ConsoleConfig {
if o == nil || o.Console == nil {
var ret ConsoleConfig
return ret
}
return *o.Console
}
// GetConsoleOk returns a tuple with the Console field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetConsoleOk() (*ConsoleConfig, bool) {
if o == nil || o.Console == nil {
return nil, false
}
return o.Console, true
}
// HasConsole returns a boolean if a field has been set.
func (o *VmConfig) HasConsole() bool {
if o != nil && o.Console != nil {
return true
}
return false
}
// SetConsole gets a reference to the given ConsoleConfig and assigns it to the Console field.
func (o *VmConfig) SetConsole(v ConsoleConfig) {
o.Console = &v
}
// GetDevices returns the Devices field value if set, zero value otherwise.
func (o *VmConfig) GetDevices() []DeviceConfig {
if o == nil || o.Devices == nil {
var ret []DeviceConfig
return ret
}
return *o.Devices
}
// GetDevicesOk returns a tuple with the Devices field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetDevicesOk() (*[]DeviceConfig, bool) {
if o == nil || o.Devices == nil {
return nil, false
}
return o.Devices, true
}
// HasDevices returns a boolean if a field has been set.
func (o *VmConfig) HasDevices() bool {
if o != nil && o.Devices != nil {
return true
}
return false
}
// SetDevices gets a reference to the given []DeviceConfig and assigns it to the Devices field.
func (o *VmConfig) SetDevices(v []DeviceConfig) {
o.Devices = &v
}
// GetVsock returns the Vsock field value if set, zero value otherwise.
func (o *VmConfig) GetVsock() VsockConfig {
if o == nil || o.Vsock == nil {
var ret VsockConfig
return ret
}
return *o.Vsock
}
// GetVsockOk returns a tuple with the Vsock field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetVsockOk() (*VsockConfig, bool) {
if o == nil || o.Vsock == nil {
return nil, false
}
return o.Vsock, true
}
// HasVsock returns a boolean if a field has been set.
func (o *VmConfig) HasVsock() bool {
if o != nil && o.Vsock != nil {
return true
}
return false
}
// SetVsock gets a reference to the given VsockConfig and assigns it to the Vsock field.
func (o *VmConfig) SetVsock(v VsockConfig) {
o.Vsock = &v
}
// GetSgxEpc returns the SgxEpc field value if set, zero value otherwise.
func (o *VmConfig) GetSgxEpc() []SgxEpcConfig {
if o == nil || o.SgxEpc == nil {
var ret []SgxEpcConfig
return ret
}
return *o.SgxEpc
}
// GetSgxEpcOk returns a tuple with the SgxEpc field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetSgxEpcOk() (*[]SgxEpcConfig, bool) {
if o == nil || o.SgxEpc == nil {
return nil, false
}
return o.SgxEpc, true
}
// HasSgxEpc returns a boolean if a field has been set.
func (o *VmConfig) HasSgxEpc() bool {
if o != nil && o.SgxEpc != nil {
return true
}
return false
}
// SetSgxEpc gets a reference to the given []SgxEpcConfig and assigns it to the SgxEpc field.
func (o *VmConfig) SetSgxEpc(v []SgxEpcConfig) {
o.SgxEpc = &v
}
// GetNuma returns the Numa field value if set, zero value otherwise.
func (o *VmConfig) GetNuma() []NumaConfig {
if o == nil || o.Numa == nil {
var ret []NumaConfig
return ret
}
return *o.Numa
}
// GetNumaOk returns a tuple with the Numa field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetNumaOk() (*[]NumaConfig, bool) {
if o == nil || o.Numa == nil {
return nil, false
}
return o.Numa, true
}
// HasNuma returns a boolean if a field has been set.
func (o *VmConfig) HasNuma() bool {
if o != nil && o.Numa != nil {
return true
}
return false
}
// SetNuma gets a reference to the given []NumaConfig and assigns it to the Numa field.
func (o *VmConfig) SetNuma(v []NumaConfig) {
o.Numa = &v
}
// GetIommu returns the Iommu field value if set, zero value otherwise.
func (o *VmConfig) GetIommu() bool {
if o == nil || o.Iommu == nil {
var ret bool
return ret
}
return *o.Iommu
}
// GetIommuOk returns a tuple with the Iommu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetIommuOk() (*bool, bool) {
if o == nil || o.Iommu == nil {
return nil, false
}
return o.Iommu, true
}
// HasIommu returns a boolean if a field has been set.
func (o *VmConfig) HasIommu() bool {
if o != nil && o.Iommu != nil {
return true
}
return false
}
// SetIommu gets a reference to the given bool and assigns it to the Iommu field.
func (o *VmConfig) SetIommu(v bool) {
o.Iommu = &v
}
// GetWatchdog returns the Watchdog field value if set, zero value otherwise.
func (o *VmConfig) GetWatchdog() bool {
if o == nil || o.Watchdog == nil {
var ret bool
return ret
}
return *o.Watchdog
}
// GetWatchdogOk returns a tuple with the Watchdog field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetWatchdogOk() (*bool, bool) {
if o == nil || o.Watchdog == nil {
return nil, false
}
return o.Watchdog, true
}
// HasWatchdog returns a boolean if a field has been set.
func (o *VmConfig) HasWatchdog() bool {
if o != nil && o.Watchdog != nil {
return true
}
return false
}
// SetWatchdog gets a reference to the given bool and assigns it to the Watchdog field.
func (o *VmConfig) SetWatchdog(v bool) {
o.Watchdog = &v
}
func (o VmConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Cpus != nil {
toSerialize["cpus"] = o.Cpus
}
if o.Memory != nil {
toSerialize["memory"] = o.Memory
}
if true {
toSerialize["kernel"] = o.Kernel
}
if o.Initramfs.IsSet() {
toSerialize["initramfs"] = o.Initramfs.Get()
}
if o.Cmdline != nil {
toSerialize["cmdline"] = o.Cmdline
}
if o.Disks != nil {
toSerialize["disks"] = o.Disks
}
if o.Net != nil {
toSerialize["net"] = o.Net
}
if o.Rng != nil {
toSerialize["rng"] = o.Rng
}
if o.Balloon != nil {
toSerialize["balloon"] = o.Balloon
}
if o.Fs != nil {
toSerialize["fs"] = o.Fs
}
if o.Pmem != nil {
toSerialize["pmem"] = o.Pmem
}
if o.Serial != nil {
toSerialize["serial"] = o.Serial
}
if o.Console != nil {
toSerialize["console"] = o.Console
}
if o.Devices != nil {
toSerialize["devices"] = o.Devices
}
if o.Vsock != nil {
toSerialize["vsock"] = o.Vsock
}
if o.SgxEpc != nil {
toSerialize["sgx_epc"] = o.SgxEpc
}
if o.Numa != nil {
toSerialize["numa"] = o.Numa
}
if o.Iommu != nil {
toSerialize["iommu"] = o.Iommu
}
if o.Watchdog != nil {
toSerialize["watchdog"] = o.Watchdog
}
return json.Marshal(toSerialize)
}
type NullableVmConfig struct {
value *VmConfig
isSet bool
}
func (v NullableVmConfig) Get() *VmConfig {
return v.value
}
func (v *NullableVmConfig) Set(val *VmConfig) {
v.value = val
v.isSet = true
}
func (v NullableVmConfig) IsSet() bool {
return v.isSet
}
func (v *NullableVmConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVmConfig(val *VmConfig) *NullableVmConfig {
return &NullableVmConfig{value: val, isSet: true}
}
func (v NullableVmConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVmConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,18 +1,207 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// VmInfo Virtual Machine information
type VmInfo struct {
Config VmConfig `json:"config"`
State string `json:"state"`
MemoryActualSize int64 `json:"memory_actual_size,omitempty"`
DeviceTree map[string]DeviceNode `json:"device_tree,omitempty"`
Config VmConfig `json:"config"`
State string `json:"state"`
MemoryActualSize *int64 `json:"memory_actual_size,omitempty"`
DeviceTree *map[string]DeviceNode `json:"device_tree,omitempty"`
}
// NewVmInfo instantiates a new VmInfo object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewVmInfo(config VmConfig, state string) *VmInfo {
this := VmInfo{}
this.Config = config
this.State = state
return &this
}
// NewVmInfoWithDefaults instantiates a new VmInfo object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewVmInfoWithDefaults() *VmInfo {
this := VmInfo{}
return &this
}
// GetConfig returns the Config field value
func (o *VmInfo) GetConfig() VmConfig {
if o == nil {
var ret VmConfig
return ret
}
return o.Config
}
// GetConfigOk returns a tuple with the Config field value
// and a boolean to check if the value has been set.
func (o *VmInfo) GetConfigOk() (*VmConfig, bool) {
if o == nil {
return nil, false
}
return &o.Config, true
}
// SetConfig sets field value
func (o *VmInfo) SetConfig(v VmConfig) {
o.Config = v
}
// GetState returns the State field value
func (o *VmInfo) GetState() string {
if o == nil {
var ret string
return ret
}
return o.State
}
// GetStateOk returns a tuple with the State field value
// and a boolean to check if the value has been set.
func (o *VmInfo) GetStateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.State, true
}
// SetState sets field value
func (o *VmInfo) SetState(v string) {
o.State = v
}
// GetMemoryActualSize returns the MemoryActualSize field value if set, zero value otherwise.
func (o *VmInfo) GetMemoryActualSize() int64 {
if o == nil || o.MemoryActualSize == nil {
var ret int64
return ret
}
return *o.MemoryActualSize
}
// GetMemoryActualSizeOk returns a tuple with the MemoryActualSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmInfo) GetMemoryActualSizeOk() (*int64, bool) {
if o == nil || o.MemoryActualSize == nil {
return nil, false
}
return o.MemoryActualSize, true
}
// HasMemoryActualSize returns a boolean if a field has been set.
func (o *VmInfo) HasMemoryActualSize() bool {
if o != nil && o.MemoryActualSize != nil {
return true
}
return false
}
// SetMemoryActualSize gets a reference to the given int64 and assigns it to the MemoryActualSize field.
func (o *VmInfo) SetMemoryActualSize(v int64) {
o.MemoryActualSize = &v
}
// GetDeviceTree returns the DeviceTree field value if set, zero value otherwise.
func (o *VmInfo) GetDeviceTree() map[string]DeviceNode {
if o == nil || o.DeviceTree == nil {
var ret map[string]DeviceNode
return ret
}
return *o.DeviceTree
}
// GetDeviceTreeOk returns a tuple with the DeviceTree field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmInfo) GetDeviceTreeOk() (*map[string]DeviceNode, bool) {
if o == nil || o.DeviceTree == nil {
return nil, false
}
return o.DeviceTree, true
}
// HasDeviceTree returns a boolean if a field has been set.
func (o *VmInfo) HasDeviceTree() bool {
if o != nil && o.DeviceTree != nil {
return true
}
return false
}
// SetDeviceTree gets a reference to the given map[string]DeviceNode and assigns it to the DeviceTree field.
func (o *VmInfo) SetDeviceTree(v map[string]DeviceNode) {
o.DeviceTree = &v
}
func (o VmInfo) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["config"] = o.Config
}
if true {
toSerialize["state"] = o.State
}
if o.MemoryActualSize != nil {
toSerialize["memory_actual_size"] = o.MemoryActualSize
}
if o.DeviceTree != nil {
toSerialize["device_tree"] = o.DeviceTree
}
return json.Marshal(toSerialize)
}
type NullableVmInfo struct {
value *VmInfo
isSet bool
}
func (v NullableVmInfo) Get() *VmInfo {
return v.value
}
func (v *NullableVmInfo) Set(val *VmInfo) {
v.value = val
v.isSet = true
}
func (v NullableVmInfo) IsSet() bool {
return v.isSet
}
func (v *NullableVmInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVmInfo(val *VmInfo) *NullableVmInfo {
return &NullableVmInfo{value: val, isSet: true}
}
func (v NullableVmInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVmInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,15 +1,113 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// VmRemoveDevice struct for VmRemoveDevice
type VmRemoveDevice struct {
Id string `json:"id,omitempty"`
Id *string `json:"id,omitempty"`
}
// NewVmRemoveDevice instantiates a new VmRemoveDevice object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewVmRemoveDevice() *VmRemoveDevice {
this := VmRemoveDevice{}
return &this
}
// NewVmRemoveDeviceWithDefaults instantiates a new VmRemoveDevice object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewVmRemoveDeviceWithDefaults() *VmRemoveDevice {
this := VmRemoveDevice{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *VmRemoveDevice) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmRemoveDevice) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *VmRemoveDevice) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *VmRemoveDevice) SetId(v string) {
o.Id = &v
}
func (o VmRemoveDevice) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
return json.Marshal(toSerialize)
}
type NullableVmRemoveDevice struct {
value *VmRemoveDevice
isSet bool
}
func (v NullableVmRemoveDevice) Get() *VmRemoveDevice {
return v.value
}
func (v *NullableVmRemoveDevice) Set(val *VmRemoveDevice) {
v.value = val
v.isSet = true
}
func (v NullableVmRemoveDevice) IsSet() bool {
return v.isSet
}
func (v *NullableVmRemoveDevice) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVmRemoveDevice(val *VmRemoveDevice) *NullableVmRemoveDevice {
return &NullableVmRemoveDevice{value: val, isSet: true}
}
func (v NullableVmRemoveDevice) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVmRemoveDevice) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,19 +1,187 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// VmResize struct for VmResize
type VmResize struct {
DesiredVcpus int32 `json:"desired_vcpus,omitempty"`
DesiredVcpus *int32 `json:"desired_vcpus,omitempty"`
// desired memory ram in bytes
DesiredRam int64 `json:"desired_ram,omitempty"`
DesiredRam *int64 `json:"desired_ram,omitempty"`
// desired balloon size in bytes
DesiredBalloon int64 `json:"desired_balloon,omitempty"`
DesiredBalloon *int64 `json:"desired_balloon,omitempty"`
}
// NewVmResize instantiates a new VmResize object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewVmResize() *VmResize {
this := VmResize{}
return &this
}
// NewVmResizeWithDefaults instantiates a new VmResize object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewVmResizeWithDefaults() *VmResize {
this := VmResize{}
return &this
}
// GetDesiredVcpus returns the DesiredVcpus field value if set, zero value otherwise.
func (o *VmResize) GetDesiredVcpus() int32 {
if o == nil || o.DesiredVcpus == nil {
var ret int32
return ret
}
return *o.DesiredVcpus
}
// GetDesiredVcpusOk returns a tuple with the DesiredVcpus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmResize) GetDesiredVcpusOk() (*int32, bool) {
if o == nil || o.DesiredVcpus == nil {
return nil, false
}
return o.DesiredVcpus, true
}
// HasDesiredVcpus returns a boolean if a field has been set.
func (o *VmResize) HasDesiredVcpus() bool {
if o != nil && o.DesiredVcpus != nil {
return true
}
return false
}
// SetDesiredVcpus gets a reference to the given int32 and assigns it to the DesiredVcpus field.
func (o *VmResize) SetDesiredVcpus(v int32) {
o.DesiredVcpus = &v
}
// GetDesiredRam returns the DesiredRam field value if set, zero value otherwise.
func (o *VmResize) GetDesiredRam() int64 {
if o == nil || o.DesiredRam == nil {
var ret int64
return ret
}
return *o.DesiredRam
}
// GetDesiredRamOk returns a tuple with the DesiredRam field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmResize) GetDesiredRamOk() (*int64, bool) {
if o == nil || o.DesiredRam == nil {
return nil, false
}
return o.DesiredRam, true
}
// HasDesiredRam returns a boolean if a field has been set.
func (o *VmResize) HasDesiredRam() bool {
if o != nil && o.DesiredRam != nil {
return true
}
return false
}
// SetDesiredRam gets a reference to the given int64 and assigns it to the DesiredRam field.
func (o *VmResize) SetDesiredRam(v int64) {
o.DesiredRam = &v
}
// GetDesiredBalloon returns the DesiredBalloon field value if set, zero value otherwise.
func (o *VmResize) GetDesiredBalloon() int64 {
if o == nil || o.DesiredBalloon == nil {
var ret int64
return ret
}
return *o.DesiredBalloon
}
// GetDesiredBalloonOk returns a tuple with the DesiredBalloon field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmResize) GetDesiredBalloonOk() (*int64, bool) {
if o == nil || o.DesiredBalloon == nil {
return nil, false
}
return o.DesiredBalloon, true
}
// HasDesiredBalloon returns a boolean if a field has been set.
func (o *VmResize) HasDesiredBalloon() bool {
if o != nil && o.DesiredBalloon != nil {
return true
}
return false
}
// SetDesiredBalloon gets a reference to the given int64 and assigns it to the DesiredBalloon field.
func (o *VmResize) SetDesiredBalloon(v int64) {
o.DesiredBalloon = &v
}
func (o VmResize) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.DesiredVcpus != nil {
toSerialize["desired_vcpus"] = o.DesiredVcpus
}
if o.DesiredRam != nil {
toSerialize["desired_ram"] = o.DesiredRam
}
if o.DesiredBalloon != nil {
toSerialize["desired_balloon"] = o.DesiredBalloon
}
return json.Marshal(toSerialize)
}
type NullableVmResize struct {
value *VmResize
isSet bool
}
func (v NullableVmResize) Get() *VmResize {
return v.value
}
func (v *NullableVmResize) Set(val *VmResize) {
v.value = val
v.isSet = true
}
func (v NullableVmResize) IsSet() bool {
return v.isSet
}
func (v *NullableVmResize) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVmResize(val *VmResize) *NullableVmResize {
return &NullableVmResize{value: val, isSet: true}
}
func (v NullableVmResize) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVmResize) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,17 +1,150 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// VmResizeZone struct for VmResizeZone
type VmResizeZone struct {
Id string `json:"id,omitempty"`
Id *string `json:"id,omitempty"`
// desired memory zone size in bytes
DesiredRam int64 `json:"desired_ram,omitempty"`
DesiredRam *int64 `json:"desired_ram,omitempty"`
}
// NewVmResizeZone instantiates a new VmResizeZone object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewVmResizeZone() *VmResizeZone {
this := VmResizeZone{}
return &this
}
// NewVmResizeZoneWithDefaults instantiates a new VmResizeZone object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewVmResizeZoneWithDefaults() *VmResizeZone {
this := VmResizeZone{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *VmResizeZone) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmResizeZone) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *VmResizeZone) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *VmResizeZone) SetId(v string) {
o.Id = &v
}
// GetDesiredRam returns the DesiredRam field value if set, zero value otherwise.
func (o *VmResizeZone) GetDesiredRam() int64 {
if o == nil || o.DesiredRam == nil {
var ret int64
return ret
}
return *o.DesiredRam
}
// GetDesiredRamOk returns a tuple with the DesiredRam field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmResizeZone) GetDesiredRamOk() (*int64, bool) {
if o == nil || o.DesiredRam == nil {
return nil, false
}
return o.DesiredRam, true
}
// HasDesiredRam returns a boolean if a field has been set.
func (o *VmResizeZone) HasDesiredRam() bool {
if o != nil && o.DesiredRam != nil {
return true
}
return false
}
// SetDesiredRam gets a reference to the given int64 and assigns it to the DesiredRam field.
func (o *VmResizeZone) SetDesiredRam(v int64) {
o.DesiredRam = &v
}
func (o VmResizeZone) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.DesiredRam != nil {
toSerialize["desired_ram"] = o.DesiredRam
}
return json.Marshal(toSerialize)
}
type NullableVmResizeZone struct {
value *VmResizeZone
isSet bool
}
func (v NullableVmResizeZone) Get() *VmResizeZone {
return v.value
}
func (v *NullableVmResizeZone) Set(val *VmResizeZone) {
v.value = val
v.isSet = true
}
func (v NullableVmResizeZone) IsSet() bool {
return v.isSet
}
func (v *NullableVmResizeZone) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVmResizeZone(val *VmResizeZone) *NullableVmResizeZone {
return &NullableVmResizeZone{value: val, isSet: true}
}
func (v NullableVmResizeZone) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVmResizeZone) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,15 +1,113 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// VmSnapshotConfig struct for VmSnapshotConfig
type VmSnapshotConfig struct {
DestinationUrl string `json:"destination_url,omitempty"`
DestinationUrl *string `json:"destination_url,omitempty"`
}
// NewVmSnapshotConfig instantiates a new VmSnapshotConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewVmSnapshotConfig() *VmSnapshotConfig {
this := VmSnapshotConfig{}
return &this
}
// NewVmSnapshotConfigWithDefaults instantiates a new VmSnapshotConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewVmSnapshotConfigWithDefaults() *VmSnapshotConfig {
this := VmSnapshotConfig{}
return &this
}
// GetDestinationUrl returns the DestinationUrl field value if set, zero value otherwise.
func (o *VmSnapshotConfig) GetDestinationUrl() string {
if o == nil || o.DestinationUrl == nil {
var ret string
return ret
}
return *o.DestinationUrl
}
// GetDestinationUrlOk returns a tuple with the DestinationUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmSnapshotConfig) GetDestinationUrlOk() (*string, bool) {
if o == nil || o.DestinationUrl == nil {
return nil, false
}
return o.DestinationUrl, true
}
// HasDestinationUrl returns a boolean if a field has been set.
func (o *VmSnapshotConfig) HasDestinationUrl() bool {
if o != nil && o.DestinationUrl != nil {
return true
}
return false
}
// SetDestinationUrl gets a reference to the given string and assigns it to the DestinationUrl field.
func (o *VmSnapshotConfig) SetDestinationUrl(v string) {
o.DestinationUrl = &v
}
func (o VmSnapshotConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.DestinationUrl != nil {
toSerialize["destination_url"] = o.DestinationUrl
}
return json.Marshal(toSerialize)
}
type NullableVmSnapshotConfig struct {
value *VmSnapshotConfig
isSet bool
}
func (v NullableVmSnapshotConfig) Get() *VmSnapshotConfig {
return v.value
}
func (v *NullableVmSnapshotConfig) Set(val *VmSnapshotConfig) {
v.value = val
v.isSet = true
}
func (v NullableVmSnapshotConfig) IsSet() bool {
return v.isSet
}
func (v *NullableVmSnapshotConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVmSnapshotConfig(val *VmSnapshotConfig) *NullableVmSnapshotConfig {
return &NullableVmSnapshotConfig{value: val, isSet: true}
}
func (v NullableVmSnapshotConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVmSnapshotConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,15 +1,106 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// VmmPingResponse Virtual Machine Monitor information
type VmmPingResponse struct {
Version string `json:"version"`
}
// NewVmmPingResponse instantiates a new VmmPingResponse object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewVmmPingResponse(version string) *VmmPingResponse {
this := VmmPingResponse{}
this.Version = version
return &this
}
// NewVmmPingResponseWithDefaults instantiates a new VmmPingResponse object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewVmmPingResponseWithDefaults() *VmmPingResponse {
this := VmmPingResponse{}
return &this
}
// GetVersion returns the Version field value
func (o *VmmPingResponse) GetVersion() string {
if o == nil {
var ret string
return ret
}
return o.Version
}
// GetVersionOk returns a tuple with the Version field value
// and a boolean to check if the value has been set.
func (o *VmmPingResponse) GetVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Version, true
}
// SetVersion sets field value
func (o *VmmPingResponse) SetVersion(v string) {
o.Version = v
}
func (o VmmPingResponse) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["version"] = o.Version
}
return json.Marshal(toSerialize)
}
type NullableVmmPingResponse struct {
value *VmmPingResponse
isSet bool
}
func (v NullableVmmPingResponse) Get() *VmmPingResponse {
return v.value
}
func (v *NullableVmmPingResponse) Set(val *VmmPingResponse) {
v.value = val
v.isSet = true
}
func (v NullableVmmPingResponse) IsSet() bool {
return v.isSet
}
func (v *NullableVmmPingResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVmmPingResponse(val *VmmPingResponse) *NullableVmmPingResponse {
return &NullableVmmPingResponse{value: val, isSet: true}
}
func (v NullableVmmPingResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVmmPingResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,20 +1,213 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// VsockConfig struct for VsockConfig
type VsockConfig struct {
// Guest Vsock CID
Cid int64 `json:"cid"`
// Path to UNIX domain socket, used to proxy vsock connections.
Socket string `json:"socket"`
Iommu bool `json:"iommu,omitempty"`
Id string `json:"id,omitempty"`
Socket string `json:"socket"`
Iommu *bool `json:"iommu,omitempty"`
Id *string `json:"id,omitempty"`
}
// NewVsockConfig instantiates a new VsockConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewVsockConfig(cid int64, socket string) *VsockConfig {
this := VsockConfig{}
this.Cid = cid
this.Socket = socket
var iommu bool = false
this.Iommu = &iommu
return &this
}
// NewVsockConfigWithDefaults instantiates a new VsockConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewVsockConfigWithDefaults() *VsockConfig {
this := VsockConfig{}
var iommu bool = false
this.Iommu = &iommu
return &this
}
// GetCid returns the Cid field value
func (o *VsockConfig) GetCid() int64 {
if o == nil {
var ret int64
return ret
}
return o.Cid
}
// GetCidOk returns a tuple with the Cid field value
// and a boolean to check if the value has been set.
func (o *VsockConfig) GetCidOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Cid, true
}
// SetCid sets field value
func (o *VsockConfig) SetCid(v int64) {
o.Cid = v
}
// GetSocket returns the Socket field value
func (o *VsockConfig) GetSocket() string {
if o == nil {
var ret string
return ret
}
return o.Socket
}
// GetSocketOk returns a tuple with the Socket field value
// and a boolean to check if the value has been set.
func (o *VsockConfig) GetSocketOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Socket, true
}
// SetSocket sets field value
func (o *VsockConfig) SetSocket(v string) {
o.Socket = v
}
// GetIommu returns the Iommu field value if set, zero value otherwise.
func (o *VsockConfig) GetIommu() bool {
if o == nil || o.Iommu == nil {
var ret bool
return ret
}
return *o.Iommu
}
// GetIommuOk returns a tuple with the Iommu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VsockConfig) GetIommuOk() (*bool, bool) {
if o == nil || o.Iommu == nil {
return nil, false
}
return o.Iommu, true
}
// HasIommu returns a boolean if a field has been set.
func (o *VsockConfig) HasIommu() bool {
if o != nil && o.Iommu != nil {
return true
}
return false
}
// SetIommu gets a reference to the given bool and assigns it to the Iommu field.
func (o *VsockConfig) SetIommu(v bool) {
o.Iommu = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *VsockConfig) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VsockConfig) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *VsockConfig) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *VsockConfig) SetId(v string) {
o.Id = &v
}
func (o VsockConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["cid"] = o.Cid
}
if true {
toSerialize["socket"] = o.Socket
}
if o.Iommu != nil {
toSerialize["iommu"] = o.Iommu
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
return json.Marshal(toSerialize)
}
type NullableVsockConfig struct {
value *VsockConfig
isSet bool
}
func (v NullableVsockConfig) Get() *VsockConfig {
return v.value
}
func (v *NullableVsockConfig) Set(val *VsockConfig) {
v.value = val
v.isSet = true
}
func (v NullableVsockConfig) IsSet() bool {
return v.isSet
}
func (v *NullableVsockConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVsockConfig(val *VsockConfig) *NullableVsockConfig {
return &NullableVsockConfig{value: val, isSet: true}
}
func (v NullableVsockConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVsockConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,11 +1,12 @@
/*
* Cloud Hypervisor API
*
* Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
*
* API version: 0.3.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
@ -31,7 +32,7 @@ type APIResponse struct {
Payload []byte `json:"-"`
}
// NewAPIResponse returns a new APIResonse object.
// NewAPIResponse returns a new APIResponse object.
func NewAPIResponse(r *http.Response) *APIResponse {
response := &APIResponse{Response: r}

View File

@ -0,0 +1,328 @@
/*
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
"time"
)
// PtrBool is a helper routine that returns a pointer to given boolean value.
func PtrBool(v bool) *bool { return &v }
// PtrInt is a helper routine that returns a pointer to given integer value.
func PtrInt(v int) *int { return &v }
// PtrInt32 is a helper routine that returns a pointer to given integer value.
func PtrInt32(v int32) *int32 { return &v }
// PtrInt64 is a helper routine that returns a pointer to given integer value.
func PtrInt64(v int64) *int64 { return &v }
// PtrFloat32 is a helper routine that returns a pointer to given float value.
func PtrFloat32(v float32) *float32 { return &v }
// PtrFloat64 is a helper routine that returns a pointer to given float value.
func PtrFloat64(v float64) *float64 { return &v }
// PtrString is a helper routine that returns a pointer to given string value.
func PtrString(v string) *string { return &v }
// PtrTime is helper routine that returns a pointer to given Time value.
func PtrTime(v time.Time) *time.Time { return &v }
type NullableBool struct {
value *bool
isSet bool
}
func (v NullableBool) Get() *bool {
return v.value
}
func (v *NullableBool) Set(val *bool) {
v.value = val
v.isSet = true
}
func (v NullableBool) IsSet() bool {
return v.isSet
}
func (v *NullableBool) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBool(val *bool) *NullableBool {
return &NullableBool{value: val, isSet: true}
}
func (v NullableBool) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBool) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableInt struct {
value *int
isSet bool
}
func (v NullableInt) Get() *int {
return v.value
}
func (v *NullableInt) Set(val *int) {
v.value = val
v.isSet = true
}
func (v NullableInt) IsSet() bool {
return v.isSet
}
func (v *NullableInt) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInt(val *int) *NullableInt {
return &NullableInt{value: val, isSet: true}
}
func (v NullableInt) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInt) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableInt32 struct {
value *int32
isSet bool
}
func (v NullableInt32) Get() *int32 {
return v.value
}
func (v *NullableInt32) Set(val *int32) {
v.value = val
v.isSet = true
}
func (v NullableInt32) IsSet() bool {
return v.isSet
}
func (v *NullableInt32) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInt32(val *int32) *NullableInt32 {
return &NullableInt32{value: val, isSet: true}
}
func (v NullableInt32) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInt32) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableInt64 struct {
value *int64
isSet bool
}
func (v NullableInt64) Get() *int64 {
return v.value
}
func (v *NullableInt64) Set(val *int64) {
v.value = val
v.isSet = true
}
func (v NullableInt64) IsSet() bool {
return v.isSet
}
func (v *NullableInt64) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInt64(val *int64) *NullableInt64 {
return &NullableInt64{value: val, isSet: true}
}
func (v NullableInt64) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInt64) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableFloat32 struct {
value *float32
isSet bool
}
func (v NullableFloat32) Get() *float32 {
return v.value
}
func (v *NullableFloat32) Set(val *float32) {
v.value = val
v.isSet = true
}
func (v NullableFloat32) IsSet() bool {
return v.isSet
}
func (v *NullableFloat32) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFloat32(val *float32) *NullableFloat32 {
return &NullableFloat32{value: val, isSet: true}
}
func (v NullableFloat32) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFloat32) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableFloat64 struct {
value *float64
isSet bool
}
func (v NullableFloat64) Get() *float64 {
return v.value
}
func (v *NullableFloat64) Set(val *float64) {
v.value = val
v.isSet = true
}
func (v NullableFloat64) IsSet() bool {
return v.isSet
}
func (v *NullableFloat64) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFloat64(val *float64) *NullableFloat64 {
return &NullableFloat64{value: val, isSet: true}
}
func (v NullableFloat64) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFloat64) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableString struct {
value *string
isSet bool
}
func (v NullableString) Get() *string {
return v.value
}
func (v *NullableString) Set(val *string) {
v.value = val
v.isSet = true
}
func (v NullableString) IsSet() bool {
return v.isSet
}
func (v *NullableString) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableString(val *string) *NullableString {
return &NullableString{value: val, isSet: true}
}
func (v NullableString) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableString) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableTime struct {
value *time.Time
isSet bool
}
func (v NullableTime) Get() *time.Time {
return v.value
}
func (v *NullableTime) Set(val *time.Time) {
v.value = val
v.isSet = true
}
func (v NullableTime) IsSet() bool {
return v.isSet
}
func (v *NullableTime) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTime(val *time.Time) *NullableTime {
return &NullableTime{value: val, isSet: true}
}
func (v NullableTime) MarshalJSON() ([]byte, error) {
return v.value.MarshalJSON()
}
func (v *NullableTime) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}