From 5076952facffd13a99a8f82990590fedcc846a37 Mon Sep 17 00:00:00 2001 From: vmsharoshkin Date: Tue, 13 Oct 2026 12:28:32 +0300 Subject: [PATCH] feat: additional commands --- README.md | 30 +- cmd/app.go | 38 +- cmd/job.go | 98 + cmd/pipeline.go | 88 + cmd/repo.go | 4 +- cmd/run.go | 53 +- cmd/space.go | 193 ++ cmd/variable.go | 169 ++ cmd/wf.go | 3 + .../workflow_client/.openapi-generator/FILES | 19 + internal/workflow_client/README.md | 39 +- .../workflow_client/api_application_space.go | 903 ++++++++ internal/workflow_client/api_pipelines.go | 1950 ++++++++++++++++- internal/workflow_client/api_services.go | 6 +- internal/workflow_client/api_workflows.go | 793 ++++++- internal/workflow_client/client.go | 3 + internal/workflow_client/configuration.go | 2 +- ..._internal_application_model_application.go | 36 + ...nal_application_model_application_space.go | 268 +++ ...l_application_model_config_storage_type.go | 2 + ...line_src_internal_application_model_run.go | 86 +- ..._application_request_application_create.go | 36 + ...cation_request_application_space_create.go | 156 ++ ...cation_request_application_space_update.go | 156 ++ ..._application_request_application_update.go | 72 +- ...nal_application_request_variable_create.go | 184 ++ ...nal_application_request_variable_update.go | 156 ++ ...application_response_application_create.go | 36 + ...al_application_response_application_get.go | 36 + ...ation_response_application_space_create.go | 268 +++ ...lication_response_application_space_get.go | 268 +++ ...ication_response_application_space_list.go | 160 ++ ...ation_response_application_space_update.go | 268 +++ ...src_internal_application_response_clone.go | 124 ++ ...c_internal_application_response_job_get.go | 520 +++++ ...ernal_application_response_pipeline_get.go | 594 +++++ ...rnal_application_response_pipeline_list.go | 160 ++ ...nternal_application_response_repository.go | 484 ++++ ...e_src_internal_application_response_run.go | 449 ++++ ...c_internal_application_response_run_get.go | 86 +- ..._internal_application_response_run_list.go | 160 ++ ..._internal_application_response_variable.go | 160 ++ ...rnal_application_response_variable_list.go | 160 ++ skills/eds/SKILL.md | 22 +- 44 files changed, 9345 insertions(+), 153 deletions(-) create mode 100644 cmd/pipeline.go create mode 100644 cmd/space.go create mode 100644 cmd/variable.go create mode 100644 internal/workflow_client/api_application_space.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_application_space.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_space_create.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_space_update.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_variable_create.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_variable_update.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_create.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_get.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_list.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_update.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_clone.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_job_get.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_get.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_list.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_repository.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run_list.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_variable.go create mode 100644 internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_variable_list.go diff --git a/README.md b/README.md index e4a9259..db6dda3 100644 --- a/README.md +++ b/README.md @@ -63,18 +63,36 @@ eds repo delete [--force] delete a repository eds repo clone [dir] [--ssh] clone via local git CLI eds repo remote-add [--name N] [--ssh] wire an existing local checkout to it (git remote add) -eds wf app create --repository R|--repository-url URL --branch B create and auto-deploy a Workflow Studio application -eds wf app list list applications +eds wf app create --repository R|--repository-url URL --branch B [--space-id S] [--port N] create and auto-deploy a Workflow Studio application +eds wf app list [--space-id S] list applications eds wf app show show application details -eds wf app update --branch B [--name N] update name/branch +eds wf app update --branch B [--name N] [--space-id S] [--port N] update name/branch/space/port eds wf app delete [--force] delete an application eds wf app deploy run the pipeline and publish eds wf app deployments list publish history -eds wf run show show a run's status, stages and jobs -eds wf run stop stop a running run +eds wf pipeline list list pipelines +eds wf pipeline show show pipeline details -eds wf job logs get logs for a job +eds wf run list [--pipeline-id ID] [--limit N] [--with-config] list pipeline runs +eds wf run show show a run's status, stages and jobs +eds wf run stop stop a running run + +eds wf space list list application spaces +eds wf space create --name create an application space +eds wf space show show an application space +eds wf space update --name update an application space +eds wf space delete delete an application space + +eds wf variable list --pipeline-id list variables for a pipeline +eds wf variable create --pipeline-id create a variable +eds wf variable update --pipeline-id update a variable +eds wf variable delete --pipeline-id delete a variable + +eds wf job list --run-id list jobs for a run +eds wf job show show job details +eds wf job stop stop a running job +eds wf job logs get logs for a job ``` ### Login diff --git a/cmd/app.go b/cmd/app.go index ce603ad..f4baa3f 100644 --- a/cmd/app.go +++ b/cmd/app.go @@ -34,6 +34,8 @@ func newAppCreateCmd() *cobra.Command { repository string repositoryURL string branch string + spaceID string + port int ) cmd := &cobra.Command{ @@ -83,6 +85,12 @@ accepts either its id or its name) or an external git URL (--repository-url).`, if repositoryURL != "" { req.RepositoryUrl = &repositoryURL } + if spaceID != "" { + req.SpaceId = &spaceID + } + if port != 0 { + req.Port = &port + } app, _, err := ctx.WorkflowClient.ServicesAPI.ProjectProjectIdApplicationPost(cmd.Context(), ctx.ProjectID). Request(req).Execute() if err != nil { @@ -96,15 +104,18 @@ accepts either its id or its name) or an external git URL (--repository-url).`, cmd.Flags().StringVar(&repository, "repository", "", "id or name of an existing `eds repo` repository") cmd.Flags().StringVar(&repositoryURL, "repository-url", "", "external git repository URL (alternative to --repository)") cmd.Flags().StringVar(&branch, "branch", "main", "branch to deploy from") + cmd.Flags().StringVar(&spaceID, "space-id", "", "application space ID to place the app in (default space if omitted)") + cmd.Flags().IntVar(&port, "port", 0, "container port the app listens on (server default if omitted)") return cmd } func newAppListCmd() *cobra.Command { var ( - search string - sort string - limit int - offset int + search string + sort string + limit int + offset int + spaceID string ) cmd := &cobra.Command{ @@ -127,6 +138,7 @@ func newAppListCmd() *cobra.Command { Limit(limit). Offset(offset). Search(search). + SpaceId(spaceID). Execute() if err != nil { return fmt.Errorf("workflow client application list: %w", err) @@ -140,6 +152,7 @@ func newAppListCmd() *cobra.Command { cmd.Flags().StringVar(&sort, "sort", "created_at_desc", "sort order: created_at_asc, created_at_desc") cmd.Flags().IntVar(&limit, "limit", 50, "page size") cmd.Flags().IntVar(&offset, "offset", 0, "offset") + cmd.Flags().StringVar(&spaceID, "space-id", "", "filter by application space ID") return cmd } @@ -171,8 +184,10 @@ func newAppShowCmd() *cobra.Command { func newAppUpdateCmd() *cobra.Command { var ( - name string - branch string + name string + branch string + spaceID string + port int ) cmd := &cobra.Command{ @@ -194,12 +209,17 @@ func newAppUpdateCmd() *cobra.Command { } req := workflowclient.GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate{ - Branch: branch, - SpaceId: "", + Branch: branch, } if name != "" { req.Name = &name } + if spaceID != "" { + req.SpaceId = &spaceID + } + if port != 0 { + req.Port = &port + } _, err = ctx.WorkflowClient.ServicesAPI.ProjectProjectIdApplicationApplicationIdPatch(cmd.Context(), ctx.ProjectID, args[0]). Request(req). Execute() @@ -212,6 +232,8 @@ func newAppUpdateCmd() *cobra.Command { cmd.Flags().StringVar(&name, "name", "", "new application name") cmd.Flags().StringVar(&branch, "branch", "", "new branch to deploy from") + cmd.Flags().StringVar(&spaceID, "space-id", "", "move the app to this application space ID") + cmd.Flags().IntVar(&port, "port", 0, "container port the app listens on") return cmd } diff --git a/cmd/job.go b/cmd/job.go index c475eee..0c5a474 100644 --- a/cmd/job.go +++ b/cmd/job.go @@ -17,11 +17,109 @@ func newJobCmd() *cobra.Command { Short: "Inspect and control Workflow Studio jobs", } + cmd.AddCommand(newJobListCmd()) + cmd.AddCommand(newJobShowCmd()) + cmd.AddCommand(newJobStopCmd()) cmd.AddCommand(newJobLogsCmd()) return cmd } +func newJobListCmd() *cobra.Command { + var ( + runID string + limit int + offset int + ) + + cmd := &cobra.Command{ + Use: "list", + Short: "List jobs for a run", + Example: ` eds wf job list --run-id my-run-id + eds wf job list --run-id my-run-id --limit 20`, + RunE: func(cmd *cobra.Command, _ []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + if runID == "" { + return fmt.Errorf("--run-id is required") + } + + resp, _, err := ctx.WorkflowClient.PipelinesAPI.ListJobs(cmd.Context(), ctx.ProjectID). + RunId(runID). + Limit(limit). + Offset(offset). + Execute() + if err != nil { + return fmt.Errorf("workflow client job list: %w", err) + } + + return ctx.Printer.Print(resp) + }, + } + + cmd.Flags().StringVar(&runID, "run-id", "", "run ID to list jobs for (required)") + cmd.Flags().IntVar(&limit, "limit", 50, "page size") + cmd.Flags().IntVar(&offset, "offset", 0, "offset") + return cmd +} + +func newJobShowCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "show ", + Short: "Show job details", + Args: cobra.ExactArgs(1), + Example: ` eds wf job show my-job-id`, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + + job, _, err := ctx.WorkflowClient.WorkflowsAPI.GetJob(cmd.Context(), ctx.ProjectID, args[0]). + Execute() + if err != nil { + return fmt.Errorf("workflow client get job: %w", err) + } + + return ctx.Printer.Print(job) + }, + } + return cmd +} + +func newJobStopCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "stop ", + Short: "Stop a running job", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + + _, _, err = ctx.WorkflowClient.WorkflowsAPI.StopJob(cmd.Context(), ctx.ProjectID, args[0]).Execute() + if err != nil { + return fmt.Errorf("stop job: %w", err) + } + + return ctx.Printer.Print("job has been stopped") + }, + } + return cmd +} + func newJobLogsCmd() *cobra.Command { var ( limit int diff --git a/cmd/pipeline.go b/cmd/pipeline.go new file mode 100644 index 0000000..b169c61 --- /dev/null +++ b/cmd/pipeline.go @@ -0,0 +1,88 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +// newPipelineCmd creates the parent `eds wf pipeline` command. +func newPipelineCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "pipeline", + Short: "Manage Workflow Studio pipelines", + } + cmd.AddCommand(newPipelineListCmd()) + cmd.AddCommand(newPipelineShowCmd()) + return cmd +} + +func newPipelineListCmd() *cobra.Command { + var ( + search string + sort string + limit int + offset int + ) + + cmd := &cobra.Command{ + Use: "list", + Short: "List pipelines in the configured project", + Example: ` eds wf pipeline list + eds wf pipeline list --search my-pipeline --limit 10`, + RunE: func(cmd *cobra.Command, _ []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + + resp, _, err := ctx.WorkflowClient.PipelinesAPI.ListPipelines(cmd.Context(), ctx.ProjectID). + Search(search). + Sort(sort). + Limit(limit). + Offset(offset). + Execute() + if err != nil { + return fmt.Errorf("workflow client pipeline list: %w", err) + } + + return ctx.Printer.Print(resp) + }, + } + + cmd.Flags().StringVar(&search, "search", "", "search term (default: all)") + cmd.Flags().StringVar(&sort, "sort", "", "sort order: created_at_asc, created_at_desc") + cmd.Flags().IntVar(&limit, "limit", 50, "page size") + cmd.Flags().IntVar(&offset, "offset", 0, "offset") + return cmd +} + +func newPipelineShowCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "show ", + Short: "Show pipeline details", + Args: cobra.ExactArgs(1), + Example: ` eds wf pipeline show my-pipeline-id`, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + + pipe, _, err := ctx.WorkflowClient.PipelinesAPI.GetPipeline(cmd.Context(), ctx.ProjectID, args[0]). + Execute() + if err != nil { + return fmt.Errorf("workflow client get pipeline: %w", err) + } + + return ctx.Printer.Print(pipe) + }, + } + return cmd +} diff --git a/cmd/repo.go b/cmd/repo.go index 9034fa1..27cee68 100644 --- a/cmd/repo.go +++ b/cmd/repo.go @@ -195,8 +195,8 @@ func newRepoDeleteCmd() *cobra.Command { if err := ctx.API.DeleteRepository(cmd.Context(), id); err != nil { return fmt.Errorf("api delete repository: %w", err) } - fmt.Fprintf(cmd.OutOrStdout(), "Deleted repository %s\n", args[0]) - return nil + + return ctx.Printer.Print("repository has been deleted") }, } diff --git a/cmd/run.go b/cmd/run.go index 0fabe77..f9a0e8c 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -14,11 +14,61 @@ func newRunCmd() *cobra.Command { Use: "run", Short: "Inspect and control Workflow Studio pipeline runs", } + cmd.AddCommand(newRunListCmd()) cmd.AddCommand(newRunShowCmd()) cmd.AddCommand(newRunStopCmd()) return cmd } +func newRunListCmd() *cobra.Command { + var ( + pipelineID string + sort string + limit int + offset int + withConfig bool + ) + + cmd := &cobra.Command{ + Use: "list", + Short: "List Workflow Studio pipeline runs", + Example: ` eds wf run list + eds wf run list --pipeline-id my-pipeline-id --limit 10`, + RunE: func(cmd *cobra.Command, _ []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + + req := ctx.WorkflowClient.WorkflowsAPI.ListRuns(cmd.Context(), ctx.ProjectID). + PipelineId(pipelineID). + Sort(sort). + Limit(limit). + Offset(offset) + if cmd.Flags().Changed("with-config") { + req = req.WithConfig(withConfig) + } + + resp, _, err := req.Execute() + if err != nil { + return fmt.Errorf("workflow client run list: %w", err) + } + + return ctx.Printer.Print(resp) + }, + } + + cmd.Flags().StringVar(&pipelineID, "pipeline-id", "", "filter by pipeline ID") + cmd.Flags().StringVar(&sort, "sort", "", "sort order") + cmd.Flags().IntVar(&limit, "limit", 50, "page size") + cmd.Flags().IntVar(&offset, "offset", 0, "offset") + cmd.Flags().BoolVar(&withConfig, "with-config", false, "include run config in the response") + return cmd +} + func newRunShowCmd() *cobra.Command { cmd := &cobra.Command{ Use: "show ", @@ -66,8 +116,7 @@ func newRunStopCmd() *cobra.Command { return fmt.Errorf("stop run: %w", err) } - fmt.Fprintf(cmd.OutOrStdout(), "Stopped run %s\n", args[0]) - return nil + return ctx.Printer.Print("run has been stopped") }, } return cmd diff --git a/cmd/space.go b/cmd/space.go new file mode 100644 index 0000000..b6ee40e --- /dev/null +++ b/cmd/space.go @@ -0,0 +1,193 @@ +package cmd + +import ( + "fmt" + + workflowclient "github.com/cloud-ru/evolution-devservices-cli/internal/workflow_client" + "github.com/spf13/cobra" +) + +// newSpaceCmd creates the parent `eds wf space` command. +func newSpaceCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "space", + Short: "Manage Workflow Studio application spaces", + } + cmd.AddCommand(newSpaceListCmd()) + cmd.AddCommand(newSpaceCreateCmd()) + cmd.AddCommand(newSpaceShowCmd()) + cmd.AddCommand(newSpaceUpdateCmd()) + cmd.AddCommand(newSpaceDeleteCmd()) + return cmd +} + +func newSpaceListCmd() *cobra.Command { + var ( + search string + sort string + limit int + offset int + ) + + cmd := &cobra.Command{ + Use: "list", + Short: "List application spaces in the configured project", + Example: ` eds wf space list + eds wf space list --search default`, + RunE: func(cmd *cobra.Command, _ []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + + resp, _, err := ctx.WorkflowClient.ApplicationSpaceAPI.ListApplicationSpaces(cmd.Context(), ctx.ProjectID). + Search(search). + Sort(sort). + Limit(limit). + Offset(offset). + Execute() + if err != nil { + return fmt.Errorf("workflow client space list: %w", err) + } + + return ctx.Printer.Print(resp) + }, + } + + cmd.Flags().StringVar(&search, "search", "", "search term (default: all)") + cmd.Flags().StringVar(&sort, "sort", "", "sort order: created_at_asc, created_at_desc") + cmd.Flags().IntVar(&limit, "limit", 50, "page size") + cmd.Flags().IntVar(&offset, "offset", 0, "offset") + return cmd +} + +func newSpaceCreateCmd() *cobra.Command { + var name string + + cmd := &cobra.Command{ + Use: "create", + Short: "Create an application space", + Example: ` eds wf space create --name my-space`, + RunE: func(cmd *cobra.Command, _ []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + if name == "" { + return fmt.Errorf("--name is required") + } + + resp, _, err := ctx.WorkflowClient.ApplicationSpaceAPI.CreateApplicationSpace(cmd.Context(), ctx.ProjectID). + Request(workflowclient.GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate{ + Name: name, + }). + Execute() + if err != nil { + return fmt.Errorf("workflow client space create: %w", err) + } + + return ctx.Printer.Print(resp) + }, + } + + cmd.Flags().StringVar(&name, "name", "", "space name (required)") + return cmd +} + +func newSpaceShowCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "show ", + Short: "Show an application space", + Args: cobra.ExactArgs(1), + Example: ` eds wf space show my-space-id`, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + + resp, _, err := ctx.WorkflowClient.ApplicationSpaceAPI.GetApplicationSpace(cmd.Context(), ctx.ProjectID, args[0]). + Execute() + if err != nil { + return fmt.Errorf("workflow client space show: %w", err) + } + + return ctx.Printer.Print(resp) + }, + } + + return cmd +} + +func newSpaceUpdateCmd() *cobra.Command { + var name string + + cmd := &cobra.Command{ + Use: "update ", + Short: "Update an application space", + Args: cobra.ExactArgs(1), + Example: ` eds wf space update my-space-id --name new-name`, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + if name == "" { + return fmt.Errorf("--name is required") + } + + resp, _, err := ctx.WorkflowClient.ApplicationSpaceAPI.UpdateApplicationSpace(cmd.Context(), ctx.ProjectID, args[0]). + Request(workflowclient.GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate{ + Name: name, + }). + Execute() + if err != nil { + return fmt.Errorf("workflow client space update: %w", err) + } + + return ctx.Printer.Print(resp) + }, + } + + cmd.Flags().StringVar(&name, "name", "", "new space name (required)") + return cmd +} + +func newSpaceDeleteCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "delete ", + Short: "Delete an application space", + Args: cobra.ExactArgs(1), + Example: ` eds wf space delete my-space-id`, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + + if _, err := ctx.WorkflowClient.ApplicationSpaceAPI.DeleteApplicationSpace(cmd.Context(), ctx.ProjectID, args[0]). + Execute(); err != nil { + return fmt.Errorf("workflow client space delete: %w", err) + } + + return nil + }, + } + + return cmd +} diff --git a/cmd/variable.go b/cmd/variable.go new file mode 100644 index 0000000..99337af --- /dev/null +++ b/cmd/variable.go @@ -0,0 +1,169 @@ +package cmd + +import ( + "fmt" + + workflowclient "github.com/cloud-ru/evolution-devservices-cli/internal/workflow_client" + "github.com/spf13/cobra" +) + +// newVariableCmd creates the parent `eds wf variable` command. +func newVariableCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "variable", + Short: "Manage Workflow Studio pipeline variables", + } + cmd.AddCommand(newVariableListCmd()) + cmd.AddCommand(newVariableCreateCmd()) + cmd.AddCommand(newVariableUpdateCmd()) + cmd.AddCommand(newVariableDeleteCmd()) + return cmd +} + +func newVariableListCmd() *cobra.Command { + var pipelineID string + + cmd := &cobra.Command{ + Use: "list", + Short: "List variables for a pipeline", + Example: ` eds wf variable list --pipeline-id my-pipeline-id`, + RunE: func(cmd *cobra.Command, _ []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + if pipelineID == "" { + return fmt.Errorf("--pipeline-id is required") + } + + resp, _, err := ctx.WorkflowClient.PipelinesAPI.ListVariables(cmd.Context(), ctx.ProjectID, pipelineID). + Execute() + if err != nil { + return fmt.Errorf("workflow client variable list: %w", err) + } + + for i := range resp.Variables { + resp.Variables[i].Value = new("Value is hidden. Use Web-UI to view it") + } + + return ctx.Printer.Print(resp) + }, + } + + cmd.Flags().StringVar(&pipelineID, "pipeline-id", "", "pipeline ID to list variables for (required)") + return cmd +} + +func newVariableCreateCmd() *cobra.Command { + var pipelineID string + + cmd := &cobra.Command{ + Use: "create ", + Short: "Create a variable for a pipeline", + Args: cobra.ExactArgs(2), + Example: ` eds wf variable create MY_VAR my_value --pipeline-id my-pipeline-id`, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + if pipelineID == "" { + return fmt.Errorf("--pipeline-id is required") + } + + _, err = ctx.WorkflowClient.PipelinesAPI.CreateVariable(cmd.Context(), ctx.ProjectID, pipelineID). + Request(workflowclient.GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate{ + Name: args[0], + Value: args[1], + }). + Execute() + if err != nil { + return fmt.Errorf("workflow client variable create: %w", err) + } + + return nil + }, + } + + cmd.Flags().StringVar(&pipelineID, "pipeline-id", "", "pipeline ID (required)") + return cmd +} + +func newVariableUpdateCmd() *cobra.Command { + var pipelineID string + + cmd := &cobra.Command{ + Use: "update ", + Short: "Update a pipeline variable", + Args: cobra.ExactArgs(2), + Example: ` eds wf variable update MY_VAR new_value --pipeline-id my-pipeline-id`, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + if pipelineID == "" { + return fmt.Errorf("--pipeline-id is required") + } + + _, err = ctx.WorkflowClient.PipelinesAPI.UpdateVariable(cmd.Context(), ctx.ProjectID, pipelineID). + Name(args[0]). + Request(workflowclient.GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate{ + Value: args[1], + }). + Execute() + if err != nil { + return fmt.Errorf("workflow client variable update: %w", err) + } + + return nil + }, + } + + cmd.Flags().StringVar(&pipelineID, "pipeline-id", "", "pipeline ID (required)") + return cmd +} + +func newVariableDeleteCmd() *cobra.Command { + var pipelineID string + + cmd := &cobra.Command{ + Use: "delete ", + Short: "Delete a pipeline variable", + Args: cobra.ExactArgs(1), + Example: ` eds wf variable delete MY_VAR --pipeline-id my-pipeline-id`, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := resolveContext(cmd) + if err != nil { + return err + } + if err := ctx.ensureWorkflowAuth(cmd.Context()); err != nil { + return err + } + if pipelineID == "" { + return fmt.Errorf("--pipeline-id is required") + } + + _, err = ctx.WorkflowClient.PipelinesAPI.DeleteVariable(cmd.Context(), ctx.ProjectID, pipelineID). + Name(args[0]). + Execute() + if err != nil { + return fmt.Errorf("workflow client variable delete: %w", err) + } + + return nil + }, + } + + cmd.Flags().StringVar(&pipelineID, "pipeline-id", "", "pipeline ID (required)") + return cmd +} diff --git a/cmd/wf.go b/cmd/wf.go index 22003e6..b1cd6fd 100644 --- a/cmd/wf.go +++ b/cmd/wf.go @@ -13,7 +13,10 @@ func newWFCmd() *cobra.Command { Short: "Manage Workflow Studio applications, runs and jobs", } cmd.AddCommand(newAppCmd()) + cmd.AddCommand(newPipelineCmd()) cmd.AddCommand(newRunCmd()) + cmd.AddCommand(newSpaceCmd()) + cmd.AddCommand(newVariableCmd()) cmd.AddCommand(newJobCmd()) return cmd } diff --git a/internal/workflow_client/.openapi-generator/FILES b/internal/workflow_client/.openapi-generator/FILES index a50282c..7a61a57 100644 --- a/internal/workflow_client/.openapi-generator/FILES +++ b/internal/workflow_client/.openapi-generator/FILES @@ -2,6 +2,7 @@ .travis.yml README.md api/openapi.yaml +api_application_space.go api_pipelines.go api_services.go api_workflows.go @@ -9,6 +10,7 @@ client.go configuration.go git_push.sh model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_application.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_application_space.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_config_storage_type.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_deployment.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_job.go @@ -20,18 +22,35 @@ model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_mode model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_run_status.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_stage.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_create.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_space_create.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_space_update.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_update.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_job_log_list.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_variable_create.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_variable_update.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_create.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_get.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_list.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_create.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_get.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_list.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_update.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_clone.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_deployment_create.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_deployment_list.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_deployment_response.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_job_get.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_job_log_list.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_job_logs.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_get.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_list.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_run.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_repository.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run_get.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run_list.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_variable.go +model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_variable_list.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_errors_bad_request.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_errors_conflict.go model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_errors_internal.go diff --git a/internal/workflow_client/README.md b/internal/workflow_client/README.md index 7c2350e..43d5021 100644 --- a/internal/workflow_client/README.md +++ b/internal/workflow_client/README.md @@ -67,14 +67,29 @@ ctx = context.WithValue(context.Background(), workflowclient.ContextOperationSer ## Documentation for API Endpoints -All URIs are relative to *https://devtools.api.cloud.ru/workflow/v1* +All URIs are relative to *https://pipeline.cloud.ru/public-api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*ApplicationSpaceAPI* | [**CreateApplicationSpace**](docs/ApplicationSpaceAPI.md#createapplicationspace) | **Post** /project/{project_id}/space | Create application space +*ApplicationSpaceAPI* | [**DeleteApplicationSpace**](docs/ApplicationSpaceAPI.md#deleteapplicationspace) | **Delete** /project/{project_id}/space/{space_id} | Delete application space +*ApplicationSpaceAPI* | [**GetApplicationSpace**](docs/ApplicationSpaceAPI.md#getapplicationspace) | **Get** /project/{project_id}/space/{space_id} | Get application space +*ApplicationSpaceAPI* | [**ListApplicationSpaces**](docs/ApplicationSpaceAPI.md#listapplicationspaces) | **Get** /project/{project_id}/space/list | List application spaces +*ApplicationSpaceAPI* | [**UpdateApplicationSpace**](docs/ApplicationSpaceAPI.md#updateapplicationspace) | **Patch** /project/{project_id}/space/{space_id} | Update application space +*PipelinesAPI* | [**CreateVariable**](docs/PipelinesAPI.md#createvariable) | **Post** /project/{project_id}/pipeline/{pipeline_id}/variable | Create variable +*PipelinesAPI* | [**DeleteVariable**](docs/PipelinesAPI.md#deletevariable) | **Delete** /project/{project_id}/pipeline/{pipeline_id}/variable | Delete variable +*PipelinesAPI* | [**GetJob**](docs/PipelinesAPI.md#getjob) | **Get** /project/{project_id}/job/{job_id} | Get job *PipelinesAPI* | [**GetJobLogs**](docs/PipelinesAPI.md#getjoblogs) | **Get** /project/{project_id}/job/{job_id}/log/list | Get job logs +*PipelinesAPI* | [**GetPipeline**](docs/PipelinesAPI.md#getpipeline) | **Get** /project/{project_id}/pipeline/{pipeline_id} | Get pipeline *PipelinesAPI* | [**GetRun**](docs/PipelinesAPI.md#getrun) | **Get** /project/{project_id}/run/{run_id} | Get run +*PipelinesAPI* | [**ListJobs**](docs/PipelinesAPI.md#listjobs) | **Get** /project/{project_id}/job/list | List jobs +*PipelinesAPI* | [**ListPipelines**](docs/PipelinesAPI.md#listpipelines) | **Get** /project/{project_id}/pipeline/list | List pipelines +*PipelinesAPI* | [**ListRuns**](docs/PipelinesAPI.md#listruns) | **Get** /project/{project_id}/run/list | List runs +*PipelinesAPI* | [**ListVariables**](docs/PipelinesAPI.md#listvariables) | **Get** /project/{project_id}/pipeline/{pipeline_id}/variable/list | List variables *PipelinesAPI* | [**RunPipeline**](docs/PipelinesAPI.md#runpipeline) | **Post** /project/{project_id}/pipeline/{pipeline_id}/run | Run pipeline +*PipelinesAPI* | [**StopJob**](docs/PipelinesAPI.md#stopjob) | **Post** /project/{project_id}/job/{job_id}/stop | Stop job *PipelinesAPI* | [**StopRun**](docs/PipelinesAPI.md#stoprun) | **Post** /project/{project_id}/run/{run_id}/stop | Stop run +*PipelinesAPI* | [**UpdateVariable**](docs/PipelinesAPI.md#updatevariable) | **Put** /project/{project_id}/pipeline/{pipeline_id}/variable | Update variable *ServicesAPI* | [**ListApplications**](docs/ServicesAPI.md#listapplications) | **Get** /project/{project_id}/application/list | List applications *ServicesAPI* | [**ProjectProjectIdApplicationApplicationIdDelete**](docs/ServicesAPI.md#projectprojectidapplicationapplicationiddelete) | **Delete** /project/{project_id}/application/{application_id} | Delete application *ServicesAPI* | [**ProjectProjectIdApplicationApplicationIdDeploymentListGet**](docs/ServicesAPI.md#projectprojectidapplicationapplicationiddeploymentlistget) | **Get** /project/{project_id}/application/{application_id}/deployment/list | List deployments @@ -82,15 +97,20 @@ Class | Method | HTTP request | Description *ServicesAPI* | [**ProjectProjectIdApplicationApplicationIdGet**](docs/ServicesAPI.md#projectprojectidapplicationapplicationidget) | **Get** /project/{project_id}/application/{application_id} | Get application *ServicesAPI* | [**ProjectProjectIdApplicationApplicationIdPatch**](docs/ServicesAPI.md#projectprojectidapplicationapplicationidpatch) | **Patch** /project/{project_id}/application/{application_id} | Update application *ServicesAPI* | [**ProjectProjectIdApplicationPost**](docs/ServicesAPI.md#projectprojectidapplicationpost) | **Post** /project/{project_id}/application | Create application +*WorkflowsAPI* | [**GetJob**](docs/WorkflowsAPI.md#getjob) | **Get** /project/{project_id}/job/{job_id} | Get job *WorkflowsAPI* | [**GetJobLogs**](docs/WorkflowsAPI.md#getjoblogs) | **Get** /project/{project_id}/job/{job_id}/log/list | Get job logs *WorkflowsAPI* | [**GetRun**](docs/WorkflowsAPI.md#getrun) | **Get** /project/{project_id}/run/{run_id} | Get run +*WorkflowsAPI* | [**ListJobs**](docs/WorkflowsAPI.md#listjobs) | **Get** /project/{project_id}/job/list | List jobs +*WorkflowsAPI* | [**ListRuns**](docs/WorkflowsAPI.md#listruns) | **Get** /project/{project_id}/run/list | List runs *WorkflowsAPI* | [**RunPipeline**](docs/WorkflowsAPI.md#runpipeline) | **Post** /project/{project_id}/pipeline/{pipeline_id}/run | Run pipeline +*WorkflowsAPI* | [**StopJob**](docs/WorkflowsAPI.md#stopjob) | **Post** /project/{project_id}/job/{job_id}/stop | Stop job *WorkflowsAPI* | [**StopRun**](docs/WorkflowsAPI.md#stoprun) | **Post** /project/{project_id}/run/{run_id}/stop | Stop run ## Documentation For Models - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplication](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplication.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelDeployment](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelDeployment.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJob](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJob.md) @@ -102,18 +122,35 @@ Class | Method | HTTP request | Description - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRunStatus](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRunStatus.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationCreate](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationCreate.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestJobLogList](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestJobLogList.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationCreate](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationCreate.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationGet](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationGet.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationList](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationList.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseDeploymentCreate](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseDeploymentCreate.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseDeploymentList](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseDeploymentList.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseDeploymentResponse](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseDeploymentResponse.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogList](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogList.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogs](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogs.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable.md) + - [GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsConflict](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsConflict.md) - [GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal](docs/GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal.md) diff --git a/internal/workflow_client/api_application_space.go b/internal/workflow_client/api_application_space.go new file mode 100644 index 0000000..68bfab9 --- /dev/null +++ b/internal/workflow_client/api_application_space.go @@ -0,0 +1,903 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// ApplicationSpaceAPIService ApplicationSpaceAPI service +type ApplicationSpaceAPIService service + +type ApplicationSpaceAPICreateApplicationSpaceRequest struct { + ctx context.Context + ApiService *ApplicationSpaceAPIService + projectId string + request *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate +} + +// Request body +func (r ApplicationSpaceAPICreateApplicationSpaceRequest) Request(request GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) ApplicationSpaceAPICreateApplicationSpaceRequest { + r.request = &request + return r +} + +func (r ApplicationSpaceAPICreateApplicationSpaceRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate, *http.Response, error) { + return r.ApiService.CreateApplicationSpaceExecute(r) +} + +/* +CreateApplicationSpace Create application space + +Create application space + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @return ApplicationSpaceAPICreateApplicationSpaceRequest +*/ +func (a *ApplicationSpaceAPIService) CreateApplicationSpace(ctx context.Context, projectId string) ApplicationSpaceAPICreateApplicationSpaceRequest { + return ApplicationSpaceAPICreateApplicationSpaceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate +func (a *ApplicationSpaceAPIService) CreateApplicationSpaceExecute(r ApplicationSpaceAPICreateApplicationSpaceRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationSpaceAPIService.CreateApplicationSpace") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/space" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.request == nil { + return localVarReturnValue, nil, reportError("request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.request + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsConflict + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApplicationSpaceAPIDeleteApplicationSpaceRequest struct { + ctx context.Context + ApiService *ApplicationSpaceAPIService + projectId string + spaceId string +} + +func (r ApplicationSpaceAPIDeleteApplicationSpaceRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteApplicationSpaceExecute(r) +} + +/* +DeleteApplicationSpace Delete application space + +Delete application space + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param spaceId Space ID + @return ApplicationSpaceAPIDeleteApplicationSpaceRequest +*/ +func (a *ApplicationSpaceAPIService) DeleteApplicationSpace(ctx context.Context, projectId string, spaceId string) ApplicationSpaceAPIDeleteApplicationSpaceRequest { + return ApplicationSpaceAPIDeleteApplicationSpaceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + spaceId: spaceId, + } +} + +// Execute executes the request +func (a *ApplicationSpaceAPIService) DeleteApplicationSpaceExecute(r ApplicationSpaceAPIDeleteApplicationSpaceRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationSpaceAPIService.DeleteApplicationSpace") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/space/{space_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"space_id"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsConflict + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApplicationSpaceAPIGetApplicationSpaceRequest struct { + ctx context.Context + ApiService *ApplicationSpaceAPIService + projectId string + spaceId string +} + +func (r ApplicationSpaceAPIGetApplicationSpaceRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet, *http.Response, error) { + return r.ApiService.GetApplicationSpaceExecute(r) +} + +/* +GetApplicationSpace Get application space + +Get application space + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param spaceId Space ID + @return ApplicationSpaceAPIGetApplicationSpaceRequest +*/ +func (a *ApplicationSpaceAPIService) GetApplicationSpace(ctx context.Context, projectId string, spaceId string) ApplicationSpaceAPIGetApplicationSpaceRequest { + return ApplicationSpaceAPIGetApplicationSpaceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet +func (a *ApplicationSpaceAPIService) GetApplicationSpaceExecute(r ApplicationSpaceAPIGetApplicationSpaceRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationSpaceAPIService.GetApplicationSpace") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/space/{space_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"space_id"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApplicationSpaceAPIListApplicationSpacesRequest struct { + ctx context.Context + ApiService *ApplicationSpaceAPIService + projectId string + search *string + sort *string + limit *int + offset *int +} + +// Search +func (r ApplicationSpaceAPIListApplicationSpacesRequest) Search(search string) ApplicationSpaceAPIListApplicationSpacesRequest { + r.search = &search + return r +} + +// Sort +func (r ApplicationSpaceAPIListApplicationSpacesRequest) Sort(sort string) ApplicationSpaceAPIListApplicationSpacesRequest { + r.sort = &sort + return r +} + +// Limit +func (r ApplicationSpaceAPIListApplicationSpacesRequest) Limit(limit int) ApplicationSpaceAPIListApplicationSpacesRequest { + r.limit = &limit + return r +} + +// Offset +func (r ApplicationSpaceAPIListApplicationSpacesRequest) Offset(offset int) ApplicationSpaceAPIListApplicationSpacesRequest { + r.offset = &offset + return r +} + +func (r ApplicationSpaceAPIListApplicationSpacesRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList, *http.Response, error) { + return r.ApiService.ListApplicationSpacesExecute(r) +} + +/* +ListApplicationSpaces List application spaces + +List application spaces + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @return ApplicationSpaceAPIListApplicationSpacesRequest +*/ +func (a *ApplicationSpaceAPIService) ListApplicationSpaces(ctx context.Context, projectId string) ApplicationSpaceAPIListApplicationSpacesRequest { + return ApplicationSpaceAPIListApplicationSpacesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList +func (a *ApplicationSpaceAPIService) ListApplicationSpacesExecute(r ApplicationSpaceAPIListApplicationSpacesRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationSpaceAPIService.ListApplicationSpaces") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/space/list" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "", "") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "", "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApplicationSpaceAPIUpdateApplicationSpaceRequest struct { + ctx context.Context + ApiService *ApplicationSpaceAPIService + projectId string + spaceId string + request *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate +} + +// Request body +func (r ApplicationSpaceAPIUpdateApplicationSpaceRequest) Request(request GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) ApplicationSpaceAPIUpdateApplicationSpaceRequest { + r.request = &request + return r +} + +func (r ApplicationSpaceAPIUpdateApplicationSpaceRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate, *http.Response, error) { + return r.ApiService.UpdateApplicationSpaceExecute(r) +} + +/* +UpdateApplicationSpace Update application space + +Update application space + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param spaceId Space ID + @return ApplicationSpaceAPIUpdateApplicationSpaceRequest +*/ +func (a *ApplicationSpaceAPIService) UpdateApplicationSpace(ctx context.Context, projectId string, spaceId string) ApplicationSpaceAPIUpdateApplicationSpaceRequest { + return ApplicationSpaceAPIUpdateApplicationSpaceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate +func (a *ApplicationSpaceAPIService) UpdateApplicationSpaceExecute(r ApplicationSpaceAPIUpdateApplicationSpaceRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationSpaceAPIService.UpdateApplicationSpace") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/space/{space_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"space_id"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.request == nil { + return localVarReturnValue, nil, reportError("request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.request + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsConflict + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/internal/workflow_client/api_pipelines.go b/internal/workflow_client/api_pipelines.go index 91c5a59..780026e 100644 --- a/internal/workflow_client/api_pipelines.go +++ b/internal/workflow_client/api_pipelines.go @@ -22,72 +22,1698 @@ import ( // PipelinesAPIService PipelinesAPI service type PipelinesAPIService service +type PipelinesAPICreateVariableRequest struct { + ctx context.Context + ApiService *PipelinesAPIService + projectId string + pipelineId string + request *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate +} + +// Request body +func (r PipelinesAPICreateVariableRequest) Request(request GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) PipelinesAPICreateVariableRequest { + r.request = &request + return r +} + +func (r PipelinesAPICreateVariableRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateVariableExecute(r) +} + +/* +CreateVariable Create variable + +Create a variable for a pipeline + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param pipelineId Pipeline ID + @return PipelinesAPICreateVariableRequest +*/ +func (a *PipelinesAPIService) CreateVariable(ctx context.Context, projectId string, pipelineId string) PipelinesAPICreateVariableRequest { + return PipelinesAPICreateVariableRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + pipelineId: pipelineId, + } +} + +// Execute executes the request +func (a *PipelinesAPIService) CreateVariableExecute(r PipelinesAPICreateVariableRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.CreateVariable") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/pipeline/{pipeline_id}/variable" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", url.PathEscape(parameterValueToString(r.pipelineId, "pipelineId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.request == nil { + return nil, reportError("request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.request + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsConflict + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PipelinesAPIDeleteVariableRequest struct { + ctx context.Context + ApiService *PipelinesAPIService + projectId string + pipelineId string + name *string +} + +// Variable name +func (r PipelinesAPIDeleteVariableRequest) Name(name string) PipelinesAPIDeleteVariableRequest { + r.name = &name + return r +} + +func (r PipelinesAPIDeleteVariableRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteVariableExecute(r) +} + +/* +DeleteVariable Delete variable + +Delete a pipeline variable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param pipelineId Pipeline ID + @return PipelinesAPIDeleteVariableRequest +*/ +func (a *PipelinesAPIService) DeleteVariable(ctx context.Context, projectId string, pipelineId string) PipelinesAPIDeleteVariableRequest { + return PipelinesAPIDeleteVariableRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + pipelineId: pipelineId, + } +} + +// Execute executes the request +func (a *PipelinesAPIService) DeleteVariableExecute(r PipelinesAPIDeleteVariableRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.DeleteVariable") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/pipeline/{pipeline_id}/variable" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", url.PathEscape(parameterValueToString(r.pipelineId, "pipelineId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.name == nil { + return nil, reportError("name is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "", "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PipelinesAPIGetJobRequest struct { + ctx context.Context + ApiService *PipelinesAPIService + projectId string + jobId string +} + +func (r PipelinesAPIGetJobRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet, *http.Response, error) { + return r.ApiService.GetJobExecute(r) +} + +/* +GetJob Get job + +Get job details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param jobId Job ID + @return PipelinesAPIGetJobRequest +*/ +func (a *PipelinesAPIService) GetJob(ctx context.Context, projectId string, jobId string) PipelinesAPIGetJobRequest { + return PipelinesAPIGetJobRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + jobId: jobId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet +func (a *PipelinesAPIService) GetJobExecute(r PipelinesAPIGetJobRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.GetJob") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/job/{job_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"job_id"+"}", url.PathEscape(parameterValueToString(r.jobId, "jobId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type PipelinesAPIGetJobLogsRequest struct { ctx context.Context ApiService *PipelinesAPIService projectId string - jobId string - request *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestJobLogList -} - -// Request body -func (r PipelinesAPIGetJobLogsRequest) Request(request GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestJobLogList) PipelinesAPIGetJobLogsRequest { - r.request = &request - return r + jobId string + request *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestJobLogList +} + +// Request body +func (r PipelinesAPIGetJobLogsRequest) Request(request GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestJobLogList) PipelinesAPIGetJobLogsRequest { + r.request = &request + return r +} + +func (r PipelinesAPIGetJobLogsRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogList, *http.Response, error) { + return r.ApiService.GetJobLogsExecute(r) +} + +/* +GetJobLogs Get job logs + +Get job logs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param jobId Job ID + @return PipelinesAPIGetJobLogsRequest +*/ +func (a *PipelinesAPIService) GetJobLogs(ctx context.Context, projectId string, jobId string) PipelinesAPIGetJobLogsRequest { + return PipelinesAPIGetJobLogsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + jobId: jobId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogList +func (a *PipelinesAPIService) GetJobLogsExecute(r PipelinesAPIGetJobLogsRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.GetJobLogs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/job/{job_id}/log/list" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"job_id"+"}", url.PathEscape(parameterValueToString(r.jobId, "jobId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.request == nil { + return localVarReturnValue, nil, reportError("request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.request + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PipelinesAPIGetPipelineRequest struct { + ctx context.Context + ApiService *PipelinesAPIService + projectId string + pipelineId string +} + +func (r PipelinesAPIGetPipelineRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet, *http.Response, error) { + return r.ApiService.GetPipelineExecute(r) +} + +/* +GetPipeline Get pipeline + +Get pipeline by ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param pipelineId Pipeline ID + @return PipelinesAPIGetPipelineRequest +*/ +func (a *PipelinesAPIService) GetPipeline(ctx context.Context, projectId string, pipelineId string) PipelinesAPIGetPipelineRequest { + return PipelinesAPIGetPipelineRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + pipelineId: pipelineId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet +func (a *PipelinesAPIService) GetPipelineExecute(r PipelinesAPIGetPipelineRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.GetPipeline") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/pipeline/{pipeline_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", url.PathEscape(parameterValueToString(r.pipelineId, "pipelineId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PipelinesAPIGetRunRequest struct { + ctx context.Context + ApiService *PipelinesAPIService + projectId string + runId string +} + +func (r PipelinesAPIGetRunRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet, *http.Response, error) { + return r.ApiService.GetRunExecute(r) +} + +/* +GetRun Get run + +Get run + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param runId Run ID + @return PipelinesAPIGetRunRequest +*/ +func (a *PipelinesAPIService) GetRun(ctx context.Context, projectId string, runId string) PipelinesAPIGetRunRequest { + return PipelinesAPIGetRunRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + runId: runId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet +func (a *PipelinesAPIService) GetRunExecute(r PipelinesAPIGetRunRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.GetRun") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/run/{run_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"run_id"+"}", url.PathEscape(parameterValueToString(r.runId, "runId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PipelinesAPIListJobsRequest struct { + ctx context.Context + ApiService *PipelinesAPIService + projectId string + runId *string + limit *int + offset *int +} + +// Run ID +func (r PipelinesAPIListJobsRequest) RunId(runId string) PipelinesAPIListJobsRequest { + r.runId = &runId + return r +} + +// Limit +func (r PipelinesAPIListJobsRequest) Limit(limit int) PipelinesAPIListJobsRequest { + r.limit = &limit + return r +} + +// Offset +func (r PipelinesAPIListJobsRequest) Offset(offset int) PipelinesAPIListJobsRequest { + r.offset = &offset + return r +} + +func (r PipelinesAPIListJobsRequest) Execute() ([]GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJob, *http.Response, error) { + return r.ApiService.ListJobsExecute(r) +} + +/* +ListJobs List jobs + +List jobs for a run + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @return PipelinesAPIListJobsRequest +*/ +func (a *PipelinesAPIService) ListJobs(ctx context.Context, projectId string) PipelinesAPIListJobsRequest { + return PipelinesAPIListJobsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJob +func (a *PipelinesAPIService) ListJobsExecute(r PipelinesAPIListJobsRequest) ([]GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJob, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJob + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.ListJobs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/job/list" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.runId == nil { + return localVarReturnValue, nil, reportError("runId is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "run_id", r.runId, "", "") + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "", "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PipelinesAPIListPipelinesRequest struct { + ctx context.Context + ApiService *PipelinesAPIService + projectId string + limit *int + offset *int + search *string + type_ *string + sort *string +} + +// Limit +func (r PipelinesAPIListPipelinesRequest) Limit(limit int) PipelinesAPIListPipelinesRequest { + r.limit = &limit + return r +} + +// Offset +func (r PipelinesAPIListPipelinesRequest) Offset(offset int) PipelinesAPIListPipelinesRequest { + r.offset = &offset + return r +} + +// Search +func (r PipelinesAPIListPipelinesRequest) Search(search string) PipelinesAPIListPipelinesRequest { + r.search = &search + return r +} + +// Pipeline type +func (r PipelinesAPIListPipelinesRequest) Type_(type_ string) PipelinesAPIListPipelinesRequest { + r.type_ = &type_ + return r +} + +// Sort Order +func (r PipelinesAPIListPipelinesRequest) Sort(sort string) PipelinesAPIListPipelinesRequest { + r.sort = &sort + return r +} + +func (r PipelinesAPIListPipelinesRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList, *http.Response, error) { + return r.ApiService.ListPipelinesExecute(r) +} + +/* +ListPipelines List pipelines + +List pipelines + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @return PipelinesAPIListPipelinesRequest +*/ +func (a *PipelinesAPIService) ListPipelines(ctx context.Context, projectId string) PipelinesAPIListPipelinesRequest { + return PipelinesAPIListPipelinesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList +func (a *PipelinesAPIService) ListPipelinesExecute(r PipelinesAPIListPipelinesRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.ListPipelines") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/pipeline/list" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "", "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "", "") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PipelinesAPIListRunsRequest struct { + ctx context.Context + ApiService *PipelinesAPIService + projectId string + pipelineId *string + withConfig *bool + sort *string + type_ *string + limit *int + offset *int +} + +// Pipeline ID +func (r PipelinesAPIListRunsRequest) PipelineId(pipelineId string) PipelinesAPIListRunsRequest { + r.pipelineId = &pipelineId + return r +} + +// Include pipeline config +func (r PipelinesAPIListRunsRequest) WithConfig(withConfig bool) PipelinesAPIListRunsRequest { + r.withConfig = &withConfig + return r +} + +// Sort +func (r PipelinesAPIListRunsRequest) Sort(sort string) PipelinesAPIListRunsRequest { + r.sort = &sort + return r +} + +// Pipeline type +func (r PipelinesAPIListRunsRequest) Type_(type_ string) PipelinesAPIListRunsRequest { + r.type_ = &type_ + return r +} + +// Limit +func (r PipelinesAPIListRunsRequest) Limit(limit int) PipelinesAPIListRunsRequest { + r.limit = &limit + return r +} + +// Offset +func (r PipelinesAPIListRunsRequest) Offset(offset int) PipelinesAPIListRunsRequest { + r.offset = &offset + return r +} + +func (r PipelinesAPIListRunsRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList, *http.Response, error) { + return r.ApiService.ListRunsExecute(r) +} + +/* +ListRuns List runs + +List runs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @return PipelinesAPIListRunsRequest +*/ +func (a *PipelinesAPIService) ListRuns(ctx context.Context, projectId string) PipelinesAPIListRunsRequest { + return PipelinesAPIListRunsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList +func (a *PipelinesAPIService) ListRunsExecute(r PipelinesAPIListRunsRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.ListRuns") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/run/list" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.pipelineId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pipeline_id", r.pipelineId, "", "") + } + if r.withConfig != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_config", r.withConfig, "", "") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "", "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PipelinesAPIListVariablesRequest struct { + ctx context.Context + ApiService *PipelinesAPIService + projectId string + pipelineId string } -func (r PipelinesAPIGetJobLogsRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogList, *http.Response, error) { - return r.ApiService.GetJobLogsExecute(r) +func (r PipelinesAPIListVariablesRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList, *http.Response, error) { + return r.ApiService.ListVariablesExecute(r) } /* -GetJobLogs Get job logs +ListVariables List variables -Get job logs +List variables for a pipeline @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project ID - @param jobId Job ID - @return PipelinesAPIGetJobLogsRequest + @param pipelineId Pipeline ID + @return PipelinesAPIListVariablesRequest */ -func (a *PipelinesAPIService) GetJobLogs(ctx context.Context, projectId string, jobId string) PipelinesAPIGetJobLogsRequest { - return PipelinesAPIGetJobLogsRequest{ +func (a *PipelinesAPIService) ListVariables(ctx context.Context, projectId string, pipelineId string) PipelinesAPIListVariablesRequest { + return PipelinesAPIListVariablesRequest{ ApiService: a, ctx: ctx, projectId: projectId, - jobId: jobId, + pipelineId: pipelineId, } } // Execute executes the request // -// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogList -func (a *PipelinesAPIService) GetJobLogsExecute(r PipelinesAPIGetJobLogsRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogList, *http.Response, error) { +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList +func (a *PipelinesAPIService) ListVariablesExecute(r PipelinesAPIListVariablesRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobLogList + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.GetJobLogs") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.ListVariables") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/project/{project_id}/job/{job_id}/log/list" + localVarPath := localBasePath + "/project/{project_id}/pipeline/{pipeline_id}/variable/list" localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"job_id"+"}", url.PathEscape(parameterValueToString(r.jobId, "jobId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", url.PathEscape(parameterValueToString(r.pipelineId, "pipelineId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.request == nil { - return localVarReturnValue, nil, reportError("request is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -103,8 +1729,6 @@ func (a *PipelinesAPIService) GetJobLogsExecute(r PipelinesAPIGetJobLogsRequest) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.request if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -199,60 +1823,71 @@ func (a *PipelinesAPIService) GetJobLogsExecute(r PipelinesAPIGetJobLogsRequest) return localVarReturnValue, localVarHTTPResponse, nil } -type PipelinesAPIGetRunRequest struct { +type PipelinesAPIRunPipelineRequest struct { ctx context.Context ApiService *PipelinesAPIService projectId string - runId string + pipelineId string + branch *string } -func (r PipelinesAPIGetRunRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet, *http.Response, error) { - return r.ApiService.GetRunExecute(r) +// Branch +func (r PipelinesAPIRunPipelineRequest) Branch(branch string) PipelinesAPIRunPipelineRequest { + r.branch = &branch + return r +} + +func (r PipelinesAPIRunPipelineRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun, *http.Response, error) { + return r.ApiService.RunPipelineExecute(r) } /* -GetRun Get run +RunPipeline Run pipeline -Get run +Run pipeline @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project ID - @param runId Run ID - @return PipelinesAPIGetRunRequest + @param pipelineId Pipeline ID + @return PipelinesAPIRunPipelineRequest */ -func (a *PipelinesAPIService) GetRun(ctx context.Context, projectId string, runId string) PipelinesAPIGetRunRequest { - return PipelinesAPIGetRunRequest{ +func (a *PipelinesAPIService) RunPipeline(ctx context.Context, projectId string, pipelineId string) PipelinesAPIRunPipelineRequest { + return PipelinesAPIRunPipelineRequest{ ApiService: a, ctx: ctx, projectId: projectId, - runId: runId, + pipelineId: pipelineId, } } // Execute executes the request // -// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet -func (a *PipelinesAPIService) GetRunExecute(r PipelinesAPIGetRunRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet, *http.Response, error) { +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun +func (a *PipelinesAPIService) RunPipelineExecute(r PipelinesAPIRunPipelineRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.GetRun") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.RunPipeline") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/project/{project_id}/run/{run_id}" + localVarPath := localBasePath + "/project/{project_id}/pipeline/{pipeline_id}/run" localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"run_id"+"}", url.PathEscape(parameterValueToString(r.runId, "runId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", url.PathEscape(parameterValueToString(r.pipelineId, "pipelineId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.branch == nil { + return localVarReturnValue, nil, reportError("branch is required and must be specified") + } + parameterAddToHeaderOrQuery(localVarQueryParams, "branch", r.branch, "", "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -364,71 +1999,60 @@ func (a *PipelinesAPIService) GetRunExecute(r PipelinesAPIGetRunRequest) (*GitSb return localVarReturnValue, localVarHTTPResponse, nil } -type PipelinesAPIRunPipelineRequest struct { +type PipelinesAPIStopJobRequest struct { ctx context.Context ApiService *PipelinesAPIService projectId string - pipelineId string - branch *string -} - -// Branch -func (r PipelinesAPIRunPipelineRequest) Branch(branch string) PipelinesAPIRunPipelineRequest { - r.branch = &branch - return r + jobId string } -func (r PipelinesAPIRunPipelineRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun, *http.Response, error) { - return r.ApiService.RunPipelineExecute(r) +func (r PipelinesAPIStopJobRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.StopJobExecute(r) } /* -RunPipeline Run pipeline +StopJob Stop job -Run pipeline +Stop a running job @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project ID - @param pipelineId Pipeline ID - @return PipelinesAPIRunPipelineRequest + @param jobId Job ID + @return PipelinesAPIStopJobRequest */ -func (a *PipelinesAPIService) RunPipeline(ctx context.Context, projectId string, pipelineId string) PipelinesAPIRunPipelineRequest { - return PipelinesAPIRunPipelineRequest{ +func (a *PipelinesAPIService) StopJob(ctx context.Context, projectId string, jobId string) PipelinesAPIStopJobRequest { + return PipelinesAPIStopJobRequest{ ApiService: a, ctx: ctx, projectId: projectId, - pipelineId: pipelineId, + jobId: jobId, } } // Execute executes the request // -// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun -func (a *PipelinesAPIService) RunPipelineExecute(r PipelinesAPIRunPipelineRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun, *http.Response, error) { +// @return map[string]interface{} +func (a *PipelinesAPIService) StopJobExecute(r PipelinesAPIStopJobRequest) (map[string]interface{}, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun + localVarReturnValue map[string]interface{} ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.RunPipeline") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.StopJob") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/project/{project_id}/pipeline/{pipeline_id}/run" + localVarPath := localBasePath + "/project/{project_id}/job/{job_id}/stop" localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", url.PathEscape(parameterValueToString(r.pipelineId, "pipelineId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"job_id"+"}", url.PathEscape(parameterValueToString(r.jobId, "jobId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.branch == nil { - return localVarReturnValue, nil, reportError("branch is required and must be specified") - } - parameterAddToHeaderOrQuery(localVarQueryParams, "branch", r.branch, "", "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -704,3 +2328,179 @@ func (a *PipelinesAPIService) StopRunExecute(r PipelinesAPIStopRunRequest) (map[ return localVarReturnValue, localVarHTTPResponse, nil } + +type PipelinesAPIUpdateVariableRequest struct { + ctx context.Context + ApiService *PipelinesAPIService + projectId string + pipelineId string + name *string + request *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate +} + +// Variable name +func (r PipelinesAPIUpdateVariableRequest) Name(name string) PipelinesAPIUpdateVariableRequest { + r.name = &name + return r +} + +// Request body +func (r PipelinesAPIUpdateVariableRequest) Request(request GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) PipelinesAPIUpdateVariableRequest { + r.request = &request + return r +} + +func (r PipelinesAPIUpdateVariableRequest) Execute() (*http.Response, error) { + return r.ApiService.UpdateVariableExecute(r) +} + +/* +UpdateVariable Update variable + +Update a pipeline variable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param pipelineId Pipeline ID + @return PipelinesAPIUpdateVariableRequest +*/ +func (a *PipelinesAPIService) UpdateVariable(ctx context.Context, projectId string, pipelineId string) PipelinesAPIUpdateVariableRequest { + return PipelinesAPIUpdateVariableRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + pipelineId: pipelineId, + } +} + +// Execute executes the request +func (a *PipelinesAPIService) UpdateVariableExecute(r PipelinesAPIUpdateVariableRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PipelinesAPIService.UpdateVariable") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/pipeline/{pipeline_id}/variable" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", url.PathEscape(parameterValueToString(r.pipelineId, "pipelineId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.name == nil { + return nil, reportError("name is required and must be specified") + } + if r.request == nil { + return nil, reportError("request is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "", "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.request + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/internal/workflow_client/api_services.go b/internal/workflow_client/api_services.go index 14212c8..1b77e30 100644 --- a/internal/workflow_client/api_services.go +++ b/internal/workflow_client/api_services.go @@ -599,7 +599,7 @@ type ServicesAPIProjectProjectIdApplicationApplicationIdDeploymentPostRequest st request *map[string]interface{} } -// Deployment create request +// Deployment create request; the run uses the port saved on the application (change it via application update) func (r ServicesAPIProjectProjectIdApplicationApplicationIdDeploymentPostRequest) Request(request map[string]interface{}) ServicesAPIProjectProjectIdApplicationApplicationIdDeploymentPostRequest { r.request = &request return r @@ -941,7 +941,7 @@ type ServicesAPIProjectProjectIdApplicationApplicationIdPatchRequest struct { request *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate } -// Application update request +// Application update request; port is optional container port: 1025-65535 except 8008, 8012, 8013, 8022, 8112, 9090, 9091; update is rejected while a pipeline run is in progress func (r ServicesAPIProjectProjectIdApplicationApplicationIdPatchRequest) Request(request GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate) ServicesAPIProjectProjectIdApplicationApplicationIdPatchRequest { r.request = &request return r @@ -1116,7 +1116,7 @@ type ServicesAPIProjectProjectIdApplicationPostRequest struct { request *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationCreate } -// Application create request; repository_url must be an HTTPS git clone URL (cloning uses HTTPS, not SSH), branch must exist, repository root must contain Dockerfile +// Application create request; repository_url must be an HTTPS git clone URL (cloning uses HTTPS, not SSH), branch must exist, repository root must contain Dockerfile; port is optional container port: 1025-65535 except 8008, 8012, 8013, 8022, 8112, 9090, 9091 (default 8080) func (r ServicesAPIProjectProjectIdApplicationPostRequest) Request(request GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationCreate) ServicesAPIProjectProjectIdApplicationPostRequest { r.request = &request return r diff --git a/internal/workflow_client/api_workflows.go b/internal/workflow_client/api_workflows.go index 2ed2cf3..627ed60 100644 --- a/internal/workflow_client/api_workflows.go +++ b/internal/workflow_client/api_workflows.go @@ -22,6 +22,171 @@ import ( // WorkflowsAPIService WorkflowsAPI service type WorkflowsAPIService service +type WorkflowsAPIGetJobRequest struct { + ctx context.Context + ApiService *WorkflowsAPIService + projectId string + jobId string +} + +func (r WorkflowsAPIGetJobRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet, *http.Response, error) { + return r.ApiService.GetJobExecute(r) +} + +/* +GetJob Get job + +Get job details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param jobId Job ID + @return WorkflowsAPIGetJobRequest +*/ +func (a *WorkflowsAPIService) GetJob(ctx context.Context, projectId string, jobId string) WorkflowsAPIGetJobRequest { + return WorkflowsAPIGetJobRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + jobId: jobId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet +func (a *WorkflowsAPIService) GetJobExecute(r WorkflowsAPIGetJobRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkflowsAPIService.GetJob") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/job/{job_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"job_id"+"}", url.PathEscape(parameterValueToString(r.jobId, "jobId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type WorkflowsAPIGetJobLogsRequest struct { ctx context.Context ApiService *WorkflowsAPIService @@ -364,71 +529,649 @@ func (a *WorkflowsAPIService) GetRunExecute(r WorkflowsAPIGetRunRequest) (*GitSb return localVarReturnValue, localVarHTTPResponse, nil } -type WorkflowsAPIRunPipelineRequest struct { +type WorkflowsAPIListJobsRequest struct { ctx context.Context ApiService *WorkflowsAPIService projectId string - pipelineId string - branch *string + runId *string + limit *int + offset *int } -// Branch -func (r WorkflowsAPIRunPipelineRequest) Branch(branch string) WorkflowsAPIRunPipelineRequest { - r.branch = &branch +// Run ID +func (r WorkflowsAPIListJobsRequest) RunId(runId string) WorkflowsAPIListJobsRequest { + r.runId = &runId return r } -func (r WorkflowsAPIRunPipelineRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun, *http.Response, error) { - return r.ApiService.RunPipelineExecute(r) +// Limit +func (r WorkflowsAPIListJobsRequest) Limit(limit int) WorkflowsAPIListJobsRequest { + r.limit = &limit + return r +} + +// Offset +func (r WorkflowsAPIListJobsRequest) Offset(offset int) WorkflowsAPIListJobsRequest { + r.offset = &offset + return r +} + +func (r WorkflowsAPIListJobsRequest) Execute() ([]GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJob, *http.Response, error) { + return r.ApiService.ListJobsExecute(r) } /* -RunPipeline Run pipeline +ListJobs List jobs -Run pipeline +List jobs for a run @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project ID - @param pipelineId Pipeline ID - @return WorkflowsAPIRunPipelineRequest + @return WorkflowsAPIListJobsRequest */ -func (a *WorkflowsAPIService) RunPipeline(ctx context.Context, projectId string, pipelineId string) WorkflowsAPIRunPipelineRequest { - return WorkflowsAPIRunPipelineRequest{ +func (a *WorkflowsAPIService) ListJobs(ctx context.Context, projectId string) WorkflowsAPIListJobsRequest { + return WorkflowsAPIListJobsRequest{ ApiService: a, ctx: ctx, projectId: projectId, - pipelineId: pipelineId, } } // Execute executes the request // -// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun -func (a *WorkflowsAPIService) RunPipelineExecute(r WorkflowsAPIRunPipelineRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun, *http.Response, error) { +// @return []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJob +func (a *WorkflowsAPIService) ListJobsExecute(r WorkflowsAPIListJobsRequest) ([]GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJob, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun + localVarReturnValue []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJob ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkflowsAPIService.RunPipeline") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkflowsAPIService.ListJobs") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/project/{project_id}/pipeline/{pipeline_id}/run" + localVarPath := localBasePath + "/project/{project_id}/job/list" localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", url.PathEscape(parameterValueToString(r.pipelineId, "pipelineId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.branch == nil { - return localVarReturnValue, nil, reportError("branch is required and must be specified") + if r.runId == nil { + return localVarReturnValue, nil, reportError("runId is required and must be specified") } - parameterAddToHeaderOrQuery(localVarQueryParams, "branch", r.branch, "", "") + parameterAddToHeaderOrQuery(localVarQueryParams, "run_id", r.runId, "", "") + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "", "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type WorkflowsAPIListRunsRequest struct { + ctx context.Context + ApiService *WorkflowsAPIService + projectId string + pipelineId *string + withConfig *bool + sort *string + type_ *string + limit *int + offset *int +} + +// Pipeline ID +func (r WorkflowsAPIListRunsRequest) PipelineId(pipelineId string) WorkflowsAPIListRunsRequest { + r.pipelineId = &pipelineId + return r +} + +// Include pipeline config +func (r WorkflowsAPIListRunsRequest) WithConfig(withConfig bool) WorkflowsAPIListRunsRequest { + r.withConfig = &withConfig + return r +} + +// Sort +func (r WorkflowsAPIListRunsRequest) Sort(sort string) WorkflowsAPIListRunsRequest { + r.sort = &sort + return r +} + +// Pipeline type +func (r WorkflowsAPIListRunsRequest) Type_(type_ string) WorkflowsAPIListRunsRequest { + r.type_ = &type_ + return r +} + +// Limit +func (r WorkflowsAPIListRunsRequest) Limit(limit int) WorkflowsAPIListRunsRequest { + r.limit = &limit + return r +} + +// Offset +func (r WorkflowsAPIListRunsRequest) Offset(offset int) WorkflowsAPIListRunsRequest { + r.offset = &offset + return r +} + +func (r WorkflowsAPIListRunsRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList, *http.Response, error) { + return r.ApiService.ListRunsExecute(r) +} + +/* +ListRuns List runs + +List runs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @return WorkflowsAPIListRunsRequest +*/ +func (a *WorkflowsAPIService) ListRuns(ctx context.Context, projectId string) WorkflowsAPIListRunsRequest { + return WorkflowsAPIListRunsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList +func (a *WorkflowsAPIService) ListRunsExecute(r WorkflowsAPIListRunsRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkflowsAPIService.ListRuns") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/run/list" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.pipelineId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pipeline_id", r.pipelineId, "", "") + } + if r.withConfig != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_config", r.withConfig, "", "") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "", "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type WorkflowsAPIRunPipelineRequest struct { + ctx context.Context + ApiService *WorkflowsAPIService + projectId string + pipelineId string + branch *string +} + +// Branch +func (r WorkflowsAPIRunPipelineRequest) Branch(branch string) WorkflowsAPIRunPipelineRequest { + r.branch = &branch + return r +} + +func (r WorkflowsAPIRunPipelineRequest) Execute() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun, *http.Response, error) { + return r.ApiService.RunPipelineExecute(r) +} + +/* +RunPipeline Run pipeline + +Run pipeline + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param pipelineId Pipeline ID + @return WorkflowsAPIRunPipelineRequest +*/ +func (a *WorkflowsAPIService) RunPipeline(ctx context.Context, projectId string, pipelineId string) WorkflowsAPIRunPipelineRequest { + return WorkflowsAPIRunPipelineRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + pipelineId: pipelineId, + } +} + +// Execute executes the request +// +// @return GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun +func (a *WorkflowsAPIService) RunPipelineExecute(r WorkflowsAPIRunPipelineRequest) (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineRun + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkflowsAPIService.RunPipeline") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/pipeline/{pipeline_id}/run" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", url.PathEscape(parameterValueToString(r.pipelineId, "pipelineId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.branch == nil { + return localVarReturnValue, nil, reportError("branch is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "branch", r.branch, "", "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["BearerAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsBadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsUnauthorized + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsNotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GitSbercloudTechDsworksServicesPipelineSrcInternalErrorsInternal + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type WorkflowsAPIStopJobRequest struct { + ctx context.Context + ApiService *WorkflowsAPIService + projectId string + jobId string +} + +func (r WorkflowsAPIStopJobRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.StopJobExecute(r) +} + +/* +StopJob Stop job + +Stop a running job + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project ID + @param jobId Job ID + @return WorkflowsAPIStopJobRequest +*/ +func (a *WorkflowsAPIService) StopJob(ctx context.Context, projectId string, jobId string) WorkflowsAPIStopJobRequest { + return WorkflowsAPIStopJobRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + jobId: jobId, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *WorkflowsAPIService) StopJobExecute(r WorkflowsAPIStopJobRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkflowsAPIService.StopJob") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/project/{project_id}/job/{job_id}/stop" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"job_id"+"}", url.PathEscape(parameterValueToString(r.jobId, "jobId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/internal/workflow_client/client.go b/internal/workflow_client/client.go index 8e6efdf..94c0346 100644 --- a/internal/workflow_client/client.go +++ b/internal/workflow_client/client.go @@ -48,6 +48,8 @@ type APIClient struct { // API Services + ApplicationSpaceAPI *ApplicationSpaceAPIService + PipelinesAPI *PipelinesAPIService ServicesAPI *ServicesAPIService @@ -71,6 +73,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services + c.ApplicationSpaceAPI = (*ApplicationSpaceAPIService)(&c.common) c.PipelinesAPI = (*PipelinesAPIService)(&c.common) c.ServicesAPI = (*ServicesAPIService)(&c.common) c.WorkflowsAPI = (*WorkflowsAPIService)(&c.common) diff --git a/internal/workflow_client/configuration.go b/internal/workflow_client/configuration.go index 3f8cdbf..b0835bd 100644 --- a/internal/workflow_client/configuration.go +++ b/internal/workflow_client/configuration.go @@ -93,7 +93,7 @@ func NewConfiguration() *Configuration { Debug: false, Servers: ServerConfigurations{ { - URL: "https://devtools.api.cloud.ru/workflow/v1", + URL: "https://pipeline.cloud.ru/public-api/v1", Description: "No description provided", }, }, diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_application.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_application.go index 06a410b..7ae5e76 100644 --- a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_application.go +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_application.go @@ -24,6 +24,7 @@ type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicati Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` PipelineId *string `json:"pipeline_id,omitempty"` + Port *int `json:"port,omitempty"` ProjectId *string `json:"project_id,omitempty"` RepositoryId *string `json:"repository_id,omitempty"` RepositoryUrl *string `json:"repository_url,omitempty"` @@ -212,6 +213,38 @@ func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelAppli o.PipelineId = &v } +// GetPort returns the Port field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplication) GetPort() int { + if o == nil || IsNil(o.Port) { + var ret int + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplication) GetPortOk() (*int, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplication) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int and assigns it to the Port field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplication) SetPort(v int) { + o.Port = &v +} + // GetProjectId returns the ProjectId field value if set, zero value otherwise. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplication) GetProjectId() string { if o == nil || IsNil(o.ProjectId) { @@ -525,6 +558,9 @@ func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplic if !IsNil(o.PipelineId) { toSerialize["pipeline_id"] = o.PipelineId } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } if !IsNil(o.ProjectId) { toSerialize["project_id"] = o.ProjectId } diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_application_space.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_application_space.go new file mode 100644 index 0000000..05877e8 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_application_space.go @@ -0,0 +1,268 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace struct { + CreatedAt *string `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpaceWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpaceWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) SetName(v string) { + o.Name = &v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) GetUpdatedAt() string { + if o == nil || IsNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) GetUpdatedAtOk() (*string, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ProjectId) { + toSerialize["project_id"] = o.ProjectId + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_config_storage_type.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_config_storage_type.go index d183bde..89bb66a 100644 --- a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_config_storage_type.go +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_config_storage_type.go @@ -20,12 +20,14 @@ type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigSto // List of git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model.ConfigStorageType const ( + EmptyStorageType GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType = "" DBConfigStorageType GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType = "db" RepoConfigStorageType GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType = "repo" ) // All allowed values of GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType enum var AllowedGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageTypeEnumValues = []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType{ + "", "db", "repo", } diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_run.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_run.go index 0e86d64..f700eda 100644 --- a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_run.go +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_model_run.go @@ -19,12 +19,16 @@ var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplic // GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun struct { - Branch *string `json:"branch,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - Pipeline *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline `json:"pipeline,omitempty"` - PipelineId *string `json:"pipeline_id,omitempty"` - Snapshot *string `json:"snapshot,omitempty"` + Branch *string `json:"branch,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + // DestinationNode — нода, до которой шёл частичный запуск («Execute step»); nil — полный run. + DestinationNode *string `json:"destination_node,omitempty"` + Id *string `json:"id,omitempty"` + Pipeline *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline `json:"pipeline,omitempty"` + PipelineId *string `json:"pipeline_id,omitempty"` + Snapshot *string `json:"snapshot,omitempty"` + // SourceRunID — run, данные которого переиспользовал частичный запуск. + SourceRunId *string `json:"source_run_id,omitempty"` Stages []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage `json:"stages,omitempty"` Status *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRunStatus `json:"status,omitempty"` StatusMessage *string `json:"status_message,omitempty"` @@ -115,6 +119,38 @@ func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) o.CreatedAt = &v } +// GetDestinationNode returns the DestinationNode field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) GetDestinationNode() string { + if o == nil || IsNil(o.DestinationNode) { + var ret string + return ret + } + return *o.DestinationNode +} + +// GetDestinationNodeOk returns a tuple with the DestinationNode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) GetDestinationNodeOk() (*string, bool) { + if o == nil || IsNil(o.DestinationNode) { + return nil, false + } + return o.DestinationNode, true +} + +// HasDestinationNode returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) HasDestinationNode() bool { + if o != nil && !IsNil(o.DestinationNode) { + return true + } + + return false +} + +// SetDestinationNode gets a reference to the given string and assigns it to the DestinationNode field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) SetDestinationNode(v string) { + o.DestinationNode = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) GetId() string { if o == nil || IsNil(o.Id) { @@ -243,6 +279,38 @@ func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) o.Snapshot = &v } +// GetSourceRunId returns the SourceRunId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) GetSourceRunId() string { + if o == nil || IsNil(o.SourceRunId) { + var ret string + return ret + } + return *o.SourceRunId +} + +// GetSourceRunIdOk returns a tuple with the SourceRunId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) GetSourceRunIdOk() (*string, bool) { + if o == nil || IsNil(o.SourceRunId) { + return nil, false + } + return o.SourceRunId, true +} + +// HasSourceRunId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) HasSourceRunId() bool { + if o != nil && !IsNil(o.SourceRunId) { + return true + } + + return false +} + +// SetSourceRunId gets a reference to the given string and assigns it to the SourceRunId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) SetSourceRunId(v string) { + o.SourceRunId = &v +} + // GetStages returns the Stages field value if set, zero value otherwise. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) GetStages() []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage { if o == nil || IsNil(o.Stages) { @@ -451,6 +519,9 @@ func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) T if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } + if !IsNil(o.DestinationNode) { + toSerialize["destination_node"] = o.DestinationNode + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -463,6 +534,9 @@ func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRun) T if !IsNil(o.Snapshot) { toSerialize["snapshot"] = o.Snapshot } + if !IsNil(o.SourceRunId) { + toSerialize["source_run_id"] = o.SourceRunId + } if !IsNil(o.Stages) { toSerialize["stages"] = o.Stages } diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_create.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_create.go index cd1b7ef..1aea0f0 100644 --- a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_create.go +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_create.go @@ -23,6 +23,7 @@ var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplic type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationCreate struct { Branch string `json:"branch"` Name *string `json:"name,omitempty"` + Port *int `json:"port,omitempty"` RepositoryId *string `json:"repository_id,omitempty"` RepositoryUrl *string `json:"repository_url,omitempty"` SpaceId *string `json:"space_id,omitempty"` @@ -104,6 +105,38 @@ func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApp o.Name = &v } +// GetPort returns the Port field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationCreate) GetPort() int { + if o == nil || IsNil(o.Port) { + var ret int + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationCreate) GetPortOk() (*int, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationCreate) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int and assigns it to the Port field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationCreate) SetPort(v int) { + o.Port = &v +} + // GetRepositoryId returns the RepositoryId field value if set, zero value otherwise. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationCreate) GetRepositoryId() string { if o == nil || IsNil(o.RepositoryId) { @@ -214,6 +247,9 @@ func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestAppl if !IsNil(o.Name) { toSerialize["name"] = o.Name } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } if !IsNil(o.RepositoryId) { toSerialize["repository_id"] = o.RepositoryId } diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_space_create.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_space_create.go new file mode 100644 index 0000000..1e32be1 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_space_create.go @@ -0,0 +1,156 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate struct { + Name string `json:"name"` +} + +type _GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate(name string) *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate{} + this.Name = name + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreateWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreateWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate{} + return &this +} + +// GetName returns the Name field value +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) SetName(v string) { + o.Name = v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate := _GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) + + if err != nil { + return err + } + + *o = GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate(varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) + + return err +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_space_update.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_space_update.go new file mode 100644 index 0000000..88b3df9 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_space_update.go @@ -0,0 +1,156 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate struct { + Name string `json:"name"` +} + +type _GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate(name string) *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate{} + this.Name = name + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdateWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdateWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate{} + return &this +} + +// GetName returns the Name field value +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) SetName(v string) { + o.Name = v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate := _GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) + + if err != nil { + return err + } + + *o = GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate(varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) + + return err +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationSpaceUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_update.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_update.go index 174a08d..194c0d2 100644 --- a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_update.go +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_application_update.go @@ -23,7 +23,8 @@ var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplic type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate struct { Branch string `json:"branch"` Name *string `json:"name,omitempty"` - SpaceId string `json:"space_id"` + Port *int `json:"port,omitempty"` + SpaceId *string `json:"space_id,omitempty"` } type _GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate @@ -32,10 +33,9 @@ type _GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplic // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate(branch string, spaceId string) *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate { +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate(branch string) *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate { this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate{} this.Branch = branch - this.SpaceId = spaceId return &this } @@ -103,28 +103,68 @@ func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApp o.Name = &v } -// GetSpaceId returns the SpaceId field value +// GetPort returns the Port field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate) GetPort() int { + if o == nil || IsNil(o.Port) { + var ret int + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate) GetPortOk() (*int, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int and assigns it to the Port field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate) SetPort(v int) { + o.Port = &v +} + +// GetSpaceId returns the SpaceId field value if set, zero value otherwise. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate) GetSpaceId() string { - if o == nil { + if o == nil || IsNil(o.SpaceId) { var ret string return ret } - - return o.SpaceId + return *o.SpaceId } -// GetSpaceIdOk returns a tuple with the SpaceId field value +// GetSpaceIdOk returns a tuple with the SpaceId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate) GetSpaceIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.SpaceId) { return nil, false } - return &o.SpaceId, true + return o.SpaceId, true +} + +// HasSpaceId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate) HasSpaceId() bool { + if o != nil && !IsNil(o.SpaceId) { + return true + } + + return false } -// SetSpaceId sets field value +// SetSpaceId gets a reference to the given string and assigns it to the SpaceId field. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate) SetSpaceId(v string) { - o.SpaceId = v + o.SpaceId = &v } func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApplicationUpdate) MarshalJSON() ([]byte, error) { @@ -141,7 +181,12 @@ func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestAppl if !IsNil(o.Name) { toSerialize["name"] = o.Name } - toSerialize["space_id"] = o.SpaceId + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.SpaceId) { + toSerialize["space_id"] = o.SpaceId + } return toSerialize, nil } @@ -151,7 +196,6 @@ func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestApp // that every required field exists as a key in the generic map. requiredProperties := []string{ "branch", - "space_id", } allProperties := make(map[string]interface{}) diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_variable_create.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_variable_create.go new file mode 100644 index 0000000..a1fabf1 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_variable_create.go @@ -0,0 +1,184 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate struct { + Name string `json:"name"` + Value string `json:"value"` +} + +type _GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate(name string, value string) *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate{} + this.Name = name + this.Value = value + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreateWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreateWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate{} + return &this +} + +// GetName returns the Name field value +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) SetName(v string) { + o.Name = v +} + +// GetValue returns the Value field value +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) SetValue(v string) { + o.Value = v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["value"] = o.Value + return toSerialize, nil +} + +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate := _GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) + + if err != nil { + return err + } + + *o = GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate(varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) + + return err +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_variable_update.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_variable_update.go new file mode 100644 index 0000000..0c118d3 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_request_variable_update.go @@ -0,0 +1,156 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate struct { + Value string `json:"value"` +} + +type _GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate(value string) *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate{} + this.Value = value + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdateWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdateWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate{} + return &this +} + +// GetValue returns the Value field value +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) SetValue(v string) { + o.Value = v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + return toSerialize, nil +} + +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate := _GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) + + if err != nil { + return err + } + + *o = GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate(varGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) + + return err +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationRequestVariableUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_create.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_create.go index 59e1f70..c955664 100644 --- a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_create.go +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_create.go @@ -24,6 +24,7 @@ type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplic Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` PipelineId *string `json:"pipeline_id,omitempty"` + Port *int `json:"port,omitempty"` ProjectId *string `json:"project_id,omitempty"` RepositoryId *string `json:"repository_id,omitempty"` RepositoryUrl *string `json:"repository_url,omitempty"` @@ -212,6 +213,38 @@ func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseAp o.PipelineId = &v } +// GetPort returns the Port field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationCreate) GetPort() int { + if o == nil || IsNil(o.Port) { + var ret int + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationCreate) GetPortOk() (*int, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationCreate) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int and assigns it to the Port field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationCreate) SetPort(v int) { + o.Port = &v +} + // GetProjectId returns the ProjectId field value if set, zero value otherwise. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationCreate) GetProjectId() string { if o == nil || IsNil(o.ProjectId) { @@ -525,6 +558,9 @@ func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApp if !IsNil(o.PipelineId) { toSerialize["pipeline_id"] = o.PipelineId } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } if !IsNil(o.ProjectId) { toSerialize["project_id"] = o.ProjectId } diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_get.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_get.go index 76596fa..0ee0214 100644 --- a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_get.go +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_get.go @@ -24,6 +24,7 @@ type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplic Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` PipelineId *string `json:"pipeline_id,omitempty"` + Port *int `json:"port,omitempty"` ProjectId *string `json:"project_id,omitempty"` RepositoryId *string `json:"repository_id,omitempty"` RepositoryUrl *string `json:"repository_url,omitempty"` @@ -212,6 +213,38 @@ func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseAp o.PipelineId = &v } +// GetPort returns the Port field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationGet) GetPort() int { + if o == nil || IsNil(o.Port) { + var ret int + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationGet) GetPortOk() (*int, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationGet) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int and assigns it to the Port field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationGet) SetPort(v int) { + o.Port = &v +} + // GetProjectId returns the ProjectId field value if set, zero value otherwise. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationGet) GetProjectId() string { if o == nil || IsNil(o.ProjectId) { @@ -525,6 +558,9 @@ func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApp if !IsNil(o.PipelineId) { toSerialize["pipeline_id"] = o.PipelineId } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } if !IsNil(o.ProjectId) { toSerialize["project_id"] = o.ProjectId } diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_create.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_create.go new file mode 100644 index 0000000..306c241 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_create.go @@ -0,0 +1,268 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate struct { + CreatedAt *string `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreateWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreateWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) SetName(v string) { + o.Name = &v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) GetUpdatedAt() string { + if o == nil || IsNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) GetUpdatedAtOk() (*string, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ProjectId) { + toSerialize["project_id"] = o.ProjectId + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_get.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_get.go new file mode 100644 index 0000000..a698e67 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_get.go @@ -0,0 +1,268 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet struct { + CreatedAt *string `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGetWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGetWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) SetName(v string) { + o.Name = &v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) GetUpdatedAt() string { + if o == nil || IsNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) GetUpdatedAtOk() (*string, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ProjectId) { + toSerialize["project_id"] = o.ProjectId + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceGet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_list.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_list.go new file mode 100644 index 0000000..506f20d --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_list.go @@ -0,0 +1,160 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList struct { + ApplicationSpaces []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace `json:"application_spaces,omitempty"` + Total *int `json:"total,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceListWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceListWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList{} + return &this +} + +// GetApplicationSpaces returns the ApplicationSpaces field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) GetApplicationSpaces() []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace { + if o == nil || IsNil(o.ApplicationSpaces) { + var ret []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace + return ret + } + return o.ApplicationSpaces +} + +// GetApplicationSpacesOk returns a tuple with the ApplicationSpaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) GetApplicationSpacesOk() ([]GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace, bool) { + if o == nil || IsNil(o.ApplicationSpaces) { + return nil, false + } + return o.ApplicationSpaces, true +} + +// HasApplicationSpaces returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) HasApplicationSpaces() bool { + if o != nil && !IsNil(o.ApplicationSpaces) { + return true + } + + return false +} + +// SetApplicationSpaces gets a reference to the given []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace and assigns it to the ApplicationSpaces field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) SetApplicationSpaces(v []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelApplicationSpace) { + o.ApplicationSpaces = v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) GetTotal() int { + if o == nil || IsNil(o.Total) { + var ret int + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) GetTotalOk() (*int, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int and assigns it to the Total field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) SetTotal(v int) { + o.Total = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ApplicationSpaces) { + toSerialize["application_spaces"] = o.ApplicationSpaces + } + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_update.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_update.go new file mode 100644 index 0000000..47bd555 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_application_space_update.go @@ -0,0 +1,268 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate struct { + CreatedAt *string `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdateWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdateWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) SetName(v string) { + o.Name = &v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) GetUpdatedAt() string { + if o == nil || IsNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) GetUpdatedAtOk() (*string, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ProjectId) { + toSerialize["project_id"] = o.ProjectId + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseApplicationSpaceUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_clone.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_clone.go new file mode 100644 index 0000000..fbd9fb4 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_clone.go @@ -0,0 +1,124 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone struct { + Ssh *string `json:"ssh,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseCloneWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseCloneWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone{} + return &this +} + +// GetSsh returns the Ssh field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) GetSsh() string { + if o == nil || IsNil(o.Ssh) { + var ret string + return ret + } + return *o.Ssh +} + +// GetSshOk returns a tuple with the Ssh field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) GetSshOk() (*string, bool) { + if o == nil || IsNil(o.Ssh) { + return nil, false + } + return o.Ssh, true +} + +// HasSsh returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) HasSsh() bool { + if o != nil && !IsNil(o.Ssh) { + return true + } + + return false +} + +// SetSsh gets a reference to the given string and assigns it to the Ssh field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) SetSsh(v string) { + o.Ssh = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ssh) { + toSerialize["ssh"] = o.Ssh + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_job_get.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_job_get.go new file mode 100644 index 0000000..0e129e4 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_job_get.go @@ -0,0 +1,520 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet struct { + CreatedAt *string `json:"created_at,omitempty"` + DataPlaneExecName *string `json:"data_plane_exec_name,omitempty"` + DataPlaneJobName *string `json:"data_plane_job_name,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + RunId *string `json:"run_id,omitempty"` + SequenceNumber *int `json:"sequence_number,omitempty"` + StageId *string `json:"stage_id,omitempty"` + Status *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJobStatus `json:"status,omitempty"` + TemporalWorkflowId *string `json:"temporal_workflow_id,omitempty"` + Type *string `json:"type,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGetWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGetWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetDataPlaneExecName returns the DataPlaneExecName field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetDataPlaneExecName() string { + if o == nil || IsNil(o.DataPlaneExecName) { + var ret string + return ret + } + return *o.DataPlaneExecName +} + +// GetDataPlaneExecNameOk returns a tuple with the DataPlaneExecName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetDataPlaneExecNameOk() (*string, bool) { + if o == nil || IsNil(o.DataPlaneExecName) { + return nil, false + } + return o.DataPlaneExecName, true +} + +// HasDataPlaneExecName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasDataPlaneExecName() bool { + if o != nil && !IsNil(o.DataPlaneExecName) { + return true + } + + return false +} + +// SetDataPlaneExecName gets a reference to the given string and assigns it to the DataPlaneExecName field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetDataPlaneExecName(v string) { + o.DataPlaneExecName = &v +} + +// GetDataPlaneJobName returns the DataPlaneJobName field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetDataPlaneJobName() string { + if o == nil || IsNil(o.DataPlaneJobName) { + var ret string + return ret + } + return *o.DataPlaneJobName +} + +// GetDataPlaneJobNameOk returns a tuple with the DataPlaneJobName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetDataPlaneJobNameOk() (*string, bool) { + if o == nil || IsNil(o.DataPlaneJobName) { + return nil, false + } + return o.DataPlaneJobName, true +} + +// HasDataPlaneJobName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasDataPlaneJobName() bool { + if o != nil && !IsNil(o.DataPlaneJobName) { + return true + } + + return false +} + +// SetDataPlaneJobName gets a reference to the given string and assigns it to the DataPlaneJobName field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetDataPlaneJobName(v string) { + o.DataPlaneJobName = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetName(v string) { + o.Name = &v +} + +// GetRunId returns the RunId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetRunId() string { + if o == nil || IsNil(o.RunId) { + var ret string + return ret + } + return *o.RunId +} + +// GetRunIdOk returns a tuple with the RunId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetRunIdOk() (*string, bool) { + if o == nil || IsNil(o.RunId) { + return nil, false + } + return o.RunId, true +} + +// HasRunId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasRunId() bool { + if o != nil && !IsNil(o.RunId) { + return true + } + + return false +} + +// SetRunId gets a reference to the given string and assigns it to the RunId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetRunId(v string) { + o.RunId = &v +} + +// GetSequenceNumber returns the SequenceNumber field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetSequenceNumber() int { + if o == nil || IsNil(o.SequenceNumber) { + var ret int + return ret + } + return *o.SequenceNumber +} + +// GetSequenceNumberOk returns a tuple with the SequenceNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetSequenceNumberOk() (*int, bool) { + if o == nil || IsNil(o.SequenceNumber) { + return nil, false + } + return o.SequenceNumber, true +} + +// HasSequenceNumber returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasSequenceNumber() bool { + if o != nil && !IsNil(o.SequenceNumber) { + return true + } + + return false +} + +// SetSequenceNumber gets a reference to the given int and assigns it to the SequenceNumber field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetSequenceNumber(v int) { + o.SequenceNumber = &v +} + +// GetStageId returns the StageId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetStageId() string { + if o == nil || IsNil(o.StageId) { + var ret string + return ret + } + return *o.StageId +} + +// GetStageIdOk returns a tuple with the StageId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetStageIdOk() (*string, bool) { + if o == nil || IsNil(o.StageId) { + return nil, false + } + return o.StageId, true +} + +// HasStageId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasStageId() bool { + if o != nil && !IsNil(o.StageId) { + return true + } + + return false +} + +// SetStageId gets a reference to the given string and assigns it to the StageId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetStageId(v string) { + o.StageId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetStatus() GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJobStatus { + if o == nil || IsNil(o.Status) { + var ret GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJobStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetStatusOk() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJobStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJobStatus and assigns it to the Status field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetStatus(v GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelJobStatus) { + o.Status = &v +} + +// GetTemporalWorkflowId returns the TemporalWorkflowId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetTemporalWorkflowId() string { + if o == nil || IsNil(o.TemporalWorkflowId) { + var ret string + return ret + } + return *o.TemporalWorkflowId +} + +// GetTemporalWorkflowIdOk returns a tuple with the TemporalWorkflowId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetTemporalWorkflowIdOk() (*string, bool) { + if o == nil || IsNil(o.TemporalWorkflowId) { + return nil, false + } + return o.TemporalWorkflowId, true +} + +// HasTemporalWorkflowId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasTemporalWorkflowId() bool { + if o != nil && !IsNil(o.TemporalWorkflowId) { + return true + } + + return false +} + +// SetTemporalWorkflowId gets a reference to the given string and assigns it to the TemporalWorkflowId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetTemporalWorkflowId(v string) { + o.TemporalWorkflowId = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetType(v string) { + o.Type = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetUpdatedAt() string { + if o == nil || IsNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) GetUpdatedAtOk() (*string, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.DataPlaneExecName) { + toSerialize["data_plane_exec_name"] = o.DataPlaneExecName + } + if !IsNil(o.DataPlaneJobName) { + toSerialize["data_plane_job_name"] = o.DataPlaneJobName + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.RunId) { + toSerialize["run_id"] = o.RunId + } + if !IsNil(o.SequenceNumber) { + toSerialize["sequence_number"] = o.SequenceNumber + } + if !IsNil(o.StageId) { + toSerialize["stage_id"] = o.StageId + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TemporalWorkflowId) { + toSerialize["temporal_workflow_id"] = o.TemporalWorkflowId + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseJobGet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_get.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_get.go new file mode 100644 index 0000000..c7d5344 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_get.go @@ -0,0 +1,594 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet struct { + Config *string `json:"config,omitempty"` + ConfigStorageType *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType `json:"config_storage_type,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + CreatorId *string `json:"creator_id,omitempty"` + EnvironmentId *string `json:"environment_id,omitempty"` + Id *string `json:"id,omitempty"` + // Deprecated + ManifestName *string `json:"manifest_name,omitempty"` + Name *string `json:"name,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + RepoConfigStorage *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRepoConfigStorage `json:"repo_config_storage,omitempty"` + Repository *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository `json:"repository,omitempty"` + // Deprecated + RepositoryId *string `json:"repository_id,omitempty"` + Type *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipelineType `json:"type,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGetWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGetWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet{} + return &this +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetConfig() string { + if o == nil || IsNil(o.Config) { + var ret string + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetConfigOk() (*string, bool) { + if o == nil || IsNil(o.Config) { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given string and assigns it to the Config field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetConfig(v string) { + o.Config = &v +} + +// GetConfigStorageType returns the ConfigStorageType field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetConfigStorageType() GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType { + if o == nil || IsNil(o.ConfigStorageType) { + var ret GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType + return ret + } + return *o.ConfigStorageType +} + +// GetConfigStorageTypeOk returns a tuple with the ConfigStorageType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetConfigStorageTypeOk() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType, bool) { + if o == nil || IsNil(o.ConfigStorageType) { + return nil, false + } + return o.ConfigStorageType, true +} + +// HasConfigStorageType returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasConfigStorageType() bool { + if o != nil && !IsNil(o.ConfigStorageType) { + return true + } + + return false +} + +// SetConfigStorageType gets a reference to the given GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType and assigns it to the ConfigStorageType field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetConfigStorageType(v GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelConfigStorageType) { + o.ConfigStorageType = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetCreatorId returns the CreatorId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetCreatorId() string { + if o == nil || IsNil(o.CreatorId) { + var ret string + return ret + } + return *o.CreatorId +} + +// GetCreatorIdOk returns a tuple with the CreatorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetCreatorIdOk() (*string, bool) { + if o == nil || IsNil(o.CreatorId) { + return nil, false + } + return o.CreatorId, true +} + +// HasCreatorId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasCreatorId() bool { + if o != nil && !IsNil(o.CreatorId) { + return true + } + + return false +} + +// SetCreatorId gets a reference to the given string and assigns it to the CreatorId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetCreatorId(v string) { + o.CreatorId = &v +} + +// GetEnvironmentId returns the EnvironmentId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetEnvironmentId() string { + if o == nil || IsNil(o.EnvironmentId) { + var ret string + return ret + } + return *o.EnvironmentId +} + +// GetEnvironmentIdOk returns a tuple with the EnvironmentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetEnvironmentIdOk() (*string, bool) { + if o == nil || IsNil(o.EnvironmentId) { + return nil, false + } + return o.EnvironmentId, true +} + +// HasEnvironmentId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasEnvironmentId() bool { + if o != nil && !IsNil(o.EnvironmentId) { + return true + } + + return false +} + +// SetEnvironmentId gets a reference to the given string and assigns it to the EnvironmentId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetEnvironmentId(v string) { + o.EnvironmentId = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetId(v string) { + o.Id = &v +} + +// GetManifestName returns the ManifestName field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetManifestName() string { + if o == nil || IsNil(o.ManifestName) { + var ret string + return ret + } + return *o.ManifestName +} + +// GetManifestNameOk returns a tuple with the ManifestName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetManifestNameOk() (*string, bool) { + if o == nil || IsNil(o.ManifestName) { + return nil, false + } + return o.ManifestName, true +} + +// HasManifestName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasManifestName() bool { + if o != nil && !IsNil(o.ManifestName) { + return true + } + + return false +} + +// SetManifestName gets a reference to the given string and assigns it to the ManifestName field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetManifestName(v string) { + o.ManifestName = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetName(v string) { + o.Name = &v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetRepoConfigStorage returns the RepoConfigStorage field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetRepoConfigStorage() GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRepoConfigStorage { + if o == nil || IsNil(o.RepoConfigStorage) { + var ret GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRepoConfigStorage + return ret + } + return *o.RepoConfigStorage +} + +// GetRepoConfigStorageOk returns a tuple with the RepoConfigStorage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetRepoConfigStorageOk() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRepoConfigStorage, bool) { + if o == nil || IsNil(o.RepoConfigStorage) { + return nil, false + } + return o.RepoConfigStorage, true +} + +// HasRepoConfigStorage returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasRepoConfigStorage() bool { + if o != nil && !IsNil(o.RepoConfigStorage) { + return true + } + + return false +} + +// SetRepoConfigStorage gets a reference to the given GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRepoConfigStorage and assigns it to the RepoConfigStorage field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetRepoConfigStorage(v GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRepoConfigStorage) { + o.RepoConfigStorage = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetRepository() GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository { + if o == nil || IsNil(o.Repository) { + var ret GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetRepositoryOk() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository and assigns it to the Repository field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetRepository(v GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) { + o.Repository = &v +} + +// GetRepositoryId returns the RepositoryId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetRepositoryId() string { + if o == nil || IsNil(o.RepositoryId) { + var ret string + return ret + } + return *o.RepositoryId +} + +// GetRepositoryIdOk returns a tuple with the RepositoryId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetRepositoryIdOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryId) { + return nil, false + } + return o.RepositoryId, true +} + +// HasRepositoryId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasRepositoryId() bool { + if o != nil && !IsNil(o.RepositoryId) { + return true + } + + return false +} + +// SetRepositoryId gets a reference to the given string and assigns it to the RepositoryId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetRepositoryId(v string) { + o.RepositoryId = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetType() GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipelineType { + if o == nil || IsNil(o.Type) { + var ret GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipelineType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetTypeOk() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipelineType, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipelineType and assigns it to the Type field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetType(v GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipelineType) { + o.Type = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetUpdatedAt() string { + if o == nil || IsNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) GetUpdatedAtOk() (*string, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.ConfigStorageType) { + toSerialize["config_storage_type"] = o.ConfigStorageType + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.CreatorId) { + toSerialize["creator_id"] = o.CreatorId + } + if !IsNil(o.EnvironmentId) { + toSerialize["environment_id"] = o.EnvironmentId + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ManifestName) { + toSerialize["manifest_name"] = o.ManifestName + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ProjectId) { + toSerialize["project_id"] = o.ProjectId + } + if !IsNil(o.RepoConfigStorage) { + toSerialize["repo_config_storage"] = o.RepoConfigStorage + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.RepositoryId) { + toSerialize["repository_id"] = o.RepositoryId + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineGet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_list.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_list.go new file mode 100644 index 0000000..ce4f2d9 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_pipeline_list.go @@ -0,0 +1,160 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList struct { + Pipelines []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline `json:"pipelines,omitempty"` + Total *int `json:"total,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineListWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineListWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList{} + return &this +} + +// GetPipelines returns the Pipelines field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) GetPipelines() []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline { + if o == nil || IsNil(o.Pipelines) { + var ret []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline + return ret + } + return o.Pipelines +} + +// GetPipelinesOk returns a tuple with the Pipelines field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) GetPipelinesOk() ([]GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline, bool) { + if o == nil || IsNil(o.Pipelines) { + return nil, false + } + return o.Pipelines, true +} + +// HasPipelines returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) HasPipelines() bool { + if o != nil && !IsNil(o.Pipelines) { + return true + } + + return false +} + +// SetPipelines gets a reference to the given []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline and assigns it to the Pipelines field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) SetPipelines(v []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline) { + o.Pipelines = v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) GetTotal() int { + if o == nil || IsNil(o.Total) { + var ret int + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) GetTotalOk() (*int, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int and assigns it to the Total field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) SetTotal(v int) { + o.Total = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Pipelines) { + toSerialize["pipelines"] = o.Pipelines + } + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponsePipelineList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_repository.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_repository.go new file mode 100644 index 0000000..cdd2f7a --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_repository.go @@ -0,0 +1,484 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository struct { + Branches []string `json:"branches,omitempty"` + BranchesCount *int `json:"branches_count,omitempty"` + Clone *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone `json:"clone,omitempty"` + CommitsCount *int `json:"commits_count,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + DefaultBranch *string `json:"default_branch,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Size *int `json:"size,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepositoryWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepositoryWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository{} + return &this +} + +// GetBranches returns the Branches field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetBranches() []string { + if o == nil || IsNil(o.Branches) { + var ret []string + return ret + } + return o.Branches +} + +// GetBranchesOk returns a tuple with the Branches field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetBranchesOk() ([]string, bool) { + if o == nil || IsNil(o.Branches) { + return nil, false + } + return o.Branches, true +} + +// HasBranches returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasBranches() bool { + if o != nil && !IsNil(o.Branches) { + return true + } + + return false +} + +// SetBranches gets a reference to the given []string and assigns it to the Branches field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetBranches(v []string) { + o.Branches = v +} + +// GetBranchesCount returns the BranchesCount field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetBranchesCount() int { + if o == nil || IsNil(o.BranchesCount) { + var ret int + return ret + } + return *o.BranchesCount +} + +// GetBranchesCountOk returns a tuple with the BranchesCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetBranchesCountOk() (*int, bool) { + if o == nil || IsNil(o.BranchesCount) { + return nil, false + } + return o.BranchesCount, true +} + +// HasBranchesCount returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasBranchesCount() bool { + if o != nil && !IsNil(o.BranchesCount) { + return true + } + + return false +} + +// SetBranchesCount gets a reference to the given int and assigns it to the BranchesCount field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetBranchesCount(v int) { + o.BranchesCount = &v +} + +// GetClone returns the Clone field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetClone() GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone { + if o == nil || IsNil(o.Clone) { + var ret GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone + return ret + } + return *o.Clone +} + +// GetCloneOk returns a tuple with the Clone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetCloneOk() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone, bool) { + if o == nil || IsNil(o.Clone) { + return nil, false + } + return o.Clone, true +} + +// HasClone returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasClone() bool { + if o != nil && !IsNil(o.Clone) { + return true + } + + return false +} + +// SetClone gets a reference to the given GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone and assigns it to the Clone field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetClone(v GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseClone) { + o.Clone = &v +} + +// GetCommitsCount returns the CommitsCount field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetCommitsCount() int { + if o == nil || IsNil(o.CommitsCount) { + var ret int + return ret + } + return *o.CommitsCount +} + +// GetCommitsCountOk returns a tuple with the CommitsCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetCommitsCountOk() (*int, bool) { + if o == nil || IsNil(o.CommitsCount) { + return nil, false + } + return o.CommitsCount, true +} + +// HasCommitsCount returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasCommitsCount() bool { + if o != nil && !IsNil(o.CommitsCount) { + return true + } + + return false +} + +// SetCommitsCount gets a reference to the given int and assigns it to the CommitsCount field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetCommitsCount(v int) { + o.CommitsCount = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetDefaultBranch returns the DefaultBranch field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetDefaultBranch() string { + if o == nil || IsNil(o.DefaultBranch) { + var ret string + return ret + } + return *o.DefaultBranch +} + +// GetDefaultBranchOk returns a tuple with the DefaultBranch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetDefaultBranchOk() (*string, bool) { + if o == nil || IsNil(o.DefaultBranch) { + return nil, false + } + return o.DefaultBranch, true +} + +// HasDefaultBranch returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasDefaultBranch() bool { + if o != nil && !IsNil(o.DefaultBranch) { + return true + } + + return false +} + +// SetDefaultBranch gets a reference to the given string and assigns it to the DefaultBranch field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetDefaultBranch(v string) { + o.DefaultBranch = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetName(v string) { + o.Name = &v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetSize() int { + if o == nil || IsNil(o.Size) { + var ret int + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetSizeOk() (*int, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int and assigns it to the Size field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetSize(v int) { + o.Size = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetUpdatedAt() string { + if o == nil || IsNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) GetUpdatedAtOk() (*string, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Branches) { + toSerialize["branches"] = o.Branches + } + if !IsNil(o.BranchesCount) { + toSerialize["branches_count"] = o.BranchesCount + } + if !IsNil(o.Clone) { + toSerialize["clone"] = o.Clone + } + if !IsNil(o.CommitsCount) { + toSerialize["commits_count"] = o.CommitsCount + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.DefaultBranch) { + toSerialize["default_branch"] = o.DefaultBranch + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run.go new file mode 100644 index 0000000..a2cbccf --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run.go @@ -0,0 +1,449 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun struct { + Branch *string `json:"branch,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + // DestinationNode и SourceRunID заданы у частичного запуска ноды. + DestinationNode *string `json:"destination_node,omitempty"` + Id *string `json:"id,omitempty"` + Pipeline *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline `json:"pipeline,omitempty"` + SourceRunId *string `json:"source_run_id,omitempty"` + Stages []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage `json:"stages,omitempty"` + Status *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRunStatus `json:"status,omitempty"` + StatusMessage *string `json:"status_message,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun{} + return &this +} + +// GetBranch returns the Branch field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetBranch() string { + if o == nil || IsNil(o.Branch) { + var ret string + return ret + } + return *o.Branch +} + +// GetBranchOk returns a tuple with the Branch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetBranchOk() (*string, bool) { + if o == nil || IsNil(o.Branch) { + return nil, false + } + return o.Branch, true +} + +// HasBranch returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) HasBranch() bool { + if o != nil && !IsNil(o.Branch) { + return true + } + + return false +} + +// SetBranch gets a reference to the given string and assigns it to the Branch field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) SetBranch(v string) { + o.Branch = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetDestinationNode returns the DestinationNode field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetDestinationNode() string { + if o == nil || IsNil(o.DestinationNode) { + var ret string + return ret + } + return *o.DestinationNode +} + +// GetDestinationNodeOk returns a tuple with the DestinationNode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetDestinationNodeOk() (*string, bool) { + if o == nil || IsNil(o.DestinationNode) { + return nil, false + } + return o.DestinationNode, true +} + +// HasDestinationNode returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) HasDestinationNode() bool { + if o != nil && !IsNil(o.DestinationNode) { + return true + } + + return false +} + +// SetDestinationNode gets a reference to the given string and assigns it to the DestinationNode field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) SetDestinationNode(v string) { + o.DestinationNode = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) SetId(v string) { + o.Id = &v +} + +// GetPipeline returns the Pipeline field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetPipeline() GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline { + if o == nil || IsNil(o.Pipeline) { + var ret GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline + return ret + } + return *o.Pipeline +} + +// GetPipelineOk returns a tuple with the Pipeline field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetPipelineOk() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline, bool) { + if o == nil || IsNil(o.Pipeline) { + return nil, false + } + return o.Pipeline, true +} + +// HasPipeline returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) HasPipeline() bool { + if o != nil && !IsNil(o.Pipeline) { + return true + } + + return false +} + +// SetPipeline gets a reference to the given GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline and assigns it to the Pipeline field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) SetPipeline(v GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline) { + o.Pipeline = &v +} + +// GetSourceRunId returns the SourceRunId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetSourceRunId() string { + if o == nil || IsNil(o.SourceRunId) { + var ret string + return ret + } + return *o.SourceRunId +} + +// GetSourceRunIdOk returns a tuple with the SourceRunId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetSourceRunIdOk() (*string, bool) { + if o == nil || IsNil(o.SourceRunId) { + return nil, false + } + return o.SourceRunId, true +} + +// HasSourceRunId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) HasSourceRunId() bool { + if o != nil && !IsNil(o.SourceRunId) { + return true + } + + return false +} + +// SetSourceRunId gets a reference to the given string and assigns it to the SourceRunId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) SetSourceRunId(v string) { + o.SourceRunId = &v +} + +// GetStages returns the Stages field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetStages() []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage { + if o == nil || IsNil(o.Stages) { + var ret []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage + return ret + } + return o.Stages +} + +// GetStagesOk returns a tuple with the Stages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetStagesOk() ([]GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage, bool) { + if o == nil || IsNil(o.Stages) { + return nil, false + } + return o.Stages, true +} + +// HasStages returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) HasStages() bool { + if o != nil && !IsNil(o.Stages) { + return true + } + + return false +} + +// SetStages gets a reference to the given []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage and assigns it to the Stages field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) SetStages(v []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage) { + o.Stages = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetStatus() GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRunStatus { + if o == nil || IsNil(o.Status) { + var ret GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRunStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetStatusOk() (*GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRunStatus, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRunStatus and assigns it to the Status field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) SetStatus(v GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRunStatus) { + o.Status = &v +} + +// GetStatusMessage returns the StatusMessage field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetStatusMessage() string { + if o == nil || IsNil(o.StatusMessage) { + var ret string + return ret + } + return *o.StatusMessage +} + +// GetStatusMessageOk returns a tuple with the StatusMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetStatusMessageOk() (*string, bool) { + if o == nil || IsNil(o.StatusMessage) { + return nil, false + } + return o.StatusMessage, true +} + +// HasStatusMessage returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) HasStatusMessage() bool { + if o != nil && !IsNil(o.StatusMessage) { + return true + } + + return false +} + +// SetStatusMessage gets a reference to the given string and assigns it to the StatusMessage field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) SetStatusMessage(v string) { + o.StatusMessage = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetUpdatedAt() string { + if o == nil || IsNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) GetUpdatedAtOk() (*string, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Branch) { + toSerialize["branch"] = o.Branch + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.DestinationNode) { + toSerialize["destination_node"] = o.DestinationNode + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Pipeline) { + toSerialize["pipeline"] = o.Pipeline + } + if !IsNil(o.SourceRunId) { + toSerialize["source_run_id"] = o.SourceRunId + } + if !IsNil(o.Stages) { + toSerialize["stages"] = o.Stages + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StatusMessage) { + toSerialize["status_message"] = o.StatusMessage + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run_get.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run_get.go index 20e2b6e..2c5e11e 100644 --- a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run_get.go +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run_get.go @@ -19,12 +19,16 @@ var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplic // GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet struct { - Branch *string `json:"branch,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - Pipeline *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline `json:"pipeline,omitempty"` - PipelineId *string `json:"pipeline_id,omitempty"` - Snapshot *string `json:"snapshot,omitempty"` + Branch *string `json:"branch,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + // DestinationNode — нода, до которой шёл частичный запуск («Execute step»); nil — полный run. + DestinationNode *string `json:"destination_node,omitempty"` + Id *string `json:"id,omitempty"` + Pipeline *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelPipeline `json:"pipeline,omitempty"` + PipelineId *string `json:"pipeline_id,omitempty"` + Snapshot *string `json:"snapshot,omitempty"` + // SourceRunID — run, данные которого переиспользовал частичный запуск. + SourceRunId *string `json:"source_run_id,omitempty"` Stages []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage `json:"stages,omitempty"` Status *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelRunStatus `json:"status,omitempty"` StatusMessage *string `json:"status_message,omitempty"` @@ -115,6 +119,38 @@ func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRu o.CreatedAt = &v } +// GetDestinationNode returns the DestinationNode field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet) GetDestinationNode() string { + if o == nil || IsNil(o.DestinationNode) { + var ret string + return ret + } + return *o.DestinationNode +} + +// GetDestinationNodeOk returns a tuple with the DestinationNode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet) GetDestinationNodeOk() (*string, bool) { + if o == nil || IsNil(o.DestinationNode) { + return nil, false + } + return o.DestinationNode, true +} + +// HasDestinationNode returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet) HasDestinationNode() bool { + if o != nil && !IsNil(o.DestinationNode) { + return true + } + + return false +} + +// SetDestinationNode gets a reference to the given string and assigns it to the DestinationNode field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet) SetDestinationNode(v string) { + o.DestinationNode = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet) GetId() string { if o == nil || IsNil(o.Id) { @@ -243,6 +279,38 @@ func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRu o.Snapshot = &v } +// GetSourceRunId returns the SourceRunId field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet) GetSourceRunId() string { + if o == nil || IsNil(o.SourceRunId) { + var ret string + return ret + } + return *o.SourceRunId +} + +// GetSourceRunIdOk returns a tuple with the SourceRunId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet) GetSourceRunIdOk() (*string, bool) { + if o == nil || IsNil(o.SourceRunId) { + return nil, false + } + return o.SourceRunId, true +} + +// HasSourceRunId returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet) HasSourceRunId() bool { + if o != nil && !IsNil(o.SourceRunId) { + return true + } + + return false +} + +// SetSourceRunId gets a reference to the given string and assigns it to the SourceRunId field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet) SetSourceRunId(v string) { + o.SourceRunId = &v +} + // GetStages returns the Stages field value if set, zero value otherwise. func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunGet) GetStages() []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationModelStage { if o == nil || IsNil(o.Stages) { @@ -451,6 +519,9 @@ func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } + if !IsNil(o.DestinationNode) { + toSerialize["destination_node"] = o.DestinationNode + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -463,6 +534,9 @@ func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun if !IsNil(o.Snapshot) { toSerialize["snapshot"] = o.Snapshot } + if !IsNil(o.SourceRunId) { + toSerialize["source_run_id"] = o.SourceRunId + } if !IsNil(o.Stages) { toSerialize["stages"] = o.Stages } diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run_list.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run_list.go new file mode 100644 index 0000000..3546048 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_run_list.go @@ -0,0 +1,160 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList struct { + Runs []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun `json:"runs,omitempty"` + Total *int `json:"total,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunListWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunListWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList{} + return &this +} + +// GetRuns returns the Runs field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) GetRuns() []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun { + if o == nil || IsNil(o.Runs) { + var ret []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun + return ret + } + return o.Runs +} + +// GetRunsOk returns a tuple with the Runs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) GetRunsOk() ([]GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun, bool) { + if o == nil || IsNil(o.Runs) { + return nil, false + } + return o.Runs, true +} + +// HasRuns returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) HasRuns() bool { + if o != nil && !IsNil(o.Runs) { + return true + } + + return false +} + +// SetRuns gets a reference to the given []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun and assigns it to the Runs field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) SetRuns(v []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRun) { + o.Runs = v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) GetTotal() int { + if o == nil || IsNil(o.Total) { + var ret int + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) GetTotalOk() (*int, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int and assigns it to the Total field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) SetTotal(v int) { + o.Total = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Runs) { + toSerialize["runs"] = o.Runs + } + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseRunList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_variable.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_variable.go new file mode 100644 index 0000000..862b6d4 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_variable.go @@ -0,0 +1,160 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) GetValue() string { + if o == nil || IsNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) SetValue(v string) { + o.Value = &v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_variable_list.go b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_variable_list.go new file mode 100644 index 0000000..e6fa482 --- /dev/null +++ b/internal/workflow_client/model_git_sbercloud_tech_dsworks_services_pipeline_src_internal_application_response_variable_list.go @@ -0,0 +1,160 @@ +/* +Pipelines Public API + +Pipelines Public API + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package workflowclient + +import ( + "encoding/json" +) + +// checks if the GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList{} + +// GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList struct for GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList +type GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList struct { + Total *int `json:"total,omitempty"` + Variables []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable `json:"variables,omitempty"` +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList{} + return &this +} + +// NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableListWithDefaults instantiates a new GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableListWithDefaults() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList { + this := GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList{} + return &this +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) GetTotal() int { + if o == nil || IsNil(o.Total) { + var ret int + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) GetTotalOk() (*int, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int and assigns it to the Total field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) SetTotal(v int) { + o.Total = &v +} + +// GetVariables returns the Variables field value if set, zero value otherwise. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) GetVariables() []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable { + if o == nil || IsNil(o.Variables) { + var ret []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable + return ret + } + return o.Variables +} + +// GetVariablesOk returns a tuple with the Variables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) GetVariablesOk() ([]GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable, bool) { + if o == nil || IsNil(o.Variables) { + return nil, false + } + return o.Variables, true +} + +// HasVariables returns a boolean if a field has been set. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) HasVariables() bool { + if o != nil && !IsNil(o.Variables) { + return true + } + + return false +} + +// SetVariables gets a reference to the given []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable and assigns it to the Variables field. +func (o *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) SetVariables(v []GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariable) { + o.Variables = v +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + if !IsNil(o.Variables) { + toSerialize["variables"] = o.Variables + } + return toSerialize, nil +} + +type NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList struct { + value *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList + isSet bool +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) Get() *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList { + return v.value +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) Set(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) { + v.value = val + v.isSet = true +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) IsSet() bool { + return v.isSet +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList(val *GitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList { + return &NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList{value: val, isSet: true} +} + +func (v NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGitSbercloudTechDsworksServicesPipelineSrcInternalApplicationResponseVariableList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/skills/eds/SKILL.md b/skills/eds/SKILL.md index b4981b4..2ffb21a 100644 --- a/skills/eds/SKILL.md +++ b/skills/eds/SKILL.md @@ -60,15 +60,29 @@ Errors go to stderr and the process exits non-zero. | `eds repo delete [--force]` | Delete (irreversible; requires confirmation unless `--force`) | | `eds repo clone [dir] [--ssh] [--target DIR]` | Clone via local `git` CLI | | `eds repo remote-add [--name N] [--ssh]` | Wire an existing local checkout to it (`git remote add`, authenticated) | -| `eds wf app create --repository R\|--repository-url URL --branch B` | Create a Workflow Studio application from a repo + branch (auto-triggers first deploy) | -| `eds wf app list [--search S] [--sort created_at_asc\|created_at_desc]` | List applications | +| `eds wf app create --repository R\|--repository-url URL --branch B [--space-id S] [--port N]` | Create a Workflow Studio application from a repo + branch (auto-triggers first deploy) | +| `eds wf app list [--search S] [--sort created_at_asc\|created_at_desc] [--space-id S]` | List applications | | `eds wf app show ` | Show application details (status, run_id, pipeline_id, ...) | -| `eds wf app update --branch B [--name N]` | Update an application's name/branch | +| `eds wf app update --branch B [--name N] [--space-id S] [--port N]` | Update an application's name/branch/space/port | | `eds wf app delete [--force]` | Delete an application and its deployments (irreversible) | | `eds wf app deploy ` | Run the pipeline and publish (the "deploy" action) | | `eds wf app deployments ` | List publish history for an application | +| `eds wf pipeline list [--search S] [--sort ...] [--limit N] [--offset N]` | List pipelines in the configured project | +| `eds wf pipeline show ` | Show pipeline details (config, type, etc.) | +| `eds wf run list [--pipeline-id ID] [--sort ...] [--limit N] [--offset N] [--with-config]` | List pipeline runs | | `eds wf run show ` / `eds wf run stop ` | Inspect/control a pipeline run | -| `eds wf job logs ` | Stream job logs | +| `eds wf space list [--search S] [--sort ...] [--limit N] [--offset N]` | List application spaces | +| `eds wf space create --name ` | Create an application space | +| `eds wf space show ` | Show an application space | +| `eds wf space update --name ` | Update an application space | +| `eds wf space delete ` | Delete an application space | +| `eds wf variable list --pipeline-id ` | List variables for a pipeline | +| `eds wf variable create --pipeline-id ` | Create a pipeline variable | +| `eds wf variable update --pipeline-id ` | Update a pipeline variable | +| `eds wf variable delete --pipeline-id ` | Delete a pipeline variable | +| `eds wf job list --run-id [--limit N] [--offset N]` | List jobs for a run | +| `eds wf job show ` / `eds wf job stop ` | Inspect/control a job | +| `eds wf job logs ` | Stream job logs | | `eds login --api-key --project [--repo-api-url URL]` | Persist credentials (one-time setup) | The `` argument on `eds repo *` and `--repository` on