chore: work save
This commit is contained in:
parent
3e3f13d36d
commit
9752d63f7e
19 changed files with 1003 additions and 209 deletions
|
|
@ -37,6 +37,26 @@ func setConnectiongetEnabledAttributeType(arg *ConnectiongetEnabledAttributeType
|
|||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isContainer
|
||||
type ConnectionGetLabelsAttributeType = *map[string]string
|
||||
type ConnectionGetLabelsArgType = map[string]string
|
||||
type ConnectionGetLabelsRetType = map[string]string
|
||||
|
||||
func getConnectionGetLabelsAttributeTypeOk(arg ConnectionGetLabelsAttributeType) (ret ConnectionGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setConnectionGetLabelsAttributeType(arg *ConnectionGetLabelsAttributeType, val ConnectionGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for localSubnets
|
||||
*/
|
||||
|
|
@ -142,6 +162,8 @@ func setConnectionGetTunnel2AttributeType(arg *ConnectionGetTunnel2AttributeType
|
|||
type Connection struct {
|
||||
// This flag decides whether this connection should be enabled or disabled
|
||||
Enabled ConnectiongetEnabledAttributeType `json:"enabled,omitempty"`
|
||||
// Map of custom labels. Key and values must be max 63 chars, start/end with alphanumeric.
|
||||
Labels ConnectionGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// List of local subnets (IPv4 CIDR).
|
||||
// REQUIRED
|
||||
LocalSubnets ConnectionGetLocalSubnetsAttributeType `json:"localSubnets" required:"true"`
|
||||
|
|
@ -204,6 +226,29 @@ func (o *Connection) SetEnabled(v ConnectiongetEnabledRetType) {
|
|||
setConnectiongetEnabledAttributeType(&o.Enabled, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *Connection) GetLabels() (res ConnectionGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Connection) GetLabelsOk() (ret ConnectionGetLabelsRetType, ok bool) {
|
||||
return getConnectionGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *Connection) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
|
||||
func (o *Connection) SetLabels(v ConnectionGetLabelsRetType) {
|
||||
setConnectionGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetLocalSubnets returns the LocalSubnets field value
|
||||
func (o *Connection) GetLocalSubnets() (ret ConnectionGetLocalSubnetsRetType) {
|
||||
ret, _ = o.GetLocalSubnetsOk()
|
||||
|
|
@ -294,6 +339,9 @@ func (o Connection) ToMap() (map[string]interface{}, error) {
|
|||
if val, ok := getConnectiongetEnabledAttributeTypeOk(o.Enabled); ok {
|
||||
toSerialize["Enabled"] = val
|
||||
}
|
||||
if val, ok := getConnectionGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getConnectionGetLocalSubnetsAttributeTypeOk(o.LocalSubnets); ok {
|
||||
toSerialize["LocalSubnets"] = val
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue