chore: work save
This commit is contained in:
parent
3e3f13d36d
commit
9752d63f7e
19 changed files with 1003 additions and 209 deletions
|
|
@ -354,6 +354,7 @@ type ApiGetVPNGatewayStatusRequest interface {
|
|||
}
|
||||
|
||||
type ApiListGatewayConnectionsRequest interface {
|
||||
LabelSelector(labelSelector map[string]string) ApiListGatewayConnectionsRequest
|
||||
Execute() (*ConnectionList, error)
|
||||
}
|
||||
|
||||
|
|
@ -1860,11 +1861,17 @@ func (a *APIClient) GetVPNGatewayStatusExecute(ctx context.Context, projectId st
|
|||
}
|
||||
|
||||
type ListGatewayConnectionsRequest struct {
|
||||
ctx context.Context
|
||||
apiService *DefaultApiService
|
||||
projectId string
|
||||
region Region
|
||||
gatewayName string
|
||||
ctx context.Context
|
||||
apiService *DefaultApiService
|
||||
projectId string
|
||||
region Region
|
||||
gatewayName string
|
||||
labelSelector *map[string]string
|
||||
}
|
||||
|
||||
func (r ListGatewayConnectionsRequest) LabelSelector(labelSelector map[string]string) ApiListGatewayConnectionsRequest {
|
||||
r.labelSelector = &labelSelector
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ListGatewayConnectionsRequest) Execute() (*ConnectionList, error) {
|
||||
|
|
@ -1893,6 +1900,9 @@ func (r ListGatewayConnectionsRequest) Execute() (*ConnectionList, error) {
|
|||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
if r.labelSelector != nil {
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "")
|
||||
}
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,26 @@ func setConnectionRequestgetEnabledAttributeType(arg *ConnectionRequestgetEnable
|
|||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isContainer
|
||||
type ConnectionRequestGetLabelsAttributeType = *map[string]string
|
||||
type ConnectionRequestGetLabelsArgType = map[string]string
|
||||
type ConnectionRequestGetLabelsRetType = map[string]string
|
||||
|
||||
func getConnectionRequestGetLabelsAttributeTypeOk(arg ConnectionRequestGetLabelsAttributeType) (ret ConnectionRequestGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setConnectionRequestGetLabelsAttributeType(arg *ConnectionRequestGetLabelsAttributeType, val ConnectionRequestGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for localSubnets
|
||||
*/
|
||||
|
|
@ -142,6 +162,8 @@ func setConnectionRequestGetTunnel2AttributeType(arg *ConnectionRequestGetTunnel
|
|||
type ConnectionRequest struct {
|
||||
// This flag decides whether this connection should be enabled or disabled
|
||||
Enabled ConnectionRequestgetEnabledAttributeType `json:"enabled,omitempty"`
|
||||
// Map of custom labels. Key and values must be max 63 chars, start/end with alphanumeric.
|
||||
Labels ConnectionRequestGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// List of local subnets (IPv4 CIDR).
|
||||
// REQUIRED
|
||||
LocalSubnets ConnectionRequestGetLocalSubnetsAttributeType `json:"localSubnets" required:"true"`
|
||||
|
|
@ -204,6 +226,29 @@ func (o *ConnectionRequest) SetEnabled(v ConnectionRequestgetEnabledRetType) {
|
|||
setConnectionRequestgetEnabledAttributeType(&o.Enabled, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *ConnectionRequest) GetLabels() (res ConnectionRequestGetLabelsRetType) {
|
||||
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 *ConnectionRequest) GetLabelsOk() (ret ConnectionRequestGetLabelsRetType, ok bool) {
|
||||
return getConnectionRequestGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *ConnectionRequest) 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 *ConnectionRequest) SetLabels(v ConnectionRequestGetLabelsRetType) {
|
||||
setConnectionRequestGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetLocalSubnets returns the LocalSubnets field value
|
||||
func (o *ConnectionRequest) GetLocalSubnets() (ret ConnectionRequestGetLocalSubnetsRetType) {
|
||||
ret, _ = o.GetLocalSubnetsOk()
|
||||
|
|
@ -294,6 +339,9 @@ func (o ConnectionRequest) ToMap() (map[string]interface{}, error) {
|
|||
if val, ok := getConnectionRequestgetEnabledAttributeTypeOk(o.Enabled); ok {
|
||||
toSerialize["Enabled"] = val
|
||||
}
|
||||
if val, ok := getConnectionRequestGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getConnectionRequestGetLocalSubnetsAttributeTypeOk(o.LocalSubnets); ok {
|
||||
toSerialize["LocalSubnets"] = val
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,26 @@ func setCreateGatewayConnectionPayloadgetEnabledAttributeType(arg *CreateGateway
|
|||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isContainer
|
||||
type CreateGatewayConnectionPayloadGetLabelsAttributeType = *map[string]string
|
||||
type CreateGatewayConnectionPayloadGetLabelsArgType = map[string]string
|
||||
type CreateGatewayConnectionPayloadGetLabelsRetType = map[string]string
|
||||
|
||||
func getCreateGatewayConnectionPayloadGetLabelsAttributeTypeOk(arg CreateGatewayConnectionPayloadGetLabelsAttributeType) (ret CreateGatewayConnectionPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateGatewayConnectionPayloadGetLabelsAttributeType(arg *CreateGatewayConnectionPayloadGetLabelsAttributeType, val CreateGatewayConnectionPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for localSubnets
|
||||
*/
|
||||
|
|
@ -142,6 +162,8 @@ func setCreateGatewayConnectionPayloadGetTunnel2AttributeType(arg *CreateGateway
|
|||
type CreateGatewayConnectionPayload struct {
|
||||
// This flag decides whether this connection should be enabled or disabled
|
||||
Enabled CreateGatewayConnectionPayloadgetEnabledAttributeType `json:"enabled,omitempty"`
|
||||
// Map of custom labels. Key and values must be max 63 chars, start/end with alphanumeric.
|
||||
Labels CreateGatewayConnectionPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// List of local subnets (IPv4 CIDR).
|
||||
// REQUIRED
|
||||
LocalSubnets CreateGatewayConnectionPayloadGetLocalSubnetsAttributeType `json:"localSubnets" required:"true"`
|
||||
|
|
@ -204,6 +226,29 @@ func (o *CreateGatewayConnectionPayload) SetEnabled(v CreateGatewayConnectionPay
|
|||
setCreateGatewayConnectionPayloadgetEnabledAttributeType(&o.Enabled, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateGatewayConnectionPayload) GetLabels() (res CreateGatewayConnectionPayloadGetLabelsRetType) {
|
||||
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 *CreateGatewayConnectionPayload) GetLabelsOk() (ret CreateGatewayConnectionPayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateGatewayConnectionPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateGatewayConnectionPayload) 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 *CreateGatewayConnectionPayload) SetLabels(v CreateGatewayConnectionPayloadGetLabelsRetType) {
|
||||
setCreateGatewayConnectionPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetLocalSubnets returns the LocalSubnets field value
|
||||
func (o *CreateGatewayConnectionPayload) GetLocalSubnets() (ret CreateGatewayConnectionPayloadGetLocalSubnetsRetType) {
|
||||
ret, _ = o.GetLocalSubnetsOk()
|
||||
|
|
@ -294,6 +339,9 @@ func (o CreateGatewayConnectionPayload) ToMap() (map[string]interface{}, error)
|
|||
if val, ok := getCreateGatewayConnectionPayloadgetEnabledAttributeTypeOk(o.Enabled); ok {
|
||||
toSerialize["Enabled"] = val
|
||||
}
|
||||
if val, ok := getCreateGatewayConnectionPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateGatewayConnectionPayloadGetLocalSubnetsAttributeTypeOk(o.LocalSubnets); ok {
|
||||
toSerialize["LocalSubnets"] = val
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,26 @@ func setUpdateGatewayConnectionPayloadgetEnabledAttributeType(arg *UpdateGateway
|
|||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isContainer
|
||||
type UpdateGatewayConnectionPayloadGetLabelsAttributeType = *map[string]string
|
||||
type UpdateGatewayConnectionPayloadGetLabelsArgType = map[string]string
|
||||
type UpdateGatewayConnectionPayloadGetLabelsRetType = map[string]string
|
||||
|
||||
func getUpdateGatewayConnectionPayloadGetLabelsAttributeTypeOk(arg UpdateGatewayConnectionPayloadGetLabelsAttributeType) (ret UpdateGatewayConnectionPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setUpdateGatewayConnectionPayloadGetLabelsAttributeType(arg *UpdateGatewayConnectionPayloadGetLabelsAttributeType, val UpdateGatewayConnectionPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for localSubnets
|
||||
*/
|
||||
|
|
@ -142,6 +162,8 @@ func setUpdateGatewayConnectionPayloadGetTunnel2AttributeType(arg *UpdateGateway
|
|||
type UpdateGatewayConnectionPayload struct {
|
||||
// This flag decides whether this connection should be enabled or disabled
|
||||
Enabled UpdateGatewayConnectionPayloadgetEnabledAttributeType `json:"enabled,omitempty"`
|
||||
// Map of custom labels. Key and values must be max 63 chars, start/end with alphanumeric.
|
||||
Labels UpdateGatewayConnectionPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// List of local subnets (IPv4 CIDR).
|
||||
// REQUIRED
|
||||
LocalSubnets UpdateGatewayConnectionPayloadGetLocalSubnetsAttributeType `json:"localSubnets" required:"true"`
|
||||
|
|
@ -204,6 +226,29 @@ func (o *UpdateGatewayConnectionPayload) SetEnabled(v UpdateGatewayConnectionPay
|
|||
setUpdateGatewayConnectionPayloadgetEnabledAttributeType(&o.Enabled, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *UpdateGatewayConnectionPayload) GetLabels() (res UpdateGatewayConnectionPayloadGetLabelsRetType) {
|
||||
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 *UpdateGatewayConnectionPayload) GetLabelsOk() (ret UpdateGatewayConnectionPayloadGetLabelsRetType, ok bool) {
|
||||
return getUpdateGatewayConnectionPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *UpdateGatewayConnectionPayload) 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 *UpdateGatewayConnectionPayload) SetLabels(v UpdateGatewayConnectionPayloadGetLabelsRetType) {
|
||||
setUpdateGatewayConnectionPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetLocalSubnets returns the LocalSubnets field value
|
||||
func (o *UpdateGatewayConnectionPayload) GetLocalSubnets() (ret UpdateGatewayConnectionPayloadGetLocalSubnetsRetType) {
|
||||
ret, _ = o.GetLocalSubnetsOk()
|
||||
|
|
@ -294,6 +339,9 @@ func (o UpdateGatewayConnectionPayload) ToMap() (map[string]interface{}, error)
|
|||
if val, ok := getUpdateGatewayConnectionPayloadgetEnabledAttributeTypeOk(o.Enabled); ok {
|
||||
toSerialize["Enabled"] = val
|
||||
}
|
||||
if val, ok := getUpdateGatewayConnectionPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getUpdateGatewayConnectionPayloadGetLocalSubnetsAttributeTypeOk(o.LocalSubnets); ok {
|
||||
toSerialize["LocalSubnets"] = val
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue