Files
runtime/libs/api-client-go/model_create_docker_registry.go
zeekay ea80dc3638 feat: Add new Dockerfiles and improve containerization
- Add main Dockerfile for production builds
- Add Dockerfile.runtime for secure code execution
- Add Dockerfile.runtime.fixed with improved configuration
- Include .dockerignore for build optimization
- Add integration documentation and publishing guides
- Update API and CLI components for better runtime support
- Enhance sandbox and container management features
2025-08-16 23:03:39 -05:00

337 lines
8.0 KiB
Go
Generated

/*
Runtime
Runtime AI platform API Docs
API version: 1.0
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package apiclient
import (
"bytes"
"encoding/json"
"fmt"
)
// checks if the CreateDockerRegistry type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateDockerRegistry{}
// CreateDockerRegistry struct for CreateDockerRegistry
type CreateDockerRegistry struct {
// Registry name
Name string `json:"name"`
// Registry URL
Url string `json:"url"`
// Registry username
Username string `json:"username"`
// Registry password
Password string `json:"password"`
// Registry project
Project string `json:"project"`
// Registry type
RegistryType string `json:"registryType"`
// Set as default registry
IsDefault bool `json:"isDefault"`
}
type _CreateDockerRegistry CreateDockerRegistry
// NewCreateDockerRegistry instantiates a new CreateDockerRegistry 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 NewCreateDockerRegistry(name string, url string, username string, password string, project string, registryType string, isDefault bool) *CreateDockerRegistry {
this := CreateDockerRegistry{}
this.Name = name
this.Url = url
this.Username = username
this.Password = password
this.Project = project
this.RegistryType = registryType
this.IsDefault = isDefault
return &this
}
// NewCreateDockerRegistryWithDefaults instantiates a new CreateDockerRegistry 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 NewCreateDockerRegistryWithDefaults() *CreateDockerRegistry {
this := CreateDockerRegistry{}
var registryType string = "internal"
this.RegistryType = registryType
var isDefault bool = false
this.IsDefault = isDefault
return &this
}
// GetName returns the Name field value
func (o *CreateDockerRegistry) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *CreateDockerRegistry) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *CreateDockerRegistry) SetName(v string) {
o.Name = v
}
// GetUrl returns the Url field value
func (o *CreateDockerRegistry) GetUrl() string {
if o == nil {
var ret string
return ret
}
return o.Url
}
// GetUrlOk returns a tuple with the Url field value
// and a boolean to check if the value has been set.
func (o *CreateDockerRegistry) GetUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Url, true
}
// SetUrl sets field value
func (o *CreateDockerRegistry) SetUrl(v string) {
o.Url = v
}
// GetUsername returns the Username field value
func (o *CreateDockerRegistry) GetUsername() string {
if o == nil {
var ret string
return ret
}
return o.Username
}
// GetUsernameOk returns a tuple with the Username field value
// and a boolean to check if the value has been set.
func (o *CreateDockerRegistry) GetUsernameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Username, true
}
// SetUsername sets field value
func (o *CreateDockerRegistry) SetUsername(v string) {
o.Username = v
}
// GetPassword returns the Password field value
func (o *CreateDockerRegistry) GetPassword() string {
if o == nil {
var ret string
return ret
}
return o.Password
}
// GetPasswordOk returns a tuple with the Password field value
// and a boolean to check if the value has been set.
func (o *CreateDockerRegistry) GetPasswordOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Password, true
}
// SetPassword sets field value
func (o *CreateDockerRegistry) SetPassword(v string) {
o.Password = v
}
// GetProject returns the Project field value
func (o *CreateDockerRegistry) GetProject() string {
if o == nil {
var ret string
return ret
}
return o.Project
}
// GetProjectOk returns a tuple with the Project field value
// and a boolean to check if the value has been set.
func (o *CreateDockerRegistry) GetProjectOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Project, true
}
// SetProject sets field value
func (o *CreateDockerRegistry) SetProject(v string) {
o.Project = v
}
// GetRegistryType returns the RegistryType field value
func (o *CreateDockerRegistry) GetRegistryType() string {
if o == nil {
var ret string
return ret
}
return o.RegistryType
}
// GetRegistryTypeOk returns a tuple with the RegistryType field value
// and a boolean to check if the value has been set.
func (o *CreateDockerRegistry) GetRegistryTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.RegistryType, true
}
// SetRegistryType sets field value
func (o *CreateDockerRegistry) SetRegistryType(v string) {
o.RegistryType = v
}
// GetIsDefault returns the IsDefault field value
func (o *CreateDockerRegistry) GetIsDefault() bool {
if o == nil {
var ret bool
return ret
}
return o.IsDefault
}
// GetIsDefaultOk returns a tuple with the IsDefault field value
// and a boolean to check if the value has been set.
func (o *CreateDockerRegistry) GetIsDefaultOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.IsDefault, true
}
// SetIsDefault sets field value
func (o *CreateDockerRegistry) SetIsDefault(v bool) {
o.IsDefault = v
}
func (o CreateDockerRegistry) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateDockerRegistry) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
toSerialize["url"] = o.Url
toSerialize["username"] = o.Username
toSerialize["password"] = o.Password
toSerialize["project"] = o.Project
toSerialize["registryType"] = o.RegistryType
toSerialize["isDefault"] = o.IsDefault
return toSerialize, nil
}
func (o *CreateDockerRegistry) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"name",
"url",
"username",
"password",
"project",
"registryType",
"isDefault",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err
}
for _, requiredProperty := range requiredProperties {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varCreateDockerRegistry := _CreateDockerRegistry{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varCreateDockerRegistry)
if err != nil {
return err
}
*o = CreateDockerRegistry(varCreateDockerRegistry)
return err
}
type NullableCreateDockerRegistry struct {
value *CreateDockerRegistry
isSet bool
}
func (v NullableCreateDockerRegistry) Get() *CreateDockerRegistry {
return v.value
}
func (v *NullableCreateDockerRegistry) Set(val *CreateDockerRegistry) {
v.value = val
v.isSet = true
}
func (v NullableCreateDockerRegistry) IsSet() bool {
return v.isSet
}
func (v *NullableCreateDockerRegistry) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateDockerRegistry(val *CreateDockerRegistry) *NullableCreateDockerRegistry {
return &NullableCreateDockerRegistry{value: val, isSet: true}
}
func (v NullableCreateDockerRegistry) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateDockerRegistry) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}