Skip to content

Commit

Permalink
regen embedded sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfrahry authored and tombuildsstuff committed Nov 12, 2021
1 parent d042f29 commit 7612229
Show file tree
Hide file tree
Showing 17 changed files with 1,096 additions and 700 deletions.
214 changes: 214 additions & 0 deletions internal/services/signalr/sdk/2020-05-01/signalr/constants.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
package signalr

import "strings"

type ACLAction string

const (
ACLActionAllow ACLAction = "Allow"
ACLActionDeny ACLAction = "Deny"
)

func PossibleValuesForACLAction() []string {
return []string{
"Allow",
"Deny",
}
}

func parseACLAction(input string) (*ACLAction, error) {
vals := map[string]ACLAction{
"allow": "Allow",
"deny": "Deny",
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
}

// it could be a new value - best effort convert this
v := input

out := ACLAction(v)
return &out, nil
}

type FeatureFlags string

const (
Expand All @@ -15,13 +40,61 @@ const (
FeatureFlagsServiceMode FeatureFlags = "ServiceMode"
)

func PossibleValuesForFeatureFlags() []string {
return []string{
"EnableConnectivityLogs",
"EnableMessagingLogs",
"ServiceMode",
}
}

func parseFeatureFlags(input string) (*FeatureFlags, error) {
vals := map[string]FeatureFlags{
"enableconnectivitylogs": "EnableConnectivityLogs",
"enablemessaginglogs": "EnableMessagingLogs",
"servicemode": "ServiceMode",
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
}

// it could be a new value - best effort convert this
v := input

out := FeatureFlags(v)
return &out, nil
}

type KeyType string

const (
KeyTypePrimary KeyType = "Primary"
KeyTypeSecondary KeyType = "Secondary"
)

func PossibleValuesForKeyType() []string {
return []string{
"Primary",
"Secondary",
}
}

func parseKeyType(input string) (*KeyType, error) {
vals := map[string]KeyType{
"primary": "Primary",
"secondary": "Secondary",
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
}

// it could be a new value - best effort convert this
v := input

out := KeyType(v)
return &out, nil
}

type PrivateLinkServiceConnectionStatus string

const (
Expand All @@ -31,6 +104,33 @@ const (
PrivateLinkServiceConnectionStatusRejected PrivateLinkServiceConnectionStatus = "Rejected"
)

func PossibleValuesForPrivateLinkServiceConnectionStatus() []string {
return []string{
"Approved",
"Disconnected",
"Pending",
"Rejected",
}
}

func parsePrivateLinkServiceConnectionStatus(input string) (*PrivateLinkServiceConnectionStatus, error) {
vals := map[string]PrivateLinkServiceConnectionStatus{
"approved": "Approved",
"disconnected": "Disconnected",
"pending": "Pending",
"rejected": "Rejected",
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
}

// it could be a new value - best effort convert this
v := input

out := PrivateLinkServiceConnectionStatus(v)
return &out, nil
}

type ProvisioningState string

const (
Expand All @@ -45,13 +145,73 @@ const (
ProvisioningStateUpdating ProvisioningState = "Updating"
)

func PossibleValuesForProvisioningState() []string {
return []string{
"Canceled",
"Creating",
"Deleting",
"Failed",
"Moving",
"Running",
"Succeeded",
"Unknown",
"Updating",
}
}

func parseProvisioningState(input string) (*ProvisioningState, error) {
vals := map[string]ProvisioningState{
"canceled": "Canceled",
"creating": "Creating",
"deleting": "Deleting",
"failed": "Failed",
"moving": "Moving",
"running": "Running",
"succeeded": "Succeeded",
"unknown": "Unknown",
"updating": "Updating",
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
}

// it could be a new value - best effort convert this
v := input

out := ProvisioningState(v)
return &out, nil
}

type ServiceKind string

const (
ServiceKindRawWebSockets ServiceKind = "RawWebSockets"
ServiceKindSignalR ServiceKind = "SignalR"
)

func PossibleValuesForServiceKind() []string {
return []string{
"RawWebSockets",
"SignalR",
}
}

func parseServiceKind(input string) (*ServiceKind, error) {
vals := map[string]ServiceKind{
"rawwebsockets": "RawWebSockets",
"signalr": "SignalR",
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
}

// it could be a new value - best effort convert this
v := input

out := ServiceKind(v)
return &out, nil
}

type SignalRRequestType string

const (
Expand All @@ -61,6 +221,33 @@ const (
SignalRRequestTypeTrace SignalRRequestType = "Trace"
)

func PossibleValuesForSignalRRequestType() []string {
return []string{
"ClientConnection",
"RESTAPI",
"ServerConnection",
"Trace",
}
}

func parseSignalRRequestType(input string) (*SignalRRequestType, error) {
vals := map[string]SignalRRequestType{
"clientconnection": "ClientConnection",
"restapi": "RESTAPI",
"serverconnection": "ServerConnection",
"trace": "Trace",
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
}

// it could be a new value - best effort convert this
v := input

out := SignalRRequestType(v)
return &out, nil
}

type SignalRSkuTier string

const (
Expand All @@ -69,3 +256,30 @@ const (
SignalRSkuTierPremium SignalRSkuTier = "Premium"
SignalRSkuTierStandard SignalRSkuTier = "Standard"
)

func PossibleValuesForSignalRSkuTier() []string {
return []string{
"Basic",
"Free",
"Premium",
"Standard",
}
}

func parseSignalRSkuTier(input string) (*SignalRSkuTier, error) {
vals := map[string]SignalRSkuTier{
"basic": "Basic",
"free": "Free",
"premium": "Premium",
"standard": "Standard",
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
}

// it could be a new value - best effort convert this
v := input

out := SignalRSkuTier(v)
return &out, nil
}
Loading

0 comments on commit 7612229

Please sign in to comment.