From 6b3564ae4726809c00e1b8a0654888b1fbfd9368 Mon Sep 17 00:00:00 2001 From: Tim Hogarty Date: Thu, 22 Aug 2024 14:59:38 -0700 Subject: [PATCH 1/2] Manual Spec Patch: Add patching for connection model to differentiate response from request object for validate connection --- ...nection_as_connection_response_model.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 spec/services/fabricv4/patches/20240822_use_base_connection_as_connection_response_model.patch diff --git a/spec/services/fabricv4/patches/20240822_use_base_connection_as_connection_response_model.patch b/spec/services/fabricv4/patches/20240822_use_base_connection_as_connection_response_model.patch new file mode 100644 index 00000000..905e9f5a --- /dev/null +++ b/spec/services/fabricv4/patches/20240822_use_base_connection_as_connection_response_model.patch @@ -0,0 +1,46 @@ +diff --git a/spec/services/fabricv4/oas3.patched/swagger.yaml b/spec/services/fabricv4/oas3.patched/swagger.yaml +index 701d20e..ac39f1e 100644 +--- a/spec/services/fabricv4/oas3.patched/swagger.yaml ++++ b/spec/services/fabricv4/oas3.patched/swagger.yaml +@@ -7720,13 +7720,7 @@ components: + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + description: Create connection post request +- Connection: +- required: +- - aSide +- - bandwidth +- - name +- - type +- - zSide ++ BaseConnection: + type: object + properties: + type: +@@ -7789,6 +7783,17 @@ components: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" + project: + $ref: "#/components/schemas/Project" ++ description: Connection base specification ++ Connection: ++ required: ++ - aSide ++ - bandwidth ++ - name ++ - type ++ - zSide ++ type: object ++ allOf: ++ - $ref: "#/components/schemas/BaseConnection" + description: Connection specification + ErrorList: + type: array +@@ -10421,7 +10426,7 @@ components: + type: array + description: Connection response data + items: +- $ref: "#/components/schemas/Connection" ++ $ref: "#/components/schemas/BaseConnection" + description: ValidateResponse + Pagination: + required: From 1b588c9c5c2192342daf358b9825f262edf848c2 Mon Sep 17 00:00:00 2001 From: Tim Hogarty Date: Thu, 22 Aug 2024 15:05:20 -0700 Subject: [PATCH 2/2] Code generation for spec patching on validate connection response --- services/fabricv4/README.md | 1 + services/fabricv4/docs/BaseConnection.md | 602 +++++++++++ services/fabricv4/docs/ConnectionResponse.md | 8 +- services/fabricv4/model_base_connection.go | 936 ++++++++++++++++++ .../fabricv4/model_connection_response.go | 12 +- .../fabricv4/oas3.patched/swagger.yaml | 21 +- 6 files changed, 1562 insertions(+), 18 deletions(-) create mode 100644 services/fabricv4/docs/BaseConnection.md create mode 100644 services/fabricv4/model_base_connection.go diff --git a/services/fabricv4/README.md b/services/fabricv4/README.md index 9de2c504..84ad82f7 100644 --- a/services/fabricv4/README.md +++ b/services/fabricv4/README.md @@ -205,6 +205,7 @@ Class | Method | HTTP request | Description - [BGPConnectionOperationOperationalStatus](docs/BGPConnectionOperationOperationalStatus.md) - [BandwidthUtilization](docs/BandwidthUtilization.md) - [BandwidthUtilizationUnit](docs/BandwidthUtilizationUnit.md) + - [BaseConnection](docs/BaseConnection.md) - [BulkPhysicalPort](docs/BulkPhysicalPort.md) - [BulkPort](docs/BulkPort.md) - [Change](docs/Change.md) diff --git a/services/fabricv4/docs/BaseConnection.md b/services/fabricv4/docs/BaseConnection.md new file mode 100644 index 00000000..e494b878 --- /dev/null +++ b/services/fabricv4/docs/BaseConnection.md @@ -0,0 +1,602 @@ +# BaseConnection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to [**ConnectionType**](ConnectionType.md) | | [optional] +**Href** | Pointer to **string** | Connection URI | [optional] [readonly] +**Uuid** | Pointer to **string** | Equinix-assigned connection identifier | [optional] +**Name** | Pointer to **string** | Customer-provided connection name | [optional] +**Description** | Pointer to **string** | Customer-provided connection description | [optional] +**State** | Pointer to [**ConnectionState**](ConnectionState.md) | | [optional] +**Change** | Pointer to [**Change**](Change.md) | | [optional] +**Operation** | Pointer to [**ConnectionOperation**](ConnectionOperation.md) | | [optional] +**Order** | Pointer to [**Order**](Order.md) | | [optional] +**Notifications** | Pointer to [**[]SimplifiedNotification**](SimplifiedNotification.md) | Preferences for notifications on connection configuration or status changes | [optional] +**Account** | Pointer to [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] +**ChangeLog** | Pointer to [**Changelog**](Changelog.md) | | [optional] +**Bandwidth** | Pointer to **int32** | Connection bandwidth in Mbps | [optional] +**GeoScope** | Pointer to [**GeoScopeType**](GeoScopeType.md) | | [optional] +**Redundancy** | Pointer to [**ConnectionRedundancy**](ConnectionRedundancy.md) | | [optional] +**IsRemote** | Pointer to **bool** | Connection property derived from access point locations | [optional] +**Direction** | Pointer to [**ConnectionDirection**](ConnectionDirection.md) | | [optional] +**ASide** | Pointer to [**ConnectionSide**](ConnectionSide.md) | | [optional] +**ZSide** | Pointer to [**ConnectionSide**](ConnectionSide.md) | | [optional] +**MarketplaceSubscription** | Pointer to [**MarketplaceSubscription**](MarketplaceSubscription.md) | | [optional] +**AdditionalInfo** | Pointer to [**[]ConnectionSideAdditionalInfo**](ConnectionSideAdditionalInfo.md) | Connection additional information | [optional] +**Project** | Pointer to [**Project**](Project.md) | | [optional] + +## Methods + +### NewBaseConnection + +`func NewBaseConnection() *BaseConnection` + +NewBaseConnection instantiates a new BaseConnection 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 + +### NewBaseConnectionWithDefaults + +`func NewBaseConnectionWithDefaults() *BaseConnection` + +NewBaseConnectionWithDefaults instantiates a new BaseConnection 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 + +### GetType + +`func (o *BaseConnection) GetType() ConnectionType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *BaseConnection) GetTypeOk() (*ConnectionType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *BaseConnection) SetType(v ConnectionType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *BaseConnection) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetHref + +`func (o *BaseConnection) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *BaseConnection) GetHrefOk() (*string, bool)` + +GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHref + +`func (o *BaseConnection) SetHref(v string)` + +SetHref sets Href field to given value. + +### HasHref + +`func (o *BaseConnection) HasHref() bool` + +HasHref returns a boolean if a field has been set. + +### GetUuid + +`func (o *BaseConnection) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *BaseConnection) GetUuidOk() (*string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUuid + +`func (o *BaseConnection) SetUuid(v string)` + +SetUuid sets Uuid field to given value. + +### HasUuid + +`func (o *BaseConnection) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### GetName + +`func (o *BaseConnection) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BaseConnection) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *BaseConnection) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *BaseConnection) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *BaseConnection) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *BaseConnection) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *BaseConnection) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *BaseConnection) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetState + +`func (o *BaseConnection) GetState() ConnectionState` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *BaseConnection) GetStateOk() (*ConnectionState, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *BaseConnection) SetState(v ConnectionState)` + +SetState sets State field to given value. + +### HasState + +`func (o *BaseConnection) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetChange + +`func (o *BaseConnection) GetChange() Change` + +GetChange returns the Change field if non-nil, zero value otherwise. + +### GetChangeOk + +`func (o *BaseConnection) GetChangeOk() (*Change, bool)` + +GetChangeOk returns a tuple with the Change field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChange + +`func (o *BaseConnection) SetChange(v Change)` + +SetChange sets Change field to given value. + +### HasChange + +`func (o *BaseConnection) HasChange() bool` + +HasChange returns a boolean if a field has been set. + +### GetOperation + +`func (o *BaseConnection) GetOperation() ConnectionOperation` + +GetOperation returns the Operation field if non-nil, zero value otherwise. + +### GetOperationOk + +`func (o *BaseConnection) GetOperationOk() (*ConnectionOperation, bool)` + +GetOperationOk returns a tuple with the Operation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperation + +`func (o *BaseConnection) SetOperation(v ConnectionOperation)` + +SetOperation sets Operation field to given value. + +### HasOperation + +`func (o *BaseConnection) HasOperation() bool` + +HasOperation returns a boolean if a field has been set. + +### GetOrder + +`func (o *BaseConnection) GetOrder() Order` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *BaseConnection) GetOrderOk() (*Order, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *BaseConnection) SetOrder(v Order)` + +SetOrder sets Order field to given value. + +### HasOrder + +`func (o *BaseConnection) HasOrder() bool` + +HasOrder returns a boolean if a field has been set. + +### GetNotifications + +`func (o *BaseConnection) GetNotifications() []SimplifiedNotification` + +GetNotifications returns the Notifications field if non-nil, zero value otherwise. + +### GetNotificationsOk + +`func (o *BaseConnection) GetNotificationsOk() (*[]SimplifiedNotification, bool)` + +GetNotificationsOk returns a tuple with the Notifications field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotifications + +`func (o *BaseConnection) SetNotifications(v []SimplifiedNotification)` + +SetNotifications sets Notifications field to given value. + +### HasNotifications + +`func (o *BaseConnection) HasNotifications() bool` + +HasNotifications returns a boolean if a field has been set. + +### GetAccount + +`func (o *BaseConnection) GetAccount() SimplifiedAccount` + +GetAccount returns the Account field if non-nil, zero value otherwise. + +### GetAccountOk + +`func (o *BaseConnection) GetAccountOk() (*SimplifiedAccount, bool)` + +GetAccountOk returns a tuple with the Account field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccount + +`func (o *BaseConnection) SetAccount(v SimplifiedAccount)` + +SetAccount sets Account field to given value. + +### HasAccount + +`func (o *BaseConnection) HasAccount() bool` + +HasAccount returns a boolean if a field has been set. + +### GetChangeLog + +`func (o *BaseConnection) GetChangeLog() Changelog` + +GetChangeLog returns the ChangeLog field if non-nil, zero value otherwise. + +### GetChangeLogOk + +`func (o *BaseConnection) GetChangeLogOk() (*Changelog, bool)` + +GetChangeLogOk returns a tuple with the ChangeLog field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChangeLog + +`func (o *BaseConnection) SetChangeLog(v Changelog)` + +SetChangeLog sets ChangeLog field to given value. + +### HasChangeLog + +`func (o *BaseConnection) HasChangeLog() bool` + +HasChangeLog returns a boolean if a field has been set. + +### GetBandwidth + +`func (o *BaseConnection) GetBandwidth() int32` + +GetBandwidth returns the Bandwidth field if non-nil, zero value otherwise. + +### GetBandwidthOk + +`func (o *BaseConnection) GetBandwidthOk() (*int32, bool)` + +GetBandwidthOk returns a tuple with the Bandwidth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBandwidth + +`func (o *BaseConnection) SetBandwidth(v int32)` + +SetBandwidth sets Bandwidth field to given value. + +### HasBandwidth + +`func (o *BaseConnection) HasBandwidth() bool` + +HasBandwidth returns a boolean if a field has been set. + +### GetGeoScope + +`func (o *BaseConnection) GetGeoScope() GeoScopeType` + +GetGeoScope returns the GeoScope field if non-nil, zero value otherwise. + +### GetGeoScopeOk + +`func (o *BaseConnection) GetGeoScopeOk() (*GeoScopeType, bool)` + +GetGeoScopeOk returns a tuple with the GeoScope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGeoScope + +`func (o *BaseConnection) SetGeoScope(v GeoScopeType)` + +SetGeoScope sets GeoScope field to given value. + +### HasGeoScope + +`func (o *BaseConnection) HasGeoScope() bool` + +HasGeoScope returns a boolean if a field has been set. + +### GetRedundancy + +`func (o *BaseConnection) GetRedundancy() ConnectionRedundancy` + +GetRedundancy returns the Redundancy field if non-nil, zero value otherwise. + +### GetRedundancyOk + +`func (o *BaseConnection) GetRedundancyOk() (*ConnectionRedundancy, bool)` + +GetRedundancyOk returns a tuple with the Redundancy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedundancy + +`func (o *BaseConnection) SetRedundancy(v ConnectionRedundancy)` + +SetRedundancy sets Redundancy field to given value. + +### HasRedundancy + +`func (o *BaseConnection) HasRedundancy() bool` + +HasRedundancy returns a boolean if a field has been set. + +### GetIsRemote + +`func (o *BaseConnection) GetIsRemote() bool` + +GetIsRemote returns the IsRemote field if non-nil, zero value otherwise. + +### GetIsRemoteOk + +`func (o *BaseConnection) GetIsRemoteOk() (*bool, bool)` + +GetIsRemoteOk returns a tuple with the IsRemote field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsRemote + +`func (o *BaseConnection) SetIsRemote(v bool)` + +SetIsRemote sets IsRemote field to given value. + +### HasIsRemote + +`func (o *BaseConnection) HasIsRemote() bool` + +HasIsRemote returns a boolean if a field has been set. + +### GetDirection + +`func (o *BaseConnection) GetDirection() ConnectionDirection` + +GetDirection returns the Direction field if non-nil, zero value otherwise. + +### GetDirectionOk + +`func (o *BaseConnection) GetDirectionOk() (*ConnectionDirection, bool)` + +GetDirectionOk returns a tuple with the Direction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirection + +`func (o *BaseConnection) SetDirection(v ConnectionDirection)` + +SetDirection sets Direction field to given value. + +### HasDirection + +`func (o *BaseConnection) HasDirection() bool` + +HasDirection returns a boolean if a field has been set. + +### GetASide + +`func (o *BaseConnection) GetASide() ConnectionSide` + +GetASide returns the ASide field if non-nil, zero value otherwise. + +### GetASideOk + +`func (o *BaseConnection) GetASideOk() (*ConnectionSide, bool)` + +GetASideOk returns a tuple with the ASide field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetASide + +`func (o *BaseConnection) SetASide(v ConnectionSide)` + +SetASide sets ASide field to given value. + +### HasASide + +`func (o *BaseConnection) HasASide() bool` + +HasASide returns a boolean if a field has been set. + +### GetZSide + +`func (o *BaseConnection) GetZSide() ConnectionSide` + +GetZSide returns the ZSide field if non-nil, zero value otherwise. + +### GetZSideOk + +`func (o *BaseConnection) GetZSideOk() (*ConnectionSide, bool)` + +GetZSideOk returns a tuple with the ZSide field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetZSide + +`func (o *BaseConnection) SetZSide(v ConnectionSide)` + +SetZSide sets ZSide field to given value. + +### HasZSide + +`func (o *BaseConnection) HasZSide() bool` + +HasZSide returns a boolean if a field has been set. + +### GetMarketplaceSubscription + +`func (o *BaseConnection) GetMarketplaceSubscription() MarketplaceSubscription` + +GetMarketplaceSubscription returns the MarketplaceSubscription field if non-nil, zero value otherwise. + +### GetMarketplaceSubscriptionOk + +`func (o *BaseConnection) GetMarketplaceSubscriptionOk() (*MarketplaceSubscription, bool)` + +GetMarketplaceSubscriptionOk returns a tuple with the MarketplaceSubscription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMarketplaceSubscription + +`func (o *BaseConnection) SetMarketplaceSubscription(v MarketplaceSubscription)` + +SetMarketplaceSubscription sets MarketplaceSubscription field to given value. + +### HasMarketplaceSubscription + +`func (o *BaseConnection) HasMarketplaceSubscription() bool` + +HasMarketplaceSubscription returns a boolean if a field has been set. + +### GetAdditionalInfo + +`func (o *BaseConnection) GetAdditionalInfo() []ConnectionSideAdditionalInfo` + +GetAdditionalInfo returns the AdditionalInfo field if non-nil, zero value otherwise. + +### GetAdditionalInfoOk + +`func (o *BaseConnection) GetAdditionalInfoOk() (*[]ConnectionSideAdditionalInfo, bool)` + +GetAdditionalInfoOk returns a tuple with the AdditionalInfo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAdditionalInfo + +`func (o *BaseConnection) SetAdditionalInfo(v []ConnectionSideAdditionalInfo)` + +SetAdditionalInfo sets AdditionalInfo field to given value. + +### HasAdditionalInfo + +`func (o *BaseConnection) HasAdditionalInfo() bool` + +HasAdditionalInfo returns a boolean if a field has been set. + +### GetProject + +`func (o *BaseConnection) GetProject() Project` + +GetProject returns the Project field if non-nil, zero value otherwise. + +### GetProjectOk + +`func (o *BaseConnection) GetProjectOk() (*Project, bool)` + +GetProjectOk returns a tuple with the Project field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProject + +`func (o *BaseConnection) SetProject(v Project)` + +SetProject sets Project field to given value. + +### HasProject + +`func (o *BaseConnection) HasProject() bool` + +HasProject returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/fabricv4/docs/ConnectionResponse.md b/services/fabricv4/docs/ConnectionResponse.md index 2fc0b236..bd3adc3b 100644 --- a/services/fabricv4/docs/ConnectionResponse.md +++ b/services/fabricv4/docs/ConnectionResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AdditionalInfo** | Pointer to [**[]ConnectionSideAdditionalInfo**](ConnectionSideAdditionalInfo.md) | Additional information | [optional] -**Data** | Pointer to [**[]Connection**](Connection.md) | Connection response data | [optional] +**Data** | Pointer to [**[]BaseConnection**](BaseConnection.md) | Connection response data | [optional] ## Methods @@ -53,20 +53,20 @@ HasAdditionalInfo returns a boolean if a field has been set. ### GetData -`func (o *ConnectionResponse) GetData() []Connection` +`func (o *ConnectionResponse) GetData() []BaseConnection` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *ConnectionResponse) GetDataOk() (*[]Connection, bool)` +`func (o *ConnectionResponse) GetDataOk() (*[]BaseConnection, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetData -`func (o *ConnectionResponse) SetData(v []Connection)` +`func (o *ConnectionResponse) SetData(v []BaseConnection)` SetData sets Data field to given value. diff --git a/services/fabricv4/model_base_connection.go b/services/fabricv4/model_base_connection.go new file mode 100644 index 00000000..91e5814d --- /dev/null +++ b/services/fabricv4/model_base_connection.go @@ -0,0 +1,936 @@ +/* +Equinix Fabric API v4 + +Contact: api-support@equinix.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package fabricv4 + +import ( + "encoding/json" +) + +// checks if the BaseConnection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseConnection{} + +// BaseConnection Connection base specification +type BaseConnection struct { + Type *ConnectionType `json:"type,omitempty"` + // Connection URI + Href *string `json:"href,omitempty"` + // Equinix-assigned connection identifier + Uuid *string `json:"uuid,omitempty"` + // Customer-provided connection name + Name *string `json:"name,omitempty"` + // Customer-provided connection description + Description *string `json:"description,omitempty"` + State *ConnectionState `json:"state,omitempty"` + Change *Change `json:"change,omitempty"` + Operation *ConnectionOperation `json:"operation,omitempty"` + Order *Order `json:"order,omitempty"` + // Preferences for notifications on connection configuration or status changes + Notifications []SimplifiedNotification `json:"notifications,omitempty"` + Account *SimplifiedAccount `json:"account,omitempty"` + ChangeLog *Changelog `json:"changeLog,omitempty"` + // Connection bandwidth in Mbps + Bandwidth *int32 `json:"bandwidth,omitempty"` + GeoScope *GeoScopeType `json:"geoScope,omitempty"` + Redundancy *ConnectionRedundancy `json:"redundancy,omitempty"` + // Connection property derived from access point locations + IsRemote *bool `json:"isRemote,omitempty"` + Direction *ConnectionDirection `json:"direction,omitempty"` + ASide *ConnectionSide `json:"aSide,omitempty"` + ZSide *ConnectionSide `json:"zSide,omitempty"` + MarketplaceSubscription *MarketplaceSubscription `json:"marketplaceSubscription,omitempty"` + // Connection additional information + AdditionalInfo []ConnectionSideAdditionalInfo `json:"additionalInfo,omitempty"` + Project *Project `json:"project,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _BaseConnection BaseConnection + +// NewBaseConnection instantiates a new BaseConnection 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 NewBaseConnection() *BaseConnection { + this := BaseConnection{} + return &this +} + +// NewBaseConnectionWithDefaults instantiates a new BaseConnection 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 NewBaseConnectionWithDefaults() *BaseConnection { + this := BaseConnection{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *BaseConnection) GetType() ConnectionType { + if o == nil || IsNil(o.Type) { + var ret ConnectionType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetTypeOk() (*ConnectionType, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *BaseConnection) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given ConnectionType and assigns it to the Type field. +func (o *BaseConnection) SetType(v ConnectionType) { + o.Type = &v +} + +// GetHref returns the Href field value if set, zero value otherwise. +func (o *BaseConnection) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret + } + return *o.Href +} + +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetHrefOk() (*string, bool) { + if o == nil || IsNil(o.Href) { + return nil, false + } + return o.Href, true +} + +// HasHref returns a boolean if a field has been set. +func (o *BaseConnection) HasHref() bool { + if o != nil && !IsNil(o.Href) { + return true + } + + return false +} + +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *BaseConnection) SetHref(v string) { + o.Href = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *BaseConnection) GetUuid() string { + if o == nil || IsNil(o.Uuid) { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetUuidOk() (*string, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *BaseConnection) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *BaseConnection) SetUuid(v string) { + o.Uuid = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *BaseConnection) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *BaseConnection) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *BaseConnection) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *BaseConnection) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *BaseConnection) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *BaseConnection) SetDescription(v string) { + o.Description = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *BaseConnection) GetState() ConnectionState { + if o == nil || IsNil(o.State) { + var ret ConnectionState + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetStateOk() (*ConnectionState, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *BaseConnection) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given ConnectionState and assigns it to the State field. +func (o *BaseConnection) SetState(v ConnectionState) { + o.State = &v +} + +// GetChange returns the Change field value if set, zero value otherwise. +func (o *BaseConnection) GetChange() Change { + if o == nil || IsNil(o.Change) { + var ret Change + return ret + } + return *o.Change +} + +// GetChangeOk returns a tuple with the Change field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetChangeOk() (*Change, bool) { + if o == nil || IsNil(o.Change) { + return nil, false + } + return o.Change, true +} + +// HasChange returns a boolean if a field has been set. +func (o *BaseConnection) HasChange() bool { + if o != nil && !IsNil(o.Change) { + return true + } + + return false +} + +// SetChange gets a reference to the given Change and assigns it to the Change field. +func (o *BaseConnection) SetChange(v Change) { + o.Change = &v +} + +// GetOperation returns the Operation field value if set, zero value otherwise. +func (o *BaseConnection) GetOperation() ConnectionOperation { + if o == nil || IsNil(o.Operation) { + var ret ConnectionOperation + return ret + } + return *o.Operation +} + +// GetOperationOk returns a tuple with the Operation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetOperationOk() (*ConnectionOperation, bool) { + if o == nil || IsNil(o.Operation) { + return nil, false + } + return o.Operation, true +} + +// HasOperation returns a boolean if a field has been set. +func (o *BaseConnection) HasOperation() bool { + if o != nil && !IsNil(o.Operation) { + return true + } + + return false +} + +// SetOperation gets a reference to the given ConnectionOperation and assigns it to the Operation field. +func (o *BaseConnection) SetOperation(v ConnectionOperation) { + o.Operation = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *BaseConnection) GetOrder() Order { + if o == nil || IsNil(o.Order) { + var ret Order + return ret + } + return *o.Order +} + +// GetOrderOk returns a tuple with the Order field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetOrderOk() (*Order, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *BaseConnection) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given Order and assigns it to the Order field. +func (o *BaseConnection) SetOrder(v Order) { + o.Order = &v +} + +// GetNotifications returns the Notifications field value if set, zero value otherwise. +func (o *BaseConnection) GetNotifications() []SimplifiedNotification { + if o == nil || IsNil(o.Notifications) { + var ret []SimplifiedNotification + return ret + } + return o.Notifications +} + +// GetNotificationsOk returns a tuple with the Notifications field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetNotificationsOk() ([]SimplifiedNotification, bool) { + if o == nil || IsNil(o.Notifications) { + return nil, false + } + return o.Notifications, true +} + +// HasNotifications returns a boolean if a field has been set. +func (o *BaseConnection) HasNotifications() bool { + if o != nil && !IsNil(o.Notifications) { + return true + } + + return false +} + +// SetNotifications gets a reference to the given []SimplifiedNotification and assigns it to the Notifications field. +func (o *BaseConnection) SetNotifications(v []SimplifiedNotification) { + o.Notifications = v +} + +// GetAccount returns the Account field value if set, zero value otherwise. +func (o *BaseConnection) GetAccount() SimplifiedAccount { + if o == nil || IsNil(o.Account) { + var ret SimplifiedAccount + return ret + } + return *o.Account +} + +// GetAccountOk returns a tuple with the Account field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetAccountOk() (*SimplifiedAccount, bool) { + if o == nil || IsNil(o.Account) { + return nil, false + } + return o.Account, true +} + +// HasAccount returns a boolean if a field has been set. +func (o *BaseConnection) HasAccount() bool { + if o != nil && !IsNil(o.Account) { + return true + } + + return false +} + +// SetAccount gets a reference to the given SimplifiedAccount and assigns it to the Account field. +func (o *BaseConnection) SetAccount(v SimplifiedAccount) { + o.Account = &v +} + +// GetChangeLog returns the ChangeLog field value if set, zero value otherwise. +func (o *BaseConnection) GetChangeLog() Changelog { + if o == nil || IsNil(o.ChangeLog) { + var ret Changelog + return ret + } + return *o.ChangeLog +} + +// GetChangeLogOk returns a tuple with the ChangeLog field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetChangeLogOk() (*Changelog, bool) { + if o == nil || IsNil(o.ChangeLog) { + return nil, false + } + return o.ChangeLog, true +} + +// HasChangeLog returns a boolean if a field has been set. +func (o *BaseConnection) HasChangeLog() bool { + if o != nil && !IsNil(o.ChangeLog) { + return true + } + + return false +} + +// SetChangeLog gets a reference to the given Changelog and assigns it to the ChangeLog field. +func (o *BaseConnection) SetChangeLog(v Changelog) { + o.ChangeLog = &v +} + +// GetBandwidth returns the Bandwidth field value if set, zero value otherwise. +func (o *BaseConnection) GetBandwidth() int32 { + if o == nil || IsNil(o.Bandwidth) { + var ret int32 + return ret + } + return *o.Bandwidth +} + +// GetBandwidthOk returns a tuple with the Bandwidth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetBandwidthOk() (*int32, bool) { + if o == nil || IsNil(o.Bandwidth) { + return nil, false + } + return o.Bandwidth, true +} + +// HasBandwidth returns a boolean if a field has been set. +func (o *BaseConnection) HasBandwidth() bool { + if o != nil && !IsNil(o.Bandwidth) { + return true + } + + return false +} + +// SetBandwidth gets a reference to the given int32 and assigns it to the Bandwidth field. +func (o *BaseConnection) SetBandwidth(v int32) { + o.Bandwidth = &v +} + +// GetGeoScope returns the GeoScope field value if set, zero value otherwise. +func (o *BaseConnection) GetGeoScope() GeoScopeType { + if o == nil || IsNil(o.GeoScope) { + var ret GeoScopeType + return ret + } + return *o.GeoScope +} + +// GetGeoScopeOk returns a tuple with the GeoScope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetGeoScopeOk() (*GeoScopeType, bool) { + if o == nil || IsNil(o.GeoScope) { + return nil, false + } + return o.GeoScope, true +} + +// HasGeoScope returns a boolean if a field has been set. +func (o *BaseConnection) HasGeoScope() bool { + if o != nil && !IsNil(o.GeoScope) { + return true + } + + return false +} + +// SetGeoScope gets a reference to the given GeoScopeType and assigns it to the GeoScope field. +func (o *BaseConnection) SetGeoScope(v GeoScopeType) { + o.GeoScope = &v +} + +// GetRedundancy returns the Redundancy field value if set, zero value otherwise. +func (o *BaseConnection) GetRedundancy() ConnectionRedundancy { + if o == nil || IsNil(o.Redundancy) { + var ret ConnectionRedundancy + return ret + } + return *o.Redundancy +} + +// GetRedundancyOk returns a tuple with the Redundancy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetRedundancyOk() (*ConnectionRedundancy, bool) { + if o == nil || IsNil(o.Redundancy) { + return nil, false + } + return o.Redundancy, true +} + +// HasRedundancy returns a boolean if a field has been set. +func (o *BaseConnection) HasRedundancy() bool { + if o != nil && !IsNil(o.Redundancy) { + return true + } + + return false +} + +// SetRedundancy gets a reference to the given ConnectionRedundancy and assigns it to the Redundancy field. +func (o *BaseConnection) SetRedundancy(v ConnectionRedundancy) { + o.Redundancy = &v +} + +// GetIsRemote returns the IsRemote field value if set, zero value otherwise. +func (o *BaseConnection) GetIsRemote() bool { + if o == nil || IsNil(o.IsRemote) { + var ret bool + return ret + } + return *o.IsRemote +} + +// GetIsRemoteOk returns a tuple with the IsRemote field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetIsRemoteOk() (*bool, bool) { + if o == nil || IsNil(o.IsRemote) { + return nil, false + } + return o.IsRemote, true +} + +// HasIsRemote returns a boolean if a field has been set. +func (o *BaseConnection) HasIsRemote() bool { + if o != nil && !IsNil(o.IsRemote) { + return true + } + + return false +} + +// SetIsRemote gets a reference to the given bool and assigns it to the IsRemote field. +func (o *BaseConnection) SetIsRemote(v bool) { + o.IsRemote = &v +} + +// GetDirection returns the Direction field value if set, zero value otherwise. +func (o *BaseConnection) GetDirection() ConnectionDirection { + if o == nil || IsNil(o.Direction) { + var ret ConnectionDirection + return ret + } + return *o.Direction +} + +// GetDirectionOk returns a tuple with the Direction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetDirectionOk() (*ConnectionDirection, bool) { + if o == nil || IsNil(o.Direction) { + return nil, false + } + return o.Direction, true +} + +// HasDirection returns a boolean if a field has been set. +func (o *BaseConnection) HasDirection() bool { + if o != nil && !IsNil(o.Direction) { + return true + } + + return false +} + +// SetDirection gets a reference to the given ConnectionDirection and assigns it to the Direction field. +func (o *BaseConnection) SetDirection(v ConnectionDirection) { + o.Direction = &v +} + +// GetASide returns the ASide field value if set, zero value otherwise. +func (o *BaseConnection) GetASide() ConnectionSide { + if o == nil || IsNil(o.ASide) { + var ret ConnectionSide + return ret + } + return *o.ASide +} + +// GetASideOk returns a tuple with the ASide field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetASideOk() (*ConnectionSide, bool) { + if o == nil || IsNil(o.ASide) { + return nil, false + } + return o.ASide, true +} + +// HasASide returns a boolean if a field has been set. +func (o *BaseConnection) HasASide() bool { + if o != nil && !IsNil(o.ASide) { + return true + } + + return false +} + +// SetASide gets a reference to the given ConnectionSide and assigns it to the ASide field. +func (o *BaseConnection) SetASide(v ConnectionSide) { + o.ASide = &v +} + +// GetZSide returns the ZSide field value if set, zero value otherwise. +func (o *BaseConnection) GetZSide() ConnectionSide { + if o == nil || IsNil(o.ZSide) { + var ret ConnectionSide + return ret + } + return *o.ZSide +} + +// GetZSideOk returns a tuple with the ZSide field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetZSideOk() (*ConnectionSide, bool) { + if o == nil || IsNil(o.ZSide) { + return nil, false + } + return o.ZSide, true +} + +// HasZSide returns a boolean if a field has been set. +func (o *BaseConnection) HasZSide() bool { + if o != nil && !IsNil(o.ZSide) { + return true + } + + return false +} + +// SetZSide gets a reference to the given ConnectionSide and assigns it to the ZSide field. +func (o *BaseConnection) SetZSide(v ConnectionSide) { + o.ZSide = &v +} + +// GetMarketplaceSubscription returns the MarketplaceSubscription field value if set, zero value otherwise. +func (o *BaseConnection) GetMarketplaceSubscription() MarketplaceSubscription { + if o == nil || IsNil(o.MarketplaceSubscription) { + var ret MarketplaceSubscription + return ret + } + return *o.MarketplaceSubscription +} + +// GetMarketplaceSubscriptionOk returns a tuple with the MarketplaceSubscription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetMarketplaceSubscriptionOk() (*MarketplaceSubscription, bool) { + if o == nil || IsNil(o.MarketplaceSubscription) { + return nil, false + } + return o.MarketplaceSubscription, true +} + +// HasMarketplaceSubscription returns a boolean if a field has been set. +func (o *BaseConnection) HasMarketplaceSubscription() bool { + if o != nil && !IsNil(o.MarketplaceSubscription) { + return true + } + + return false +} + +// SetMarketplaceSubscription gets a reference to the given MarketplaceSubscription and assigns it to the MarketplaceSubscription field. +func (o *BaseConnection) SetMarketplaceSubscription(v MarketplaceSubscription) { + o.MarketplaceSubscription = &v +} + +// GetAdditionalInfo returns the AdditionalInfo field value if set, zero value otherwise. +func (o *BaseConnection) GetAdditionalInfo() []ConnectionSideAdditionalInfo { + if o == nil || IsNil(o.AdditionalInfo) { + var ret []ConnectionSideAdditionalInfo + return ret + } + return o.AdditionalInfo +} + +// GetAdditionalInfoOk returns a tuple with the AdditionalInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetAdditionalInfoOk() ([]ConnectionSideAdditionalInfo, bool) { + if o == nil || IsNil(o.AdditionalInfo) { + return nil, false + } + return o.AdditionalInfo, true +} + +// HasAdditionalInfo returns a boolean if a field has been set. +func (o *BaseConnection) HasAdditionalInfo() bool { + if o != nil && !IsNil(o.AdditionalInfo) { + return true + } + + return false +} + +// SetAdditionalInfo gets a reference to the given []ConnectionSideAdditionalInfo and assigns it to the AdditionalInfo field. +func (o *BaseConnection) SetAdditionalInfo(v []ConnectionSideAdditionalInfo) { + o.AdditionalInfo = v +} + +// GetProject returns the Project field value if set, zero value otherwise. +func (o *BaseConnection) GetProject() Project { + if o == nil || IsNil(o.Project) { + var ret Project + return ret + } + return *o.Project +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseConnection) GetProjectOk() (*Project, bool) { + if o == nil || IsNil(o.Project) { + return nil, false + } + return o.Project, true +} + +// HasProject returns a boolean if a field has been set. +func (o *BaseConnection) HasProject() bool { + if o != nil && !IsNil(o.Project) { + return true + } + + return false +} + +// SetProject gets a reference to the given Project and assigns it to the Project field. +func (o *BaseConnection) SetProject(v Project) { + o.Project = &v +} + +func (o BaseConnection) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseConnection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Href) { + toSerialize["href"] = o.Href + } + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.Change) { + toSerialize["change"] = o.Change + } + if !IsNil(o.Operation) { + toSerialize["operation"] = o.Operation + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.Notifications) { + toSerialize["notifications"] = o.Notifications + } + if !IsNil(o.Account) { + toSerialize["account"] = o.Account + } + if !IsNil(o.ChangeLog) { + toSerialize["changeLog"] = o.ChangeLog + } + if !IsNil(o.Bandwidth) { + toSerialize["bandwidth"] = o.Bandwidth + } + if !IsNil(o.GeoScope) { + toSerialize["geoScope"] = o.GeoScope + } + if !IsNil(o.Redundancy) { + toSerialize["redundancy"] = o.Redundancy + } + if !IsNil(o.IsRemote) { + toSerialize["isRemote"] = o.IsRemote + } + if !IsNil(o.Direction) { + toSerialize["direction"] = o.Direction + } + if !IsNil(o.ASide) { + toSerialize["aSide"] = o.ASide + } + if !IsNil(o.ZSide) { + toSerialize["zSide"] = o.ZSide + } + if !IsNil(o.MarketplaceSubscription) { + toSerialize["marketplaceSubscription"] = o.MarketplaceSubscription + } + if !IsNil(o.AdditionalInfo) { + toSerialize["additionalInfo"] = o.AdditionalInfo + } + if !IsNil(o.Project) { + toSerialize["project"] = o.Project + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *BaseConnection) UnmarshalJSON(data []byte) (err error) { + varBaseConnection := _BaseConnection{} + + err = json.Unmarshal(data, &varBaseConnection) + + if err != nil { + return err + } + + *o = BaseConnection(varBaseConnection) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "href") + delete(additionalProperties, "uuid") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "state") + delete(additionalProperties, "change") + delete(additionalProperties, "operation") + delete(additionalProperties, "order") + delete(additionalProperties, "notifications") + delete(additionalProperties, "account") + delete(additionalProperties, "changeLog") + delete(additionalProperties, "bandwidth") + delete(additionalProperties, "geoScope") + delete(additionalProperties, "redundancy") + delete(additionalProperties, "isRemote") + delete(additionalProperties, "direction") + delete(additionalProperties, "aSide") + delete(additionalProperties, "zSide") + delete(additionalProperties, "marketplaceSubscription") + delete(additionalProperties, "additionalInfo") + delete(additionalProperties, "project") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableBaseConnection struct { + value *BaseConnection + isSet bool +} + +func (v NullableBaseConnection) Get() *BaseConnection { + return v.value +} + +func (v *NullableBaseConnection) Set(val *BaseConnection) { + v.value = val + v.isSet = true +} + +func (v NullableBaseConnection) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseConnection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseConnection(val *BaseConnection) *NullableBaseConnection { + return &NullableBaseConnection{value: val, isSet: true} +} + +func (v NullableBaseConnection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseConnection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/fabricv4/model_connection_response.go b/services/fabricv4/model_connection_response.go index 174acf8b..c628e3d0 100644 --- a/services/fabricv4/model_connection_response.go +++ b/services/fabricv4/model_connection_response.go @@ -20,7 +20,7 @@ type ConnectionResponse struct { // Additional information AdditionalInfo []ConnectionSideAdditionalInfo `json:"additionalInfo,omitempty"` // Connection response data - Data []Connection `json:"data,omitempty"` + Data []BaseConnection `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -76,9 +76,9 @@ func (o *ConnectionResponse) SetAdditionalInfo(v []ConnectionSideAdditionalInfo) } // GetData returns the Data field value if set, zero value otherwise. -func (o *ConnectionResponse) GetData() []Connection { +func (o *ConnectionResponse) GetData() []BaseConnection { if o == nil || IsNil(o.Data) { - var ret []Connection + var ret []BaseConnection return ret } return o.Data @@ -86,7 +86,7 @@ func (o *ConnectionResponse) GetData() []Connection { // GetDataOk returns a tuple with the Data field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConnectionResponse) GetDataOk() ([]Connection, bool) { +func (o *ConnectionResponse) GetDataOk() ([]BaseConnection, bool) { if o == nil || IsNil(o.Data) { return nil, false } @@ -102,8 +102,8 @@ func (o *ConnectionResponse) HasData() bool { return false } -// SetData gets a reference to the given []Connection and assigns it to the Data field. -func (o *ConnectionResponse) SetData(v []Connection) { +// SetData gets a reference to the given []BaseConnection and assigns it to the Data field. +func (o *ConnectionResponse) SetData(v []BaseConnection) { o.Data = v } diff --git a/spec/services/fabricv4/oas3.patched/swagger.yaml b/spec/services/fabricv4/oas3.patched/swagger.yaml index 701d20ee..ac39f1ed 100644 --- a/spec/services/fabricv4/oas3.patched/swagger.yaml +++ b/spec/services/fabricv4/oas3.patched/swagger.yaml @@ -7720,13 +7720,7 @@ components: marketplaceSubscription: $ref: "#/components/schemas/marketplaceSubscription" description: Create connection post request - Connection: - required: - - aSide - - bandwidth - - name - - type - - zSide + BaseConnection: type: object properties: type: @@ -7789,6 +7783,17 @@ components: $ref: "#/components/schemas/ConnectionSideAdditionalInfo" project: $ref: "#/components/schemas/Project" + description: Connection base specification + Connection: + required: + - aSide + - bandwidth + - name + - type + - zSide + type: object + allOf: + - $ref: "#/components/schemas/BaseConnection" description: Connection specification ErrorList: type: array @@ -10421,7 +10426,7 @@ components: type: array description: Connection response data items: - $ref: "#/components/schemas/Connection" + $ref: "#/components/schemas/BaseConnection" description: ValidateResponse Pagination: required: