Add class prefix to enums

This commit is contained in:
Kanwar Saad Bin Liaqat 2019-09-19 04:13:01 +03:00
parent 7977676acb
commit d4823e24ee
No known key found for this signature in database
GPG Key ID: F5189DC439490C63
12 changed files with 69 additions and 69 deletions

View File

@ -1,7 +1,7 @@
.PHONY: code-gen .PHONY: code-gen
code-gen: code-gen:
rm -rf client 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 .PHONY: deps
deps: deps:

View File

@ -12,19 +12,19 @@ type BootSource string
// List of BootSource // List of BootSource
const ( const (
NONE BootSource = "None" BOOTSOURCE_NONE BootSource = "None"
PXE BootSource = "Pxe" BOOTSOURCE_PXE BootSource = "Pxe"
FLOPPY BootSource = "Floppy" BOOTSOURCE_FLOPPY BootSource = "Floppy"
CD BootSource = "Cd" BOOTSOURCE_CD BootSource = "Cd"
USB BootSource = "Usb" BOOTSOURCE_USB BootSource = "Usb"
HDD BootSource = "Hdd" BOOTSOURCE_HDD BootSource = "Hdd"
BIOS_SETUP BootSource = "BiosSetup" BOOTSOURCE_BIOS_SETUP BootSource = "BiosSetup"
UTILITIES BootSource = "Utilities" BOOTSOURCE_UTILITIES BootSource = "Utilities"
DIAGS BootSource = "Diags" BOOTSOURCE_DIAGS BootSource = "Diags"
UEFI_SHELL BootSource = "UefiShell" BOOTSOURCE_UEFI_SHELL BootSource = "UefiShell"
UEFI_TARGET BootSource = "UefiTarget" BOOTSOURCE_UEFI_TARGET BootSource = "UefiTarget"
SD_CARD BootSource = "SDCard" BOOTSOURCE_SD_CARD BootSource = "SDCard"
UEFI_HTTP BootSource = "UefiHttp" BOOTSOURCE_UEFI_HTTP BootSource = "UefiHttp"
REMOTE_DRIVE BootSource = "RemoteDrive" BOOTSOURCE_REMOTE_DRIVE BootSource = "RemoteDrive"
UEFI_BOOT_NEXT BootSource = "UefiBootNext" BOOTSOURCE_UEFI_BOOT_NEXT BootSource = "UefiBootNext"
) )

View File

@ -12,6 +12,6 @@ type BootSourceOverrideEnabled string
// List of BootSourceOverrideEnabled // List of BootSourceOverrideEnabled
const ( const (
ONCE BootSourceOverrideEnabled = "Once" BOOTSOURCEOVERRIDEENABLED_ONCE BootSourceOverrideEnabled = "Once"
CONTINUOUS BootSourceOverrideEnabled = "Continuous" BOOTSOURCEOVERRIDEENABLED_CONTINUOUS BootSourceOverrideEnabled = "Continuous"
) )

View File

@ -12,8 +12,8 @@ type ConnectedVia string
// List of ConnectedVia // List of ConnectedVia
const ( const (
NOT_CONNECTED ConnectedVia = "NotConnected" CONNECTEDVIA_NOT_CONNECTED ConnectedVia = "NotConnected"
URI ConnectedVia = "URI" CONNECTEDVIA_URI ConnectedVia = "URI"
APPLET ConnectedVia = "Applet" CONNECTEDVIA_APPLET ConnectedVia = "Applet"
OEM ConnectedVia = "Oem" CONNECTEDVIA_OEM ConnectedVia = "Oem"
) )

View File

@ -12,7 +12,7 @@ type Health string
// List of Health // List of Health
const ( const (
OK Health = "OK" HEALTH_OK Health = "OK"
WARNING Health = "Warning" HEALTH_WARNING Health = "Warning"
CRITICAL Health = "Critical" HEALTH_CRITICAL Health = "Critical"
) )

View File

@ -12,8 +12,8 @@ type IndicatorLed string
// List of IndicatorLED // List of IndicatorLED
const ( const (
UNKNOWN IndicatorLed = "Unknown" INDICATORLED_UNKNOWN IndicatorLed = "Unknown"
LIT IndicatorLed = "Lit" INDICATORLED_LIT IndicatorLed = "Lit"
BLINKING IndicatorLed = "Blinking" INDICATORLED_BLINKING IndicatorLed = "Blinking"
OFF IndicatorLed = "Off" INDICATORLED_OFF IndicatorLed = "Off"
) )

View File

@ -12,10 +12,10 @@ type ManagerType string
// List of ManagerType // List of ManagerType
const ( const (
MANAGEMENT_CONTROLLER ManagerType = "ManagementController" MANAGERTYPE_MANAGEMENT_CONTROLLER ManagerType = "ManagementController"
ENCLOSURE_MANAGER ManagerType = "EnclosureManager" MANAGERTYPE_ENCLOSURE_MANAGER ManagerType = "EnclosureManager"
BMC ManagerType = "BMC" MANAGERTYPE_BMC ManagerType = "BMC"
RACK_MANAGER ManagerType = "RackManager" MANAGERTYPE_RACK_MANAGER ManagerType = "RackManager"
AUXILIARY_CONTROLLER ManagerType = "AuxiliaryController" MANAGERTYPE_AUXILIARY_CONTROLLER ManagerType = "AuxiliaryController"
SERVICE ManagerType = "Service" MANAGERTYPE_SERVICE ManagerType = "Service"
) )

View File

@ -12,8 +12,8 @@ type PowerState string
// List of PowerState // List of PowerState
const ( const (
TRUE PowerState = "true" POWERSTATE_TRUE PowerState = "true"
FALSE PowerState = "false" POWERSTATE_FALSE PowerState = "false"
POWERING_ON PowerState = "PoweringOn" POWERSTATE_POWERING_ON PowerState = "PoweringOn"
POWERING_OFF PowerState = "PoweringOff" POWERSTATE_POWERING_OFF PowerState = "PoweringOff"
) )

View File

@ -12,13 +12,13 @@ type ResetType string
// List of ResetType // List of ResetType
const ( const (
ON ResetType = "On" RESETTYPE_ON ResetType = "On"
FORCE_OFF ResetType = "ForceOff" RESETTYPE_FORCE_OFF ResetType = "ForceOff"
GRACEFUL_SHUTDOWN ResetType = "GracefulShutdown" RESETTYPE_GRACEFUL_SHUTDOWN ResetType = "GracefulShutdown"
GRACEFUL_RESTART ResetType = "GracefulRestart" RESETTYPE_GRACEFUL_RESTART ResetType = "GracefulRestart"
FORCE_RESTART ResetType = "ForceRestart" RESETTYPE_FORCE_RESTART ResetType = "ForceRestart"
NMI ResetType = "Nmi" RESETTYPE_NMI ResetType = "Nmi"
FORCE_ON ResetType = "ForceOn" RESETTYPE_FORCE_ON ResetType = "ForceOn"
PUSH_POWER_BUTTON ResetType = "PushPowerButton" RESETTYPE_PUSH_POWER_BUTTON ResetType = "PushPowerButton"
POWER_CYCLE ResetType = "PowerCycle" RESETTYPE_POWER_CYCLE ResetType = "PowerCycle"
) )

View File

@ -12,15 +12,15 @@ type State string
// List of State // List of State
const ( const (
ENABLED State = "Enabled" STATE_ENABLED State = "Enabled"
DISABLED State = "Disabled" STATE_DISABLED State = "Disabled"
STANDBY_OFFLINE State = "StandbyOffline" STATE_STANDBY_OFFLINE State = "StandbyOffline"
STANDBY_SPARE State = "StandbySpare" STATE_STANDBY_SPARE State = "StandbySpare"
IN_TEST State = "InTest" STATE_IN_TEST State = "InTest"
STARTING State = "Starting" STATE_STARTING State = "Starting"
ABSENT State = "Absent" STATE_ABSENT State = "Absent"
UNAVAILABLE_OFFLINE State = "UnavailableOffline" STATE_UNAVAILABLE_OFFLINE State = "UnavailableOffline"
DEFERRING State = "Deferring" STATE_DEFERRING State = "Deferring"
QUIESCED State = "Quiesced" STATE_QUIESCED State = "Quiesced"
UPDATING State = "Updating" STATE_UPDATING State = "Updating"
) )

View File

@ -12,6 +12,6 @@ type TransferMethod string
// List of TransferMethod // List of TransferMethod
const ( const (
STREAM TransferMethod = "Stream" TRANSFERMETHOD_STREAM TransferMethod = "Stream"
UPLOAD TransferMethod = "Upload" TRANSFERMETHOD_UPLOAD TransferMethod = "Upload"
) )

View File

@ -12,12 +12,12 @@ type TransferProtocolType string
// List of TransferProtocolType // List of TransferProtocolType
const ( const (
CIFS TransferProtocolType = "CIFS" TRANSFERPROTOCOLTYPE_CIFS TransferProtocolType = "CIFS"
FTP TransferProtocolType = "FTP" TRANSFERPROTOCOLTYPE_FTP TransferProtocolType = "FTP"
SFTP TransferProtocolType = "SFTP" TRANSFERPROTOCOLTYPE_SFTP TransferProtocolType = "SFTP"
HTTP TransferProtocolType = "HTTP" TRANSFERPROTOCOLTYPE_HTTP TransferProtocolType = "HTTP"
HTTPS TransferProtocolType = "HTTPS" TRANSFERPROTOCOLTYPE_HTTPS TransferProtocolType = "HTTPS"
NFS TransferProtocolType = "NFS" TRANSFERPROTOCOLTYPE_NFS TransferProtocolType = "NFS"
SCP TransferProtocolType = "SCP" TRANSFERPROTOCOLTYPE_SCP TransferProtocolType = "SCP"
TFTP TransferProtocolType = "TFTP" TRANSFERPROTOCOLTYPE_TFTP TransferProtocolType = "TFTP"
) )