Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
270 changes: 270 additions & 0 deletions temporalcloudcli/commands.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ func NewCloudCommand(cctx *CommandContext) *CloudCommand {
s.Command.AddCommand(&NewCloudLogoutCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudNamespaceCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudNexusCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudProjectCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudRegionCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudServiceAccountCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudUserCommand(cctx, &s).Command)
Expand Down Expand Up @@ -4624,6 +4625,275 @@ func NewCloudNexusEndpointUpdateCommand(cctx *CommandContext, parent *CloudNexus
return &s
}

type CloudProjectCommand struct {
Parent *CloudCommand
Command cobra.Command
}

func NewCloudProjectCommand(cctx *CommandContext, parent *CloudCommand) *CloudProjectCommand {
var s CloudProjectCommand
s.Parent = parent
s.Command.Use = "project"
s.Command.Short = "Manage Temporal Cloud projects"
s.Command.Long = "Commands for managing Temporal Cloud projects.\n\nProjects provide an account-level grouping for Temporal Cloud resources."
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewCloudProjectApplyCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudProjectCreateCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudProjectDeleteCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudProjectEditCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudProjectGetCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudProjectListCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudProjectUpdateCommand(cctx, &s).Command)
return &s
}

type CloudProjectApplyCommand struct {
Parent *CloudProjectCommand
Command cobra.Command
ClientOptions
DiffOptions
AsyncOperationOptions
ResourceVersionOptions
ProjectId string
Spec string
}

func NewCloudProjectApplyCommand(cctx *CommandContext, parent *CloudProjectCommand) *CloudProjectApplyCommand {
var s CloudProjectApplyCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "apply [flags]"
s.Command.Short = "Create or update a project from a specification"
if hasHighlighting {
s.Command.Long = "Apply a project configuration to Temporal Cloud. If --project-id is\nprovided, the existing project is updated. Otherwise, a new project is\ncreated because project IDs are generated by the server.\n\nThe specification can be provided as inline JSON or loaded from a file\nby prefixing the path with '@'.\n\nExample:\n\n\x1b[1mtemporal cloud project apply --spec '{\"display_name\": \"Engineering\", \"description\": \"Engineering workloads\"}'\x1b[0m"
} else {
s.Command.Long = "Apply a project configuration to Temporal Cloud. If --project-id is\nprovided, the existing project is updated. Otherwise, a new project is\ncreated because project IDs are generated by the server.\n\nThe specification can be provided as inline JSON or loaded from a file\nby prefixing the path with '@'.\n\nExample:\n\n```\ntemporal cloud project apply --spec '{\"display_name\": \"Engineering\", \"description\": \"Engineering workloads\"}'\n```"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.ProjectId, "project-id", "", "The ID of the project to update. Omit to create a new project.")
s.Command.Flags().StringVar(&s.Spec, "spec", "", "Project configuration in JSON format. Provide inline JSON directly, or use '@path/to/file.json' to load from a file. Required.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "spec")
s.ClientOptions.BuildFlags(s.Command.Flags())
s.DiffOptions.BuildFlags(s.Command.Flags())
s.AsyncOperationOptions.BuildFlags(s.Command.Flags())
s.ResourceVersionOptions.BuildFlags(s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}

type CloudProjectCreateCommand struct {
Parent *CloudProjectCommand
Command cobra.Command
ClientOptions
AsyncOperationOptions
DisplayName string
Description string
EnableDeleteProtection bool
}

func NewCloudProjectCreateCommand(cctx *CommandContext, parent *CloudProjectCommand) *CloudProjectCreateCommand {
var s CloudProjectCreateCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "create [flags]"
s.Command.Short = "Create a project"
if hasHighlighting {
s.Command.Long = "Create a new Temporal Cloud project.\n\nExample:\n\n\x1b[1mtemporal cloud project create --display-name \"Engineering\" --description \"Engineering workloads\"\x1b[0m"
} else {
s.Command.Long = "Create a new Temporal Cloud project.\n\nExample:\n\n```\ntemporal cloud project create --display-name \"Engineering\" --description \"Engineering workloads\"\n```"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.DisplayName, "display-name", "", "The display name of the project. Required.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "display-name")
s.Command.Flags().StringVar(&s.Description, "description", "", "A description of the project.")
s.Command.Flags().BoolVar(&s.EnableDeleteProtection, "enable-delete-protection", false, "Prevent the project from being deleted while enabled.")
s.ClientOptions.BuildFlags(s.Command.Flags())
s.AsyncOperationOptions.BuildFlags(s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}

type CloudProjectDeleteCommand struct {
Parent *CloudProjectCommand
Command cobra.Command
ClientOptions
AsyncOperationOptions
ResourceVersionOptions
ProjectId string
}

func NewCloudProjectDeleteCommand(cctx *CommandContext, parent *CloudProjectCommand) *CloudProjectDeleteCommand {
var s CloudProjectDeleteCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "delete [flags]"
s.Command.Short = "Delete a project"
if hasHighlighting {
s.Command.Long = "Delete a Temporal Cloud project.\n\nExample:\n\n\x1b[1mtemporal cloud project delete --project-id my-project-id\x1b[0m"
} else {
s.Command.Long = "Delete a Temporal Cloud project.\n\nExample:\n\n```\ntemporal cloud project delete --project-id my-project-id\n```"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.ProjectId, "project-id", "", "The ID of the project. Required.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "project-id")
s.ClientOptions.BuildFlags(s.Command.Flags())
s.AsyncOperationOptions.BuildFlags(s.Command.Flags())
s.ResourceVersionOptions.BuildFlags(s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}

type CloudProjectEditCommand struct {
Parent *CloudProjectCommand
Command cobra.Command
ClientOptions
DiffOptions
AsyncOperationOptions
ResourceVersionOptions
ProjectId string
}

func NewCloudProjectEditCommand(cctx *CommandContext, parent *CloudProjectCommand) *CloudProjectEditCommand {
var s CloudProjectEditCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "edit [flags]"
s.Command.Short = "Interactively edit a project"
if hasHighlighting {
s.Command.Long = "Open an existing project specification in your default editor and apply\nthe edited configuration.\n\nExample:\n\n\x1b[1mtemporal cloud project edit --project-id my-project-id\x1b[0m"
} else {
s.Command.Long = "Open an existing project specification in your default editor and apply\nthe edited configuration.\n\nExample:\n\n```\ntemporal cloud project edit --project-id my-project-id\n```"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.ProjectId, "project-id", "", "The ID of the project. Required.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "project-id")
s.ClientOptions.BuildFlags(s.Command.Flags())
s.DiffOptions.BuildFlags(s.Command.Flags())
s.AsyncOperationOptions.BuildFlags(s.Command.Flags())
s.ResourceVersionOptions.BuildFlags(s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}

type CloudProjectGetCommand struct {
Parent *CloudProjectCommand
Command cobra.Command
ClientOptions
ProjectId string
}

func NewCloudProjectGetCommand(cctx *CommandContext, parent *CloudProjectCommand) *CloudProjectGetCommand {
var s CloudProjectGetCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "get [flags]"
s.Command.Short = "Retrieve project details"
if hasHighlighting {
s.Command.Long = "Retrieve the configuration and status of a Temporal Cloud project.\n\nExample:\n\n\x1b[1mtemporal cloud project get --project-id my-project-id\x1b[0m"
} else {
s.Command.Long = "Retrieve the configuration and status of a Temporal Cloud project.\n\nExample:\n\n```\ntemporal cloud project get --project-id my-project-id\n```"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.ProjectId, "project-id", "", "The ID of the project. Required.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "project-id")
s.ClientOptions.BuildFlags(s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}

type CloudProjectListCommand struct {
Parent *CloudProjectCommand
Command cobra.Command
ClientOptions
ProjectId []string
PageSize int
PageToken string
}

func NewCloudProjectListCommand(cctx *CommandContext, parent *CloudProjectCommand) *CloudProjectListCommand {
var s CloudProjectListCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "list [flags]"
s.Command.Short = "List projects"
if hasHighlighting {
s.Command.Long = "List Temporal Cloud projects in the current account.\n\nExample:\n\n\x1b[1mtemporal cloud project list --page-size 50\x1b[0m"
} else {
s.Command.Long = "List Temporal Cloud projects in the current account.\n\nExample:\n\n```\ntemporal cloud project list --page-size 50\n```"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringArrayVar(&s.ProjectId, "project-id", nil, "Filter by project ID. Can be specified multiple times.")
s.Command.Flags().IntVar(&s.PageSize, "page-size", 100, "Maximum number of projects to return.")
s.Command.Flags().StringVar(&s.PageToken, "page-token", "", "Token for retrieving the next page of results.")
s.ClientOptions.BuildFlags(s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}

type CloudProjectUpdateCommand struct {
Parent *CloudProjectCommand
Command cobra.Command
ClientOptions
AsyncOperationOptions
ResourceVersionOptions
ProjectId string
DisplayName string
Description string
EnableDeleteProtection bool
}

func NewCloudProjectUpdateCommand(cctx *CommandContext, parent *CloudProjectCommand) *CloudProjectUpdateCommand {
var s CloudProjectUpdateCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "update [flags]"
s.Command.Short = "Update a project"
if hasHighlighting {
s.Command.Long = "Update an existing Temporal Cloud project. Only explicitly provided flags\nare changed.\n\nExample:\n\n\x1b[1mtemporal cloud project update --project-id my-project-id --display-name \"Platform\"\x1b[0m"
} else {
s.Command.Long = "Update an existing Temporal Cloud project. Only explicitly provided flags\nare changed.\n\nExample:\n\n```\ntemporal cloud project update --project-id my-project-id --display-name \"Platform\"\n```"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.ProjectId, "project-id", "", "The ID of the project. Required.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "project-id")
s.Command.Flags().StringVar(&s.DisplayName, "display-name", "", "The display name of the project.")
s.Command.Flags().StringVar(&s.Description, "description", "", "A description of the project.")
s.Command.Flags().BoolVar(&s.EnableDeleteProtection, "enable-delete-protection", false, "Prevent the project from being deleted while enabled.")
s.ClientOptions.BuildFlags(s.Command.Flags())
s.AsyncOperationOptions.BuildFlags(s.Command.Flags())
s.ResourceVersionOptions.BuildFlags(s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}

type CloudRegionCommand struct {
Parent *CloudCommand
Command cobra.Command
Expand Down
Loading
Loading