first version
This commit is contained in:
297
model_install_check_database_req.go
Normal file
297
model_install_check_database_req.go
Normal file
@@ -0,0 +1,297 @@
|
||||
/*
|
||||
answer
|
||||
|
||||
answer api
|
||||
|
||||
API version: v0.0.1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the InstallCheckDatabaseReq type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &InstallCheckDatabaseReq{}
|
||||
|
||||
// InstallCheckDatabaseReq struct for InstallCheckDatabaseReq
|
||||
type InstallCheckDatabaseReq struct {
|
||||
DbFile *string `json:"db_file,omitempty"`
|
||||
DbHost *string `json:"db_host,omitempty"`
|
||||
DbName *string `json:"db_name,omitempty"`
|
||||
DbPassword *string `json:"db_password,omitempty"`
|
||||
DbType string `json:"db_type"`
|
||||
DbUsername *string `json:"db_username,omitempty"`
|
||||
}
|
||||
|
||||
// NewInstallCheckDatabaseReq instantiates a new InstallCheckDatabaseReq 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 NewInstallCheckDatabaseReq(dbType string) *InstallCheckDatabaseReq {
|
||||
this := InstallCheckDatabaseReq{}
|
||||
this.DbType = dbType
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInstallCheckDatabaseReqWithDefaults instantiates a new InstallCheckDatabaseReq 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 NewInstallCheckDatabaseReqWithDefaults() *InstallCheckDatabaseReq {
|
||||
this := InstallCheckDatabaseReq{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDbFile returns the DbFile field value if set, zero value otherwise.
|
||||
func (o *InstallCheckDatabaseReq) GetDbFile() string {
|
||||
if o == nil || IsNil(o.DbFile) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.DbFile
|
||||
}
|
||||
|
||||
// GetDbFileOk returns a tuple with the DbFile field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstallCheckDatabaseReq) GetDbFileOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.DbFile) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DbFile, true
|
||||
}
|
||||
|
||||
// HasDbFile returns a boolean if a field has been set.
|
||||
func (o *InstallCheckDatabaseReq) HasDbFile() bool {
|
||||
if o != nil && !IsNil(o.DbFile) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDbFile gets a reference to the given string and assigns it to the DbFile field.
|
||||
func (o *InstallCheckDatabaseReq) SetDbFile(v string) {
|
||||
o.DbFile = &v
|
||||
}
|
||||
|
||||
// GetDbHost returns the DbHost field value if set, zero value otherwise.
|
||||
func (o *InstallCheckDatabaseReq) GetDbHost() string {
|
||||
if o == nil || IsNil(o.DbHost) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.DbHost
|
||||
}
|
||||
|
||||
// GetDbHostOk returns a tuple with the DbHost field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstallCheckDatabaseReq) GetDbHostOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.DbHost) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DbHost, true
|
||||
}
|
||||
|
||||
// HasDbHost returns a boolean if a field has been set.
|
||||
func (o *InstallCheckDatabaseReq) HasDbHost() bool {
|
||||
if o != nil && !IsNil(o.DbHost) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDbHost gets a reference to the given string and assigns it to the DbHost field.
|
||||
func (o *InstallCheckDatabaseReq) SetDbHost(v string) {
|
||||
o.DbHost = &v
|
||||
}
|
||||
|
||||
// GetDbName returns the DbName field value if set, zero value otherwise.
|
||||
func (o *InstallCheckDatabaseReq) GetDbName() string {
|
||||
if o == nil || IsNil(o.DbName) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.DbName
|
||||
}
|
||||
|
||||
// GetDbNameOk returns a tuple with the DbName field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstallCheckDatabaseReq) GetDbNameOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.DbName) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DbName, true
|
||||
}
|
||||
|
||||
// HasDbName returns a boolean if a field has been set.
|
||||
func (o *InstallCheckDatabaseReq) HasDbName() bool {
|
||||
if o != nil && !IsNil(o.DbName) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDbName gets a reference to the given string and assigns it to the DbName field.
|
||||
func (o *InstallCheckDatabaseReq) SetDbName(v string) {
|
||||
o.DbName = &v
|
||||
}
|
||||
|
||||
// GetDbPassword returns the DbPassword field value if set, zero value otherwise.
|
||||
func (o *InstallCheckDatabaseReq) GetDbPassword() string {
|
||||
if o == nil || IsNil(o.DbPassword) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.DbPassword
|
||||
}
|
||||
|
||||
// GetDbPasswordOk returns a tuple with the DbPassword field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstallCheckDatabaseReq) GetDbPasswordOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.DbPassword) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DbPassword, true
|
||||
}
|
||||
|
||||
// HasDbPassword returns a boolean if a field has been set.
|
||||
func (o *InstallCheckDatabaseReq) HasDbPassword() bool {
|
||||
if o != nil && !IsNil(o.DbPassword) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDbPassword gets a reference to the given string and assigns it to the DbPassword field.
|
||||
func (o *InstallCheckDatabaseReq) SetDbPassword(v string) {
|
||||
o.DbPassword = &v
|
||||
}
|
||||
|
||||
// GetDbType returns the DbType field value
|
||||
func (o *InstallCheckDatabaseReq) GetDbType() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.DbType
|
||||
}
|
||||
|
||||
// GetDbTypeOk returns a tuple with the DbType field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstallCheckDatabaseReq) GetDbTypeOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.DbType, true
|
||||
}
|
||||
|
||||
// SetDbType sets field value
|
||||
func (o *InstallCheckDatabaseReq) SetDbType(v string) {
|
||||
o.DbType = v
|
||||
}
|
||||
|
||||
// GetDbUsername returns the DbUsername field value if set, zero value otherwise.
|
||||
func (o *InstallCheckDatabaseReq) GetDbUsername() string {
|
||||
if o == nil || IsNil(o.DbUsername) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.DbUsername
|
||||
}
|
||||
|
||||
// GetDbUsernameOk returns a tuple with the DbUsername field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstallCheckDatabaseReq) GetDbUsernameOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.DbUsername) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DbUsername, true
|
||||
}
|
||||
|
||||
// HasDbUsername returns a boolean if a field has been set.
|
||||
func (o *InstallCheckDatabaseReq) HasDbUsername() bool {
|
||||
if o != nil && !IsNil(o.DbUsername) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDbUsername gets a reference to the given string and assigns it to the DbUsername field.
|
||||
func (o *InstallCheckDatabaseReq) SetDbUsername(v string) {
|
||||
o.DbUsername = &v
|
||||
}
|
||||
|
||||
func (o InstallCheckDatabaseReq) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o InstallCheckDatabaseReq) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.DbFile) {
|
||||
toSerialize["db_file"] = o.DbFile
|
||||
}
|
||||
if !IsNil(o.DbHost) {
|
||||
toSerialize["db_host"] = o.DbHost
|
||||
}
|
||||
if !IsNil(o.DbName) {
|
||||
toSerialize["db_name"] = o.DbName
|
||||
}
|
||||
if !IsNil(o.DbPassword) {
|
||||
toSerialize["db_password"] = o.DbPassword
|
||||
}
|
||||
toSerialize["db_type"] = o.DbType
|
||||
if !IsNil(o.DbUsername) {
|
||||
toSerialize["db_username"] = o.DbUsername
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableInstallCheckDatabaseReq struct {
|
||||
value *InstallCheckDatabaseReq
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstallCheckDatabaseReq) Get() *InstallCheckDatabaseReq {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstallCheckDatabaseReq) Set(val *InstallCheckDatabaseReq) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstallCheckDatabaseReq) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstallCheckDatabaseReq) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstallCheckDatabaseReq(val *InstallCheckDatabaseReq) *NullableInstallCheckDatabaseReq {
|
||||
return &NullableInstallCheckDatabaseReq{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstallCheckDatabaseReq) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstallCheckDatabaseReq) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user