Files
odo/pkg/apiserver-gen/go/model__devstate_container_post_request.go
Philippe Martin edf0bf38d4 [ui] Create/Delete volumes (#7029)
* [api/devstate] Add volumes to Devfile content

* Add Volume related endpoints to API

* Create/Delete volumes from the Volumes Tab

* Update UI static files

* API Devstate returns VolumeMounts

* Display volume mounts in containers

* [api] Add VolumeMounts to containers

* [ui] Define container's volume mounts

* [ui] e2e  tests

* Update UI static files

* [ui] create volumes from container / exec command creation

* Update UI static files

* Update container display

* Update UI static files

* Regenerate UI static files
2023-08-21 13:32:55 -02:30

63 lines
1.9 KiB
Go
Generated

/*
* odo dev
*
* API interface for 'odo dev'
*
* API version: 0.1
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package openapi
type DevstateContainerPostRequest struct {
// Name of the container
Name string `json:"name,omitempty"`
// Container image
Image string `json:"image,omitempty"`
// Entrypoint of the container
Command []string `json:"command,omitempty"`
// Args passed to the Container entrypoint
Args []string `json:"args,omitempty"`
// Requested memory for the deployed container
MemReq string `json:"memReq,omitempty"`
// Memory limit for the deployed container
MemLimit string `json:"memLimit,omitempty"`
// Requested CPU for the deployed container
CpuReq string `json:"cpuReq,omitempty"`
// CPU limit for the deployed container
CpuLimit string `json:"cpuLimit,omitempty"`
// Volume to mount into the container filesystem
VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"`
}
// AssertDevstateContainerPostRequestRequired checks if the required fields are not zero-ed
func AssertDevstateContainerPostRequestRequired(obj DevstateContainerPostRequest) error {
for _, el := range obj.VolumeMounts {
if err := AssertVolumeMountRequired(el); err != nil {
return err
}
}
return nil
}
// AssertRecurseDevstateContainerPostRequestRequired recursively checks if required fields are not zero-ed in a nested slice.
// Accepts only nested slice of DevstateContainerPostRequest (e.g. [][]DevstateContainerPostRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDevstateContainerPostRequestRequired(objSlice interface{}) error {
return AssertRecurseInterfaceRequired(objSlice, func(obj interface{}) error {
aDevstateContainerPostRequest, ok := obj.(DevstateContainerPostRequest)
if !ok {
return ErrTypeAssertionError
}
return AssertDevstateContainerPostRequestRequired(aDevstateContainerPostRequest)
})
}