mirror of
https://github.com/openfaas/faas.git
synced 2025-06-08 08:25:03 +00:00
Convert the existing swagger2.0 file to a moden OpenAPI file. Add missing endpoitns and model definitions. Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
45 lines
1.1 KiB
Go
45 lines
1.1 KiB
Go
// This file is auto-generated, DO NOT EDIT.
|
|
//
|
|
// Source:
|
|
//
|
|
// Title: OpenFaaS API Gateway
|
|
// Version: 0.8.12
|
|
package models
|
|
|
|
import (
|
|
validation "github.com/go-ozzo/ozzo-validation/v4"
|
|
)
|
|
|
|
// FunctionResources is an object.
|
|
type FunctionResources struct {
|
|
// Cpu: The amount of cpu that is allocated for the function
|
|
Cpu string `json:"cpu,omitempty" mapstructure:"cpu,omitempty"`
|
|
// Memory: The amount of memory that is allocated for the function
|
|
Memory string `json:"memory,omitempty" mapstructure:"memory,omitempty"`
|
|
}
|
|
|
|
// Validate implements basic validation for this model
|
|
func (m FunctionResources) Validate() error {
|
|
return validation.Errors{}.Filter()
|
|
}
|
|
|
|
// GetCpu returns the Cpu property
|
|
func (m FunctionResources) GetCpu() string {
|
|
return m.Cpu
|
|
}
|
|
|
|
// SetCpu sets the Cpu property
|
|
func (m *FunctionResources) SetCpu(val string) {
|
|
m.Cpu = val
|
|
}
|
|
|
|
// GetMemory returns the Memory property
|
|
func (m FunctionResources) GetMemory() string {
|
|
return m.Memory
|
|
}
|
|
|
|
// SetMemory sets the Memory property
|
|
func (m *FunctionResources) SetMemory(val string) {
|
|
m.Memory = val
|
|
}
|