From 9bab54b8ef20714bfc42831a81184301bf4e9d0d Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Thu, 26 Nov 2026 17:10:47 +0000 Subject: [PATCH] Generate ufw --- services/ufw/oas_commit | 2 +- services/ufw/v1api/model_rule_response.go | 79 ++++++++---- .../v1api/model_rule_response_sync_status.go | 113 ++++++++++++++++++ 3 files changed, 172 insertions(+), 22 deletions(-) create mode 100644 services/ufw/v1api/model_rule_response_sync_status.go diff --git a/services/ufw/oas_commit b/services/ufw/oas_commit index bdcef991a..e8c60c40e 100644 --- a/services/ufw/oas_commit +++ b/services/ufw/oas_commit @@ -1 +1 @@ -bead0331c9760ab4d2ff87614ae3ad156bc46758 +d420d9614787c2c3ea295aad2a2fa9b907014505 diff --git a/services/ufw/v1api/model_rule_response.go b/services/ufw/v1api/model_rule_response.go index 48b31d89c..dab388dab 100644 --- a/services/ufw/v1api/model_rule_response.go +++ b/services/ufw/v1api/model_rule_response.go @@ -20,27 +20,28 @@ var _ MappedNullable = &RuleResponse{} // RuleResponse struct for RuleResponse type RuleResponse struct { - Description *string `json:"description,omitempty"` - Destination string `json:"destination"` - Direction *string `json:"direction,omitempty"` - ErrorMessage *string `json:"errorMessage,omitempty"` - EtherType *string `json:"etherType,omitempty"` - InstanceId string `json:"instanceId"` - InstanceName *string `json:"instanceName,omitempty"` - IpRange *string `json:"ipRange,omitempty"` - Offset *int32 `json:"offset,omitempty"` - PortRange *string `json:"portRange,omitempty"` - Product string `json:"product"` - Protocol *string `json:"protocol,omitempty"` - RefId *string `json:"refId,omitempty"` - Region *string `json:"region,omitempty"` - RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty"` - RemoteSecurityGroupName *string `json:"remoteSecurityGroupName,omitempty"` - SecurityGroupId *string `json:"securityGroupId,omitempty"` - SourceIP string `json:"sourceIP"` - Stateful *bool `json:"stateful,omitempty"` - Status RuleResponseStatus `json:"status"` - Type RuleResponseType `json:"type"` + Description *string `json:"description,omitempty"` + Destination string `json:"destination"` + Direction *string `json:"direction,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + EtherType *string `json:"etherType,omitempty"` + InstanceId string `json:"instanceId"` + InstanceName *string `json:"instanceName,omitempty"` + IpRange *string `json:"ipRange,omitempty"` + Offset *int32 `json:"offset,omitempty"` + PortRange *string `json:"portRange,omitempty"` + Product string `json:"product"` + Protocol *string `json:"protocol,omitempty"` + RefId *string `json:"refId,omitempty"` + Region *string `json:"region,omitempty"` + RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty"` + RemoteSecurityGroupName *string `json:"remoteSecurityGroupName,omitempty"` + SecurityGroupId *string `json:"securityGroupId,omitempty"` + SourceIP string `json:"sourceIP"` + Stateful *bool `json:"stateful,omitempty"` + Status RuleResponseStatus `json:"status"` + SyncStatus *RuleResponseSyncStatus `json:"syncStatus,omitempty"` + Type RuleResponseType `json:"type"` AdditionalProperties map[string]interface{} } @@ -669,6 +670,38 @@ func (o *RuleResponse) SetStatus(v RuleResponseStatus) { o.Status = v } +// GetSyncStatus returns the SyncStatus field value if set, zero value otherwise. +func (o *RuleResponse) GetSyncStatus() RuleResponseSyncStatus { + if o == nil || IsNil(o.SyncStatus) { + var ret RuleResponseSyncStatus + return ret + } + return *o.SyncStatus +} + +// GetSyncStatusOk returns a tuple with the SyncStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuleResponse) GetSyncStatusOk() (*RuleResponseSyncStatus, bool) { + if o == nil || IsNil(o.SyncStatus) { + return nil, false + } + return o.SyncStatus, true +} + +// HasSyncStatus returns a boolean if a field has been set. +func (o *RuleResponse) HasSyncStatus() bool { + if o != nil && !IsNil(o.SyncStatus) { + return true + } + + return false +} + +// SetSyncStatus gets a reference to the given RuleResponseSyncStatus and assigns it to the SyncStatus field. +func (o *RuleResponse) SetSyncStatus(v RuleResponseSyncStatus) { + o.SyncStatus = &v +} + // GetType returns the Type field value func (o *RuleResponse) GetType() RuleResponseType { if o == nil { @@ -753,6 +786,9 @@ func (o RuleResponse) ToMap() (map[string]interface{}, error) { toSerialize["stateful"] = o.Stateful } toSerialize["status"] = o.Status + if !IsNil(o.SyncStatus) { + toSerialize["syncStatus"] = o.SyncStatus + } toSerialize["type"] = o.Type for key, value := range o.AdditionalProperties { @@ -822,6 +858,7 @@ func (o *RuleResponse) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "sourceIP") delete(additionalProperties, "stateful") delete(additionalProperties, "status") + delete(additionalProperties, "syncStatus") delete(additionalProperties, "type") o.AdditionalProperties = additionalProperties } diff --git a/services/ufw/v1api/model_rule_response_sync_status.go b/services/ufw/v1api/model_rule_response_sync_status.go new file mode 100644 index 000000000..b29f76116 --- /dev/null +++ b/services/ufw/v1api/model_rule_response_sync_status.go @@ -0,0 +1,113 @@ +/* +STACKIT Unified Firewall API + +API for managing and controlling the STACKIT Unified Firewall. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" +) + +// RuleResponseSyncStatus the model 'RuleResponseSyncStatus' +type RuleResponseSyncStatus string + +// List of RuleResponse_syncStatus +const ( + RULERESPONSESYNCSTATUS_SYNCED RuleResponseSyncStatus = "SYNCED" + RULERESPONSESYNCSTATUS_NOT_SYNCED RuleResponseSyncStatus = "NOT_SYNCED" + RULERESPONSESYNCSTATUS_UNKNOWN_DEFAULT_OPEN_API RuleResponseSyncStatus = "unknown_default_open_api" +) + +// All allowed values of RuleResponseSyncStatus enum +var AllowedRuleResponseSyncStatusEnumValues = []RuleResponseSyncStatus{ + "SYNCED", + "NOT_SYNCED", + "unknown_default_open_api", +} + +func (v *RuleResponseSyncStatus) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := RuleResponseSyncStatus(value) + for _, existing := range AllowedRuleResponseSyncStatusEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = RULERESPONSESYNCSTATUS_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewRuleResponseSyncStatusFromValue returns a pointer to a valid RuleResponseSyncStatus +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewRuleResponseSyncStatusFromValue(v string) (*RuleResponseSyncStatus, error) { + ev := RuleResponseSyncStatus(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for RuleResponseSyncStatus: valid values are %v", v, AllowedRuleResponseSyncStatusEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v RuleResponseSyncStatus) IsValid() bool { + for _, existing := range AllowedRuleResponseSyncStatusEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to RuleResponse_syncStatus value +func (v RuleResponseSyncStatus) Ptr() *RuleResponseSyncStatus { + return &v +} + +type NullableRuleResponseSyncStatus struct { + value *RuleResponseSyncStatus + isSet bool +} + +func (v NullableRuleResponseSyncStatus) Get() *RuleResponseSyncStatus { + return v.value +} + +func (v *NullableRuleResponseSyncStatus) Set(val *RuleResponseSyncStatus) { + v.value = val + v.isSet = true +} + +func (v NullableRuleResponseSyncStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableRuleResponseSyncStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRuleResponseSyncStatus(val *RuleResponseSyncStatus) *NullableRuleResponseSyncStatus { + return &NullableRuleResponseSyncStatus{value: val, isSet: true} +} + +func (v NullableRuleResponseSyncStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRuleResponseSyncStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}