From d4823e24ee49b16cd9b3705bf005fc900fe15330 Mon Sep 17 00:00:00 2001 From: Kanwar Saad Bin Liaqat Date: Thu, 19 Sep 2019 04:13:01 +0300 Subject: [PATCH] Add class prefix to enums --- Makefile | 2 +- client/model_boot_source.go | 30 ++++++++++---------- client/model_boot_source_override_enabled.go | 4 +-- client/model_connected_via.go | 8 +++--- client/model_health.go | 6 ++-- client/model_indicator_led.go | 8 +++--- client/model_manager_type.go | 12 ++++---- client/model_power_state.go | 8 +++--- client/model_reset_type.go | 18 ++++++------ client/model_state.go | 22 +++++++------- client/model_transfer_method.go | 4 +-- client/model_transfer_protocol_type.go | 16 +++++------ 12 files changed, 69 insertions(+), 69 deletions(-) diff --git a/Makefile b/Makefile index b8e140e..5cae238 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: code-gen code-gen: rm -rf client - openapi-generator generate -i ./spec/openapi.yaml -g go --package-name "client" --git-repo-id go-redfish/client --git-user-id Nordix -o client/ + openapi-generator generate -i ./spec/openapi.yaml -g go --package-name "client" --git-repo-id go-redfish/client --git-user-id Nordix -o client/ -p enumClassPrefix=true .PHONY: deps deps: diff --git a/client/model_boot_source.go b/client/model_boot_source.go index 2b9680d..e9803fa 100644 --- a/client/model_boot_source.go +++ b/client/model_boot_source.go @@ -12,19 +12,19 @@ type BootSource string // List of BootSource const ( - NONE BootSource = "None" - PXE BootSource = "Pxe" - FLOPPY BootSource = "Floppy" - CD BootSource = "Cd" - USB BootSource = "Usb" - HDD BootSource = "Hdd" - BIOS_SETUP BootSource = "BiosSetup" - UTILITIES BootSource = "Utilities" - DIAGS BootSource = "Diags" - UEFI_SHELL BootSource = "UefiShell" - UEFI_TARGET BootSource = "UefiTarget" - SD_CARD BootSource = "SDCard" - UEFI_HTTP BootSource = "UefiHttp" - REMOTE_DRIVE BootSource = "RemoteDrive" - UEFI_BOOT_NEXT BootSource = "UefiBootNext" + BOOTSOURCE_NONE BootSource = "None" + BOOTSOURCE_PXE BootSource = "Pxe" + BOOTSOURCE_FLOPPY BootSource = "Floppy" + BOOTSOURCE_CD BootSource = "Cd" + BOOTSOURCE_USB BootSource = "Usb" + BOOTSOURCE_HDD BootSource = "Hdd" + BOOTSOURCE_BIOS_SETUP BootSource = "BiosSetup" + BOOTSOURCE_UTILITIES BootSource = "Utilities" + BOOTSOURCE_DIAGS BootSource = "Diags" + BOOTSOURCE_UEFI_SHELL BootSource = "UefiShell" + BOOTSOURCE_UEFI_TARGET BootSource = "UefiTarget" + BOOTSOURCE_SD_CARD BootSource = "SDCard" + BOOTSOURCE_UEFI_HTTP BootSource = "UefiHttp" + BOOTSOURCE_REMOTE_DRIVE BootSource = "RemoteDrive" + BOOTSOURCE_UEFI_BOOT_NEXT BootSource = "UefiBootNext" ) \ No newline at end of file diff --git a/client/model_boot_source_override_enabled.go b/client/model_boot_source_override_enabled.go index 8d64838..abb8ae8 100644 --- a/client/model_boot_source_override_enabled.go +++ b/client/model_boot_source_override_enabled.go @@ -12,6 +12,6 @@ type BootSourceOverrideEnabled string // List of BootSourceOverrideEnabled const ( - ONCE BootSourceOverrideEnabled = "Once" - CONTINUOUS BootSourceOverrideEnabled = "Continuous" + BOOTSOURCEOVERRIDEENABLED_ONCE BootSourceOverrideEnabled = "Once" + BOOTSOURCEOVERRIDEENABLED_CONTINUOUS BootSourceOverrideEnabled = "Continuous" ) \ No newline at end of file diff --git a/client/model_connected_via.go b/client/model_connected_via.go index bc8eab7..ea29907 100644 --- a/client/model_connected_via.go +++ b/client/model_connected_via.go @@ -12,8 +12,8 @@ type ConnectedVia string // List of ConnectedVia const ( - NOT_CONNECTED ConnectedVia = "NotConnected" - URI ConnectedVia = "URI" - APPLET ConnectedVia = "Applet" - OEM ConnectedVia = "Oem" + CONNECTEDVIA_NOT_CONNECTED ConnectedVia = "NotConnected" + CONNECTEDVIA_URI ConnectedVia = "URI" + CONNECTEDVIA_APPLET ConnectedVia = "Applet" + CONNECTEDVIA_OEM ConnectedVia = "Oem" ) \ No newline at end of file diff --git a/client/model_health.go b/client/model_health.go index dd239d2..cdd8ea8 100644 --- a/client/model_health.go +++ b/client/model_health.go @@ -12,7 +12,7 @@ type Health string // List of Health const ( - OK Health = "OK" - WARNING Health = "Warning" - CRITICAL Health = "Critical" + HEALTH_OK Health = "OK" + HEALTH_WARNING Health = "Warning" + HEALTH_CRITICAL Health = "Critical" ) \ No newline at end of file diff --git a/client/model_indicator_led.go b/client/model_indicator_led.go index 89e5c71..77a27c7 100644 --- a/client/model_indicator_led.go +++ b/client/model_indicator_led.go @@ -12,8 +12,8 @@ type IndicatorLed string // List of IndicatorLED const ( - UNKNOWN IndicatorLed = "Unknown" - LIT IndicatorLed = "Lit" - BLINKING IndicatorLed = "Blinking" - OFF IndicatorLed = "Off" + INDICATORLED_UNKNOWN IndicatorLed = "Unknown" + INDICATORLED_LIT IndicatorLed = "Lit" + INDICATORLED_BLINKING IndicatorLed = "Blinking" + INDICATORLED_OFF IndicatorLed = "Off" ) \ No newline at end of file diff --git a/client/model_manager_type.go b/client/model_manager_type.go index 2c3472a..5c0c4bf 100644 --- a/client/model_manager_type.go +++ b/client/model_manager_type.go @@ -12,10 +12,10 @@ type ManagerType string // List of ManagerType const ( - MANAGEMENT_CONTROLLER ManagerType = "ManagementController" - ENCLOSURE_MANAGER ManagerType = "EnclosureManager" - BMC ManagerType = "BMC" - RACK_MANAGER ManagerType = "RackManager" - AUXILIARY_CONTROLLER ManagerType = "AuxiliaryController" - SERVICE ManagerType = "Service" + MANAGERTYPE_MANAGEMENT_CONTROLLER ManagerType = "ManagementController" + MANAGERTYPE_ENCLOSURE_MANAGER ManagerType = "EnclosureManager" + MANAGERTYPE_BMC ManagerType = "BMC" + MANAGERTYPE_RACK_MANAGER ManagerType = "RackManager" + MANAGERTYPE_AUXILIARY_CONTROLLER ManagerType = "AuxiliaryController" + MANAGERTYPE_SERVICE ManagerType = "Service" ) \ No newline at end of file diff --git a/client/model_power_state.go b/client/model_power_state.go index 8e56bb5..7d95fc1 100644 --- a/client/model_power_state.go +++ b/client/model_power_state.go @@ -12,8 +12,8 @@ type PowerState string // List of PowerState const ( - TRUE PowerState = "true" - FALSE PowerState = "false" - POWERING_ON PowerState = "PoweringOn" - POWERING_OFF PowerState = "PoweringOff" + POWERSTATE_TRUE PowerState = "true" + POWERSTATE_FALSE PowerState = "false" + POWERSTATE_POWERING_ON PowerState = "PoweringOn" + POWERSTATE_POWERING_OFF PowerState = "PoweringOff" ) \ No newline at end of file diff --git a/client/model_reset_type.go b/client/model_reset_type.go index d64024b..c0cec3b 100644 --- a/client/model_reset_type.go +++ b/client/model_reset_type.go @@ -12,13 +12,13 @@ type ResetType string // List of ResetType const ( - ON ResetType = "On" - FORCE_OFF ResetType = "ForceOff" - GRACEFUL_SHUTDOWN ResetType = "GracefulShutdown" - GRACEFUL_RESTART ResetType = "GracefulRestart" - FORCE_RESTART ResetType = "ForceRestart" - NMI ResetType = "Nmi" - FORCE_ON ResetType = "ForceOn" - PUSH_POWER_BUTTON ResetType = "PushPowerButton" - POWER_CYCLE ResetType = "PowerCycle" + RESETTYPE_ON ResetType = "On" + RESETTYPE_FORCE_OFF ResetType = "ForceOff" + RESETTYPE_GRACEFUL_SHUTDOWN ResetType = "GracefulShutdown" + RESETTYPE_GRACEFUL_RESTART ResetType = "GracefulRestart" + RESETTYPE_FORCE_RESTART ResetType = "ForceRestart" + RESETTYPE_NMI ResetType = "Nmi" + RESETTYPE_FORCE_ON ResetType = "ForceOn" + RESETTYPE_PUSH_POWER_BUTTON ResetType = "PushPowerButton" + RESETTYPE_POWER_CYCLE ResetType = "PowerCycle" ) \ No newline at end of file diff --git a/client/model_state.go b/client/model_state.go index 00016fe..6c5b723 100644 --- a/client/model_state.go +++ b/client/model_state.go @@ -12,15 +12,15 @@ type State string // List of State const ( - ENABLED State = "Enabled" - DISABLED State = "Disabled" - STANDBY_OFFLINE State = "StandbyOffline" - STANDBY_SPARE State = "StandbySpare" - IN_TEST State = "InTest" - STARTING State = "Starting" - ABSENT State = "Absent" - UNAVAILABLE_OFFLINE State = "UnavailableOffline" - DEFERRING State = "Deferring" - QUIESCED State = "Quiesced" - UPDATING State = "Updating" + STATE_ENABLED State = "Enabled" + STATE_DISABLED State = "Disabled" + STATE_STANDBY_OFFLINE State = "StandbyOffline" + STATE_STANDBY_SPARE State = "StandbySpare" + STATE_IN_TEST State = "InTest" + STATE_STARTING State = "Starting" + STATE_ABSENT State = "Absent" + STATE_UNAVAILABLE_OFFLINE State = "UnavailableOffline" + STATE_DEFERRING State = "Deferring" + STATE_QUIESCED State = "Quiesced" + STATE_UPDATING State = "Updating" ) \ No newline at end of file diff --git a/client/model_transfer_method.go b/client/model_transfer_method.go index efaaa5c..3a5749c 100644 --- a/client/model_transfer_method.go +++ b/client/model_transfer_method.go @@ -12,6 +12,6 @@ type TransferMethod string // List of TransferMethod const ( - STREAM TransferMethod = "Stream" - UPLOAD TransferMethod = "Upload" + TRANSFERMETHOD_STREAM TransferMethod = "Stream" + TRANSFERMETHOD_UPLOAD TransferMethod = "Upload" ) \ No newline at end of file diff --git a/client/model_transfer_protocol_type.go b/client/model_transfer_protocol_type.go index fc4de93..96f3773 100644 --- a/client/model_transfer_protocol_type.go +++ b/client/model_transfer_protocol_type.go @@ -12,12 +12,12 @@ type TransferProtocolType string // List of TransferProtocolType const ( - CIFS TransferProtocolType = "CIFS" - FTP TransferProtocolType = "FTP" - SFTP TransferProtocolType = "SFTP" - HTTP TransferProtocolType = "HTTP" - HTTPS TransferProtocolType = "HTTPS" - NFS TransferProtocolType = "NFS" - SCP TransferProtocolType = "SCP" - TFTP TransferProtocolType = "TFTP" + TRANSFERPROTOCOLTYPE_CIFS TransferProtocolType = "CIFS" + TRANSFERPROTOCOLTYPE_FTP TransferProtocolType = "FTP" + TRANSFERPROTOCOLTYPE_SFTP TransferProtocolType = "SFTP" + TRANSFERPROTOCOLTYPE_HTTP TransferProtocolType = "HTTP" + TRANSFERPROTOCOLTYPE_HTTPS TransferProtocolType = "HTTPS" + TRANSFERPROTOCOLTYPE_NFS TransferProtocolType = "NFS" + TRANSFERPROTOCOLTYPE_SCP TransferProtocolType = "SCP" + TRANSFERPROTOCOLTYPE_TFTP TransferProtocolType = "TFTP" ) \ No newline at end of file