terraform-provider-stackitp.../pkg/sqlserverflexalpha/model_validation_error.go
Marcel S. Henselin 2733834fc9
Some checks failed
CI Workflow / CI (push) Has been cancelled
CI Workflow / Check GoReleaser config (push) Has been cancelled
CI Workflow / Code coverage report (push) Has been cancelled
Alpha (#4)
* chore: initial push to be able to work together

* chore: add missing wait folder

* chore: add missing folders

* chore: cleanup alpha branch

* feat: mssql alpha instance (#2)

* fix: remove unused attribute types and functions from backup models

* fix: update API client references to use sqlserverflexalpha package

* fix: update package references to use sqlserverflexalpha and modify user data source model

* fix: add sqlserverflexalpha user data source to provider

* fix: add sqlserverflexalpha user resource and update related functionality

* chore: add stackit_sqlserverflexalpha_user resource and instance_id variable

* fix: refactor sqlserverflexalpha user resource and enhance schema with status and default_database

---------

Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>

* feat: add sqlserver instance

* chore: fixing tests

* chore: update docs

---------

Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
2025-12-19 11:37:53 +01:00

171 lines
5.2 KiB
Go

/*
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)
}