diff --git a/cmd/setEnvironmentVariable.go b/cmd/setEnvironmentVariable.go index b554b9e..cf599d2 100644 --- a/cmd/setEnvironmentVariable.go +++ b/cmd/setEnvironmentVariable.go @@ -31,7 +31,11 @@ import ( var setEnvironmentVariableCmd = &cobra.Command{ Use: "environment-variable", Short: "Will set an environment variable", - Long: `Will set an environment variable`, + Long: `Will set an environment variable + +Example: +rx set environment-variable --application your-application-name --environment test --component component-abc --variable LOG_LEVEL --value INFO +`, RunE: func(cmd *cobra.Command, args []string) error { appName, err := getAppNameFromConfigOrFromParameter(cmd, "application") if err != nil { @@ -115,8 +119,8 @@ func isComponentVariableReconciled(apiClient *apiclient.Radixapi, appName, envir env.Payload.ActiveDeployment.Components != nil { for _, component := range env.Payload.ActiveDeployment.Components { if *component.Name == componentName { - for _, variable := range component.Variables { - if variable == variableName { + for name := range component.Variables { + if name == variableName { return true } } diff --git a/generated-client/client/application/change_registration_details_parameters.go b/generated-client/client/application/change_registration_details_parameters.go index 50352cf..467adeb 100644 --- a/generated-client/client/application/change_registration_details_parameters.go +++ b/generated-client/client/application/change_registration_details_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type ChangeRegistrationDetailsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *ChangeRegistrationDetailsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the change registration details params -func (o *ChangeRegistrationDetailsParams) WithImpersonateGroup(impersonateGroup []string) *ChangeRegistrationDetailsParams { +func (o *ChangeRegistrationDetailsParams) WithImpersonateGroup(impersonateGroup *string) *ChangeRegistrationDetailsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the change registration details params -func (o *ChangeRegistrationDetailsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ChangeRegistrationDetailsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *ChangeRegistrationDetailsParams) WriteToRequest(r runtime.ClientRequest if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *ChangeRegistrationDetailsParams) WriteToRequest(r runtime.ClientRequest } return nil } - -// bindParamChangeRegistrationDetails binds the parameter Impersonate-Group -func (o *ChangeRegistrationDetailsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/delete_application_parameters.go b/generated-client/client/application/delete_application_parameters.go index 5c68451..3cf19f5 100644 --- a/generated-client/client/application/delete_application_parameters.go +++ b/generated-client/client/application/delete_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDeleteApplicationParams creates a new DeleteApplicationParams object, @@ -64,9 +63,9 @@ type DeleteApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *DeleteApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the delete application params -func (o *DeleteApplicationParams) WithImpersonateGroup(impersonateGroup []string) *DeleteApplicationParams { +func (o *DeleteApplicationParams) WithImpersonateGroup(impersonateGroup *string) *DeleteApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the delete application params -func (o *DeleteApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DeleteApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *DeleteApplicationParams) WriteToRequest(r runtime.ClientRequest, reg st if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *DeleteApplicationParams) WriteToRequest(r runtime.ClientRequest, reg st } return nil } - -// bindParamDeleteApplication binds the parameter Impersonate-Group -func (o *DeleteApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/disable_application_alerting_parameters.go b/generated-client/client/application/disable_application_alerting_parameters.go index b75b13b..540ec0a 100644 --- a/generated-client/client/application/disable_application_alerting_parameters.go +++ b/generated-client/client/application/disable_application_alerting_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDisableApplicationAlertingParams creates a new DisableApplicationAlertingParams object, @@ -64,9 +63,9 @@ type DisableApplicationAlertingParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *DisableApplicationAlertingParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the disable application alerting params -func (o *DisableApplicationAlertingParams) WithImpersonateGroup(impersonateGroup []string) *DisableApplicationAlertingParams { +func (o *DisableApplicationAlertingParams) WithImpersonateGroup(impersonateGroup *string) *DisableApplicationAlertingParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the disable application alerting params -func (o *DisableApplicationAlertingParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DisableApplicationAlertingParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *DisableApplicationAlertingParams) WriteToRequest(r runtime.ClientReques if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *DisableApplicationAlertingParams) WriteToRequest(r runtime.ClientReques } return nil } - -// bindParamDisableApplicationAlerting binds the parameter Impersonate-Group -func (o *DisableApplicationAlertingParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/enable_application_alerting_parameters.go b/generated-client/client/application/enable_application_alerting_parameters.go index c47b8d8..8a7fdb3 100644 --- a/generated-client/client/application/enable_application_alerting_parameters.go +++ b/generated-client/client/application/enable_application_alerting_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewEnableApplicationAlertingParams creates a new EnableApplicationAlertingParams object, @@ -64,9 +63,9 @@ type EnableApplicationAlertingParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *EnableApplicationAlertingParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the enable application alerting params -func (o *EnableApplicationAlertingParams) WithImpersonateGroup(impersonateGroup []string) *EnableApplicationAlertingParams { +func (o *EnableApplicationAlertingParams) WithImpersonateGroup(impersonateGroup *string) *EnableApplicationAlertingParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the enable application alerting params -func (o *EnableApplicationAlertingParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *EnableApplicationAlertingParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *EnableApplicationAlertingParams) WriteToRequest(r runtime.ClientRequest if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *EnableApplicationAlertingParams) WriteToRequest(r runtime.ClientRequest } return nil } - -// bindParamEnableApplicationAlerting binds the parameter Impersonate-Group -func (o *EnableApplicationAlertingParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/get_application_alerting_config_parameters.go b/generated-client/client/application/get_application_alerting_config_parameters.go index 918cc7d..744e03d 100644 --- a/generated-client/client/application/get_application_alerting_config_parameters.go +++ b/generated-client/client/application/get_application_alerting_config_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetApplicationAlertingConfigParams creates a new GetApplicationAlertingConfigParams object, @@ -64,9 +63,9 @@ type GetApplicationAlertingConfigParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetApplicationAlertingConfigParams) SetHTTPClient(client *http.Client) } // WithImpersonateGroup adds the impersonateGroup to the get application alerting config params -func (o *GetApplicationAlertingConfigParams) WithImpersonateGroup(impersonateGroup []string) *GetApplicationAlertingConfigParams { +func (o *GetApplicationAlertingConfigParams) WithImpersonateGroup(impersonateGroup *string) *GetApplicationAlertingConfigParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get application alerting config params -func (o *GetApplicationAlertingConfigParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetApplicationAlertingConfigParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetApplicationAlertingConfigParams) WriteToRequest(r runtime.ClientRequ if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetApplicationAlertingConfigParams) WriteToRequest(r runtime.ClientRequ } return nil } - -// bindParamGetApplicationAlertingConfig binds the parameter Impersonate-Group -func (o *GetApplicationAlertingConfigParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/get_application_parameters.go b/generated-client/client/application/get_application_parameters.go index 9f976b1..265ea80 100644 --- a/generated-client/client/application/get_application_parameters.go +++ b/generated-client/client/application/get_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetApplicationParams creates a new GetApplicationParams object, @@ -64,9 +63,9 @@ type GetApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get application params -func (o *GetApplicationParams) WithImpersonateGroup(impersonateGroup []string) *GetApplicationParams { +func (o *GetApplicationParams) WithImpersonateGroup(impersonateGroup *string) *GetApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get application params -func (o *GetApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetApplicationParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetApplicationParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamGetApplication binds the parameter Impersonate-Group -func (o *GetApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/get_build_secrets_parameters.go b/generated-client/client/application/get_build_secrets_parameters.go index 4a64753..8ead512 100644 --- a/generated-client/client/application/get_build_secrets_parameters.go +++ b/generated-client/client/application/get_build_secrets_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetBuildSecretsParams creates a new GetBuildSecretsParams object, @@ -64,9 +63,9 @@ type GetBuildSecretsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetBuildSecretsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get build secrets params -func (o *GetBuildSecretsParams) WithImpersonateGroup(impersonateGroup []string) *GetBuildSecretsParams { +func (o *GetBuildSecretsParams) WithImpersonateGroup(impersonateGroup *string) *GetBuildSecretsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get build secrets params -func (o *GetBuildSecretsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetBuildSecretsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetBuildSecretsParams) WriteToRequest(r runtime.ClientRequest, reg strf if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetBuildSecretsParams) WriteToRequest(r runtime.ClientRequest, reg strf } return nil } - -// bindParamGetBuildSecrets binds the parameter Impersonate-Group -func (o *GetBuildSecretsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/get_deploy_key_and_secret_parameters.go b/generated-client/client/application/get_deploy_key_and_secret_parameters.go index 6e14645..7069fdc 100644 --- a/generated-client/client/application/get_deploy_key_and_secret_parameters.go +++ b/generated-client/client/application/get_deploy_key_and_secret_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetDeployKeyAndSecretParams creates a new GetDeployKeyAndSecretParams object, @@ -64,9 +63,9 @@ type GetDeployKeyAndSecretParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetDeployKeyAndSecretParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get deploy key and secret params -func (o *GetDeployKeyAndSecretParams) WithImpersonateGroup(impersonateGroup []string) *GetDeployKeyAndSecretParams { +func (o *GetDeployKeyAndSecretParams) WithImpersonateGroup(impersonateGroup *string) *GetDeployKeyAndSecretParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get deploy key and secret params -func (o *GetDeployKeyAndSecretParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetDeployKeyAndSecretParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetDeployKeyAndSecretParams) WriteToRequest(r runtime.ClientRequest, re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetDeployKeyAndSecretParams) WriteToRequest(r runtime.ClientRequest, re } return nil } - -// bindParamGetDeployKeyAndSecret binds the parameter Impersonate-Group -func (o *GetDeployKeyAndSecretParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/get_deployments_parameters.go b/generated-client/client/application/get_deployments_parameters.go index caefb61..a276d83 100644 --- a/generated-client/client/application/get_deployments_parameters.go +++ b/generated-client/client/application/get_deployments_parameters.go @@ -64,9 +64,9 @@ type GetDeploymentsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +146,13 @@ func (o *GetDeploymentsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get deployments params -func (o *GetDeploymentsParams) WithImpersonateGroup(impersonateGroup []string) *GetDeploymentsParams { +func (o *GetDeploymentsParams) WithImpersonateGroup(impersonateGroup *string) *GetDeploymentsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get deployments params -func (o *GetDeploymentsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetDeploymentsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +210,9 @@ func (o *GetDeploymentsParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -273,20 +268,3 @@ func (o *GetDeploymentsParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamGetDeployments binds the parameter Impersonate-Group -func (o *GetDeploymentsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/get_private_image_hubs_parameters.go b/generated-client/client/application/get_private_image_hubs_parameters.go index f9f5517..45ef53b 100644 --- a/generated-client/client/application/get_private_image_hubs_parameters.go +++ b/generated-client/client/application/get_private_image_hubs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetPrivateImageHubsParams creates a new GetPrivateImageHubsParams object, @@ -64,9 +63,9 @@ type GetPrivateImageHubsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetPrivateImageHubsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get private image hubs params -func (o *GetPrivateImageHubsParams) WithImpersonateGroup(impersonateGroup []string) *GetPrivateImageHubsParams { +func (o *GetPrivateImageHubsParams) WithImpersonateGroup(impersonateGroup *string) *GetPrivateImageHubsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get private image hubs params -func (o *GetPrivateImageHubsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetPrivateImageHubsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetPrivateImageHubsParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetPrivateImageHubsParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamGetPrivateImageHubs binds the parameter Impersonate-Group -func (o *GetPrivateImageHubsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/is_deploy_key_valid_parameters.go b/generated-client/client/application/is_deploy_key_valid_parameters.go index f6df347..3add5c2 100644 --- a/generated-client/client/application/is_deploy_key_valid_parameters.go +++ b/generated-client/client/application/is_deploy_key_valid_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewIsDeployKeyValidParams creates a new IsDeployKeyValidParams object, @@ -64,9 +63,9 @@ type IsDeployKeyValidParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *IsDeployKeyValidParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the is deploy key valid params -func (o *IsDeployKeyValidParams) WithImpersonateGroup(impersonateGroup []string) *IsDeployKeyValidParams { +func (o *IsDeployKeyValidParams) WithImpersonateGroup(impersonateGroup *string) *IsDeployKeyValidParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the is deploy key valid params -func (o *IsDeployKeyValidParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *IsDeployKeyValidParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *IsDeployKeyValidParams) WriteToRequest(r runtime.ClientRequest, reg str if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *IsDeployKeyValidParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } - -// bindParamIsDeployKeyValid binds the parameter Impersonate-Group -func (o *IsDeployKeyValidParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/modify_registration_details_parameters.go b/generated-client/client/application/modify_registration_details_parameters.go index 5a57ea5..a584419 100644 --- a/generated-client/client/application/modify_registration_details_parameters.go +++ b/generated-client/client/application/modify_registration_details_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type ModifyRegistrationDetailsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *ModifyRegistrationDetailsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the modify registration details params -func (o *ModifyRegistrationDetailsParams) WithImpersonateGroup(impersonateGroup []string) *ModifyRegistrationDetailsParams { +func (o *ModifyRegistrationDetailsParams) WithImpersonateGroup(impersonateGroup *string) *ModifyRegistrationDetailsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the modify registration details params -func (o *ModifyRegistrationDetailsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ModifyRegistrationDetailsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *ModifyRegistrationDetailsParams) WriteToRequest(r runtime.ClientRequest if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *ModifyRegistrationDetailsParams) WriteToRequest(r runtime.ClientRequest } return nil } - -// bindParamModifyRegistrationDetails binds the parameter Impersonate-Group -func (o *ModifyRegistrationDetailsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/regenerate_deploy_key_parameters.go b/generated-client/client/application/regenerate_deploy_key_parameters.go index bd26441..6adc5ce 100644 --- a/generated-client/client/application/regenerate_deploy_key_parameters.go +++ b/generated-client/client/application/regenerate_deploy_key_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type RegenerateDeployKeyParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *RegenerateDeployKeyParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the regenerate deploy key params -func (o *RegenerateDeployKeyParams) WithImpersonateGroup(impersonateGroup []string) *RegenerateDeployKeyParams { +func (o *RegenerateDeployKeyParams) WithImpersonateGroup(impersonateGroup *string) *RegenerateDeployKeyParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the regenerate deploy key params -func (o *RegenerateDeployKeyParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RegenerateDeployKeyParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *RegenerateDeployKeyParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *RegenerateDeployKeyParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamRegenerateDeployKey binds the parameter Impersonate-Group -func (o *RegenerateDeployKeyParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/regenerate_deploy_key_responses.go b/generated-client/client/application/regenerate_deploy_key_responses.go index b18940b..64dbb88 100644 --- a/generated-client/client/application/regenerate_deploy_key_responses.go +++ b/generated-client/client/application/regenerate_deploy_key_responses.go @@ -38,6 +38,12 @@ func (o *RegenerateDeployKeyReader) ReadResponse(response runtime.ClientResponse return nil, err } return nil, result + case 409: + result := NewRegenerateDeployKeyConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[POST /applications/{appName}/regenerate-deploy-key] regenerateDeployKey", response, response.Code()) } @@ -210,3 +216,59 @@ func (o *RegenerateDeployKeyNotFound) readResponse(response runtime.ClientRespon return nil } + +// NewRegenerateDeployKeyConflict creates a RegenerateDeployKeyConflict with default headers values +func NewRegenerateDeployKeyConflict() *RegenerateDeployKeyConflict { + return &RegenerateDeployKeyConflict{} +} + +/* +RegenerateDeployKeyConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type RegenerateDeployKeyConflict struct { +} + +// IsSuccess returns true when this regenerate deploy key conflict response has a 2xx status code +func (o *RegenerateDeployKeyConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this regenerate deploy key conflict response has a 3xx status code +func (o *RegenerateDeployKeyConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this regenerate deploy key conflict response has a 4xx status code +func (o *RegenerateDeployKeyConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this regenerate deploy key conflict response has a 5xx status code +func (o *RegenerateDeployKeyConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this regenerate deploy key conflict response a status code equal to that given +func (o *RegenerateDeployKeyConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the regenerate deploy key conflict response +func (o *RegenerateDeployKeyConflict) Code() int { + return 409 +} + +func (o *RegenerateDeployKeyConflict) Error() string { + return fmt.Sprintf("[POST /applications/{appName}/regenerate-deploy-key][%d] regenerateDeployKeyConflict ", 409) +} + +func (o *RegenerateDeployKeyConflict) String() string { + return fmt.Sprintf("[POST /applications/{appName}/regenerate-deploy-key][%d] regenerateDeployKeyConflict ", 409) +} + +func (o *RegenerateDeployKeyConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/generated-client/client/application/restart_application_parameters.go b/generated-client/client/application/restart_application_parameters.go index cc2f34f..beec4f7 100644 --- a/generated-client/client/application/restart_application_parameters.go +++ b/generated-client/client/application/restart_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartApplicationParams creates a new RestartApplicationParams object, @@ -64,9 +63,9 @@ type RestartApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *RestartApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the restart application params -func (o *RestartApplicationParams) WithImpersonateGroup(impersonateGroup []string) *RestartApplicationParams { +func (o *RestartApplicationParams) WithImpersonateGroup(impersonateGroup *string) *RestartApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart application params -func (o *RestartApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *RestartApplicationParams) WriteToRequest(r runtime.ClientRequest, reg s if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *RestartApplicationParams) WriteToRequest(r runtime.ClientRequest, reg s } return nil } - -// bindParamRestartApplication binds the parameter Impersonate-Group -func (o *RestartApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/start_application_parameters.go b/generated-client/client/application/start_application_parameters.go index 4eabe6e..4ab00c6 100644 --- a/generated-client/client/application/start_application_parameters.go +++ b/generated-client/client/application/start_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStartApplicationParams creates a new StartApplicationParams object, @@ -64,9 +63,9 @@ type StartApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *StartApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the start application params -func (o *StartApplicationParams) WithImpersonateGroup(impersonateGroup []string) *StartApplicationParams { +func (o *StartApplicationParams) WithImpersonateGroup(impersonateGroup *string) *StartApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the start application params -func (o *StartApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StartApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *StartApplicationParams) WriteToRequest(r runtime.ClientRequest, reg str if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *StartApplicationParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } - -// bindParamStartApplication binds the parameter Impersonate-Group -func (o *StartApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/stop_application_parameters.go b/generated-client/client/application/stop_application_parameters.go index ef818fc..27311ad 100644 --- a/generated-client/client/application/stop_application_parameters.go +++ b/generated-client/client/application/stop_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopApplicationParams creates a new StopApplicationParams object, @@ -64,9 +63,9 @@ type StopApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *StopApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop application params -func (o *StopApplicationParams) WithImpersonateGroup(impersonateGroup []string) *StopApplicationParams { +func (o *StopApplicationParams) WithImpersonateGroup(impersonateGroup *string) *StopApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop application params -func (o *StopApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *StopApplicationParams) WriteToRequest(r runtime.ClientRequest, reg strf if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *StopApplicationParams) WriteToRequest(r runtime.ClientRequest, reg strf } return nil } - -// bindParamStopApplication binds the parameter Impersonate-Group -func (o *StopApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/trigger_pipeline_build_deploy_parameters.go b/generated-client/client/application/trigger_pipeline_build_deploy_parameters.go index 400f718..3183dc6 100644 --- a/generated-client/client/application/trigger_pipeline_build_deploy_parameters.go +++ b/generated-client/client/application/trigger_pipeline_build_deploy_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type TriggerPipelineBuildDeployParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *TriggerPipelineBuildDeployParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the trigger pipeline build deploy params -func (o *TriggerPipelineBuildDeployParams) WithImpersonateGroup(impersonateGroup []string) *TriggerPipelineBuildDeployParams { +func (o *TriggerPipelineBuildDeployParams) WithImpersonateGroup(impersonateGroup *string) *TriggerPipelineBuildDeployParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the trigger pipeline build deploy params -func (o *TriggerPipelineBuildDeployParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *TriggerPipelineBuildDeployParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *TriggerPipelineBuildDeployParams) WriteToRequest(r runtime.ClientReques if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *TriggerPipelineBuildDeployParams) WriteToRequest(r runtime.ClientReques } return nil } - -// bindParamTriggerPipelineBuildDeploy binds the parameter Impersonate-Group -func (o *TriggerPipelineBuildDeployParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/trigger_pipeline_build_parameters.go b/generated-client/client/application/trigger_pipeline_build_parameters.go index 89ae73e..f6e0120 100644 --- a/generated-client/client/application/trigger_pipeline_build_parameters.go +++ b/generated-client/client/application/trigger_pipeline_build_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type TriggerPipelineBuildParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *TriggerPipelineBuildParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the trigger pipeline build params -func (o *TriggerPipelineBuildParams) WithImpersonateGroup(impersonateGroup []string) *TriggerPipelineBuildParams { +func (o *TriggerPipelineBuildParams) WithImpersonateGroup(impersonateGroup *string) *TriggerPipelineBuildParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the trigger pipeline build params -func (o *TriggerPipelineBuildParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *TriggerPipelineBuildParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *TriggerPipelineBuildParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *TriggerPipelineBuildParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamTriggerPipelineBuild binds the parameter Impersonate-Group -func (o *TriggerPipelineBuildParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/trigger_pipeline_deploy_parameters.go b/generated-client/client/application/trigger_pipeline_deploy_parameters.go index 51754ae..6300ecb 100644 --- a/generated-client/client/application/trigger_pipeline_deploy_parameters.go +++ b/generated-client/client/application/trigger_pipeline_deploy_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type TriggerPipelineDeployParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *TriggerPipelineDeployParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the trigger pipeline deploy params -func (o *TriggerPipelineDeployParams) WithImpersonateGroup(impersonateGroup []string) *TriggerPipelineDeployParams { +func (o *TriggerPipelineDeployParams) WithImpersonateGroup(impersonateGroup *string) *TriggerPipelineDeployParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the trigger pipeline deploy params -func (o *TriggerPipelineDeployParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *TriggerPipelineDeployParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *TriggerPipelineDeployParams) WriteToRequest(r runtime.ClientRequest, re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *TriggerPipelineDeployParams) WriteToRequest(r runtime.ClientRequest, re } return nil } - -// bindParamTriggerPipelineDeploy binds the parameter Impersonate-Group -func (o *TriggerPipelineDeployParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/trigger_pipeline_promote_parameters.go b/generated-client/client/application/trigger_pipeline_promote_parameters.go index 7bd2684..def3ca7 100644 --- a/generated-client/client/application/trigger_pipeline_promote_parameters.go +++ b/generated-client/client/application/trigger_pipeline_promote_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type TriggerPipelinePromoteParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *TriggerPipelinePromoteParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the trigger pipeline promote params -func (o *TriggerPipelinePromoteParams) WithImpersonateGroup(impersonateGroup []string) *TriggerPipelinePromoteParams { +func (o *TriggerPipelinePromoteParams) WithImpersonateGroup(impersonateGroup *string) *TriggerPipelinePromoteParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the trigger pipeline promote params -func (o *TriggerPipelinePromoteParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *TriggerPipelinePromoteParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *TriggerPipelinePromoteParams) WriteToRequest(r runtime.ClientRequest, r if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *TriggerPipelinePromoteParams) WriteToRequest(r runtime.ClientRequest, r } return nil } - -// bindParamTriggerPipelinePromote binds the parameter Impersonate-Group -func (o *TriggerPipelinePromoteParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/update_application_alerting_config_parameters.go b/generated-client/client/application/update_application_alerting_config_parameters.go index 33b5e47..176c8f1 100644 --- a/generated-client/client/application/update_application_alerting_config_parameters.go +++ b/generated-client/client/application/update_application_alerting_config_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type UpdateApplicationAlertingConfigParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *UpdateApplicationAlertingConfigParams) SetHTTPClient(client *http.Clien } // WithImpersonateGroup adds the impersonateGroup to the update application alerting config params -func (o *UpdateApplicationAlertingConfigParams) WithImpersonateGroup(impersonateGroup []string) *UpdateApplicationAlertingConfigParams { +func (o *UpdateApplicationAlertingConfigParams) WithImpersonateGroup(impersonateGroup *string) *UpdateApplicationAlertingConfigParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the update application alerting config params -func (o *UpdateApplicationAlertingConfigParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *UpdateApplicationAlertingConfigParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *UpdateApplicationAlertingConfigParams) WriteToRequest(r runtime.ClientR if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *UpdateApplicationAlertingConfigParams) WriteToRequest(r runtime.ClientR } return nil } - -// bindParamUpdateApplicationAlertingConfig binds the parameter Impersonate-Group -func (o *UpdateApplicationAlertingConfigParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/update_build_secrets_secret_value_parameters.go b/generated-client/client/application/update_build_secrets_secret_value_parameters.go index 648ead8..08b0826 100644 --- a/generated-client/client/application/update_build_secrets_secret_value_parameters.go +++ b/generated-client/client/application/update_build_secrets_secret_value_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type UpdateBuildSecretsSecretValueParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -148,13 +147,13 @@ func (o *UpdateBuildSecretsSecretValueParams) SetHTTPClient(client *http.Client) } // WithImpersonateGroup adds the impersonateGroup to the update build secrets secret value params -func (o *UpdateBuildSecretsSecretValueParams) WithImpersonateGroup(impersonateGroup []string) *UpdateBuildSecretsSecretValueParams { +func (o *UpdateBuildSecretsSecretValueParams) WithImpersonateGroup(impersonateGroup *string) *UpdateBuildSecretsSecretValueParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the update build secrets secret value params -func (o *UpdateBuildSecretsSecretValueParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *UpdateBuildSecretsSecretValueParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -212,14 +211,9 @@ func (o *UpdateBuildSecretsSecretValueParams) WriteToRequest(r runtime.ClientReq if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -251,20 +245,3 @@ func (o *UpdateBuildSecretsSecretValueParams) WriteToRequest(r runtime.ClientReq } return nil } - -// bindParamUpdateBuildSecretsSecretValue binds the parameter Impersonate-Group -func (o *UpdateBuildSecretsSecretValueParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/application/update_private_image_hubs_secret_value_parameters.go b/generated-client/client/application/update_private_image_hubs_secret_value_parameters.go index da06bef..a483008 100644 --- a/generated-client/client/application/update_private_image_hubs_secret_value_parameters.go +++ b/generated-client/client/application/update_private_image_hubs_secret_value_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type UpdatePrivateImageHubsSecretValueParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -148,13 +147,13 @@ func (o *UpdatePrivateImageHubsSecretValueParams) SetHTTPClient(client *http.Cli } // WithImpersonateGroup adds the impersonateGroup to the update private image hubs secret value params -func (o *UpdatePrivateImageHubsSecretValueParams) WithImpersonateGroup(impersonateGroup []string) *UpdatePrivateImageHubsSecretValueParams { +func (o *UpdatePrivateImageHubsSecretValueParams) WithImpersonateGroup(impersonateGroup *string) *UpdatePrivateImageHubsSecretValueParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the update private image hubs secret value params -func (o *UpdatePrivateImageHubsSecretValueParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *UpdatePrivateImageHubsSecretValueParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -212,14 +211,9 @@ func (o *UpdatePrivateImageHubsSecretValueParams) WriteToRequest(r runtime.Clien if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -251,20 +245,3 @@ func (o *UpdatePrivateImageHubsSecretValueParams) WriteToRequest(r runtime.Clien } return nil } - -// bindParamUpdatePrivateImageHubsSecretValue binds the parameter Impersonate-Group -func (o *UpdatePrivateImageHubsSecretValueParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/change_env_var_parameters.go b/generated-client/client/component/change_env_var_parameters.go index 1c36f43..0c82bea 100644 --- a/generated-client/client/component/change_env_var_parameters.go +++ b/generated-client/client/component/change_env_var_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -72,9 +71,9 @@ type ChangeEnvVarParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -165,13 +164,13 @@ func (o *ChangeEnvVarParams) SetEnvVarParameter(envVarParameter []*models.EnvVar } // WithImpersonateGroup adds the impersonateGroup to the change env var params -func (o *ChangeEnvVarParams) WithImpersonateGroup(impersonateGroup []string) *ChangeEnvVarParams { +func (o *ChangeEnvVarParams) WithImpersonateGroup(impersonateGroup *string) *ChangeEnvVarParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the change env var params -func (o *ChangeEnvVarParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ChangeEnvVarParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -234,14 +233,9 @@ func (o *ChangeEnvVarParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -273,20 +267,3 @@ func (o *ChangeEnvVarParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } return nil } - -// bindParamChangeEnvVar binds the parameter Impersonate-Group -func (o *ChangeEnvVarParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/components_parameters.go b/generated-client/client/component/components_parameters.go index 28e8fa3..2cf8567 100644 --- a/generated-client/client/component/components_parameters.go +++ b/generated-client/client/component/components_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewComponentsParams creates a new ComponentsParams object, @@ -64,9 +63,9 @@ type ComponentsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *ComponentsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the components params -func (o *ComponentsParams) WithImpersonateGroup(impersonateGroup []string) *ComponentsParams { +func (o *ComponentsParams) WithImpersonateGroup(impersonateGroup *string) *ComponentsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the components params -func (o *ComponentsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ComponentsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *ComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *ComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } return nil } - -// bindParamComponents binds the parameter Impersonate-Group -func (o *ComponentsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/env_vars_parameters.go b/generated-client/client/component/env_vars_parameters.go index 1a3c90e..cee6738 100644 --- a/generated-client/client/component/env_vars_parameters.go +++ b/generated-client/client/component/env_vars_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewEnvVarsParams creates a new EnvVarsParams object, @@ -64,9 +63,9 @@ type EnvVarsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *EnvVarsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the env vars params -func (o *EnvVarsParams) WithImpersonateGroup(impersonateGroup []string) *EnvVarsParams { +func (o *EnvVarsParams) WithImpersonateGroup(impersonateGroup *string) *EnvVarsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the env vars params -func (o *EnvVarsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *EnvVarsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *EnvVarsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *EnvVarsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } return nil } - -// bindParamEnvVars binds the parameter Impersonate-Group -func (o *EnvVarsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/get_o_auth_pod_log_parameters.go b/generated-client/client/component/get_o_auth_pod_log_parameters.go index 13182ff..855db8c 100644 --- a/generated-client/client/component/get_o_auth_pod_log_parameters.go +++ b/generated-client/client/component/get_o_auth_pod_log_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetOAuthPodLogParams creates a new GetOAuthPodLogParams object, @@ -64,9 +63,9 @@ type GetOAuthPodLogParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -176,13 +175,13 @@ func (o *GetOAuthPodLogParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get o auth pod log params -func (o *GetOAuthPodLogParams) WithImpersonateGroup(impersonateGroup []string) *GetOAuthPodLogParams { +func (o *GetOAuthPodLogParams) WithImpersonateGroup(impersonateGroup *string) *GetOAuthPodLogParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get o auth pod log params -func (o *GetOAuthPodLogParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetOAuthPodLogParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -284,14 +283,9 @@ func (o *GetOAuthPodLogParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -379,20 +373,3 @@ func (o *GetOAuthPodLogParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamGetOAuthPodLog binds the parameter Impersonate-Group -func (o *GetOAuthPodLogParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/log_parameters.go b/generated-client/client/component/log_parameters.go index 13038ff..3e3fd0c 100644 --- a/generated-client/client/component/log_parameters.go +++ b/generated-client/client/component/log_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewLogParams creates a new LogParams object, @@ -64,9 +63,9 @@ type LogParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -184,13 +183,13 @@ func (o *LogParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the log params -func (o *LogParams) WithImpersonateGroup(impersonateGroup []string) *LogParams { +func (o *LogParams) WithImpersonateGroup(impersonateGroup *string) *LogParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the log params -func (o *LogParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *LogParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -303,14 +302,9 @@ func (o *LogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -415,20 +409,3 @@ func (o *LogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) } return nil } - -// bindParamLog binds the parameter Impersonate-Group -func (o *LogParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/replica_log_parameters.go b/generated-client/client/component/replica_log_parameters.go index 2610431..7df0354 100644 --- a/generated-client/client/component/replica_log_parameters.go +++ b/generated-client/client/component/replica_log_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewReplicaLogParams creates a new ReplicaLogParams object, @@ -64,9 +63,9 @@ type ReplicaLogParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -184,13 +183,13 @@ func (o *ReplicaLogParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the replica log params -func (o *ReplicaLogParams) WithImpersonateGroup(impersonateGroup []string) *ReplicaLogParams { +func (o *ReplicaLogParams) WithImpersonateGroup(impersonateGroup *string) *ReplicaLogParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the replica log params -func (o *ReplicaLogParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ReplicaLogParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -303,14 +302,9 @@ func (o *ReplicaLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -415,20 +409,3 @@ func (o *ReplicaLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } return nil } - -// bindParamReplicaLog binds the parameter Impersonate-Group -func (o *ReplicaLogParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/restart_component_parameters.go b/generated-client/client/component/restart_component_parameters.go index 239125f..db236aa 100644 --- a/generated-client/client/component/restart_component_parameters.go +++ b/generated-client/client/component/restart_component_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartComponentParams creates a new RestartComponentParams object, @@ -64,9 +63,9 @@ type RestartComponentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *RestartComponentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the restart component params -func (o *RestartComponentParams) WithImpersonateGroup(impersonateGroup []string) *RestartComponentParams { +func (o *RestartComponentParams) WithImpersonateGroup(impersonateGroup *string) *RestartComponentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart component params -func (o *RestartComponentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartComponentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *RestartComponentParams) WriteToRequest(r runtime.ClientRequest, reg str if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *RestartComponentParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } - -// bindParamRestartComponent binds the parameter Impersonate-Group -func (o *RestartComponentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/restart_o_auth_auxiliary_resource_parameters.go b/generated-client/client/component/restart_o_auth_auxiliary_resource_parameters.go index c99d5d0..2372841 100644 --- a/generated-client/client/component/restart_o_auth_auxiliary_resource_parameters.go +++ b/generated-client/client/component/restart_o_auth_auxiliary_resource_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartOAuthAuxiliaryResourceParams creates a new RestartOAuthAuxiliaryResourceParams object, @@ -64,9 +63,9 @@ type RestartOAuthAuxiliaryResourceParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *RestartOAuthAuxiliaryResourceParams) SetHTTPClient(client *http.Client) } // WithImpersonateGroup adds the impersonateGroup to the restart o auth auxiliary resource params -func (o *RestartOAuthAuxiliaryResourceParams) WithImpersonateGroup(impersonateGroup []string) *RestartOAuthAuxiliaryResourceParams { +func (o *RestartOAuthAuxiliaryResourceParams) WithImpersonateGroup(impersonateGroup *string) *RestartOAuthAuxiliaryResourceParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart o auth auxiliary resource params -func (o *RestartOAuthAuxiliaryResourceParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartOAuthAuxiliaryResourceParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *RestartOAuthAuxiliaryResourceParams) WriteToRequest(r runtime.ClientReq if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *RestartOAuthAuxiliaryResourceParams) WriteToRequest(r runtime.ClientReq } return nil } - -// bindParamRestartOAuthAuxiliaryResource binds the parameter Impersonate-Group -func (o *RestartOAuthAuxiliaryResourceParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/scale_component_parameters.go b/generated-client/client/component/scale_component_parameters.go index bdc42b5..1cfc18a 100644 --- a/generated-client/client/component/scale_component_parameters.go +++ b/generated-client/client/component/scale_component_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewScaleComponentParams creates a new ScaleComponentParams object, @@ -64,9 +63,9 @@ type ScaleComponentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *ScaleComponentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the scale component params -func (o *ScaleComponentParams) WithImpersonateGroup(impersonateGroup []string) *ScaleComponentParams { +func (o *ScaleComponentParams) WithImpersonateGroup(impersonateGroup *string) *ScaleComponentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the scale component params -func (o *ScaleComponentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ScaleComponentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *ScaleComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *ScaleComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamScaleComponent binds the parameter Impersonate-Group -func (o *ScaleComponentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/start_component_parameters.go b/generated-client/client/component/start_component_parameters.go index 87388ba..7f16f69 100644 --- a/generated-client/client/component/start_component_parameters.go +++ b/generated-client/client/component/start_component_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStartComponentParams creates a new StartComponentParams object, @@ -64,9 +63,9 @@ type StartComponentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *StartComponentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the start component params -func (o *StartComponentParams) WithImpersonateGroup(impersonateGroup []string) *StartComponentParams { +func (o *StartComponentParams) WithImpersonateGroup(impersonateGroup *string) *StartComponentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the start component params -func (o *StartComponentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StartComponentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *StartComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *StartComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamStartComponent binds the parameter Impersonate-Group -func (o *StartComponentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/component/stop_component_parameters.go b/generated-client/client/component/stop_component_parameters.go index 8c19062..185c705 100644 --- a/generated-client/client/component/stop_component_parameters.go +++ b/generated-client/client/component/stop_component_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopComponentParams creates a new StopComponentParams object, @@ -64,9 +63,9 @@ type StopComponentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *StopComponentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop component params -func (o *StopComponentParams) WithImpersonateGroup(impersonateGroup []string) *StopComponentParams { +func (o *StopComponentParams) WithImpersonateGroup(impersonateGroup *string) *StopComponentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop component params -func (o *StopComponentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopComponentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *StopComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *StopComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } return nil } - -// bindParamStopComponent binds the parameter Impersonate-Group -func (o *StopComponentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/deployment/get_deployment_parameters.go b/generated-client/client/deployment/get_deployment_parameters.go index 0697525..29424b4 100644 --- a/generated-client/client/deployment/get_deployment_parameters.go +++ b/generated-client/client/deployment/get_deployment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetDeploymentParams creates a new GetDeploymentParams object, @@ -64,9 +63,9 @@ type GetDeploymentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetDeploymentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get deployment params -func (o *GetDeploymentParams) WithImpersonateGroup(impersonateGroup []string) *GetDeploymentParams { +func (o *GetDeploymentParams) WithImpersonateGroup(impersonateGroup *string) *GetDeploymentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get deployment params -func (o *GetDeploymentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetDeploymentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetDeploymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetDeploymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } return nil } - -// bindParamGetDeployment binds the parameter Impersonate-Group -func (o *GetDeploymentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/change_component_secret_parameters.go b/generated-client/client/environment/change_component_secret_parameters.go index 546235b..0adb44b 100644 --- a/generated-client/client/environment/change_component_secret_parameters.go +++ b/generated-client/client/environment/change_component_secret_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type ChangeComponentSecretParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -160,13 +159,13 @@ func (o *ChangeComponentSecretParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the change component secret params -func (o *ChangeComponentSecretParams) WithImpersonateGroup(impersonateGroup []string) *ChangeComponentSecretParams { +func (o *ChangeComponentSecretParams) WithImpersonateGroup(impersonateGroup *string) *ChangeComponentSecretParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the change component secret params -func (o *ChangeComponentSecretParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ChangeComponentSecretParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -246,14 +245,9 @@ func (o *ChangeComponentSecretParams) WriteToRequest(r runtime.ClientRequest, re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -295,20 +289,3 @@ func (o *ChangeComponentSecretParams) WriteToRequest(r runtime.ClientRequest, re } return nil } - -// bindParamChangeComponentSecret binds the parameter Impersonate-Group -func (o *ChangeComponentSecretParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/create_environment_parameters.go b/generated-client/client/environment/create_environment_parameters.go index e9c6ca2..daecba2 100644 --- a/generated-client/client/environment/create_environment_parameters.go +++ b/generated-client/client/environment/create_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewCreateEnvironmentParams creates a new CreateEnvironmentParams object, @@ -64,9 +63,9 @@ type CreateEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *CreateEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the create environment params -func (o *CreateEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *CreateEnvironmentParams { +func (o *CreateEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *CreateEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the create environment params -func (o *CreateEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *CreateEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *CreateEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg st if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *CreateEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg st } return nil } - -// bindParamCreateEnvironment binds the parameter Impersonate-Group -func (o *CreateEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/delete_environment_parameters.go b/generated-client/client/environment/delete_environment_parameters.go index 015e652..0b5822d 100644 --- a/generated-client/client/environment/delete_environment_parameters.go +++ b/generated-client/client/environment/delete_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDeleteEnvironmentParams creates a new DeleteEnvironmentParams object, @@ -64,9 +63,9 @@ type DeleteEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *DeleteEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the delete environment params -func (o *DeleteEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *DeleteEnvironmentParams { +func (o *DeleteEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *DeleteEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the delete environment params -func (o *DeleteEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DeleteEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *DeleteEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg st if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *DeleteEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg st } return nil } - -// bindParamDeleteEnvironment binds the parameter Impersonate-Group -func (o *DeleteEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/disable_environment_alerting_parameters.go b/generated-client/client/environment/disable_environment_alerting_parameters.go index 3a75962..5c3225b 100644 --- a/generated-client/client/environment/disable_environment_alerting_parameters.go +++ b/generated-client/client/environment/disable_environment_alerting_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDisableEnvironmentAlertingParams creates a new DisableEnvironmentAlertingParams object, @@ -64,9 +63,9 @@ type DisableEnvironmentAlertingParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *DisableEnvironmentAlertingParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the disable environment alerting params -func (o *DisableEnvironmentAlertingParams) WithImpersonateGroup(impersonateGroup []string) *DisableEnvironmentAlertingParams { +func (o *DisableEnvironmentAlertingParams) WithImpersonateGroup(impersonateGroup *string) *DisableEnvironmentAlertingParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the disable environment alerting params -func (o *DisableEnvironmentAlertingParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DisableEnvironmentAlertingParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *DisableEnvironmentAlertingParams) WriteToRequest(r runtime.ClientReques if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *DisableEnvironmentAlertingParams) WriteToRequest(r runtime.ClientReques } return nil } - -// bindParamDisableEnvironmentAlerting binds the parameter Impersonate-Group -func (o *DisableEnvironmentAlertingParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/enable_environment_alerting_parameters.go b/generated-client/client/environment/enable_environment_alerting_parameters.go index 0ff9323..42e0664 100644 --- a/generated-client/client/environment/enable_environment_alerting_parameters.go +++ b/generated-client/client/environment/enable_environment_alerting_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewEnableEnvironmentAlertingParams creates a new EnableEnvironmentAlertingParams object, @@ -64,9 +63,9 @@ type EnableEnvironmentAlertingParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *EnableEnvironmentAlertingParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the enable environment alerting params -func (o *EnableEnvironmentAlertingParams) WithImpersonateGroup(impersonateGroup []string) *EnableEnvironmentAlertingParams { +func (o *EnableEnvironmentAlertingParams) WithImpersonateGroup(impersonateGroup *string) *EnableEnvironmentAlertingParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the enable environment alerting params -func (o *EnableEnvironmentAlertingParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *EnableEnvironmentAlertingParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *EnableEnvironmentAlertingParams) WriteToRequest(r runtime.ClientRequest if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *EnableEnvironmentAlertingParams) WriteToRequest(r runtime.ClientRequest } return nil } - -// bindParamEnableEnvironmentAlerting binds the parameter Impersonate-Group -func (o *EnableEnvironmentAlertingParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/get_application_environment_deployments_parameters.go b/generated-client/client/environment/get_application_environment_deployments_parameters.go index 4585d6c..3764a0a 100644 --- a/generated-client/client/environment/get_application_environment_deployments_parameters.go +++ b/generated-client/client/environment/get_application_environment_deployments_parameters.go @@ -64,9 +64,9 @@ type GetApplicationEnvironmentDeploymentsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +146,13 @@ func (o *GetApplicationEnvironmentDeploymentsParams) SetHTTPClient(client *http. } // WithImpersonateGroup adds the impersonateGroup to the get application environment deployments params -func (o *GetApplicationEnvironmentDeploymentsParams) WithImpersonateGroup(impersonateGroup []string) *GetApplicationEnvironmentDeploymentsParams { +func (o *GetApplicationEnvironmentDeploymentsParams) WithImpersonateGroup(impersonateGroup *string) *GetApplicationEnvironmentDeploymentsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get application environment deployments params -func (o *GetApplicationEnvironmentDeploymentsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetApplicationEnvironmentDeploymentsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +210,9 @@ func (o *GetApplicationEnvironmentDeploymentsParams) WriteToRequest(r runtime.Cl if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -261,20 +256,3 @@ func (o *GetApplicationEnvironmentDeploymentsParams) WriteToRequest(r runtime.Cl } return nil } - -// bindParamGetApplicationEnvironmentDeployments binds the parameter Impersonate-Group -func (o *GetApplicationEnvironmentDeploymentsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/get_azure_key_vault_secret_versions_parameters.go b/generated-client/client/environment/get_azure_key_vault_secret_versions_parameters.go index 17107be..b1f77ee 100644 --- a/generated-client/client/environment/get_azure_key_vault_secret_versions_parameters.go +++ b/generated-client/client/environment/get_azure_key_vault_secret_versions_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetAzureKeyVaultSecretVersionsParams creates a new GetAzureKeyVaultSecretVersionsParams object, @@ -64,9 +63,9 @@ type GetAzureKeyVaultSecretVersionsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -158,13 +157,13 @@ func (o *GetAzureKeyVaultSecretVersionsParams) SetHTTPClient(client *http.Client } // WithImpersonateGroup adds the impersonateGroup to the get azure key vault secret versions params -func (o *GetAzureKeyVaultSecretVersionsParams) WithImpersonateGroup(impersonateGroup []string) *GetAzureKeyVaultSecretVersionsParams { +func (o *GetAzureKeyVaultSecretVersionsParams) WithImpersonateGroup(impersonateGroup *string) *GetAzureKeyVaultSecretVersionsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get azure key vault secret versions params -func (o *GetAzureKeyVaultSecretVersionsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetAzureKeyVaultSecretVersionsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -244,14 +243,9 @@ func (o *GetAzureKeyVaultSecretVersionsParams) WriteToRequest(r runtime.ClientRe if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -305,20 +299,3 @@ func (o *GetAzureKeyVaultSecretVersionsParams) WriteToRequest(r runtime.ClientRe } return nil } - -// bindParamGetAzureKeyVaultSecretVersions binds the parameter Impersonate-Group -func (o *GetAzureKeyVaultSecretVersionsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/get_environment_alerting_config_parameters.go b/generated-client/client/environment/get_environment_alerting_config_parameters.go index e36677a..62f399c 100644 --- a/generated-client/client/environment/get_environment_alerting_config_parameters.go +++ b/generated-client/client/environment/get_environment_alerting_config_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetEnvironmentAlertingConfigParams creates a new GetEnvironmentAlertingConfigParams object, @@ -64,9 +63,9 @@ type GetEnvironmentAlertingConfigParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetEnvironmentAlertingConfigParams) SetHTTPClient(client *http.Client) } // WithImpersonateGroup adds the impersonateGroup to the get environment alerting config params -func (o *GetEnvironmentAlertingConfigParams) WithImpersonateGroup(impersonateGroup []string) *GetEnvironmentAlertingConfigParams { +func (o *GetEnvironmentAlertingConfigParams) WithImpersonateGroup(impersonateGroup *string) *GetEnvironmentAlertingConfigParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get environment alerting config params -func (o *GetEnvironmentAlertingConfigParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetEnvironmentAlertingConfigParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetEnvironmentAlertingConfigParams) WriteToRequest(r runtime.ClientRequ if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetEnvironmentAlertingConfigParams) WriteToRequest(r runtime.ClientRequ } return nil } - -// bindParamGetEnvironmentAlertingConfig binds the parameter Impersonate-Group -func (o *GetEnvironmentAlertingConfigParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/get_environment_events_parameters.go b/generated-client/client/environment/get_environment_events_parameters.go index 50f6f18..3dc9e73 100644 --- a/generated-client/client/environment/get_environment_events_parameters.go +++ b/generated-client/client/environment/get_environment_events_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetEnvironmentEventsParams creates a new GetEnvironmentEventsParams object, @@ -64,9 +63,9 @@ type GetEnvironmentEventsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetEnvironmentEventsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get environment events params -func (o *GetEnvironmentEventsParams) WithImpersonateGroup(impersonateGroup []string) *GetEnvironmentEventsParams { +func (o *GetEnvironmentEventsParams) WithImpersonateGroup(impersonateGroup *string) *GetEnvironmentEventsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get environment events params -func (o *GetEnvironmentEventsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetEnvironmentEventsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetEnvironmentEventsParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetEnvironmentEventsParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamGetEnvironmentEvents binds the parameter Impersonate-Group -func (o *GetEnvironmentEventsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/get_environment_events_responses.go b/generated-client/client/environment/get_environment_events_responses.go index 3176a46..11ebed7 100644 --- a/generated-client/client/environment/get_environment_events_responses.go +++ b/generated-client/client/environment/get_environment_events_responses.go @@ -57,7 +57,7 @@ GetEnvironmentEventsOK describes a response with status code 200, with default h Successful get environment events */ type GetEnvironmentEventsOK struct { - Payload *models.Event + Payload []*models.Event } // IsSuccess returns true when this get environment events o k response has a 2xx status code @@ -98,16 +98,14 @@ func (o *GetEnvironmentEventsOK) String() string { return fmt.Sprintf("[GET /applications/{appName}/environments/{envName}/events][%d] getEnvironmentEventsOK %+v", 200, o.Payload) } -func (o *GetEnvironmentEventsOK) GetPayload() *models.Event { +func (o *GetEnvironmentEventsOK) GetPayload() []*models.Event { return o.Payload } func (o *GetEnvironmentEventsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.Event) - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } diff --git a/generated-client/client/environment/get_environment_parameters.go b/generated-client/client/environment/get_environment_parameters.go index 54ccbc3..7869848 100644 --- a/generated-client/client/environment/get_environment_parameters.go +++ b/generated-client/client/environment/get_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetEnvironmentParams creates a new GetEnvironmentParams object, @@ -64,9 +63,9 @@ type GetEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get environment params -func (o *GetEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *GetEnvironmentParams { +func (o *GetEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *GetEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get environment params -func (o *GetEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamGetEnvironment binds the parameter Impersonate-Group -func (o *GetEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/get_environment_summary_parameters.go b/generated-client/client/environment/get_environment_summary_parameters.go index 75c9caa..47a2b9a 100644 --- a/generated-client/client/environment/get_environment_summary_parameters.go +++ b/generated-client/client/environment/get_environment_summary_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetEnvironmentSummaryParams creates a new GetEnvironmentSummaryParams object, @@ -64,9 +63,9 @@ type GetEnvironmentSummaryParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetEnvironmentSummaryParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get environment summary params -func (o *GetEnvironmentSummaryParams) WithImpersonateGroup(impersonateGroup []string) *GetEnvironmentSummaryParams { +func (o *GetEnvironmentSummaryParams) WithImpersonateGroup(impersonateGroup *string) *GetEnvironmentSummaryParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get environment summary params -func (o *GetEnvironmentSummaryParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetEnvironmentSummaryParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetEnvironmentSummaryParams) WriteToRequest(r runtime.ClientRequest, re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetEnvironmentSummaryParams) WriteToRequest(r runtime.ClientRequest, re } return nil } - -// bindParamGetEnvironmentSummary binds the parameter Impersonate-Group -func (o *GetEnvironmentSummaryParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/restart_environment_parameters.go b/generated-client/client/environment/restart_environment_parameters.go index bf77112..132bf94 100644 --- a/generated-client/client/environment/restart_environment_parameters.go +++ b/generated-client/client/environment/restart_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartEnvironmentParams creates a new RestartEnvironmentParams object, @@ -64,9 +63,9 @@ type RestartEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *RestartEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the restart environment params -func (o *RestartEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *RestartEnvironmentParams { +func (o *RestartEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *RestartEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart environment params -func (o *RestartEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *RestartEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg s if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *RestartEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg s } return nil } - -// bindParamRestartEnvironment binds the parameter Impersonate-Group -func (o *RestartEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/start_environment_parameters.go b/generated-client/client/environment/start_environment_parameters.go index 60f71eb..0e72a38 100644 --- a/generated-client/client/environment/start_environment_parameters.go +++ b/generated-client/client/environment/start_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStartEnvironmentParams creates a new StartEnvironmentParams object, @@ -64,9 +63,9 @@ type StartEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *StartEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the start environment params -func (o *StartEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *StartEnvironmentParams { +func (o *StartEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *StartEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the start environment params -func (o *StartEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StartEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *StartEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg str if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *StartEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } - -// bindParamStartEnvironment binds the parameter Impersonate-Group -func (o *StartEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/stop_environment_parameters.go b/generated-client/client/environment/stop_environment_parameters.go index 3cd7561..171aa04 100644 --- a/generated-client/client/environment/stop_environment_parameters.go +++ b/generated-client/client/environment/stop_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopEnvironmentParams creates a new StopEnvironmentParams object, @@ -64,9 +63,9 @@ type StopEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *StopEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop environment params -func (o *StopEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *StopEnvironmentParams { +func (o *StopEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *StopEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop environment params -func (o *StopEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *StopEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg strf if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *StopEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg strf } return nil } - -// bindParamStopEnvironment binds the parameter Impersonate-Group -func (o *StopEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/environment/update_environment_alerting_config_parameters.go b/generated-client/client/environment/update_environment_alerting_config_parameters.go index 00d9230..a763631 100644 --- a/generated-client/client/environment/update_environment_alerting_config_parameters.go +++ b/generated-client/client/environment/update_environment_alerting_config_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type UpdateEnvironmentAlertingConfigParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -148,13 +147,13 @@ func (o *UpdateEnvironmentAlertingConfigParams) SetHTTPClient(client *http.Clien } // WithImpersonateGroup adds the impersonateGroup to the update environment alerting config params -func (o *UpdateEnvironmentAlertingConfigParams) WithImpersonateGroup(impersonateGroup []string) *UpdateEnvironmentAlertingConfigParams { +func (o *UpdateEnvironmentAlertingConfigParams) WithImpersonateGroup(impersonateGroup *string) *UpdateEnvironmentAlertingConfigParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the update environment alerting config params -func (o *UpdateEnvironmentAlertingConfigParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *UpdateEnvironmentAlertingConfigParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -212,14 +211,9 @@ func (o *UpdateEnvironmentAlertingConfigParams) WriteToRequest(r runtime.ClientR if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -251,20 +245,3 @@ func (o *UpdateEnvironmentAlertingConfigParams) WriteToRequest(r runtime.ClientR } return nil } - -// bindParamUpdateEnvironmentAlertingConfig binds the parameter Impersonate-Group -func (o *UpdateEnvironmentAlertingConfigParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/copy_batch_parameters.go b/generated-client/client/job/copy_batch_parameters.go index 9fd4c72..c3c5f6a 100644 --- a/generated-client/client/job/copy_batch_parameters.go +++ b/generated-client/client/job/copy_batch_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type CopyBatchParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -160,13 +159,13 @@ func (o *CopyBatchParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the copy batch params -func (o *CopyBatchParams) WithImpersonateGroup(impersonateGroup []string) *CopyBatchParams { +func (o *CopyBatchParams) WithImpersonateGroup(impersonateGroup *string) *CopyBatchParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the copy batch params -func (o *CopyBatchParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *CopyBatchParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -246,14 +245,9 @@ func (o *CopyBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -295,20 +289,3 @@ func (o *CopyBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } return nil } - -// bindParamCopyBatch binds the parameter Impersonate-Group -func (o *CopyBatchParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/copy_job_parameters.go b/generated-client/client/job/copy_job_parameters.go index bac2e27..ebb0c82 100644 --- a/generated-client/client/job/copy_job_parameters.go +++ b/generated-client/client/job/copy_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type CopyJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -160,13 +159,13 @@ func (o *CopyJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the copy job params -func (o *CopyJobParams) WithImpersonateGroup(impersonateGroup []string) *CopyJobParams { +func (o *CopyJobParams) WithImpersonateGroup(impersonateGroup *string) *CopyJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the copy job params -func (o *CopyJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *CopyJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -246,14 +245,9 @@ func (o *CopyJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -295,20 +289,3 @@ func (o *CopyJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } return nil } - -// bindParamCopyJob binds the parameter Impersonate-Group -func (o *CopyJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/delete_batch_parameters.go b/generated-client/client/job/delete_batch_parameters.go index b50acba..1207dc6 100644 --- a/generated-client/client/job/delete_batch_parameters.go +++ b/generated-client/client/job/delete_batch_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDeleteBatchParams creates a new DeleteBatchParams object, @@ -64,9 +63,9 @@ type DeleteBatchParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *DeleteBatchParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the delete batch params -func (o *DeleteBatchParams) WithImpersonateGroup(impersonateGroup []string) *DeleteBatchParams { +func (o *DeleteBatchParams) WithImpersonateGroup(impersonateGroup *string) *DeleteBatchParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the delete batch params -func (o *DeleteBatchParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DeleteBatchParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *DeleteBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *DeleteBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } return nil } - -// bindParamDeleteBatch binds the parameter Impersonate-Group -func (o *DeleteBatchParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/delete_job_parameters.go b/generated-client/client/job/delete_job_parameters.go index 5ecc2f5..62eb069 100644 --- a/generated-client/client/job/delete_job_parameters.go +++ b/generated-client/client/job/delete_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDeleteJobParams creates a new DeleteJobParams object, @@ -64,9 +63,9 @@ type DeleteJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *DeleteJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the delete job params -func (o *DeleteJobParams) WithImpersonateGroup(impersonateGroup []string) *DeleteJobParams { +func (o *DeleteJobParams) WithImpersonateGroup(impersonateGroup *string) *DeleteJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the delete job params -func (o *DeleteJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DeleteJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *DeleteJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *DeleteJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } return nil } - -// bindParamDeleteJob binds the parameter Impersonate-Group -func (o *DeleteJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/get_batch_parameters.go b/generated-client/client/job/get_batch_parameters.go index b35cf1b..4f03ef3 100644 --- a/generated-client/client/job/get_batch_parameters.go +++ b/generated-client/client/job/get_batch_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetBatchParams creates a new GetBatchParams object, @@ -64,9 +63,9 @@ type GetBatchParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *GetBatchParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get batch params -func (o *GetBatchParams) WithImpersonateGroup(impersonateGroup []string) *GetBatchParams { +func (o *GetBatchParams) WithImpersonateGroup(impersonateGroup *string) *GetBatchParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get batch params -func (o *GetBatchParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetBatchParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *GetBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regi if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *GetBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regi } return nil } - -// bindParamGetBatch binds the parameter Impersonate-Group -func (o *GetBatchParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/get_batches_parameters.go b/generated-client/client/job/get_batches_parameters.go index 6c932fc..14e2f83 100644 --- a/generated-client/client/job/get_batches_parameters.go +++ b/generated-client/client/job/get_batches_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetBatchesParams creates a new GetBatchesParams object, @@ -64,9 +63,9 @@ type GetBatchesParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *GetBatchesParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get batches params -func (o *GetBatchesParams) WithImpersonateGroup(impersonateGroup []string) *GetBatchesParams { +func (o *GetBatchesParams) WithImpersonateGroup(impersonateGroup *string) *GetBatchesParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get batches params -func (o *GetBatchesParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetBatchesParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *GetBatchesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *GetBatchesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } return nil } - -// bindParamGetBatches binds the parameter Impersonate-Group -func (o *GetBatchesParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/get_job_component_deployments_parameters.go b/generated-client/client/job/get_job_component_deployments_parameters.go index 1f1e452..f333a0f 100644 --- a/generated-client/client/job/get_job_component_deployments_parameters.go +++ b/generated-client/client/job/get_job_component_deployments_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetJobComponentDeploymentsParams creates a new GetJobComponentDeploymentsParams object, @@ -64,9 +63,9 @@ type GetJobComponentDeploymentsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *GetJobComponentDeploymentsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get job component deployments params -func (o *GetJobComponentDeploymentsParams) WithImpersonateGroup(impersonateGroup []string) *GetJobComponentDeploymentsParams { +func (o *GetJobComponentDeploymentsParams) WithImpersonateGroup(impersonateGroup *string) *GetJobComponentDeploymentsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get job component deployments params -func (o *GetJobComponentDeploymentsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetJobComponentDeploymentsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *GetJobComponentDeploymentsParams) WriteToRequest(r runtime.ClientReques if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *GetJobComponentDeploymentsParams) WriteToRequest(r runtime.ClientReques } return nil } - -// bindParamGetJobComponentDeployments binds the parameter Impersonate-Group -func (o *GetJobComponentDeploymentsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/get_job_parameters.go b/generated-client/client/job/get_job_parameters.go index aea0087..cf9bf6a 100644 --- a/generated-client/client/job/get_job_parameters.go +++ b/generated-client/client/job/get_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetJobParams creates a new GetJobParams object, @@ -64,9 +63,9 @@ type GetJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *GetJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get job params -func (o *GetJobParams) WithImpersonateGroup(impersonateGroup []string) *GetJobParams { +func (o *GetJobParams) WithImpersonateGroup(impersonateGroup *string) *GetJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get job params -func (o *GetJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *GetJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regist if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *GetJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regist } return nil } - -// bindParamGetJob binds the parameter Impersonate-Group -func (o *GetJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/get_job_payload_parameters.go b/generated-client/client/job/get_job_payload_parameters.go index 39376dc..b9c1ef0 100644 --- a/generated-client/client/job/get_job_payload_parameters.go +++ b/generated-client/client/job/get_job_payload_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetJobPayloadParams creates a new GetJobPayloadParams object, @@ -64,9 +63,9 @@ type GetJobPayloadParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *GetJobPayloadParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get job payload params -func (o *GetJobPayloadParams) WithImpersonateGroup(impersonateGroup []string) *GetJobPayloadParams { +func (o *GetJobPayloadParams) WithImpersonateGroup(impersonateGroup *string) *GetJobPayloadParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get job payload params -func (o *GetJobPayloadParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetJobPayloadParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *GetJobPayloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *GetJobPayloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } return nil } - -// bindParamGetJobPayload binds the parameter Impersonate-Group -func (o *GetJobPayloadParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/get_jobs_parameters.go b/generated-client/client/job/get_jobs_parameters.go index ae2c4c4..6cad24b 100644 --- a/generated-client/client/job/get_jobs_parameters.go +++ b/generated-client/client/job/get_jobs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetJobsParams creates a new GetJobsParams object, @@ -64,9 +63,9 @@ type GetJobsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *GetJobsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get jobs params -func (o *GetJobsParams) WithImpersonateGroup(impersonateGroup []string) *GetJobsParams { +func (o *GetJobsParams) WithImpersonateGroup(impersonateGroup *string) *GetJobsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get jobs params -func (o *GetJobsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetJobsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *GetJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *GetJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } return nil } - -// bindParamGetJobs binds the parameter Impersonate-Group -func (o *GetJobsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/job_log_parameters.go b/generated-client/client/job/job_log_parameters.go index 59f6fae..d7228db 100644 --- a/generated-client/client/job/job_log_parameters.go +++ b/generated-client/client/job/job_log_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewJobLogParams creates a new JobLogParams object, @@ -64,9 +63,9 @@ type JobLogParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -176,13 +175,13 @@ func (o *JobLogParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the job log params -func (o *JobLogParams) WithImpersonateGroup(impersonateGroup []string) *JobLogParams { +func (o *JobLogParams) WithImpersonateGroup(impersonateGroup *string) *JobLogParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the job log params -func (o *JobLogParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *JobLogParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -284,14 +283,9 @@ func (o *JobLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regist if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -379,20 +373,3 @@ func (o *JobLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regist } return nil } - -// bindParamJobLog binds the parameter Impersonate-Group -func (o *JobLogParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/restart_batch_parameters.go b/generated-client/client/job/restart_batch_parameters.go index 7444245..9706268 100644 --- a/generated-client/client/job/restart_batch_parameters.go +++ b/generated-client/client/job/restart_batch_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartBatchParams creates a new RestartBatchParams object, @@ -64,9 +63,9 @@ type RestartBatchParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *RestartBatchParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the restart batch params -func (o *RestartBatchParams) WithImpersonateGroup(impersonateGroup []string) *RestartBatchParams { +func (o *RestartBatchParams) WithImpersonateGroup(impersonateGroup *string) *RestartBatchParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart batch params -func (o *RestartBatchParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartBatchParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *RestartBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *RestartBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } return nil } - -// bindParamRestartBatch binds the parameter Impersonate-Group -func (o *RestartBatchParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/restart_job_parameters.go b/generated-client/client/job/restart_job_parameters.go index f117a7b..ef4bb52 100644 --- a/generated-client/client/job/restart_job_parameters.go +++ b/generated-client/client/job/restart_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartJobParams creates a new RestartJobParams object, @@ -64,9 +63,9 @@ type RestartJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *RestartJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the restart job params -func (o *RestartJobParams) WithImpersonateGroup(impersonateGroup []string) *RestartJobParams { +func (o *RestartJobParams) WithImpersonateGroup(impersonateGroup *string) *RestartJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart job params -func (o *RestartJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *RestartJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *RestartJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } return nil } - -// bindParamRestartJob binds the parameter Impersonate-Group -func (o *RestartJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/stop_batch_parameters.go b/generated-client/client/job/stop_batch_parameters.go index ece878b..f6a232a 100644 --- a/generated-client/client/job/stop_batch_parameters.go +++ b/generated-client/client/job/stop_batch_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopBatchParams creates a new StopBatchParams object, @@ -64,9 +63,9 @@ type StopBatchParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *StopBatchParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop batch params -func (o *StopBatchParams) WithImpersonateGroup(impersonateGroup []string) *StopBatchParams { +func (o *StopBatchParams) WithImpersonateGroup(impersonateGroup *string) *StopBatchParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop batch params -func (o *StopBatchParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopBatchParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *StopBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *StopBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } return nil } - -// bindParamStopBatch binds the parameter Impersonate-Group -func (o *StopBatchParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/job/stop_job_parameters.go b/generated-client/client/job/stop_job_parameters.go index 99557c7..ea4fd76 100644 --- a/generated-client/client/job/stop_job_parameters.go +++ b/generated-client/client/job/stop_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopJobParams creates a new StopJobParams object, @@ -64,9 +63,9 @@ type StopJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *StopJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop job params -func (o *StopJobParams) WithImpersonateGroup(impersonateGroup []string) *StopJobParams { +func (o *StopJobParams) WithImpersonateGroup(impersonateGroup *string) *StopJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop job params -func (o *StopJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *StopJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *StopJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } return nil } - -// bindParamStopJob binds the parameter Impersonate-Group -func (o *StopJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/get_application_job_parameters.go b/generated-client/client/pipeline_job/get_application_job_parameters.go index 40f6d02..e525f87 100644 --- a/generated-client/client/pipeline_job/get_application_job_parameters.go +++ b/generated-client/client/pipeline_job/get_application_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetApplicationJobParams creates a new GetApplicationJobParams object, @@ -64,9 +63,9 @@ type GetApplicationJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetApplicationJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get application job params -func (o *GetApplicationJobParams) WithImpersonateGroup(impersonateGroup []string) *GetApplicationJobParams { +func (o *GetApplicationJobParams) WithImpersonateGroup(impersonateGroup *string) *GetApplicationJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get application job params -func (o *GetApplicationJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetApplicationJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg st if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg st } return nil } - -// bindParamGetApplicationJob binds the parameter Impersonate-Group -func (o *GetApplicationJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/get_application_jobs_parameters.go b/generated-client/client/pipeline_job/get_application_jobs_parameters.go index 0ce8127..4a88020 100644 --- a/generated-client/client/pipeline_job/get_application_jobs_parameters.go +++ b/generated-client/client/pipeline_job/get_application_jobs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetApplicationJobsParams creates a new GetApplicationJobsParams object, @@ -64,9 +63,9 @@ type GetApplicationJobsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetApplicationJobsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get application jobs params -func (o *GetApplicationJobsParams) WithImpersonateGroup(impersonateGroup []string) *GetApplicationJobsParams { +func (o *GetApplicationJobsParams) WithImpersonateGroup(impersonateGroup *string) *GetApplicationJobsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get application jobs params -func (o *GetApplicationJobsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetApplicationJobsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetApplicationJobsParams) WriteToRequest(r runtime.ClientRequest, reg s if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetApplicationJobsParams) WriteToRequest(r runtime.ClientRequest, reg s } return nil } - -// bindParamGetApplicationJobs binds the parameter Impersonate-Group -func (o *GetApplicationJobsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/get_pipeline_job_step_logs_parameters.go b/generated-client/client/pipeline_job/get_pipeline_job_step_logs_parameters.go index 1db5011..43e6e56 100644 --- a/generated-client/client/pipeline_job/get_pipeline_job_step_logs_parameters.go +++ b/generated-client/client/pipeline_job/get_pipeline_job_step_logs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetPipelineJobStepLogsParams creates a new GetPipelineJobStepLogsParams object, @@ -64,9 +63,9 @@ type GetPipelineJobStepLogsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -170,13 +169,13 @@ func (o *GetPipelineJobStepLogsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get pipeline job step logs params -func (o *GetPipelineJobStepLogsParams) WithImpersonateGroup(impersonateGroup []string) *GetPipelineJobStepLogsParams { +func (o *GetPipelineJobStepLogsParams) WithImpersonateGroup(impersonateGroup *string) *GetPipelineJobStepLogsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get pipeline job step logs params -func (o *GetPipelineJobStepLogsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetPipelineJobStepLogsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -267,14 +266,9 @@ func (o *GetPipelineJobStepLogsParams) WriteToRequest(r runtime.ClientRequest, r if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -357,20 +351,3 @@ func (o *GetPipelineJobStepLogsParams) WriteToRequest(r runtime.ClientRequest, r } return nil } - -// bindParamGetPipelineJobStepLogs binds the parameter Impersonate-Group -func (o *GetPipelineJobStepLogsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/get_tekton_pipeline_run_parameters.go b/generated-client/client/pipeline_job/get_tekton_pipeline_run_parameters.go index 15e674b..db10752 100644 --- a/generated-client/client/pipeline_job/get_tekton_pipeline_run_parameters.go +++ b/generated-client/client/pipeline_job/get_tekton_pipeline_run_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunParams creates a new GetTektonPipelineRunParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *GetTektonPipelineRunParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline run params -func (o *GetTektonPipelineRunParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunParams { +func (o *GetTektonPipelineRunParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline run params -func (o *GetTektonPipelineRunParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *GetTektonPipelineRunParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *GetTektonPipelineRunParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamGetTektonPipelineRun binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_parameters.go b/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_parameters.go index 45d45dc..7870730 100644 --- a/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_parameters.go +++ b/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunTaskParams creates a new GetTektonPipelineRunTaskParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunTaskParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *GetTektonPipelineRunTaskParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task params -func (o *GetTektonPipelineRunTaskParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunTaskParams { +func (o *GetTektonPipelineRunTaskParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunTaskParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task params -func (o *GetTektonPipelineRunTaskParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunTaskParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *GetTektonPipelineRunTaskParams) WriteToRequest(r runtime.ClientRequest, if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *GetTektonPipelineRunTaskParams) WriteToRequest(r runtime.ClientRequest, } return nil } - -// bindParamGetTektonPipelineRunTask binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunTaskParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_step_logs_parameters.go b/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_step_logs_parameters.go index 743e234..28e7feb 100644 --- a/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_step_logs_parameters.go +++ b/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_step_logs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunTaskStepLogsParams creates a new GetTektonPipelineRunTaskStepLogsParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunTaskStepLogsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -182,13 +181,13 @@ func (o *GetTektonPipelineRunTaskStepLogsParams) SetHTTPClient(client *http.Clie } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task step logs params -func (o *GetTektonPipelineRunTaskStepLogsParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunTaskStepLogsParams { +func (o *GetTektonPipelineRunTaskStepLogsParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunTaskStepLogsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task step logs params -func (o *GetTektonPipelineRunTaskStepLogsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunTaskStepLogsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -301,14 +300,9 @@ func (o *GetTektonPipelineRunTaskStepLogsParams) WriteToRequest(r runtime.Client if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -401,20 +395,3 @@ func (o *GetTektonPipelineRunTaskStepLogsParams) WriteToRequest(r runtime.Client } return nil } - -// bindParamGetTektonPipelineRunTaskStepLogs binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunTaskStepLogsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_steps_parameters.go b/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_steps_parameters.go index 4cdc3c2..6bb6bd6 100644 --- a/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_steps_parameters.go +++ b/generated-client/client/pipeline_job/get_tekton_pipeline_run_task_steps_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunTaskStepsParams creates a new GetTektonPipelineRunTaskStepsParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunTaskStepsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *GetTektonPipelineRunTaskStepsParams) SetHTTPClient(client *http.Client) } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task steps params -func (o *GetTektonPipelineRunTaskStepsParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunTaskStepsParams { +func (o *GetTektonPipelineRunTaskStepsParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunTaskStepsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task steps params -func (o *GetTektonPipelineRunTaskStepsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunTaskStepsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *GetTektonPipelineRunTaskStepsParams) WriteToRequest(r runtime.ClientReq if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *GetTektonPipelineRunTaskStepsParams) WriteToRequest(r runtime.ClientReq } return nil } - -// bindParamGetTektonPipelineRunTaskSteps binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunTaskStepsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/get_tekton_pipeline_run_tasks_parameters.go b/generated-client/client/pipeline_job/get_tekton_pipeline_run_tasks_parameters.go index 24e99d7..eaf17fe 100644 --- a/generated-client/client/pipeline_job/get_tekton_pipeline_run_tasks_parameters.go +++ b/generated-client/client/pipeline_job/get_tekton_pipeline_run_tasks_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunTasksParams creates a new GetTektonPipelineRunTasksParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunTasksParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *GetTektonPipelineRunTasksParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline run tasks params -func (o *GetTektonPipelineRunTasksParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunTasksParams { +func (o *GetTektonPipelineRunTasksParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunTasksParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline run tasks params -func (o *GetTektonPipelineRunTasksParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunTasksParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *GetTektonPipelineRunTasksParams) WriteToRequest(r runtime.ClientRequest if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *GetTektonPipelineRunTasksParams) WriteToRequest(r runtime.ClientRequest } return nil } - -// bindParamGetTektonPipelineRunTasks binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunTasksParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/get_tekton_pipeline_runs_parameters.go b/generated-client/client/pipeline_job/get_tekton_pipeline_runs_parameters.go index 89b69ff..28f178d 100644 --- a/generated-client/client/pipeline_job/get_tekton_pipeline_runs_parameters.go +++ b/generated-client/client/pipeline_job/get_tekton_pipeline_runs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunsParams creates a new GetTektonPipelineRunsParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetTektonPipelineRunsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline runs params -func (o *GetTektonPipelineRunsParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunsParams { +func (o *GetTektonPipelineRunsParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline runs params -func (o *GetTektonPipelineRunsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetTektonPipelineRunsParams) WriteToRequest(r runtime.ClientRequest, re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetTektonPipelineRunsParams) WriteToRequest(r runtime.ClientRequest, re } return nil } - -// bindParamGetTektonPipelineRuns binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/rerun_application_job_parameters.go b/generated-client/client/pipeline_job/rerun_application_job_parameters.go index 575a246..14429c0 100644 --- a/generated-client/client/pipeline_job/rerun_application_job_parameters.go +++ b/generated-client/client/pipeline_job/rerun_application_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRerunApplicationJobParams creates a new RerunApplicationJobParams object, @@ -64,9 +63,9 @@ type RerunApplicationJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *RerunApplicationJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the rerun application job params -func (o *RerunApplicationJobParams) WithImpersonateGroup(impersonateGroup []string) *RerunApplicationJobParams { +func (o *RerunApplicationJobParams) WithImpersonateGroup(impersonateGroup *string) *RerunApplicationJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the rerun application job params -func (o *RerunApplicationJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RerunApplicationJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *RerunApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *RerunApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamRerunApplicationJob binds the parameter Impersonate-Group -func (o *RerunApplicationJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/pipeline_job/stop_application_job_parameters.go b/generated-client/client/pipeline_job/stop_application_job_parameters.go index 4c514a9..70fcb97 100644 --- a/generated-client/client/pipeline_job/stop_application_job_parameters.go +++ b/generated-client/client/pipeline_job/stop_application_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopApplicationJobParams creates a new StopApplicationJobParams object, @@ -64,9 +63,9 @@ type StopApplicationJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *StopApplicationJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop application job params -func (o *StopApplicationJobParams) WithImpersonateGroup(impersonateGroup []string) *StopApplicationJobParams { +func (o *StopApplicationJobParams) WithImpersonateGroup(impersonateGroup *string) *StopApplicationJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop application job params -func (o *StopApplicationJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopApplicationJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *StopApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg s if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *StopApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg s } return nil } - -// bindParamStopApplicationJob binds the parameter Impersonate-Group -func (o *StopApplicationJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/platform/get_search_applications_parameters.go b/generated-client/client/platform/get_search_applications_parameters.go new file mode 100644 index 0000000..7dbf429 --- /dev/null +++ b/generated-client/client/platform/get_search_applications_parameters.go @@ -0,0 +1,274 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package platform + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetSearchApplicationsParams creates a new GetSearchApplicationsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetSearchApplicationsParams() *GetSearchApplicationsParams { + return &GetSearchApplicationsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetSearchApplicationsParamsWithTimeout creates a new GetSearchApplicationsParams object +// with the ability to set a timeout on a request. +func NewGetSearchApplicationsParamsWithTimeout(timeout time.Duration) *GetSearchApplicationsParams { + return &GetSearchApplicationsParams{ + timeout: timeout, + } +} + +// NewGetSearchApplicationsParamsWithContext creates a new GetSearchApplicationsParams object +// with the ability to set a context for a request. +func NewGetSearchApplicationsParamsWithContext(ctx context.Context) *GetSearchApplicationsParams { + return &GetSearchApplicationsParams{ + Context: ctx, + } +} + +// NewGetSearchApplicationsParamsWithHTTPClient creates a new GetSearchApplicationsParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetSearchApplicationsParamsWithHTTPClient(client *http.Client) *GetSearchApplicationsParams { + return &GetSearchApplicationsParams{ + HTTPClient: client, + } +} + +/* +GetSearchApplicationsParams contains all the parameters to send to the API endpoint + + for the get search applications operation. + + Typically these are written to a http.Request. +*/ +type GetSearchApplicationsParams struct { + + /* ImpersonateGroup. + + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) + */ + ImpersonateGroup *string + + /* ImpersonateUser. + + Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set) + */ + ImpersonateUser *string + + /* Apps. + + Comma separated list of application names to search for + */ + Apps string + + /* IncludeEnvironmentActiveComponents. + + true to include ActiveComponents in Environments + */ + IncludeEnvironmentActiveComponents *string + + /* IncludeLatestJobSummary. + + true to include LatestJobSummary + */ + IncludeLatestJobSummary *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get search applications params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetSearchApplicationsParams) WithDefaults() *GetSearchApplicationsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get search applications params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetSearchApplicationsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get search applications params +func (o *GetSearchApplicationsParams) WithTimeout(timeout time.Duration) *GetSearchApplicationsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get search applications params +func (o *GetSearchApplicationsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get search applications params +func (o *GetSearchApplicationsParams) WithContext(ctx context.Context) *GetSearchApplicationsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get search applications params +func (o *GetSearchApplicationsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get search applications params +func (o *GetSearchApplicationsParams) WithHTTPClient(client *http.Client) *GetSearchApplicationsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get search applications params +func (o *GetSearchApplicationsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithImpersonateGroup adds the impersonateGroup to the get search applications params +func (o *GetSearchApplicationsParams) WithImpersonateGroup(impersonateGroup *string) *GetSearchApplicationsParams { + o.SetImpersonateGroup(impersonateGroup) + return o +} + +// SetImpersonateGroup adds the impersonateGroup to the get search applications params +func (o *GetSearchApplicationsParams) SetImpersonateGroup(impersonateGroup *string) { + o.ImpersonateGroup = impersonateGroup +} + +// WithImpersonateUser adds the impersonateUser to the get search applications params +func (o *GetSearchApplicationsParams) WithImpersonateUser(impersonateUser *string) *GetSearchApplicationsParams { + o.SetImpersonateUser(impersonateUser) + return o +} + +// SetImpersonateUser adds the impersonateUser to the get search applications params +func (o *GetSearchApplicationsParams) SetImpersonateUser(impersonateUser *string) { + o.ImpersonateUser = impersonateUser +} + +// WithApps adds the apps to the get search applications params +func (o *GetSearchApplicationsParams) WithApps(apps string) *GetSearchApplicationsParams { + o.SetApps(apps) + return o +} + +// SetApps adds the apps to the get search applications params +func (o *GetSearchApplicationsParams) SetApps(apps string) { + o.Apps = apps +} + +// WithIncludeEnvironmentActiveComponents adds the includeEnvironmentActiveComponents to the get search applications params +func (o *GetSearchApplicationsParams) WithIncludeEnvironmentActiveComponents(includeEnvironmentActiveComponents *string) *GetSearchApplicationsParams { + o.SetIncludeEnvironmentActiveComponents(includeEnvironmentActiveComponents) + return o +} + +// SetIncludeEnvironmentActiveComponents adds the includeEnvironmentActiveComponents to the get search applications params +func (o *GetSearchApplicationsParams) SetIncludeEnvironmentActiveComponents(includeEnvironmentActiveComponents *string) { + o.IncludeEnvironmentActiveComponents = includeEnvironmentActiveComponents +} + +// WithIncludeLatestJobSummary adds the includeLatestJobSummary to the get search applications params +func (o *GetSearchApplicationsParams) WithIncludeLatestJobSummary(includeLatestJobSummary *string) *GetSearchApplicationsParams { + o.SetIncludeLatestJobSummary(includeLatestJobSummary) + return o +} + +// SetIncludeLatestJobSummary adds the includeLatestJobSummary to the get search applications params +func (o *GetSearchApplicationsParams) SetIncludeLatestJobSummary(includeLatestJobSummary *string) { + o.IncludeLatestJobSummary = includeLatestJobSummary +} + +// WriteToRequest writes these params to a swagger request +func (o *GetSearchApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ImpersonateGroup != nil { + + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err + } + } + + if o.ImpersonateUser != nil { + + // header param Impersonate-User + if err := r.SetHeaderParam("Impersonate-User", *o.ImpersonateUser); err != nil { + return err + } + } + + // query param apps + qrApps := o.Apps + qApps := qrApps + if qApps != "" { + + if err := r.SetQueryParam("apps", qApps); err != nil { + return err + } + } + + if o.IncludeEnvironmentActiveComponents != nil { + + // query param includeEnvironmentActiveComponents + var qrIncludeEnvironmentActiveComponents string + + if o.IncludeEnvironmentActiveComponents != nil { + qrIncludeEnvironmentActiveComponents = *o.IncludeEnvironmentActiveComponents + } + qIncludeEnvironmentActiveComponents := qrIncludeEnvironmentActiveComponents + if qIncludeEnvironmentActiveComponents != "" { + + if err := r.SetQueryParam("includeEnvironmentActiveComponents", qIncludeEnvironmentActiveComponents); err != nil { + return err + } + } + } + + if o.IncludeLatestJobSummary != nil { + + // query param includeLatestJobSummary + var qrIncludeLatestJobSummary string + + if o.IncludeLatestJobSummary != nil { + qrIncludeLatestJobSummary = *o.IncludeLatestJobSummary + } + qIncludeLatestJobSummary := qrIncludeLatestJobSummary + if qIncludeLatestJobSummary != "" { + + if err := r.SetQueryParam("includeLatestJobSummary", qIncludeLatestJobSummary); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/generated-client/client/platform/get_search_applications_responses.go b/generated-client/client/platform/get_search_applications_responses.go new file mode 100644 index 0000000..5cb3407 --- /dev/null +++ b/generated-client/client/platform/get_search_applications_responses.go @@ -0,0 +1,411 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package platform + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/equinor/radix-cli/generated-client/models" +) + +// GetSearchApplicationsReader is a Reader for the GetSearchApplications structure. +type GetSearchApplicationsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetSearchApplicationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetSearchApplicationsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetSearchApplicationsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetSearchApplicationsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetSearchApplicationsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewGetSearchApplicationsConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetSearchApplicationsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /applications/_search] getSearchApplications", response, response.Code()) + } +} + +// NewGetSearchApplicationsOK creates a GetSearchApplicationsOK with default headers values +func NewGetSearchApplicationsOK() *GetSearchApplicationsOK { + return &GetSearchApplicationsOK{} +} + +/* +GetSearchApplicationsOK describes a response with status code 200, with default header values. + +Successful operation +*/ +type GetSearchApplicationsOK struct { + Payload []*models.ApplicationSummary +} + +// IsSuccess returns true when this get search applications o k response has a 2xx status code +func (o *GetSearchApplicationsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get search applications o k response has a 3xx status code +func (o *GetSearchApplicationsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications o k response has a 4xx status code +func (o *GetSearchApplicationsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get search applications o k response has a 5xx status code +func (o *GetSearchApplicationsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get search applications o k response a status code equal to that given +func (o *GetSearchApplicationsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get search applications o k response +func (o *GetSearchApplicationsOK) Code() int { + return 200 +} + +func (o *GetSearchApplicationsOK) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsOK %+v", 200, o.Payload) +} + +func (o *GetSearchApplicationsOK) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsOK %+v", 200, o.Payload) +} + +func (o *GetSearchApplicationsOK) GetPayload() []*models.ApplicationSummary { + return o.Payload +} + +func (o *GetSearchApplicationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetSearchApplicationsUnauthorized creates a GetSearchApplicationsUnauthorized with default headers values +func NewGetSearchApplicationsUnauthorized() *GetSearchApplicationsUnauthorized { + return &GetSearchApplicationsUnauthorized{} +} + +/* +GetSearchApplicationsUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type GetSearchApplicationsUnauthorized struct { +} + +// IsSuccess returns true when this get search applications unauthorized response has a 2xx status code +func (o *GetSearchApplicationsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get search applications unauthorized response has a 3xx status code +func (o *GetSearchApplicationsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications unauthorized response has a 4xx status code +func (o *GetSearchApplicationsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get search applications unauthorized response has a 5xx status code +func (o *GetSearchApplicationsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get search applications unauthorized response a status code equal to that given +func (o *GetSearchApplicationsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get search applications unauthorized response +func (o *GetSearchApplicationsUnauthorized) Code() int { + return 401 +} + +func (o *GetSearchApplicationsUnauthorized) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsUnauthorized ", 401) +} + +func (o *GetSearchApplicationsUnauthorized) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsUnauthorized ", 401) +} + +func (o *GetSearchApplicationsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewGetSearchApplicationsForbidden creates a GetSearchApplicationsForbidden with default headers values +func NewGetSearchApplicationsForbidden() *GetSearchApplicationsForbidden { + return &GetSearchApplicationsForbidden{} +} + +/* +GetSearchApplicationsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetSearchApplicationsForbidden struct { +} + +// IsSuccess returns true when this get search applications forbidden response has a 2xx status code +func (o *GetSearchApplicationsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get search applications forbidden response has a 3xx status code +func (o *GetSearchApplicationsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications forbidden response has a 4xx status code +func (o *GetSearchApplicationsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get search applications forbidden response has a 5xx status code +func (o *GetSearchApplicationsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get search applications forbidden response a status code equal to that given +func (o *GetSearchApplicationsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get search applications forbidden response +func (o *GetSearchApplicationsForbidden) Code() int { + return 403 +} + +func (o *GetSearchApplicationsForbidden) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsForbidden ", 403) +} + +func (o *GetSearchApplicationsForbidden) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsForbidden ", 403) +} + +func (o *GetSearchApplicationsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewGetSearchApplicationsNotFound creates a GetSearchApplicationsNotFound with default headers values +func NewGetSearchApplicationsNotFound() *GetSearchApplicationsNotFound { + return &GetSearchApplicationsNotFound{} +} + +/* +GetSearchApplicationsNotFound describes a response with status code 404, with default header values. + +Not found +*/ +type GetSearchApplicationsNotFound struct { +} + +// IsSuccess returns true when this get search applications not found response has a 2xx status code +func (o *GetSearchApplicationsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get search applications not found response has a 3xx status code +func (o *GetSearchApplicationsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications not found response has a 4xx status code +func (o *GetSearchApplicationsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get search applications not found response has a 5xx status code +func (o *GetSearchApplicationsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get search applications not found response a status code equal to that given +func (o *GetSearchApplicationsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get search applications not found response +func (o *GetSearchApplicationsNotFound) Code() int { + return 404 +} + +func (o *GetSearchApplicationsNotFound) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsNotFound ", 404) +} + +func (o *GetSearchApplicationsNotFound) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsNotFound ", 404) +} + +func (o *GetSearchApplicationsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewGetSearchApplicationsConflict creates a GetSearchApplicationsConflict with default headers values +func NewGetSearchApplicationsConflict() *GetSearchApplicationsConflict { + return &GetSearchApplicationsConflict{} +} + +/* +GetSearchApplicationsConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type GetSearchApplicationsConflict struct { +} + +// IsSuccess returns true when this get search applications conflict response has a 2xx status code +func (o *GetSearchApplicationsConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get search applications conflict response has a 3xx status code +func (o *GetSearchApplicationsConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications conflict response has a 4xx status code +func (o *GetSearchApplicationsConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this get search applications conflict response has a 5xx status code +func (o *GetSearchApplicationsConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this get search applications conflict response a status code equal to that given +func (o *GetSearchApplicationsConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the get search applications conflict response +func (o *GetSearchApplicationsConflict) Code() int { + return 409 +} + +func (o *GetSearchApplicationsConflict) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsConflict ", 409) +} + +func (o *GetSearchApplicationsConflict) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsConflict ", 409) +} + +func (o *GetSearchApplicationsConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewGetSearchApplicationsInternalServerError creates a GetSearchApplicationsInternalServerError with default headers values +func NewGetSearchApplicationsInternalServerError() *GetSearchApplicationsInternalServerError { + return &GetSearchApplicationsInternalServerError{} +} + +/* +GetSearchApplicationsInternalServerError describes a response with status code 500, with default header values. + +Internal server error +*/ +type GetSearchApplicationsInternalServerError struct { +} + +// IsSuccess returns true when this get search applications internal server error response has a 2xx status code +func (o *GetSearchApplicationsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get search applications internal server error response has a 3xx status code +func (o *GetSearchApplicationsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications internal server error response has a 4xx status code +func (o *GetSearchApplicationsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get search applications internal server error response has a 5xx status code +func (o *GetSearchApplicationsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get search applications internal server error response a status code equal to that given +func (o *GetSearchApplicationsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get search applications internal server error response +func (o *GetSearchApplicationsInternalServerError) Code() int { + return 500 +} + +func (o *GetSearchApplicationsInternalServerError) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsInternalServerError ", 500) +} + +func (o *GetSearchApplicationsInternalServerError) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsInternalServerError ", 500) +} + +func (o *GetSearchApplicationsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/generated-client/client/platform/platform_client.go b/generated-client/client/platform/platform_client.go index ffd5735..455bdd5 100644 --- a/generated-client/client/platform/platform_client.go +++ b/generated-client/client/platform/platform_client.go @@ -30,6 +30,8 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { + GetSearchApplications(params *GetSearchApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSearchApplicationsOK, error) + RegisterApplication(params *RegisterApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterApplicationOK, error) SearchApplications(params *SearchApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchApplicationsOK, error) @@ -39,6 +41,45 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } +/* +GetSearchApplications gets applications by name n o t e doesn t get application summary latest job environments +*/ +func (a *Client) GetSearchApplications(params *GetSearchApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSearchApplicationsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetSearchApplicationsParams() + } + op := &runtime.ClientOperation{ + ID: "getSearchApplications", + Method: "GET", + PathPattern: "/applications/_search", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GetSearchApplicationsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetSearchApplicationsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getSearchApplications: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* RegisterApplication creates an application registration */ diff --git a/generated-client/client/platform/register_application_parameters.go b/generated-client/client/platform/register_application_parameters.go index 15b57f5..277d741 100644 --- a/generated-client/client/platform/register_application_parameters.go +++ b/generated-client/client/platform/register_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type RegisterApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -136,13 +135,13 @@ func (o *RegisterApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the register application params -func (o *RegisterApplicationParams) WithImpersonateGroup(impersonateGroup []string) *RegisterApplicationParams { +func (o *RegisterApplicationParams) WithImpersonateGroup(impersonateGroup *string) *RegisterApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the register application params -func (o *RegisterApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RegisterApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -178,14 +177,9 @@ func (o *RegisterApplicationParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -207,20 +201,3 @@ func (o *RegisterApplicationParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamRegisterApplication binds the parameter Impersonate-Group -func (o *RegisterApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/platform/search_applications_parameters.go b/generated-client/client/platform/search_applications_parameters.go index 5ed4f27..19964e5 100644 --- a/generated-client/client/platform/search_applications_parameters.go +++ b/generated-client/client/platform/search_applications_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cli/generated-client/models" ) @@ -66,9 +65,9 @@ type SearchApplicationsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -136,13 +135,13 @@ func (o *SearchApplicationsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the search applications params -func (o *SearchApplicationsParams) WithImpersonateGroup(impersonateGroup []string) *SearchApplicationsParams { +func (o *SearchApplicationsParams) WithImpersonateGroup(impersonateGroup *string) *SearchApplicationsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the search applications params -func (o *SearchApplicationsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *SearchApplicationsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -178,14 +177,9 @@ func (o *SearchApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg s if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -207,20 +201,3 @@ func (o *SearchApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg s } return nil } - -// bindParamSearchApplications binds the parameter Impersonate-Group -func (o *SearchApplicationsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/client/platform/show_applications_parameters.go b/generated-client/client/platform/show_applications_parameters.go index 02ad44f..036817e 100644 --- a/generated-client/client/platform/show_applications_parameters.go +++ b/generated-client/client/platform/show_applications_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewShowApplicationsParams creates a new ShowApplicationsParams object, @@ -64,9 +63,9 @@ type ShowApplicationsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *ShowApplicationsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the show applications params -func (o *ShowApplicationsParams) WithImpersonateGroup(impersonateGroup []string) *ShowApplicationsParams { +func (o *ShowApplicationsParams) WithImpersonateGroup(impersonateGroup *string) *ShowApplicationsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the show applications params -func (o *ShowApplicationsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ShowApplicationsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *ShowApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg str if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -217,20 +211,3 @@ func (o *ShowApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } - -// bindParamShowApplications binds the parameter Impersonate-Group -func (o *ShowApplicationsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/generated-client/models/auxiliary_resource_deployment.go b/generated-client/models/auxiliary_resource_deployment.go index 8103aea..1232480 100644 --- a/generated-client/models/auxiliary_resource_deployment.go +++ b/generated-client/models/auxiliary_resource_deployment.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -26,6 +27,7 @@ type AuxiliaryResourceDeployment struct { // Status of the auxiliary resource's deployment // Example: Consistent // Required: true + // Enum: [Stopped Consistent Reconciling] Status *string `json:"status"` } @@ -73,12 +75,49 @@ func (m *AuxiliaryResourceDeployment) validateReplicaList(formats strfmt.Registr return nil } +var auxiliaryResourceDeploymentTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Stopped","Consistent","Reconciling"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + auxiliaryResourceDeploymentTypeStatusPropEnum = append(auxiliaryResourceDeploymentTypeStatusPropEnum, v) + } +} + +const ( + + // AuxiliaryResourceDeploymentStatusStopped captures enum value "Stopped" + AuxiliaryResourceDeploymentStatusStopped string = "Stopped" + + // AuxiliaryResourceDeploymentStatusConsistent captures enum value "Consistent" + AuxiliaryResourceDeploymentStatusConsistent string = "Consistent" + + // AuxiliaryResourceDeploymentStatusReconciling captures enum value "Reconciling" + AuxiliaryResourceDeploymentStatusReconciling string = "Reconciling" +) + +// prop value enum +func (m *AuxiliaryResourceDeployment) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, auxiliaryResourceDeploymentTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + func (m *AuxiliaryResourceDeployment) validateStatus(formats strfmt.Registry) error { if err := validate.Required("status", "body", m.Status); err != nil { return err } + // value enum + if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { + return err + } + return nil } diff --git a/generated-client/models/build_secret.go b/generated-client/models/build_secret.go index 764b9a5..a24a8c5 100644 --- a/generated-client/models/build_secret.go +++ b/generated-client/models/build_secret.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -28,6 +29,7 @@ type BuildSecret struct { // Pending = Secret value is not set // Consistent = Secret value is set // Example: Consistent + // Enum: [Pending Consistent] Status string `json:"status,omitempty"` } @@ -39,6 +41,10 @@ func (m *BuildSecret) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -54,6 +60,48 @@ func (m *BuildSecret) validateName(formats strfmt.Registry) error { return nil } +var buildSecretTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Pending","Consistent"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + buildSecretTypeStatusPropEnum = append(buildSecretTypeStatusPropEnum, v) + } +} + +const ( + + // BuildSecretStatusPending captures enum value "Pending" + BuildSecretStatusPending string = "Pending" + + // BuildSecretStatusConsistent captures enum value "Consistent" + BuildSecretStatusConsistent string = "Consistent" +) + +// prop value enum +func (m *BuildSecret) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, buildSecretTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *BuildSecret) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + // ContextValidate validates this build secret based on context it is used func (m *BuildSecret) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/generated-client/models/component.go b/generated-client/models/component.go index b20ea85..df70340 100644 --- a/generated-client/models/component.go +++ b/generated-client/models/component.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -54,11 +55,13 @@ type Component struct { // Status of the component // Example: Consistent + // Enum: [Stopped Consistent Reconciling Restarting Outdated] Status string `json:"status,omitempty"` // Type of component // Example: component // Required: true + // Enum: [component job] Type *string `json:"type"` // Variable names map to values. From radixconfig.yaml @@ -97,6 +100,10 @@ func (m *Component) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -193,12 +200,97 @@ func (m *Component) validateReplicaList(formats strfmt.Registry) error { return nil } +var componentTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Stopped","Consistent","Reconciling","Restarting","Outdated"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + componentTypeStatusPropEnum = append(componentTypeStatusPropEnum, v) + } +} + +const ( + + // ComponentStatusStopped captures enum value "Stopped" + ComponentStatusStopped string = "Stopped" + + // ComponentStatusConsistent captures enum value "Consistent" + ComponentStatusConsistent string = "Consistent" + + // ComponentStatusReconciling captures enum value "Reconciling" + ComponentStatusReconciling string = "Reconciling" + + // ComponentStatusRestarting captures enum value "Restarting" + ComponentStatusRestarting string = "Restarting" + + // ComponentStatusOutdated captures enum value "Outdated" + ComponentStatusOutdated string = "Outdated" +) + +// prop value enum +func (m *Component) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, componentTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Component) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +var componentTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["component","job"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + componentTypeTypePropEnum = append(componentTypeTypePropEnum, v) + } +} + +const ( + + // ComponentTypeComponent captures enum value "component" + ComponentTypeComponent string = "component" + + // ComponentTypeJob captures enum value "job" + ComponentTypeJob string = "job" +) + +// prop value enum +func (m *Component) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, componentTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + func (m *Component) validateType(formats strfmt.Registry) error { if err := validate.Required("type", "body", m.Type); err != nil { return err } + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + return nil } diff --git a/generated-client/models/component_summary.go b/generated-client/models/component_summary.go index 0d1220d..7900a4c 100644 --- a/generated-client/models/component_summary.go +++ b/generated-client/models/component_summary.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -32,6 +33,7 @@ type ComponentSummary struct { // Type of component // Example: component // Required: true + // Enum: [component job] Type *string `json:"type"` } @@ -75,12 +77,46 @@ func (m *ComponentSummary) validateName(formats strfmt.Registry) error { return nil } +var componentSummaryTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["component","job"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + componentSummaryTypeTypePropEnum = append(componentSummaryTypeTypePropEnum, v) + } +} + +const ( + + // ComponentSummaryTypeComponent captures enum value "component" + ComponentSummaryTypeComponent string = "component" + + // ComponentSummaryTypeJob captures enum value "job" + ComponentSummaryTypeJob string = "job" +) + +// prop value enum +func (m *ComponentSummary) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, componentSummaryTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + func (m *ComponentSummary) validateType(formats strfmt.Registry) error { if err := validate.Required("type", "body", m.Type); err != nil { return err } + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + return nil } diff --git a/generated-client/models/deployment_summary.go b/generated-client/models/deployment_summary.go index 32fe4f5..72610ab 100644 --- a/generated-client/models/deployment_summary.go +++ b/generated-client/models/deployment_summary.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -59,6 +60,7 @@ type DeploymentSummary struct { // Type of pipeline job // Example: build-deploy + // Enum: [build build-deploy promote deploy] PipelineJobType string `json:"pipelineJobType,omitempty"` // Name of the environment the deployment was promoted from @@ -87,6 +89,10 @@ func (m *DeploymentSummary) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validatePipelineJobType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -146,6 +152,54 @@ func (m *DeploymentSummary) validateName(formats strfmt.Registry) error { return nil } +var deploymentSummaryTypePipelineJobTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["build","build-deploy","promote","deploy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deploymentSummaryTypePipelineJobTypePropEnum = append(deploymentSummaryTypePipelineJobTypePropEnum, v) + } +} + +const ( + + // DeploymentSummaryPipelineJobTypeBuild captures enum value "build" + DeploymentSummaryPipelineJobTypeBuild string = "build" + + // DeploymentSummaryPipelineJobTypeBuildDashDeploy captures enum value "build-deploy" + DeploymentSummaryPipelineJobTypeBuildDashDeploy string = "build-deploy" + + // DeploymentSummaryPipelineJobTypePromote captures enum value "promote" + DeploymentSummaryPipelineJobTypePromote string = "promote" + + // DeploymentSummaryPipelineJobTypeDeploy captures enum value "deploy" + DeploymentSummaryPipelineJobTypeDeploy string = "deploy" +) + +// prop value enum +func (m *DeploymentSummary) validatePipelineJobTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deploymentSummaryTypePipelineJobTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeploymentSummary) validatePipelineJobType(formats strfmt.Registry) error { + if swag.IsZero(m.PipelineJobType) { // not required + return nil + } + + // value enum + if err := m.validatePipelineJobTypeEnum("pipelineJobType", "body", m.PipelineJobType); err != nil { + return err + } + + return nil +} + // ContextValidate validate this deployment summary based on the context it is used func (m *DeploymentSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/generated-client/models/deployment_summary_pipeline_job_info.go b/generated-client/models/deployment_summary_pipeline_job_info.go index 3d9258e..70a8085 100644 --- a/generated-client/models/deployment_summary_pipeline_job_info.go +++ b/generated-client/models/deployment_summary_pipeline_job_info.go @@ -7,9 +7,12 @@ package models import ( "context" + "encoding/json" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // DeploymentSummaryPipelineJobInfo deployment summary pipeline job info @@ -26,6 +29,7 @@ type DeploymentSummaryPipelineJobInfo struct { // Type of pipeline job // Example: build-deploy + // Enum: [build build-deploy promote deploy] PipelineJobType string `json:"pipelineJobType,omitempty"` // Name of the environment the deployment was promoted from @@ -36,6 +40,63 @@ type DeploymentSummaryPipelineJobInfo struct { // Validate validates this deployment summary pipeline job info func (m *DeploymentSummaryPipelineJobInfo) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePipelineJobType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var deploymentSummaryPipelineJobInfoTypePipelineJobTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["build","build-deploy","promote","deploy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deploymentSummaryPipelineJobInfoTypePipelineJobTypePropEnum = append(deploymentSummaryPipelineJobInfoTypePipelineJobTypePropEnum, v) + } +} + +const ( + + // DeploymentSummaryPipelineJobInfoPipelineJobTypeBuild captures enum value "build" + DeploymentSummaryPipelineJobInfoPipelineJobTypeBuild string = "build" + + // DeploymentSummaryPipelineJobInfoPipelineJobTypeBuildDashDeploy captures enum value "build-deploy" + DeploymentSummaryPipelineJobInfoPipelineJobTypeBuildDashDeploy string = "build-deploy" + + // DeploymentSummaryPipelineJobInfoPipelineJobTypePromote captures enum value "promote" + DeploymentSummaryPipelineJobInfoPipelineJobTypePromote string = "promote" + + // DeploymentSummaryPipelineJobInfoPipelineJobTypeDeploy captures enum value "deploy" + DeploymentSummaryPipelineJobInfoPipelineJobTypeDeploy string = "deploy" +) + +// prop value enum +func (m *DeploymentSummaryPipelineJobInfo) validatePipelineJobTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deploymentSummaryPipelineJobInfoTypePipelineJobTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeploymentSummaryPipelineJobInfo) validatePipelineJobType(formats strfmt.Registry) error { + if swag.IsZero(m.PipelineJobType) { // not required + return nil + } + + // value enum + if err := m.validatePipelineJobTypeEnum("pipelineJobType", "body", m.PipelineJobType); err != nil { + return err + } + return nil } diff --git a/generated-client/models/event.go b/generated-client/models/event.go index 0563060..c3e8aaa 100644 --- a/generated-client/models/event.go +++ b/generated-client/models/event.go @@ -11,6 +11,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // Event Event holds information about Kubernetes events @@ -31,8 +32,8 @@ type Event struct { InvolvedObjectNamespace string `json:"involvedObjectNamespace,omitempty"` // The time (ISO8601) at which the event was last recorded - // Example: 2020-11-05T13:25:07.000Z - LastTimestamp interface{} `json:"lastTimestamp,omitempty"` + // Format: date + LastTimestamp strfmt.Date `json:"lastTimestamp,omitempty"` // A human-readable description of the status of this event // Example: 'Readiness probe failed: dial tcp 10.40.1.5:3003: connect: connection refused' @@ -54,6 +55,10 @@ type Event struct { func (m *Event) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateLastTimestamp(formats); err != nil { + res = append(res, err) + } + if err := m.validateInvolvedObjectState(formats); err != nil { res = append(res, err) } @@ -64,6 +69,18 @@ func (m *Event) Validate(formats strfmt.Registry) error { return nil } +func (m *Event) validateLastTimestamp(formats strfmt.Registry) error { + if swag.IsZero(m.LastTimestamp) { // not required + return nil + } + + if err := validate.FormatOf("lastTimestamp", "body", "date", m.LastTimestamp.String(), formats); err != nil { + return err + } + + return nil +} + func (m *Event) validateInvolvedObjectState(formats strfmt.Registry) error { if swag.IsZero(m.InvolvedObjectState) { // not required return nil diff --git a/generated-client/models/image_hub_secret.go b/generated-client/models/image_hub_secret.go index ea89581..43793ea 100644 --- a/generated-client/models/image_hub_secret.go +++ b/generated-client/models/image_hub_secret.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -32,6 +33,7 @@ type ImageHubSecret struct { // Pending = Secret value is not set // Consistent = Secret value is set // Example: Consistent + // Enum: [Pending Consistent] Status string `json:"status,omitempty"` // Username for connecting to private image hub @@ -48,6 +50,10 @@ func (m *ImageHubSecret) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateUsername(formats); err != nil { res = append(res, err) } @@ -67,6 +73,48 @@ func (m *ImageHubSecret) validateServer(formats strfmt.Registry) error { return nil } +var imageHubSecretTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Pending","Consistent"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + imageHubSecretTypeStatusPropEnum = append(imageHubSecretTypeStatusPropEnum, v) + } +} + +const ( + + // ImageHubSecretStatusPending captures enum value "Pending" + ImageHubSecretStatusPending string = "Pending" + + // ImageHubSecretStatusConsistent captures enum value "Consistent" + ImageHubSecretStatusConsistent string = "Consistent" +) + +// prop value enum +func (m *ImageHubSecret) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, imageHubSecretTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ImageHubSecret) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + func (m *ImageHubSecret) validateUsername(formats strfmt.Registry) error { if err := validate.Required("username", "body", m.Username); err != nil { diff --git a/generated-client/models/job.go b/generated-client/models/job.go index 808e776..37fa653 100644 --- a/generated-client/models/job.go +++ b/generated-client/models/job.go @@ -55,7 +55,7 @@ type Job struct { // Name of the pipeline // Example: build-deploy - // Enum: [build-deploy] + // Enum: [build build-deploy promote deploy] Pipeline string `json:"pipeline,omitempty"` // PromotedDeploymentName the name of the deployment that was promoted @@ -83,7 +83,7 @@ type Job struct { // Status of the job // Example: Waiting - // Enum: [Waiting Running Succeeded Stopping Stopped Failed StoppedNoChanges] + // Enum: [Queued Waiting Running Succeeded Failed Stopped Stopping StoppedNoChanges] Status string `json:"status,omitempty"` // Array of steps @@ -180,7 +180,7 @@ var jobTypePipelinePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["build-deploy"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["build","build-deploy","promote","deploy"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -190,8 +190,17 @@ func init() { const ( + // JobPipelineBuild captures enum value "build" + JobPipelineBuild string = "build" + // JobPipelineBuildDashDeploy captures enum value "build-deploy" JobPipelineBuildDashDeploy string = "build-deploy" + + // JobPipelinePromote captures enum value "promote" + JobPipelinePromote string = "promote" + + // JobPipelineDeploy captures enum value "deploy" + JobPipelineDeploy string = "deploy" ) // prop value enum @@ -219,7 +228,7 @@ var jobTypeStatusPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Stopping","Stopped","Failed","StoppedNoChanges"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Queued","Waiting","Running","Succeeded","Failed","Stopped","Stopping","StoppedNoChanges"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -229,6 +238,9 @@ func init() { const ( + // JobStatusQueued captures enum value "Queued" + JobStatusQueued string = "Queued" + // JobStatusWaiting captures enum value "Waiting" JobStatusWaiting string = "Waiting" @@ -238,14 +250,14 @@ const ( // JobStatusSucceeded captures enum value "Succeeded" JobStatusSucceeded string = "Succeeded" - // JobStatusStopping captures enum value "Stopping" - JobStatusStopping string = "Stopping" + // JobStatusFailed captures enum value "Failed" + JobStatusFailed string = "Failed" // JobStatusStopped captures enum value "Stopped" JobStatusStopped string = "Stopped" - // JobStatusFailed captures enum value "Failed" - JobStatusFailed string = "Failed" + // JobStatusStopping captures enum value "Stopping" + JobStatusStopping string = "Stopping" // JobStatusStoppedNoChanges captures enum value "StoppedNoChanges" JobStatusStoppedNoChanges string = "StoppedNoChanges" diff --git a/generated-client/models/job_summary.go b/generated-client/models/job_summary.go index f4ef220..311626a 100644 --- a/generated-client/models/job_summary.go +++ b/generated-client/models/job_summary.go @@ -54,7 +54,7 @@ type JobSummary struct { // Name of the pipeline // Example: build-deploy - // Enum: [build-deploy build] + // Enum: [build build-deploy promote deploy] Pipeline string `json:"pipeline,omitempty"` // RadixDeployment name, which is promoted @@ -72,7 +72,7 @@ type JobSummary struct { // Status of the job // Example: Waiting - // Enum: [Waiting Running Succeeded Stopping Stopped Failed StoppedNoChanges] + // Enum: [Queued Waiting Running Succeeded Failed Stopped Stopping StoppedNoChanges] Status string `json:"status,omitempty"` // TriggeredBy user that triggered the job. If through webhook = sender.login. If through api - usertoken.upn @@ -102,7 +102,7 @@ var jobSummaryTypePipelinePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["build-deploy"," build"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["build","build-deploy","promote","deploy"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -112,11 +112,17 @@ func init() { const ( + // JobSummaryPipelineBuild captures enum value "build" + JobSummaryPipelineBuild string = "build" + // JobSummaryPipelineBuildDashDeploy captures enum value "build-deploy" JobSummaryPipelineBuildDashDeploy string = "build-deploy" - // JobSummaryPipelineBuild captures enum value " build" - JobSummaryPipelineBuild string = " build" + // JobSummaryPipelinePromote captures enum value "promote" + JobSummaryPipelinePromote string = "promote" + + // JobSummaryPipelineDeploy captures enum value "deploy" + JobSummaryPipelineDeploy string = "deploy" ) // prop value enum @@ -144,7 +150,7 @@ var jobSummaryTypeStatusPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Stopping","Stopped","Failed","StoppedNoChanges"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Queued","Waiting","Running","Succeeded","Failed","Stopped","Stopping","StoppedNoChanges"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -154,6 +160,9 @@ func init() { const ( + // JobSummaryStatusQueued captures enum value "Queued" + JobSummaryStatusQueued string = "Queued" + // JobSummaryStatusWaiting captures enum value "Waiting" JobSummaryStatusWaiting string = "Waiting" @@ -163,14 +172,14 @@ const ( // JobSummaryStatusSucceeded captures enum value "Succeeded" JobSummaryStatusSucceeded string = "Succeeded" - // JobSummaryStatusStopping captures enum value "Stopping" - JobSummaryStatusStopping string = "Stopping" + // JobSummaryStatusFailed captures enum value "Failed" + JobSummaryStatusFailed string = "Failed" // JobSummaryStatusStopped captures enum value "Stopped" JobSummaryStatusStopped string = "Stopped" - // JobSummaryStatusFailed captures enum value "Failed" - JobSummaryStatusFailed string = "Failed" + // JobSummaryStatusStopping captures enum value "Stopping" + JobSummaryStatusStopping string = "Stopping" // JobSummaryStatusStoppedNoChanges captures enum value "StoppedNoChanges" JobSummaryStatusStoppedNoChanges string = "StoppedNoChanges" diff --git a/generated-client/models/pipeline_run.go b/generated-client/models/pipeline_run.go index 632bc39..f564f22 100644 --- a/generated-client/models/pipeline_run.go +++ b/generated-client/models/pipeline_run.go @@ -7,7 +7,6 @@ package models import ( "context" - "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -44,8 +43,7 @@ type PipelineRun struct { Started string `json:"started,omitempty"` // Status of the step - // Example: Waiting - // Enum: [Waiting Running Succeeded Failed] + // Example: Started Status string `json:"status,omitempty"` // StatusMessage of the task @@ -68,10 +66,6 @@ func (m *PipelineRun) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -105,54 +99,6 @@ func (m *PipelineRun) validateRealName(formats strfmt.Registry) error { return nil } -var pipelineRunTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - pipelineRunTypeStatusPropEnum = append(pipelineRunTypeStatusPropEnum, v) - } -} - -const ( - - // PipelineRunStatusWaiting captures enum value "Waiting" - PipelineRunStatusWaiting string = "Waiting" - - // PipelineRunStatusRunning captures enum value "Running" - PipelineRunStatusRunning string = "Running" - - // PipelineRunStatusSucceeded captures enum value "Succeeded" - PipelineRunStatusSucceeded string = "Succeeded" - - // PipelineRunStatusFailed captures enum value "Failed" - PipelineRunStatusFailed string = "Failed" -) - -// prop value enum -func (m *PipelineRun) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, pipelineRunTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PipelineRun) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - // ContextValidate validates this pipeline run based on context it is used func (m *PipelineRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/generated-client/models/pipeline_run_task.go b/generated-client/models/pipeline_run_task.go index 0ab5b94..6743667 100644 --- a/generated-client/models/pipeline_run_task.go +++ b/generated-client/models/pipeline_run_task.go @@ -7,7 +7,6 @@ package models import ( "context" - "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -49,8 +48,7 @@ type PipelineRunTask struct { Started string `json:"started,omitempty"` // Status of the task - // Example: Waiting - // Enum: [Waiting Running Succeeded Failed] + // Example: Running Status string `json:"status,omitempty"` // StatusMessage of the task @@ -77,10 +75,6 @@ func (m *PipelineRunTask) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -123,54 +117,6 @@ func (m *PipelineRunTask) validateRealName(formats strfmt.Registry) error { return nil } -var pipelineRunTaskTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - pipelineRunTaskTypeStatusPropEnum = append(pipelineRunTaskTypeStatusPropEnum, v) - } -} - -const ( - - // PipelineRunTaskStatusWaiting captures enum value "Waiting" - PipelineRunTaskStatusWaiting string = "Waiting" - - // PipelineRunTaskStatusRunning captures enum value "Running" - PipelineRunTaskStatusRunning string = "Running" - - // PipelineRunTaskStatusSucceeded captures enum value "Succeeded" - PipelineRunTaskStatusSucceeded string = "Succeeded" - - // PipelineRunTaskStatusFailed captures enum value "Failed" - PipelineRunTaskStatusFailed string = "Failed" -) - -// prop value enum -func (m *PipelineRunTask) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, pipelineRunTaskTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PipelineRunTask) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - // ContextValidate validates this pipeline run task based on context it is used func (m *PipelineRunTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/generated-client/models/pipeline_run_task_step.go b/generated-client/models/pipeline_run_task_step.go index b4020d6..9815aaa 100644 --- a/generated-client/models/pipeline_run_task_step.go +++ b/generated-client/models/pipeline_run_task_step.go @@ -7,7 +7,6 @@ package models import ( "context" - "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -34,8 +33,7 @@ type PipelineRunTaskStep struct { Started string `json:"started,omitempty"` // Status of the task - // Example: Waiting - // Enum: [Waiting Running Succeeded Failed] + // Example: Completed Status string `json:"status,omitempty"` // StatusMessage of the task @@ -50,10 +48,6 @@ func (m *PipelineRunTaskStep) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -69,54 +63,6 @@ func (m *PipelineRunTaskStep) validateName(formats strfmt.Registry) error { return nil } -var pipelineRunTaskStepTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - pipelineRunTaskStepTypeStatusPropEnum = append(pipelineRunTaskStepTypeStatusPropEnum, v) - } -} - -const ( - - // PipelineRunTaskStepStatusWaiting captures enum value "Waiting" - PipelineRunTaskStepStatusWaiting string = "Waiting" - - // PipelineRunTaskStepStatusRunning captures enum value "Running" - PipelineRunTaskStepStatusRunning string = "Running" - - // PipelineRunTaskStepStatusSucceeded captures enum value "Succeeded" - PipelineRunTaskStepStatusSucceeded string = "Succeeded" - - // PipelineRunTaskStepStatusFailed captures enum value "Failed" - PipelineRunTaskStepStatusFailed string = "Failed" -) - -// prop value enum -func (m *PipelineRunTaskStep) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, pipelineRunTaskStepTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PipelineRunTaskStep) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - // ContextValidate validates this pipeline run task step based on context it is used func (m *PipelineRunTaskStep) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/generated-client/models/replica_summary.go b/generated-client/models/replica_summary.go index 50a1bc5..43eef4c 100644 --- a/generated-client/models/replica_summary.go +++ b/generated-client/models/replica_summary.go @@ -19,6 +19,10 @@ import ( // swagger:model ReplicaSummary type ReplicaSummary struct { + // Container started timestamp + // Example: 2006-01-02T15:04:05Z + ContainerStarted string `json:"containerStarted,omitempty"` + // Created timestamp // Example: 2006-01-02T15:04:05Z Created string `json:"created,omitempty"` diff --git a/generated-client/models/scheduled_job_summary.go b/generated-client/models/scheduled_job_summary.go index 7935adc..1210de5 100644 --- a/generated-client/models/scheduled_job_summary.go +++ b/generated-client/models/scheduled_job_summary.go @@ -72,7 +72,7 @@ type ScheduledJobSummary struct { // Status of the job // Example: Waiting // Required: true - // Enum: [Waiting Running Succeeded Stopping Stopped Failed] + // Enum: [Running Succeeded Failed Waiting Stopping Stopped] Status *string `json:"status"` // TimeLimitSeconds How long the job supposed to run at maximum @@ -168,7 +168,7 @@ var scheduledJobSummaryTypeStatusPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Stopping","Stopped","Failed"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Running","Succeeded","Failed","Waiting","Stopping","Stopped"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -178,23 +178,23 @@ func init() { const ( - // ScheduledJobSummaryStatusWaiting captures enum value "Waiting" - ScheduledJobSummaryStatusWaiting string = "Waiting" - // ScheduledJobSummaryStatusRunning captures enum value "Running" ScheduledJobSummaryStatusRunning string = "Running" // ScheduledJobSummaryStatusSucceeded captures enum value "Succeeded" ScheduledJobSummaryStatusSucceeded string = "Succeeded" + // ScheduledJobSummaryStatusFailed captures enum value "Failed" + ScheduledJobSummaryStatusFailed string = "Failed" + + // ScheduledJobSummaryStatusWaiting captures enum value "Waiting" + ScheduledJobSummaryStatusWaiting string = "Waiting" + // ScheduledJobSummaryStatusStopping captures enum value "Stopping" ScheduledJobSummaryStatusStopping string = "Stopping" // ScheduledJobSummaryStatusStopped captures enum value "Stopped" ScheduledJobSummaryStatusStopped string = "Stopped" - - // ScheduledJobSummaryStatusFailed captures enum value "Failed" - ScheduledJobSummaryStatusFailed string = "Failed" ) // prop value enum diff --git a/generated-client/models/secret.go b/generated-client/models/secret.go index 3c8ea3e..a6016e9 100644 --- a/generated-client/models/secret.go +++ b/generated-client/models/secret.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -46,6 +47,7 @@ type Secret struct { // Consistent = Secret exists in Radix config and in cluster // NotAvailable = Secret is available in external secret configuration but not in cluster // Example: Consistent + // Enum: [Pending Consistent NotAvailable Invalid] Status string `json:"status,omitempty"` // StatusMessages contains a list of messages related to the Status @@ -55,8 +57,18 @@ type Secret struct { // The first certificate in the list should be the TLS certificate and the rest should be CA certificates TLSCertificates []*TLSCertificate `json:"tlsCertificates"` - // type - Type SecretType `json:"type,omitempty"` + // Type of the secret + // generic SecretTypeGeneric + // client-cert SecretTypeClientCert + // azure-blob-fuse-volume SecretTypeAzureBlobFuseVolume + // csi-azure-blob-volume SecretTypeCsiAzureBlobVolume + // csi-azure-key-vault-creds SecretTypeCsiAzureKeyVaultCreds + // csi-azure-key-vault-item SecretTypeCsiAzureKeyVaultItem + // client-cert-auth SecretTypeClientCertificateAuth + // oauth2-proxy SecretTypeOAuth2Proxy + // Example: client-cert + // Enum: [generic client-cert azure-blob-fuse-volume csi-azure-blob-volume csi-azure-key-vault-creds csi-azure-key-vault-item client-cert-auth oauth2-proxy] + Type string `json:"type,omitempty"` } // Validate validates this secret @@ -67,6 +79,10 @@ func (m *Secret) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateTLSCertificates(formats); err != nil { res = append(res, err) } @@ -90,6 +106,54 @@ func (m *Secret) validateName(formats strfmt.Registry) error { return nil } +var secretTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Pending","Consistent","NotAvailable","Invalid"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + secretTypeStatusPropEnum = append(secretTypeStatusPropEnum, v) + } +} + +const ( + + // SecretStatusPending captures enum value "Pending" + SecretStatusPending string = "Pending" + + // SecretStatusConsistent captures enum value "Consistent" + SecretStatusConsistent string = "Consistent" + + // SecretStatusNotAvailable captures enum value "NotAvailable" + SecretStatusNotAvailable string = "NotAvailable" + + // SecretStatusInvalid captures enum value "Invalid" + SecretStatusInvalid string = "Invalid" +) + +// prop value enum +func (m *Secret) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, secretTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Secret) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + func (m *Secret) validateTLSCertificates(formats strfmt.Registry) error { if swag.IsZero(m.TLSCertificates) { // not required return nil @@ -116,17 +180,60 @@ func (m *Secret) validateTLSCertificates(formats strfmt.Registry) error { return nil } +var secretTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["generic","client-cert","azure-blob-fuse-volume","csi-azure-blob-volume","csi-azure-key-vault-creds","csi-azure-key-vault-item","client-cert-auth","oauth2-proxy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + secretTypeTypePropEnum = append(secretTypeTypePropEnum, v) + } +} + +const ( + + // SecretTypeGeneric captures enum value "generic" + SecretTypeGeneric string = "generic" + + // SecretTypeClientDashCert captures enum value "client-cert" + SecretTypeClientDashCert string = "client-cert" + + // SecretTypeAzureDashBlobDashFuseDashVolume captures enum value "azure-blob-fuse-volume" + SecretTypeAzureDashBlobDashFuseDashVolume string = "azure-blob-fuse-volume" + + // SecretTypeCsiDashAzureDashBlobDashVolume captures enum value "csi-azure-blob-volume" + SecretTypeCsiDashAzureDashBlobDashVolume string = "csi-azure-blob-volume" + + // SecretTypeCsiDashAzureDashKeyDashVaultDashCreds captures enum value "csi-azure-key-vault-creds" + SecretTypeCsiDashAzureDashKeyDashVaultDashCreds string = "csi-azure-key-vault-creds" + + // SecretTypeCsiDashAzureDashKeyDashVaultDashItem captures enum value "csi-azure-key-vault-item" + SecretTypeCsiDashAzureDashKeyDashVaultDashItem string = "csi-azure-key-vault-item" + + // SecretTypeClientDashCertDashAuth captures enum value "client-cert-auth" + SecretTypeClientDashCertDashAuth string = "client-cert-auth" + + // SecretTypeOauth2DashProxy captures enum value "oauth2-proxy" + SecretTypeOauth2DashProxy string = "oauth2-proxy" +) + +// prop value enum +func (m *Secret) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, secretTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + func (m *Secret) validateType(formats strfmt.Registry) error { if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("type") - } + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { return err } @@ -141,10 +248,6 @@ func (m *Secret) ContextValidate(ctx context.Context, formats strfmt.Registry) e res = append(res, err) } - if err := m.contextValidateType(ctx, formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -176,24 +279,6 @@ func (m *Secret) contextValidateTLSCertificates(ctx context.Context, formats str return nil } -func (m *Secret) contextValidateType(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - if err := m.Type.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("type") - } - return err - } - - return nil -} - // MarshalBinary interface implementation func (m *Secret) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/generated-client/models/secret_parameters.go b/generated-client/models/secret_parameters.go index 5d4439d..b48776c 100644 --- a/generated-client/models/secret_parameters.go +++ b/generated-client/models/secret_parameters.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -24,8 +25,18 @@ type SecretParameters struct { // Required: true SecretValue *string `json:"secretValue"` - // type - Type SecretType `json:"type,omitempty"` + // Type of the secret + // generic SecretTypeGeneric + // client-cert SecretTypeClientCert + // azure-blob-fuse-volume SecretTypeAzureBlobFuseVolume + // csi-azure-blob-volume SecretTypeCsiAzureBlobVolume + // csi-azure-key-vault-creds SecretTypeCsiAzureKeyVaultCreds + // csi-azure-key-vault-item SecretTypeCsiAzureKeyVaultItem + // client-cert-auth SecretTypeClientCertificateAuth + // oauth2-proxy SecretTypeOAuth2Proxy + // Example: azure-blob-fuse-volume + // Enum: [generic client-cert azure-blob-fuse-volume csi-azure-blob-volume csi-azure-key-vault-creds csi-azure-key-vault-item client-cert-auth oauth2-proxy] + Type string `json:"type,omitempty"` } // Validate validates this secret parameters @@ -55,55 +66,71 @@ func (m *SecretParameters) validateSecretValue(formats strfmt.Registry) error { return nil } -func (m *SecretParameters) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } +var secretParametersTypeTypePropEnum []interface{} - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("type") - } - return err +func init() { + var res []string + if err := json.Unmarshal([]byte(`["generic","client-cert","azure-blob-fuse-volume","csi-azure-blob-volume","csi-azure-key-vault-creds","csi-azure-key-vault-item","client-cert-auth","oauth2-proxy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + secretParametersTypeTypePropEnum = append(secretParametersTypeTypePropEnum, v) } - - return nil } -// ContextValidate validate this secret parameters based on the context it is used -func (m *SecretParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error +const ( - if err := m.contextValidateType(ctx, formats); err != nil { - res = append(res, err) - } + // SecretParametersTypeGeneric captures enum value "generic" + SecretParametersTypeGeneric string = "generic" - if len(res) > 0 { - return errors.CompositeValidationError(res...) + // SecretParametersTypeClientDashCert captures enum value "client-cert" + SecretParametersTypeClientDashCert string = "client-cert" + + // SecretParametersTypeAzureDashBlobDashFuseDashVolume captures enum value "azure-blob-fuse-volume" + SecretParametersTypeAzureDashBlobDashFuseDashVolume string = "azure-blob-fuse-volume" + + // SecretParametersTypeCsiDashAzureDashBlobDashVolume captures enum value "csi-azure-blob-volume" + SecretParametersTypeCsiDashAzureDashBlobDashVolume string = "csi-azure-blob-volume" + + // SecretParametersTypeCsiDashAzureDashKeyDashVaultDashCreds captures enum value "csi-azure-key-vault-creds" + SecretParametersTypeCsiDashAzureDashKeyDashVaultDashCreds string = "csi-azure-key-vault-creds" + + // SecretParametersTypeCsiDashAzureDashKeyDashVaultDashItem captures enum value "csi-azure-key-vault-item" + SecretParametersTypeCsiDashAzureDashKeyDashVaultDashItem string = "csi-azure-key-vault-item" + + // SecretParametersTypeClientDashCertDashAuth captures enum value "client-cert-auth" + SecretParametersTypeClientDashCertDashAuth string = "client-cert-auth" + + // SecretParametersTypeOauth2DashProxy captures enum value "oauth2-proxy" + SecretParametersTypeOauth2DashProxy string = "oauth2-proxy" +) + +// prop value enum +func (m *SecretParameters) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, secretParametersTypeTypePropEnum, true); err != nil { + return err } return nil } -func (m *SecretParameters) contextValidateType(ctx context.Context, formats strfmt.Registry) error { - +func (m *SecretParameters) validateType(formats strfmt.Registry) error { if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("type") - } + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { return err } return nil } +// ContextValidate validates this secret parameters based on context it is used +func (m *SecretParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *SecretParameters) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/generated-client/models/step.go b/generated-client/models/step.go index c1b2254..f433f9c 100644 --- a/generated-client/models/step.go +++ b/generated-client/models/step.go @@ -37,7 +37,7 @@ type Step struct { // Status of the step // Example: Waiting - // Enum: [Waiting Running Succeeded Failed] + // Enum: [Queued Waiting Running Succeeded Failed Stopped StoppedNoChanges] Status string `json:"status,omitempty"` } @@ -59,7 +59,7 @@ var stepTypeStatusPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Failed"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Queued","Waiting","Running","Succeeded","Failed","Stopped","StoppedNoChanges"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -69,6 +69,9 @@ func init() { const ( + // StepStatusQueued captures enum value "Queued" + StepStatusQueued string = "Queued" + // StepStatusWaiting captures enum value "Waiting" StepStatusWaiting string = "Waiting" @@ -80,6 +83,12 @@ const ( // StepStatusFailed captures enum value "Failed" StepStatusFailed string = "Failed" + + // StepStatusStopped captures enum value "Stopped" + StepStatusStopped string = "Stopped" + + // StepStatusStoppedNoChanges captures enum value "StoppedNoChanges" + StepStatusStoppedNoChanges string = "StoppedNoChanges" ) // prop value enum diff --git a/generated-client/models/tls_certificate.go b/generated-client/models/tls_certificate.go index 0bf2590..eec1e7c 100644 --- a/generated-client/models/tls_certificate.go +++ b/generated-client/models/tls_certificate.go @@ -28,14 +28,14 @@ type TLSCertificate struct { Issuer *string `json:"issuer"` // NotAfter defines the uppdater date/time validity boundary - // Example: 2023-08-25T23:59:59Z // Required: true - NotAfter interface{} `json:"notAfter"` + // Format: date + NotAfter *strfmt.Date `json:"notAfter"` // NotBefore defines the lower date/time validity boundary - // Example: 2022-08-09T00:00:00Z // Required: true - NotBefore interface{} `json:"notBefore"` + // Format: date + NotBefore *strfmt.Date `json:"notBefore"` // Subject contains the distinguished name for the certificate // Example: CN=mysite.example.com,O=MyOrg,L=MyLocation,C=NO @@ -80,8 +80,12 @@ func (m *TLSCertificate) validateIssuer(formats strfmt.Registry) error { func (m *TLSCertificate) validateNotAfter(formats strfmt.Registry) error { - if m.NotAfter == nil { - return errors.Required("notAfter", "body", nil) + if err := validate.Required("notAfter", "body", m.NotAfter); err != nil { + return err + } + + if err := validate.FormatOf("notAfter", "body", "date", m.NotAfter.String(), formats); err != nil { + return err } return nil @@ -89,8 +93,12 @@ func (m *TLSCertificate) validateNotAfter(formats strfmt.Registry) error { func (m *TLSCertificate) validateNotBefore(formats strfmt.Registry) error { - if m.NotBefore == nil { - return errors.Required("notBefore", "body", nil) + if err := validate.Required("notBefore", "body", m.NotBefore); err != nil { + return err + } + + if err := validate.FormatOf("notBefore", "body", "date", m.NotBefore.String(), formats); err != nil { + return err } return nil