/* STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service API version: 3alpha1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package sqlserverflexalpha import ( "encoding/json" ) // checks if the ValidationError type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ValidationError{} /* types and functions for code */ // isInteger type ValidationErrorGetCodeAttributeType = *int64 type ValidationErrorGetCodeArgType = int64 type ValidationErrorGetCodeRetType = int64 func getValidationErrorGetCodeAttributeTypeOk(arg ValidationErrorGetCodeAttributeType) (ret ValidationErrorGetCodeRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setValidationErrorGetCodeAttributeType(arg *ValidationErrorGetCodeAttributeType, val ValidationErrorGetCodeRetType) { *arg = &val } /* types and functions for validation */ // isArray type ValidationErrorGetValidationAttributeType = *[]ValidationErrorValidationInner type ValidationErrorGetValidationArgType = []ValidationErrorValidationInner type ValidationErrorGetValidationRetType = []ValidationErrorValidationInner func getValidationErrorGetValidationAttributeTypeOk(arg ValidationErrorGetValidationAttributeType) (ret ValidationErrorGetValidationRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setValidationErrorGetValidationAttributeType(arg *ValidationErrorGetValidationAttributeType, val ValidationErrorGetValidationRetType) { *arg = &val } // ValidationError struct for ValidationError type ValidationError struct { // the http error should be always 422 for validationError // Can be cast to int32 without loss of precision. // REQUIRED Code ValidationErrorGetCodeAttributeType `json:"code" required:"true"` // errors for all fields where the error happened // REQUIRED Validation ValidationErrorGetValidationAttributeType `json:"validation" required:"true"` } type _ValidationError ValidationError // NewValidationError instantiates a new ValidationError 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 NewValidationError(code ValidationErrorGetCodeArgType, validation ValidationErrorGetValidationArgType) *ValidationError { this := ValidationError{} setValidationErrorGetCodeAttributeType(&this.Code, code) setValidationErrorGetValidationAttributeType(&this.Validation, validation) return &this } // NewValidationErrorWithDefaults instantiates a new ValidationError 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 NewValidationErrorWithDefaults() *ValidationError { this := ValidationError{} return &this } // GetCode returns the Code field value func (o *ValidationError) GetCode() (ret ValidationErrorGetCodeRetType) { ret, _ = o.GetCodeOk() return ret } // GetCodeOk returns a tuple with the Code field value // and a boolean to check if the value has been set. func (o *ValidationError) GetCodeOk() (ret ValidationErrorGetCodeRetType, ok bool) { return getValidationErrorGetCodeAttributeTypeOk(o.Code) } // SetCode sets field value func (o *ValidationError) SetCode(v ValidationErrorGetCodeRetType) { setValidationErrorGetCodeAttributeType(&o.Code, v) } // GetValidation returns the Validation field value func (o *ValidationError) GetValidation() (ret ValidationErrorGetValidationRetType) { ret, _ = o.GetValidationOk() return ret } // GetValidationOk returns a tuple with the Validation field value // and a boolean to check if the value has been set. func (o *ValidationError) GetValidationOk() (ret ValidationErrorGetValidationRetType, ok bool) { return getValidationErrorGetValidationAttributeTypeOk(o.Validation) } // SetValidation sets field value func (o *ValidationError) SetValidation(v ValidationErrorGetValidationRetType) { setValidationErrorGetValidationAttributeType(&o.Validation, v) } func (o ValidationError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getValidationErrorGetCodeAttributeTypeOk(o.Code); ok { toSerialize["Code"] = val } if val, ok := getValidationErrorGetValidationAttributeTypeOk(o.Validation); ok { toSerialize["Validation"] = val } return toSerialize, nil } type NullableValidationError struct { value *ValidationError isSet bool } func (v NullableValidationError) Get() *ValidationError { return v.value } func (v *NullableValidationError) Set(val *ValidationError) { v.value = val v.isSet = true } func (v NullableValidationError) IsSet() bool { return v.isSet } func (v *NullableValidationError) Unset() { v.value = nil v.isSet = false } func NewNullableValidationError(val *ValidationError) *NullableValidationError { return &NullableValidationError{value: val, isSet: true} } func (v NullableValidationError) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableValidationError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }