Skip to content

Commit ec77beb

Browse files
committed
WIP
1 parent 87af8b4 commit ec77beb

File tree

6 files changed

+50
-19
lines changed

6 files changed

+50
-19
lines changed

api/openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98121,6 +98121,7 @@ components:
9812198121
parent_device:
9812298122
allOf:
9812398123
- $ref: '#/components/schemas/NestedDevice'
98124+
nullable: true
9812498125
readOnly: true
9812598126
status:
9812698127
type: object
@@ -98996,6 +98997,7 @@ components:
9899698997
parent_device:
9899798998
allOf:
9899898999
- $ref: '#/components/schemas/NestedDevice'
99000+
nullable: true
9899999001
readOnly: true
9900099002
status:
9900199003
type: object

docs/Device.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Name | Type | Description | Notes
2222
**Face** | Pointer to [**DeviceFace**](DeviceFace.md) | | [optional]
2323
**Latitude** | Pointer to **NullableFloat64** | GPS coordinate in decimal format (xx.yyyyyy) | [optional]
2424
**Longitude** | Pointer to **NullableFloat64** | GPS coordinate in decimal format (xx.yyyyyy) | [optional]
25-
**ParentDevice** | [**NestedDevice**](NestedDevice.md) | | [readonly]
25+
**ParentDevice** | [**NullableNestedDevice**](NestedDevice.md) | | [readonly]
2626
**Status** | Pointer to [**DeviceStatus**](DeviceStatus.md) | | [optional]
2727
**Airflow** | Pointer to [**DeviceAirflow**](DeviceAirflow.md) | | [optional]
2828
**PrimaryIp** | [**NestedIPAddress**](NestedIPAddress.md) | | [readonly]
@@ -56,7 +56,7 @@ Name | Type | Description | Notes
5656

5757
### NewDevice
5858

59-
`func NewDevice(id int32, url string, display string, deviceType NestedDeviceType, role NestedDeviceRole, deviceRole DeviceDeviceRole, site NestedSite, parentDevice NestedDevice, primaryIp NestedIPAddress, created NullableTime, lastUpdated NullableTime, consolePortCount int32, consoleServerPortCount int32, powerPortCount int32, powerOutletCount int32, interfaceCount int32, frontPortCount int32, rearPortCount int32, deviceBayCount int32, moduleBayCount int32, inventoryItemCount int32, ) *Device`
59+
`func NewDevice(id int32, url string, display string, deviceType NestedDeviceType, role NestedDeviceRole, deviceRole DeviceDeviceRole, site NestedSite, parentDevice NullableNestedDevice, primaryIp NestedIPAddress, created NullableTime, lastUpdated NullableTime, consolePortCount int32, consoleServerPortCount int32, powerPortCount int32, powerOutletCount int32, interfaceCount int32, frontPortCount int32, rearPortCount int32, deviceBayCount int32, moduleBayCount int32, inventoryItemCount int32, ) *Device`
6060

6161
NewDevice instantiates a new Device object
6262
This constructor will assign default values to properties that have it defined,
@@ -596,6 +596,16 @@ and a boolean to check if the value has been set.
596596
SetParentDevice sets ParentDevice field to given value.
597597

598598

599+
### SetParentDeviceNil
600+
601+
`func (o *Device) SetParentDeviceNil(b bool)`
602+
603+
SetParentDeviceNil sets the value for ParentDevice to be an explicit nil
604+
605+
### UnsetParentDevice
606+
`func (o *Device) UnsetParentDevice()`
607+
608+
UnsetParentDevice ensures that no value is present for ParentDevice, not even an explicit nil
599609
### GetStatus
600610

601611
`func (o *Device) GetStatus() DeviceStatus`

docs/DeviceWithConfigContext.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Name | Type | Description | Notes
2222
**Face** | Pointer to [**DeviceFace**](DeviceFace.md) | | [optional]
2323
**Latitude** | Pointer to **NullableFloat64** | GPS coordinate in decimal format (xx.yyyyyy) | [optional]
2424
**Longitude** | Pointer to **NullableFloat64** | GPS coordinate in decimal format (xx.yyyyyy) | [optional]
25-
**ParentDevice** | [**NestedDevice**](NestedDevice.md) | | [readonly]
25+
**ParentDevice** | [**NullableNestedDevice**](NestedDevice.md) | | [readonly]
2626
**Status** | Pointer to [**DeviceStatus**](DeviceStatus.md) | | [optional]
2727
**Airflow** | Pointer to [**DeviceAirflow**](DeviceAirflow.md) | | [optional]
2828
**PrimaryIp** | [**NestedIPAddress**](NestedIPAddress.md) | | [readonly]
@@ -57,7 +57,7 @@ Name | Type | Description | Notes
5757

5858
### NewDeviceWithConfigContext
5959

60-
`func NewDeviceWithConfigContext(id int32, url string, display string, deviceType NestedDeviceType, role NestedDeviceRole, deviceRole DeviceDeviceRole, site NestedSite, parentDevice NestedDevice, primaryIp NestedIPAddress, configContext interface{}, created NullableTime, lastUpdated NullableTime, consolePortCount int32, consoleServerPortCount int32, powerPortCount int32, powerOutletCount int32, interfaceCount int32, frontPortCount int32, rearPortCount int32, deviceBayCount int32, moduleBayCount int32, inventoryItemCount int32, ) *DeviceWithConfigContext`
60+
`func NewDeviceWithConfigContext(id int32, url string, display string, deviceType NestedDeviceType, role NestedDeviceRole, deviceRole DeviceDeviceRole, site NestedSite, parentDevice NullableNestedDevice, primaryIp NestedIPAddress, configContext interface{}, created NullableTime, lastUpdated NullableTime, consolePortCount int32, consoleServerPortCount int32, powerPortCount int32, powerOutletCount int32, interfaceCount int32, frontPortCount int32, rearPortCount int32, deviceBayCount int32, moduleBayCount int32, inventoryItemCount int32, ) *DeviceWithConfigContext`
6161

6262
NewDeviceWithConfigContext instantiates a new DeviceWithConfigContext object
6363
This constructor will assign default values to properties that have it defined,
@@ -597,6 +597,16 @@ and a boolean to check if the value has been set.
597597
SetParentDevice sets ParentDevice field to given value.
598598

599599

600+
### SetParentDeviceNil
601+
602+
`func (o *DeviceWithConfigContext) SetParentDeviceNil(b bool)`
603+
604+
SetParentDeviceNil sets the value for ParentDevice to be an explicit nil
605+
606+
### UnsetParentDevice
607+
`func (o *DeviceWithConfigContext) UnsetParentDevice()`
608+
609+
UnsetParentDevice ensures that no value is present for ParentDevice, not even an explicit nil
600610
### GetStatus
601611

602612
`func (o *DeviceWithConfigContext) GetStatus() DeviceStatus`

main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ const authHeaderFormat = "Token %v"
99

1010
func NewAPIClientFor(host string, token string) *APIClient {
1111
cfg := NewConfiguration()
12+
1213
cfg.Servers[0].URL = host
13-
cfg.DefaultHeader[authHeaderName] = fmt.Sprintf(authHeaderFormat, token)
14+
15+
cfg.AddDefaultHeader(
16+
authHeaderName,
17+
fmt.Sprintf(authHeaderFormat, token),
18+
)
1419

1520
return NewAPIClient(cfg)
1621
}

model_device.go

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

model_device_with_config_context.go

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)