Skip to content

Commit

Permalink
Quick fix for netbox-community#165: Make some *_count fields non-requ…
Browse files Browse the repository at this point in the history
…ired
  • Loading branch information
Felix Edelmann authored and AsamaSumer committed Sep 19, 2024
1 parent 0df4a75 commit d4575dd
Show file tree
Hide file tree
Showing 14 changed files with 238 additions and 133 deletions.
8 changes: 0 additions & 8 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102497,7 +102497,6 @@ components:
- id
- name
- url
- virtualmachine_count
ClusterGroup:
type: object
description: Adds support for custom fields and tags.
Expand Down Expand Up @@ -105609,13 +105608,11 @@ components:
format: int64
readOnly: true
required:
- device_count
- display
- id
- name
- slug
- url
- virtualmachine_count
DeviceRoleRequest:
type: object
description: Adds support for custom fields and tags.
Expand Down Expand Up @@ -105685,7 +105682,6 @@ components:
format: int64
readOnly: true
required:
- device_count
- display
- id
- manufacturer
Expand Down Expand Up @@ -113955,7 +113951,6 @@ components:
format: int64
readOnly: true
required:
- devicetype_count
- display
- id
- name
Expand Down Expand Up @@ -126667,13 +126662,11 @@ components:
format: int64
readOnly: true
required:
- device_count
- display
- id
- name
- slug
- url
- virtualmachine_count
PlatformRequest:
type: object
description: Adds support for custom fields and tags.
Expand Down Expand Up @@ -129230,7 +129223,6 @@ components:
format: int64
readOnly: true
required:
- device_count
- display
- id
- name
Expand Down
9 changes: 7 additions & 2 deletions docs/Cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Name | Type | Description | Notes
**Display** | **string** | | [readonly]
**Name** | **string** | |
**Description** | Pointer to **string** | | [optional]
**VirtualmachineCount** | **int64** | | [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewCluster

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

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

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *Cluster) HasVirtualmachineCount() bool`

HasVirtualmachineCount 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)
Expand Down
16 changes: 13 additions & 3 deletions docs/DeviceRole.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Name | Type | Description | Notes
**Name** | **string** | |
**Slug** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DeviceCount** | **int64** | | [readonly]
**VirtualmachineCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewDeviceRole

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

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

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *DeviceRole) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.

### GetVirtualmachineCount

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

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *DeviceRole) HasVirtualmachineCount() bool`

HasVirtualmachineCount 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)
Expand Down
9 changes: 7 additions & 2 deletions docs/DeviceType.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Name | Type | Description | Notes
**Model** | **string** | |
**Slug** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DeviceCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewDeviceType

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

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

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *DeviceType) HasDeviceCount() bool`

HasDeviceCount 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)
Expand Down
9 changes: 7 additions & 2 deletions docs/Manufacturer.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Name | Type | Description | Notes
**Name** | **string** | |
**Slug** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DevicetypeCount** | **int64** | | [readonly]
**DevicetypeCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewManufacturer

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

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

SetDevicetypeCount sets DevicetypeCount field to given value.

### HasDevicetypeCount

`func (o *Manufacturer) HasDevicetypeCount() bool`

HasDevicetypeCount 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)
Expand Down
16 changes: 13 additions & 3 deletions docs/Platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Name | Type | Description | Notes
**Name** | **string** | |
**Slug** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DeviceCount** | **int64** | | [readonly]
**VirtualmachineCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewPlatform

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

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

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *Platform) HasDeviceCount() bool`

HasDeviceCount returns a boolean if a field has been set.

### GetVirtualmachineCount

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

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *Platform) HasVirtualmachineCount() bool`

HasVirtualmachineCount 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)
Expand Down
9 changes: 7 additions & 2 deletions docs/Rack.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Name | Type | Description | Notes
**Display** | **string** | | [readonly]
**Name** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DeviceCount** | **int64** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewRack

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

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

SetDeviceCount sets DeviceCount field to given value.

### HasDeviceCount

`func (o *Rack) HasDeviceCount() bool`

HasDeviceCount 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)
Expand Down
36 changes: 22 additions & 14 deletions model_cluster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d4575dd

Please sign in to comment.