chore: initial push to be able to work together
This commit is contained in:
parent
81e8d48cf6
commit
30070d8470
263 changed files with 45437 additions and 2 deletions
115
pkg/sqlserverflexalpha/model_instance_network_access_scope.go
Normal file
115
pkg/sqlserverflexalpha/model_instance_network_access_scope.go
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
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"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// InstanceNetworkAccessScope The network access scope of the instance ⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.
|
||||
type InstanceNetworkAccessScope string
|
||||
|
||||
// List of instance.network.accessScope
|
||||
const (
|
||||
INSTANCENETWORKACCESSSCOPE_PUBLIC InstanceNetworkAccessScope = "PUBLIC"
|
||||
INSTANCENETWORKACCESSSCOPE_SNA InstanceNetworkAccessScope = "SNA"
|
||||
)
|
||||
|
||||
// All allowed values of InstanceNetworkAccessScope enum
|
||||
var AllowedInstanceNetworkAccessScopeEnumValues = []InstanceNetworkAccessScope{
|
||||
"PUBLIC",
|
||||
"SNA",
|
||||
}
|
||||
|
||||
func (v *InstanceNetworkAccessScope) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Allow unmarshalling zero value for testing purposes
|
||||
var zeroValue string
|
||||
if value == zeroValue {
|
||||
return nil
|
||||
}
|
||||
enumTypeValue := InstanceNetworkAccessScope(value)
|
||||
for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid InstanceNetworkAccessScope", value)
|
||||
}
|
||||
|
||||
// NewInstanceNetworkAccessScopeFromValue returns a pointer to a valid InstanceNetworkAccessScope
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewInstanceNetworkAccessScopeFromValue(v string) (*InstanceNetworkAccessScope, error) {
|
||||
ev := InstanceNetworkAccessScope(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for InstanceNetworkAccessScope: valid values are %v", v, AllowedInstanceNetworkAccessScopeEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v InstanceNetworkAccessScope) IsValid() bool {
|
||||
for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to instance.network.accessScope value
|
||||
func (v InstanceNetworkAccessScope) Ptr() *InstanceNetworkAccessScope {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableInstanceNetworkAccessScope struct {
|
||||
value *InstanceNetworkAccessScope
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstanceNetworkAccessScope) Get() *InstanceNetworkAccessScope {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstanceNetworkAccessScope) Set(val *InstanceNetworkAccessScope) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstanceNetworkAccessScope) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstanceNetworkAccessScope) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstanceNetworkAccessScope(val *InstanceNetworkAccessScope) *NullableInstanceNetworkAccessScope {
|
||||
return &NullableInstanceNetworkAccessScope{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstanceNetworkAccessScope) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstanceNetworkAccessScope) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue