Skip to content

Commit d4575dd

Browse files
Felix EdelmannAsamaSumer
Felix Edelmann
authored andcommitted
Quick fix for netbox-community#165: Make some *_count fields non-required
1 parent 0df4a75 commit d4575dd

14 files changed

+238
-133
lines changed

api/openapi.yaml

-8
Original file line numberDiff line numberDiff line change
@@ -102497,7 +102497,6 @@ components:
102497102497
- id
102498102498
- name
102499102499
- url
102500-
- virtualmachine_count
102501102500
ClusterGroup:
102502102501
type: object
102503102502
description: Adds support for custom fields and tags.
@@ -105609,13 +105608,11 @@ components:
105609105608
format: int64
105610105609
readOnly: true
105611105610
required:
105612-
- device_count
105613105611
- display
105614105612
- id
105615105613
- name
105616105614
- slug
105617105615
- url
105618-
- virtualmachine_count
105619105616
DeviceRoleRequest:
105620105617
type: object
105621105618
description: Adds support for custom fields and tags.
@@ -105685,7 +105682,6 @@ components:
105685105682
format: int64
105686105683
readOnly: true
105687105684
required:
105688-
- device_count
105689105685
- display
105690105686
- id
105691105687
- manufacturer
@@ -113955,7 +113951,6 @@ components:
113955113951
format: int64
113956113952
readOnly: true
113957113953
required:
113958-
- devicetype_count
113959113954
- display
113960113955
- id
113961113956
- name
@@ -126667,13 +126662,11 @@ components:
126667126662
format: int64
126668126663
readOnly: true
126669126664
required:
126670-
- device_count
126671126665
- display
126672126666
- id
126673126667
- name
126674126668
- slug
126675126669
- url
126676-
- virtualmachine_count
126677126670
PlatformRequest:
126678126671
type: object
126679126672
description: Adds support for custom fields and tags.
@@ -129230,7 +129223,6 @@ components:
129230129223
format: int64
129231129224
readOnly: true
129232129225
required:
129233-
- device_count
129234129226
- display
129235129227
- id
129236129228
- name

docs/Cluster.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Name | Type | Description | Notes
99
**Display** | **string** | | [readonly]
1010
**Name** | **string** | |
1111
**Description** | Pointer to **string** | | [optional]
12-
**VirtualmachineCount** | **int64** | | [readonly]
12+
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]
1313

1414
## Methods
1515

1616
### NewCluster
1717

18-
`func NewCluster(id int32, url string, display string, name string, virtualmachineCount int64, ) *Cluster`
18+
`func NewCluster(id int32, url string, display string, name string, ) *Cluster`
1919

2020
NewCluster instantiates a new Cluster object
2121
This constructor will assign default values to properties that have it defined,
@@ -154,6 +154,11 @@ and a boolean to check if the value has been set.
154154

155155
SetVirtualmachineCount sets VirtualmachineCount field to given value.
156156

157+
### HasVirtualmachineCount
158+
159+
`func (o *Cluster) HasVirtualmachineCount() bool`
160+
161+
HasVirtualmachineCount returns a boolean if a field has been set.
157162

158163

159164
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/DeviceRole.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Name | Type | Description | Notes
1010
**Name** | **string** | |
1111
**Slug** | **string** | |
1212
**Description** | Pointer to **string** | | [optional]
13-
**DeviceCount** | **int64** | | [readonly]
14-
**VirtualmachineCount** | **int64** | | [readonly]
13+
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
14+
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]
1515

1616
## Methods
1717

1818
### NewDeviceRole
1919

20-
`func NewDeviceRole(id int32, url string, display string, name string, slug string, deviceCount int64, virtualmachineCount int64, ) *DeviceRole`
20+
`func NewDeviceRole(id int32, url string, display string, name string, slug string, ) *DeviceRole`
2121

2222
NewDeviceRole instantiates a new DeviceRole object
2323
This constructor will assign default values to properties that have it defined,
@@ -176,6 +176,11 @@ and a boolean to check if the value has been set.
176176

177177
SetDeviceCount sets DeviceCount field to given value.
178178

179+
### HasDeviceCount
180+
181+
`func (o *DeviceRole) HasDeviceCount() bool`
182+
183+
HasDeviceCount returns a boolean if a field has been set.
179184

180185
### GetVirtualmachineCount
181186

@@ -196,6 +201,11 @@ and a boolean to check if the value has been set.
196201

197202
SetVirtualmachineCount sets VirtualmachineCount field to given value.
198203

204+
### HasVirtualmachineCount
205+
206+
`func (o *DeviceRole) HasVirtualmachineCount() bool`
207+
208+
HasVirtualmachineCount returns a boolean if a field has been set.
199209

200210

201211
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/DeviceType.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ Name | Type | Description | Notes
1111
**Model** | **string** | |
1212
**Slug** | **string** | |
1313
**Description** | Pointer to **string** | | [optional]
14-
**DeviceCount** | **int64** | | [readonly]
14+
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
1515

1616
## Methods
1717

1818
### NewDeviceType
1919

20-
`func NewDeviceType(id int32, url string, display string, manufacturer Manufacturer, model string, slug string, deviceCount int64, ) *DeviceType`
20+
`func NewDeviceType(id int32, url string, display string, manufacturer Manufacturer, model string, slug string, ) *DeviceType`
2121

2222
NewDeviceType instantiates a new DeviceType object
2323
This constructor will assign default values to properties that have it defined,
@@ -196,6 +196,11 @@ and a boolean to check if the value has been set.
196196

197197
SetDeviceCount sets DeviceCount field to given value.
198198

199+
### HasDeviceCount
200+
201+
`func (o *DeviceType) HasDeviceCount() bool`
202+
203+
HasDeviceCount returns a boolean if a field has been set.
199204

200205

201206
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/Manufacturer.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Name | Type | Description | Notes
1010
**Name** | **string** | |
1111
**Slug** | **string** | |
1212
**Description** | Pointer to **string** | | [optional]
13-
**DevicetypeCount** | **int64** | | [readonly]
13+
**DevicetypeCount** | Pointer to **int64** | | [optional] [readonly]
1414

1515
## Methods
1616

1717
### NewManufacturer
1818

19-
`func NewManufacturer(id int32, url string, display string, name string, slug string, devicetypeCount int64, ) *Manufacturer`
19+
`func NewManufacturer(id int32, url string, display string, name string, slug string, ) *Manufacturer`
2020

2121
NewManufacturer instantiates a new Manufacturer object
2222
This constructor will assign default values to properties that have it defined,
@@ -175,6 +175,11 @@ and a boolean to check if the value has been set.
175175

176176
SetDevicetypeCount sets DevicetypeCount field to given value.
177177

178+
### HasDevicetypeCount
179+
180+
`func (o *Manufacturer) HasDevicetypeCount() bool`
181+
182+
HasDevicetypeCount returns a boolean if a field has been set.
178183

179184

180185
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/Platform.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Name | Type | Description | Notes
1010
**Name** | **string** | |
1111
**Slug** | **string** | |
1212
**Description** | Pointer to **string** | | [optional]
13-
**DeviceCount** | **int64** | | [readonly]
14-
**VirtualmachineCount** | **int64** | | [readonly]
13+
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
14+
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]
1515

1616
## Methods
1717

1818
### NewPlatform
1919

20-
`func NewPlatform(id int32, url string, display string, name string, slug string, deviceCount int64, virtualmachineCount int64, ) *Platform`
20+
`func NewPlatform(id int32, url string, display string, name string, slug string, ) *Platform`
2121

2222
NewPlatform instantiates a new Platform object
2323
This constructor will assign default values to properties that have it defined,
@@ -176,6 +176,11 @@ and a boolean to check if the value has been set.
176176

177177
SetDeviceCount sets DeviceCount field to given value.
178178

179+
### HasDeviceCount
180+
181+
`func (o *Platform) HasDeviceCount() bool`
182+
183+
HasDeviceCount returns a boolean if a field has been set.
179184

180185
### GetVirtualmachineCount
181186

@@ -196,6 +201,11 @@ and a boolean to check if the value has been set.
196201

197202
SetVirtualmachineCount sets VirtualmachineCount field to given value.
198203

204+
### HasVirtualmachineCount
205+
206+
`func (o *Platform) HasVirtualmachineCount() bool`
207+
208+
HasVirtualmachineCount returns a boolean if a field has been set.
199209

200210

201211
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/Rack.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Name | Type | Description | Notes
99
**Display** | **string** | | [readonly]
1010
**Name** | **string** | |
1111
**Description** | Pointer to **string** | | [optional]
12-
**DeviceCount** | **int64** | | [readonly]
12+
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
1313

1414
## Methods
1515

1616
### NewRack
1717

18-
`func NewRack(id int32, url string, display string, name string, deviceCount int64, ) *Rack`
18+
`func NewRack(id int32, url string, display string, name string, ) *Rack`
1919

2020
NewRack instantiates a new Rack object
2121
This constructor will assign default values to properties that have it defined,
@@ -154,6 +154,11 @@ and a boolean to check if the value has been set.
154154

155155
SetDeviceCount sets DeviceCount field to given value.
156156

157+
### HasDeviceCount
158+
159+
`func (o *Rack) HasDeviceCount() bool`
160+
161+
HasDeviceCount returns a boolean if a field has been set.
157162

158163

159164
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

model_cluster.go

+22-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)