faas/gateway/models/model_scale_service_request.go
Lucas Roesler 06ade37420 feat: refactor api spec to use OpenAPI and add missing spec
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>
2023-06-28 08:33:03 +01:00

49 lines
1.2 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"
)
// ScaleServiceRequest is an object.
type ScaleServiceRequest struct {
// Replicas: Number of replicas to scale to
Replicas int64 `json:"replicas" mapstructure:"replicas"`
// ServiceName: Name of deployed function
ServiceName string `json:"serviceName" mapstructure:"serviceName"`
}
// Validate implements basic validation for this model
func (m ScaleServiceRequest) Validate() error {
return validation.Errors{
"replicas": validation.Validate(
m.Replicas, validation.Min(int64(0)),
),
}.Filter()
}
// GetReplicas returns the Replicas property
func (m ScaleServiceRequest) GetReplicas() int64 {
return m.Replicas
}
// SetReplicas sets the Replicas property
func (m *ScaleServiceRequest) SetReplicas(val int64) {
m.Replicas = val
}
// GetServiceName returns the ServiceName property
func (m ScaleServiceRequest) GetServiceName() string {
return m.ServiceName
}
// SetServiceName sets the ServiceName property
func (m *ScaleServiceRequest) SetServiceName(val string) {
m.ServiceName = val
}