diff --git a/cmd/cone/form_fields.go b/cmd/cone/form_fields.go index 8613ee63..b85d0aa7 100644 --- a/cmd/cone/form_fields.go +++ b/cmd/cone/form_fields.go @@ -17,10 +17,19 @@ import ( "github.com/conductorone/cone/pkg/output" ) +// formFields returns the field definitions for a form, or nil if the form is empty. +func formFields(form *shared.RequestSchemaForm) []shared.FormField { + if form == nil { + return nil + } + return form.Fields +} + // collectFormFields collects form field values from the user based on the form definition. // Returns a map of field names to their values, or nil if no form fields are present. -func collectFormFields(ctx context.Context, v *viper.Viper, form *shared.FormInput) (map[string]any, error) { - if form == nil || len(form.Fields) == 0 { +func collectFormFields(ctx context.Context, v *viper.Viper, form *shared.RequestSchemaForm) (map[string]any, error) { + fields := formFields(form) + if len(fields) == 0 { return nil, nil } @@ -34,7 +43,7 @@ func collectFormFields(ctx context.Context, v *viper.Viper, form *shared.FormInp return nil, err } - for _, field := range form.Fields { + for _, field := range fields { fieldName := client.StringFromPtr(field.Name) if fieldName == "" { continue @@ -81,7 +90,7 @@ func collectFormFields(ctx context.Context, v *viper.Viper, form *shared.FormInp } // collectFieldValue collects a single field value from the user based on field type. -func collectFieldValue(ctx context.Context, field shared.FieldInput, displayName, description string) (any, error) { +func collectFieldValue(ctx context.Context, field shared.FormField, displayName, description string) (any, error) { // Check for default value first if defaultValue := getFieldDefaultValue(field); defaultValue != nil { // Show default value and ask for confirmation @@ -100,8 +109,8 @@ func collectFieldValue(ctx context.Context, field shared.FieldInput, displayName // Collect based on field type switch { - case field.StringField != nil: - return collectStringField(ctx, field.StringField, displayName, description) + case field.FormStringField != nil: + return collectStringField(ctx, field.FormStringField, displayName, description) case field.BoolField != nil: return collectBoolField(ctx, field.BoolField, displayName, description) case field.Int64Field != nil: @@ -116,7 +125,7 @@ func collectFieldValue(ctx context.Context, field shared.FieldInput, displayName } // collectStringField collects a string field value with validation. -func collectStringField(ctx context.Context, field *shared.StringField, displayName, description string) (string, error) { +func collectStringField(ctx context.Context, field *shared.FormStringField, displayName, description string) (string, error) { validator := StringFieldValidator{ field: field, displayName: displayName, @@ -235,10 +244,10 @@ func collectStringSliceField(ctx context.Context, field *shared.StringSliceField } // getFieldDefaultValue extracts the default value from a field based on its type. -func getFieldDefaultValue(field shared.FieldInput) any { +func getFieldDefaultValue(field shared.FormField) any { switch { - case field.StringField != nil && field.StringField.DefaultValue != nil: - return *field.StringField.DefaultValue + case field.FormStringField != nil && field.FormStringField.DefaultValue != nil: + return *field.FormStringField.DefaultValue case field.BoolField != nil && field.BoolField.DefaultValue != nil: return *field.BoolField.DefaultValue case field.Int64Field != nil && field.Int64Field.DefaultValue != nil: @@ -270,7 +279,7 @@ func parseFormDataFlag(formDataFlag string) (map[string]any, error) { // StringFieldValidator validates string field input. type StringFieldValidator struct { - field *shared.StringField + field *shared.FormStringField displayName string description string } @@ -385,10 +394,10 @@ func (v Int64FieldValidator) Prompt(isFirstRun bool) { } // isFieldRequired checks if a field is required based on its validation rules. -func isFieldRequired(field shared.FieldInput) bool { +func isFieldRequired(field shared.FormField) bool { switch { - case field.StringField != nil: - rules := field.StringField.StringRules + case field.FormStringField != nil: + rules := field.FormStringField.StringRules if rules == nil { return false } @@ -420,12 +429,8 @@ func isFieldRequired(field shared.FieldInput) bool { } // validateFormData validates that all required form fields are present. -func validateFormData(form *shared.FormInput, requestData map[string]any) error { - if form == nil { - return nil - } - - for _, field := range form.Fields { +func validateFormData(form *shared.RequestSchemaForm, requestData map[string]any) error { + for _, field := range formFields(form) { fieldName := client.StringFromPtr(field.Name) if fieldName == "" { continue diff --git a/cmd/cone/get_drop_task.go b/cmd/cone/get_drop_task.go index 4c4b7aa3..c46964a0 100644 --- a/cmd/cone/get_drop_task.go +++ b/cmd/cone/get_drop_task.go @@ -271,15 +271,12 @@ func runGet(cmd *cobra.Command, args []string) error { task := accessRequest.TaskView.Task // Check if the task has form fields - hasFormFields := task.Form != nil - if hasFormFields { - hasFormFields = len(task.Form.Fields) > 0 - } + hasFormFields := len(formFields(task.RequestSchemaForm)) > 0 if hasFormFields { // Collect form fields if not already provided if len(requestData) == 0 { - collectedData, err := collectFormFields(ctx, v, task.Form) + collectedData, err := collectFormFields(ctx, v, task.RequestSchemaForm) if err != nil { return nil, fmt.Errorf("error collecting form fields: %w", err) } @@ -293,7 +290,7 @@ func runGet(cmd *cobra.Command, args []string) error { } } else { // Validate that provided form data matches the form structure - if err := validateFormData(task.Form, requestData); err != nil { + if err := validateFormData(task.RequestSchemaForm, requestData); err != nil { pterm.Warning.Printf("Form data validation warning: %v\n", err) } } diff --git a/cmd/cone/main.go b/cmd/cone/main.go index 19acb70c..89de04f8 100644 --- a/cmd/cone/main.go +++ b/cmd/cone/main.go @@ -84,6 +84,7 @@ func runCli(ctx context.Context) int { cliCmd.AddCommand(virtualEntitlementsCmd()) cliCmd.AddCommand(generateAliasCmd()) cliCmd.AddCommand(awsCmd()) + cliCmd.AddCommand(secretCmd()) err = cliCmd.ExecuteContext(ctx) if err != nil { diff --git a/cmd/cone/secret.go b/cmd/cone/secret.go new file mode 100644 index 00000000..82470f01 --- /dev/null +++ b/cmd/cone/secret.go @@ -0,0 +1,1324 @@ +package main + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "mime" + "net/mail" + "net/url" + "os" + "path/filepath" + "strconv" + "strings" + "time" + + "filippo.io/age" + "github.com/spf13/cobra" + + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/cone/pkg/client" + "github.com/conductorone/cone/pkg/output" +) + +const ( + displayNameFlag = "display-name" + labelFlag = "label" + contentFlag = "content" + contentFileFlag = "content-file" + fileFlag = "file" + inputFormatFlag = "input-format" + formatFlag = "format" + userFlag = "user" + allowedUserIDsFlag = "allowed-user-ids" + externalEmailsFlag = "external-emails" + externalEmailFlag = "external-email" + expiresInFlag = "expires-in" + maxViewsFlag = "max-views" + viewLimitFlag = "view-limit" + outputFileFlag = "output" + pageSizeFlag = "page-size" + secretStatusFlag = "status" + secretTypeFlag = "type" + secretSharingFlag = "sharing-mode" + defaultSecretExpiry = "1w" + formatPlaintext = "plaintext" + formatJSON = "json" + formatYAML = "yaml" + formatKeyValue = "key-value" +) + +func secretCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "secret", + Short: "Create and retrieve secrets", + } + + cmd.AddCommand(secretCreateCmd()) + cmd.AddCommand(secretListCmd()) + cmd.AddCommand(secretGetCmd()) + cmd.AddCommand(secretViewCmd()) + cmd.AddCommand(secretDownloadCmd()) + cmd.AddCommand(secretRevokeCmd()) + cmd.AddCommand(secretAuditCmd()) + + return cmd +} + +func secretCreateCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "create", + Short: "Create a TEXT or FILE secret shared with team members or external recipients", + Long: "Create a secret and encrypt its content client-side (Age) to the recipient the API returns.\n\n" + + "Recipients (exactly one is required):\n" + + " --user share with C1 team members who sign in with SSO; accepts user ID,\n" + + " exact email, or a search query that resolves to one enabled user\n" + + " --allowed-user-ids compatibility alias for internal recipient user IDs\n" + + " --external-emails share with external recipients who verify via email\n\n" + + "Content:\n" + + " --content inline TEXT content; prefer --content-file or stdin for sensitive values\n" + + " --content-file path to TEXT content, or '-' to read from stdin\n" + + " --file path to a FILE to upload; its content type, size, and name are derived automatically\n\n" + + "--content, --content-file, and --file are mutually exclusive, as are internal and external recipients.", + RunE: secretCreateRun, + } + + cmd.Flags().String(displayNameFlag, "", "A cleartext label for the secret, visible in the My Secrets view.") + cmd.Flags().String(labelFlag, "", "Alias for --display-name.") + cmd.Flags().String(contentFlag, "", "The plaintext TEXT content to encrypt and store. Prefer --content-file or stdin to avoid shell history.") + cmd.Flags().String(contentFileFlag, "", "Path to plaintext TEXT content, or '-' to read from stdin.") + cmd.Flags().String(fileFlag, "", "Path to a file to upload as a FILE secret (max 1GB). Mutually exclusive with --content.") + cmd.Flags().String(inputFormatFlag, formatPlaintext, "TEXT format hint for the viewer UI: plaintext, json, yaml, or key-value/env. Ignored for files.") + cmd.Flags().String(formatFlag, "", "Alias for --input-format.") + cmd.Flags().StringSlice(userFlag, nil, "Internal team member recipient. Accepts user ID, exact email, or a search query that resolves to one enabled user.") + cmd.Flags().StringSlice(allowedUserIDsFlag, nil, "C1 user IDs allowed to view this secret (1 to 128). Mutually exclusive with external recipients.") + cmd.Flags().StringSlice(externalEmailsFlag, nil, "External recipient email addresses (1 to 64). Mutually exclusive with internal recipients.") + cmd.Flags().StringSlice(externalEmailFlag, nil, "Alias for --external-emails.") + cmd.Flags().String(expiresInFlag, defaultSecretExpiry, "Duration after which the secret content expires (1h to 30d, e.g. 1w, 3600s).") + cmd.Flags().Int64(maxViewsFlag, 0, "Maximum number of views before the secret is burned (0 = unlimited).") + cmd.Flags().Int64(viewLimitFlag, 0, "Alias for --max-views.") + + return cmd +} + +func secretCreateRun(cmd *cobra.Command, args []string) error { + ctx, c, v, err := cmdContext(cmd) + if err != nil { + return err + } + + if err := validateArgLenth(0, args, cmd); err != nil { + return err + } + + legacyUserIDs := cleanStringSlice(v.GetStringSlice(allowedUserIDsFlag)) + userRefs := cleanStringSlice(v.GetStringSlice(userFlag)) + emailFlags := append(v.GetStringSlice(externalEmailsFlag), v.GetStringSlice(externalEmailFlag)...) + emails := cleanEmailSlice(emailFlags) + filePath := v.GetString(fileFlag) + contentFilePath := v.GetString(contentFileFlag) + hasInlineContent := cmd.Flags().Changed(contentFlag) + + displayName, err := selectedStringFlag(cmd, v, displayNameFlag, labelFlag) + if err != nil { + return err + } + inputFormat, err := selectedStringFlag(cmd, v, inputFormatFlag, formatFlag) + if err != nil { + return err + } + inputFormat, err = normalizeSecretInputFormat(inputFormat) + if err != nil { + return err + } + expiresIn, err := normalizeSecretDuration(v.GetString(expiresInFlag)) + if err != nil { + return err + } + maxViews, err := selectedInt64Flag(cmd, v, maxViewsFlag, viewLimitFlag) + if err != nil { + return err + } + + input := secretCreateInput{ + userIDs: legacyUserIDs, + userRefs: userRefs, + emails: emails, + hasInlineContent: hasInlineContent, + contentFilePath: contentFilePath, + filePath: filePath, + expiresIn: expiresIn, + maxViews: maxViews, + } + if err := validateSecretCreateInput(input); err != nil { + return err + } + + userIDs, err := resolveSecretUserIDs(ctx, c, legacyUserIDs, userRefs) + if err != nil { + return err + } + + content := "" + params := createSecretParams{ + userIDs: userIDs, + emails: emails, + expiresIn: expiresIn, + displayName: displayName, + inputFormat: inputFormat, + isFile: filePath != "", + } + if maxViews > 0 { + params.maxViews = &maxViews + } + switch { + case params.isFile: + fileInfo, err := os.Stat(filePath) + if err != nil { + return fmt.Errorf("failed to stat --%s: %w", fileFlag, err) + } + if fileInfo.IsDir() { + return fmt.Errorf("--%s must be a file, got directory %q", fileFlag, filePath) + } + if fileInfo.Size() == 0 { + return fmt.Errorf("--%s must not be empty", fileFlag) + } + if fileInfo.Size() > maxFileSecretBytes { + return fmt.Errorf("--%s is %d bytes; maximum is %d bytes", fileFlag, fileInfo.Size(), maxFileSecretBytes) + } + params.filename = filepath.Base(filePath) + params.contentType = mime.TypeByExtension(filepath.Ext(filePath)) + if params.contentType == "" { + params.contentType = "application/octet-stream" + } + params.fileSize = fileInfo.Size() + case contentFilePath != "": + content, err = readSecretContentFile(cmd, contentFilePath) + if err != nil { + return err + } + default: + content = v.GetString(contentFlag) + } + + if !params.isFile { + if err := validateSecretTextContent(content, inputFormat); err != nil { + return err + } + } + + createResp, err := createSecret(ctx, c, params) + if err != nil { + return err + } + + vaultID := client.StringFromPtr(createResp.VaultID) + if vaultID == "" { + return fmt.Errorf("secret was created but no vault id was returned") + } + + outputManager := output.NewManager(ctx, v) + + recipientKey := client.StringFromPtr(createResp.AgeRecipient) + if recipientKey == "" { + return fmt.Errorf("secret %s was created but the API returned no Age recipient for encryption", vaultID) + } + + if params.isFile { + uploadURL := client.StringFromPtr(createResp.UploadURL) + if uploadURL == "" { + return fmt.Errorf("file secret %s was created but the API returned no upload URL", vaultID) + } + encryptedFile, err := encryptFileToTemp(filePath, recipientKey) + if err != nil { + return fmt.Errorf("failed to encrypt file content: %w", err) + } + defer func() { _ = encryptedFile.Close() }() + defer func() { _ = os.Remove(encryptedFile.Name()) }() + encryptedInfo, err := encryptedFile.Stat() + if err != nil { + return fmt.Errorf("failed to stat encrypted file: %w", err) + } + if err := c.UploadSecretFileReader(ctx, uploadURL, encryptedFile, encryptedInfo.Size()); err != nil { + return fmt.Errorf("secret %s was created but uploading the file failed: %w", vaultID, err) + } + } else { + encryptedBytes, err := encryptBytesToAgeRecipient(recipientKey, []byte(content)) + if err != nil { + return fmt.Errorf("failed to encrypt secret content: %w", err) + } + if len(encryptedBytes) > maxTextSecretCiphertextBytes { + return fmt.Errorf("encrypted text content is %d bytes; maximum is %d bytes", len(encryptedBytes), maxTextSecretCiphertextBytes) + } + encrypted := base64.StdEncoding.EncodeToString(encryptedBytes) + if err := c.SetSecretTextContent(ctx, vaultID, encrypted, setContentInputFormat(params.inputFormat)); err != nil { + return fmt.Errorf("secret %s was created but uploading content failed: %w", vaultID, err) + } + } + + // Re-fetch so the displayed metadata reflects the uploaded content. + secret, err := c.GetSecret(ctx, vaultID) + if err != nil { + return err + } + + resp := Secret(*secret) + return outputManager.Output(ctx, &resp, output.WithTransposeTable()) +} + +const ( + maxTextSecretPlaintextBytes = 60 * 1024 + maxTextSecretCiphertextBytes = 64 * 1024 + maxFileSecretBytes = int64(1 << 30) + minSecretExpiry = time.Hour + maxSecretExpiry = 30 * 24 * time.Hour +) + +type secretCreateInput struct { + userIDs []string + userRefs []string + emails []string + hasInlineContent bool + contentFilePath string + filePath string + expiresIn string + maxViews int64 +} + +func validateSecretCreateInput(input secretCreateInput) error { + internalRecipients := len(input.userIDs) + len(input.userRefs) + switch { + case internalRecipients == 0 && len(input.emails) == 0: + return fmt.Errorf("one of --%s, --%s, or --%s is required", userFlag, allowedUserIDsFlag, externalEmailsFlag) + case internalRecipients > 0 && len(input.emails) > 0: + return fmt.Errorf("internal recipients (--%s/--%s) and external recipients (--%s/--%s) are mutually exclusive", userFlag, allowedUserIDsFlag, externalEmailsFlag, externalEmailFlag) + case internalRecipients > 128: + return fmt.Errorf("internal recipient count is %d; maximum is 128", internalRecipients) + case len(input.emails) > 64: + return fmt.Errorf("external recipient count is %d; maximum is 64", len(input.emails)) + } + if err := validateEmailSlice(input.emails); err != nil { + return err + } + + contentSources := 0 + if input.hasInlineContent { + contentSources++ + } + if input.contentFilePath != "" { + contentSources++ + } + if input.filePath != "" { + contentSources++ + } + switch contentSources { + case 0: + return fmt.Errorf("one of --%s, --%s, or --%s is required", contentFlag, contentFileFlag, fileFlag) + case 1: + default: + return fmt.Errorf("--%s, --%s, and --%s are mutually exclusive", contentFlag, contentFileFlag, fileFlag) + } + + if input.expiresIn == "" { + return fmt.Errorf("--%s is required", expiresInFlag) + } + if input.maxViews < 0 || input.maxViews > 1000 { + return fmt.Errorf("--%s must be between 0 and 1000", maxViewsFlag) + } + return nil +} + +func validateSecretTextContent(content string, inputFormat string) error { + if content == "" { + return fmt.Errorf("text content must not be empty") + } + if len([]byte(content)) > maxTextSecretPlaintextBytes { + return fmt.Errorf("text content is %d bytes; maximum is %d bytes", len([]byte(content)), maxTextSecretPlaintextBytes) + } + if inputFormat == formatJSON && !json.Valid([]byte(content)) { + return fmt.Errorf("invalid JSON content") + } + return nil +} + +func selectedStringFlag(cmd *cobra.Command, v interface{ GetString(string) string }, primary string, alias string) (string, error) { + primaryValue := v.GetString(primary) + aliasValue := v.GetString(alias) + primaryChanged := cmd.Flags().Changed(primary) + aliasChanged := cmd.Flags().Changed(alias) + if primaryChanged && aliasChanged && primaryValue != aliasValue { + return "", fmt.Errorf("--%s and --%s cannot both be set to different values", primary, alias) + } + if aliasChanged { + return aliasValue, nil + } + return primaryValue, nil +} + +func selectedInt64Flag(cmd *cobra.Command, v interface{ GetInt64(string) int64 }, primary string, alias string) (int64, error) { + primaryValue := v.GetInt64(primary) + aliasValue := v.GetInt64(alias) + primaryChanged := cmd.Flags().Changed(primary) + aliasChanged := cmd.Flags().Changed(alias) + if primaryChanged && aliasChanged && primaryValue != aliasValue { + return 0, fmt.Errorf("--%s and --%s cannot both be set to different values", primary, alias) + } + if aliasChanged { + return aliasValue, nil + } + return primaryValue, nil +} + +func normalizeSecretDuration(input string) (string, error) { + d, err := strToDur(input) + if err != nil { + return "", fmt.Errorf("invalid --%s: %w", expiresInFlag, err) + } + if d == nil { + return "", fmt.Errorf("--%s is required", expiresInFlag) + } + if *d < minSecretExpiry || *d > maxSecretExpiry { + return "", fmt.Errorf("--%s must be between 1h and 30d", expiresInFlag) + } + return fmt.Sprintf("%ds", int64(d.Seconds())), nil +} + +func normalizeSecretInputFormat(input string) (string, error) { + switch strings.ToLower(strings.TrimSpace(input)) { + case "", formatPlaintext, "plain", "text": + return formatPlaintext, nil + case formatJSON: + return formatJSON, nil + case formatYAML, "yml": + return formatYAML, nil + case formatKeyValue, "key_value", "keyvalue", "env": + return formatKeyValue, nil + default: + return "", fmt.Errorf("--%s must be one of plaintext, json, yaml, or env", inputFormatFlag) + } +} + +func readSecretContentFile(cmd *cobra.Command, path string) (string, error) { + var data []byte + var err error + if path == "-" { + data, err = io.ReadAll(cmd.InOrStdin()) + } else { + //nolint:gosec // path comes directly from the CLI flag. + data, err = os.ReadFile(path) + } + if err != nil { + return "", fmt.Errorf("failed to read --%s: %w", contentFileFlag, err) + } + return string(data), nil +} + +func cleanStringSlice(values []string) []string { + out := make([]string, 0, len(values)) + seen := map[string]struct{}{} + for _, value := range values { + value = strings.TrimSpace(value) + if value == "" { + continue + } + if _, ok := seen[value]; ok { + continue + } + seen[value] = struct{}{} + out = append(out, value) + } + return out +} + +func cleanEmailSlice(values []string) []string { + out := make([]string, 0, len(values)) + seen := map[string]struct{}{} + for _, value := range values { + value = strings.TrimSpace(value) + if value == "" { + continue + } + addr, err := mail.ParseAddress(value) + if err != nil || addr.Address == "" { + out = append(out, value) + continue + } + email := strings.ToLower(addr.Address) + if _, ok := seen[email]; ok { + continue + } + seen[email] = struct{}{} + out = append(out, email) + } + return out +} + +func validateEmailSlice(emails []string) error { + for _, email := range emails { + addr, err := mail.ParseAddress(email) + if err != nil || addr.Address == "" || strings.Contains(addr.Address, " ") { + return fmt.Errorf("invalid external email address %q", email) + } + } + return nil +} + +func resolveSecretUserIDs(ctx context.Context, c client.C1Client, legacyUserIDs []string, userRefs []string) ([]string, error) { + userIDs := cleanStringSlice(legacyUserIDs) + seen := map[string]struct{}{} + for _, userID := range userIDs { + seen[userID] = struct{}{} + } + for _, ref := range userRefs { + userID, err := resolveSecretUserID(ctx, c, ref) + if err != nil { + return nil, err + } + if _, ok := seen[userID]; ok { + continue + } + seen[userID] = struct{}{} + userIDs = append(userIDs, userID) + } + return userIDs, nil +} + +func resolveSecretUserID(ctx context.Context, c client.C1Client, ref string) (string, error) { + if looksLikeC1ID(ref) { + return ref, nil + } + users, err := c.SearchUsers(ctx, secretUserSearchRequest(ref)) + if err != nil { + return "", err + } + switch len(users) { + case 0: + return "", fmt.Errorf("no enabled user matched %q", ref) + case 1: + default: + return "", fmt.Errorf("%q matched multiple enabled users; pass a C1 user ID or exact email", ref) + } + userID := client.StringFromPtr(users[0].ID) + if userID == "" { + return "", fmt.Errorf("matched user for %q had no id", ref) + } + return userID, nil +} + +func secretUserSearchRequest(ref string) *shared.SearchUsersRequest { + pageSize := 2 + status := shared.SearchUsersRequestUserStatusesEnabled + req := &shared.SearchUsersRequest{ + PageSize: &pageSize, + UserStatuses: []shared.SearchUsersRequestUserStatuses{status}, + } + if strings.Contains(ref, "@") { + req.Email = &ref + return req + } + req.Query = &ref + return req +} + +func looksLikeC1ID(ref string) bool { + if len(ref) < 20 { + return false + } + for _, r := range ref { + if r >= 'a' && r <= 'z' || r >= 'A' && r <= 'Z' || r >= '0' && r <= '9' { + continue + } + return false + } + return true +} + +// secretCreator is the subset of client.C1Client that createSecret needs, narrowed so the +// request-building logic can be exercised with a lightweight fake in tests. +type secretCreator interface { + CreateInternalSecret(ctx context.Context, req *shared.PaperSecretServiceCreateInternalRequest) (*shared.PaperSecretServiceCreateResponse, error) + CreateExternalSecret(ctx context.Context, req *shared.PaperSecretServiceCreateExternalRequest) (*shared.PaperSecretServiceCreateResponse, error) +} + +// createSecretParams carries the inputs for building a create request. Exactly one of +// userIDs (internal/team sharing) or emails (external sharing) is set. +type createSecretParams struct { + userIDs []string + emails []string + expiresIn string + displayName string + maxViews *int64 + inputFormat string + isFile bool + filename string + contentType string + fileSize int64 +} + +// createSecret builds and sends the appropriate create request: external (allowedEmails) +// when emails are provided, otherwise internal (allowedUserIds). FILE secrets set the file +// metadata; TEXT secrets set the input-format hint. +func createSecret(ctx context.Context, c secretCreator, p createSecretParams) (*shared.PaperSecretServiceCreateResponse, error) { + var displayName *string + if p.displayName != "" { + displayName = &p.displayName + } + + if len(p.emails) > 0 { + secretType := shared.PaperSecretServiceCreateExternalRequestSecretTypeSecretTypeText + if p.isFile { + secretType = shared.PaperSecretServiceCreateExternalRequestSecretTypeSecretTypeFile + } + req := &shared.PaperSecretServiceCreateExternalRequest{ + SecretType: &secretType, + AllowedEmails: p.emails, + ExpiresIn: &p.expiresIn, + DisplayName: displayName, + MaxViews: p.maxViews, + } + if p.isFile { + req.ContentType = &p.contentType + req.Filename = &p.filename + req.FileSize = &p.fileSize + } else { + req.InputFormat = createExternalInputFormat(p.inputFormat) + } + return c.CreateExternalSecret(ctx, req) + } + + secretType := shared.PaperSecretServiceCreateInternalRequestSecretTypeSecretTypeText + if p.isFile { + secretType = shared.PaperSecretServiceCreateInternalRequestSecretTypeSecretTypeFile + } + req := &shared.PaperSecretServiceCreateInternalRequest{ + SecretType: &secretType, + AllowedUserIds: p.userIDs, + ExpiresIn: &p.expiresIn, + DisplayName: displayName, + MaxViews: p.maxViews, + } + if p.isFile { + req.ContentType = &p.contentType + req.Filename = &p.filename + req.FileSize = &p.fileSize + } else { + req.InputFormat = createInputFormat(p.inputFormat) + } + return c.CreateInternalSecret(ctx, req) +} + +func secretListCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "list", + Short: "List secrets you created", + RunE: secretListRun, + } + cmd.Flags().String(queryFlag, "", "Fuzzy search by display name.") + cmd.Flags().String(secretStatusFlag, "active", "Status filter: active, expired, burned, revoked, data-deleted, or all.") + cmd.Flags().String(secretTypeFlag, "all", "Type filter: text, file, or all.") + cmd.Flags().String(secretSharingFlag, "all", "Sharing mode filter: internal, external, or all.") + cmd.Flags().Int(pageSizeFlag, 100, "Page size for API requests.") + return cmd +} + +func secretListRun(cmd *cobra.Command, args []string) error { + ctx, c, v, err := cmdContext(cmd) + if err != nil { + return err + } + + if err := validateArgLenth(0, args, cmd); err != nil { + return err + } + + pageSize := v.GetInt(pageSizeFlag) + if pageSize <= 0 || pageSize > 1000 { + return fmt.Errorf("--%s must be between 1 and 1000", pageSizeFlag) + } + req := &shared.PaperSecretServiceSearchMySecretsRequest{ + PageSize: &pageSize, + } + sortBy := shared.PaperSecretServiceSearchMySecretsRequestSortBySearchSortByCreatedDesc + req.SortBy = &sortBy + if query := strings.TrimSpace(v.GetString(queryFlag)); query != "" { + req.Query = &query + } + statuses, err := secretListStatuses(v.GetString(secretStatusFlag)) + if err != nil { + return err + } + req.Statuses = statuses + secretType, err := secretListType(v.GetString(secretTypeFlag)) + if err != nil { + return err + } + req.SecretType = secretType + sharingMode, err := secretListSharingMode(v.GetString(secretSharingFlag)) + if err != nil { + return err + } + req.SharingMode = sharingMode + + secrets, err := c.SearchMySecrets(ctx, req) + if err != nil { + return err + } + + resp := Secrets(secrets) + return output.NewManager(ctx, v).Output(ctx, &resp) +} + +func secretGetCmd() *cobra.Command { + return &cobra.Command{ + Use: "get ", + Short: "Get a secret's metadata", + RunE: secretGetRun, + } +} + +func secretGetRun(cmd *cobra.Command, args []string) error { + ctx, c, v, err := cmdContext(cmd) + if err != nil { + return err + } + + if err := validateArgLenth(1, args, cmd); err != nil { + return err + } + + secret, err := resolveSecret(ctx, c, args[0]) + if err != nil { + return err + } + + resp := Secret(*secret) + return output.NewManager(ctx, v).Output(ctx, &resp, output.WithTransposeTable()) +} + +// encryptBytesToAgeRecipient encrypts plaintext to an Age X25519 recipient and returns the +// raw ciphertext bytes, which begin with the Age header "age-encryption.org/v1". FILE secrets +// PUT these bytes verbatim to the upload URL. +func encryptBytesToAgeRecipient(recipientKey string, plaintext []byte) ([]byte, error) { + recipient, err := age.ParseX25519Recipient(recipientKey) + if err != nil { + return nil, fmt.Errorf("invalid Age recipient: %w", err) + } + + buf := &bytes.Buffer{} + w, err := age.Encrypt(buf, recipient) + if err != nil { + return nil, err + } + if _, err := w.Write(plaintext); err != nil { + return nil, err + } + if err := w.Close(); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +func encryptFileToTemp(filePath string, recipientKey string) (*os.File, error) { + recipient, err := age.ParseX25519Recipient(recipientKey) + if err != nil { + return nil, fmt.Errorf("invalid Age recipient: %w", err) + } + + //nolint:gosec // path comes directly from the CLI flag. + src, err := os.Open(filePath) + if err != nil { + return nil, err + } + defer func() { _ = src.Close() }() + + tmp, err := os.CreateTemp("", "cone-secret-upload-*.age") + if err != nil { + return nil, err + } + ok := false + defer func() { + if !ok { + _ = tmp.Close() + _ = os.Remove(tmp.Name()) + } + }() + + w, err := age.Encrypt(tmp, recipient) + if err != nil { + return nil, err + } + if _, err := io.Copy(w, src); err != nil { + _ = w.Close() + return nil, err + } + if err := w.Close(); err != nil { + return nil, err + } + if _, err := tmp.Seek(0, io.SeekStart); err != nil { + return nil, err + } + ok = true + return tmp, nil +} + +// encryptToAgeRecipient encrypts plaintext to an Age X25519 recipient and returns the +// base64-encoded ciphertext. The TEXT content API stores content in a protobuf bytes field, +// which is base64-encoded over JSON; the decoded bytes are the raw Age format. +func encryptToAgeRecipient(recipientKey string, plaintext []byte) (string, error) { + raw, err := encryptBytesToAgeRecipient(recipientKey, plaintext) + if err != nil { + return "", err + } + return base64.StdEncoding.EncodeToString(raw), nil +} + +func secretViewCmd() *cobra.Command { + return &cobra.Command{ + Use: "view ", + Short: "Fetch and decrypt a TEXT secret's content", + Long: "Fetch a TEXT secret's content and decrypt it locally. A one-time Age identity is " + + "generated for the request; the server re-encrypts the content to it. This may count " + + "against the secret's view limit.", + RunE: secretViewRun, + } +} + +func secretViewRun(cmd *cobra.Command, args []string) error { + ctx, c, _, err := cmdContext(cmd) + if err != nil { + return err + } + + if err := validateArgLenth(1, args, cmd); err != nil { + return err + } + + // Generate an ephemeral identity; the server re-encrypts content to its recipient. + identity, err := age.GenerateX25519Identity() + if err != nil { + return fmt.Errorf("failed to generate Age identity: %w", err) + } + + secret, err := resolveSecret(ctx, c, args[0]) + if err != nil { + return err + } + if isExternalSecret(secret) { + return fmt.Errorf("external secret content must be opened with the external share URL; cone supports metadata for external secrets but not the opener reveal flow") + } + vaultID, err := secretVaultID(secret) + if err != nil { + return err + } + content, err := c.GetSecretContent(ctx, vaultID, identity.Recipient().String()) + if err != nil { + return err + } + if content == nil { + return fmt.Errorf("secret content response was empty") + } + + if content.DownloadURL != nil && *content.DownloadURL != "" { + return fmt.Errorf("secret is a FILE secret; use cone secret download") + } + + encrypted := client.StringFromPtr(content.EncryptedContent) + if encrypted == "" { + return fmt.Errorf("secret has no text content to view") + } + + plaintext, err := decryptFromAgeIdentity(identity, encrypted) + if err != nil { + return fmt.Errorf("failed to decrypt secret content: %w", err) + } + + if _, err := fmt.Fprintln(cmd.OutOrStdout(), plaintext); err != nil { + return err + } + return nil +} + +func secretDownloadCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "download ", + Short: "Fetch and decrypt a FILE secret to disk", + Long: "Fetch a FILE secret and decrypt it locally. The plaintext is written to a temporary " + + "file in the destination directory first, then moved into place after decryption succeeds.", + RunE: secretDownloadRun, + } + cmd.Flags().StringP(outputFileFlag, "o", "", "Path for the decrypted file. Defaults to the secret filename when available.") + return cmd +} + +func secretDownloadRun(cmd *cobra.Command, args []string) error { + ctx, c, _, err := cmdContext(cmd) + if err != nil { + return err + } + if err := validateArgLenth(1, args, cmd); err != nil { + return err + } + + identity, err := age.GenerateX25519Identity() + if err != nil { + return fmt.Errorf("failed to generate Age identity: %w", err) + } + + secret, err := resolveSecret(ctx, c, args[0]) + if err != nil { + return err + } + if isExternalSecret(secret) { + return fmt.Errorf("external secret content must be opened with the external share URL; cone supports metadata for external secrets but not the opener reveal flow") + } + vaultID, err := secretVaultID(secret) + if err != nil { + return err + } + content, err := c.GetSecretContent(ctx, vaultID, identity.Recipient().String()) + if err != nil { + return err + } + if content == nil { + return fmt.Errorf("secret content response was empty") + } + downloadURL := client.StringFromPtr(content.DownloadURL) + if downloadURL == "" { + return fmt.Errorf("secret is not a FILE secret; use cone secret view") + } + + outputPath, err := cmd.Flags().GetString(outputFileFlag) + if err != nil { + return err + } + outputPath = strings.TrimSpace(outputPath) + if outputPath == "" { + outputPath = filepath.Base(client.StringFromPtr(content.Filename)) + } + if outputPath == "" || outputPath == "." || outputPath == string(filepath.Separator) { + return fmt.Errorf("--%s is required when the secret has no filename", outputFileFlag) + } + + encryptedBody, err := c.DownloadSecretFile(ctx, downloadURL) + if err != nil { + return err + } + defer func() { _ = encryptedBody.Close() }() + + plaintext, err := age.Decrypt(encryptedBody, identity) + if err != nil { + return fmt.Errorf("failed to decrypt file content: %w", err) + } + if err := writeDecryptedFileAtomically(outputPath, plaintext); err != nil { + return err + } + _, err = fmt.Fprintf(cmd.OutOrStdout(), "Downloaded %s\n", outputPath) + return err +} + +func secretRevokeCmd() *cobra.Command { + return &cobra.Command{ + Use: "revoke ", + Short: "Revoke a secret you created", + RunE: secretRevokeRun, + } +} + +func secretRevokeRun(cmd *cobra.Command, args []string) error { + ctx, c, v, err := cmdContext(cmd) + if err != nil { + return err + } + if err := validateArgLenth(1, args, cmd); err != nil { + return err + } + vaultID, err := resolveSecretVaultID(ctx, c, args[0]) + if err != nil { + return err + } + secret, err := c.RevokeSecret(ctx, vaultID) + if err != nil { + return err + } + resp := Secret(*secret) + return output.NewManager(ctx, v).Output(ctx, &resp, output.WithTransposeTable()) +} + +func secretAuditCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "audit ", + Short: "List audit events for a secret you created", + RunE: secretAuditRun, + } + cmd.Flags().Int(pageSizeFlag, 100, "Page size for API requests.") + return cmd +} + +func secretAuditRun(cmd *cobra.Command, args []string) error { + ctx, c, v, err := cmdContext(cmd) + if err != nil { + return err + } + if err := validateArgLenth(1, args, cmd); err != nil { + return err + } + pageSize := v.GetInt(pageSizeFlag) + if pageSize <= 0 || pageSize > 1000 { + return fmt.Errorf("--%s must be between 1 and 1000", pageSizeFlag) + } + vaultID, err := resolveSecretVaultID(ctx, c, args[0]) + if err != nil { + return err + } + events, err := c.SearchSecretAuditEvents(ctx, vaultID, pageSize) + if err != nil { + return err + } + resp := SecretAuditEvents{Events: events} + return output.NewManager(ctx, v).Output(ctx, &resp) +} + +// decryptFromAgeIdentity base64-decodes the Age ciphertext and decrypts it with the given identity. +func decryptFromAgeIdentity(identity *age.X25519Identity, encrypted string) (string, error) { + raw, err := base64.StdEncoding.DecodeString(encrypted) + if err != nil { + return "", fmt.Errorf("invalid base64 content: %w", err) + } + + r, err := age.Decrypt(bytes.NewReader(raw), identity) + if err != nil { + return "", err + } + + plaintext := &bytes.Buffer{} + if _, err := io.Copy(plaintext, r); err != nil { + return "", err + } + return plaintext.String(), nil +} + +func writeDecryptedFileAtomically(outputPath string, plaintext io.Reader) error { + outputPath = filepath.Clean(outputPath) + if outputPath == "." { + return fmt.Errorf("--%s must name a file", outputFileFlag) + } + if _, err := os.Stat(outputPath); err == nil { + return fmt.Errorf("%s already exists", outputPath) + } else if !os.IsNotExist(err) { + return err + } + + dir := filepath.Dir(outputPath) + base := filepath.Base(outputPath) + tmp, err := os.CreateTemp(dir, "."+base+".tmp-*") + if err != nil { + return err + } + tmpPath := tmp.Name() + ok := false + defer func() { + if !ok { + _ = os.Remove(tmpPath) + } + }() + + if _, err := io.Copy(tmp, plaintext); err != nil { + _ = tmp.Close() + return err + } + if err := tmp.Sync(); err != nil { + _ = tmp.Close() + return err + } + if err := tmp.Close(); err != nil { + return err + } + if err := os.Link(tmpPath, outputPath); err != nil { + return err + } + ok = true + return os.Remove(tmpPath) +} + +func resolveSecretVaultID(ctx context.Context, c client.C1Client, ref string) (string, error) { + secret, err := resolveSecret(ctx, c, ref) + if err != nil { + return "", err + } + return secretVaultID(secret) +} + +func secretVaultID(secret *shared.PaperSecret) (string, error) { + vaultID := client.StringFromPtr(secret.VaultID) + if vaultID == "" { + return "", fmt.Errorf("secret has no vault id") + } + return vaultID, nil +} + +func isExternalSecret(secret *shared.PaperSecret) bool { + return secret != nil && + secret.SharingMode != nil && + *secret.SharingMode == shared.SharingModePaperVaultSharingModeExternal +} + +func resolveSecret(ctx context.Context, c client.C1Client, ref string) (*shared.PaperSecret, error) { + ref = strings.TrimSpace(ref) + if ref == "" { + return nil, fmt.Errorf("secret identifier must not be empty") + } + if vaultID := vaultIDFromSecretURL(ref); vaultID != "" { + return c.GetSecret(ctx, vaultID) + } + if shareCode := shareCodeFromSecretRef(ref); shareCode != "" { + return c.GetSecretByShareCode(ctx, shareCode) + } + return c.GetSecret(ctx, ref) +} + +func vaultIDFromSecretURL(ref string) string { + u, err := url.Parse(ref) + if err != nil || u.Scheme == "" || u.Host == "" { + return "" + } + return strings.TrimSpace(u.Query().Get("vaultId")) +} + +func shareCodeFromSecretRef(ref string) string { + if shareCodeLooksValid(ref) { + return strings.ToUpper(ref) + } + u, err := url.Parse(ref) + if err != nil || u.Scheme == "" || u.Host == "" { + return "" + } + segments := strings.Split(strings.Trim(u.Path, "/"), "/") + if len(segments) == 0 { + return "" + } + last := segments[len(segments)-1] + if shareCodeLooksValid(last) { + return strings.ToUpper(last) + } + return "" +} + +func shareCodeLooksValid(value string) bool { + parts := strings.Split(strings.TrimSpace(value), "-") + if len(parts) != 3 { + return false + } + for _, part := range parts { + if len(part) != 4 { + return false + } + for _, r := range part { + if r >= 'a' && r <= 'z' || r >= 'A' && r <= 'Z' || r >= '0' && r <= '9' { + continue + } + return false + } + } + return true +} + +func secretListStatuses(input string) ([]shared.PaperSecretServiceSearchMySecretsRequestStatuses, error) { + switch strings.ToLower(strings.TrimSpace(input)) { + case "", "active": + return []shared.PaperSecretServiceSearchMySecretsRequestStatuses{ + shared.PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusActive, + }, nil + case "all": + return nil, nil + case "expired": + return []shared.PaperSecretServiceSearchMySecretsRequestStatuses{ + shared.PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusExpired, + }, nil + case "burned": + return []shared.PaperSecretServiceSearchMySecretsRequestStatuses{ + shared.PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusBurned, + }, nil + case "revoked": + return []shared.PaperSecretServiceSearchMySecretsRequestStatuses{ + shared.PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusRevoked, + }, nil + case "data-deleted": + return []shared.PaperSecretServiceSearchMySecretsRequestStatuses{ + shared.PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusDataDeleted, + }, nil + default: + return nil, fmt.Errorf("--%s must be active, expired, burned, revoked, data-deleted, or all", secretStatusFlag) + } +} + +func secretListType(input string) (*shared.PaperSecretServiceSearchMySecretsRequestSecretType, error) { + var secretType shared.PaperSecretServiceSearchMySecretsRequestSecretType + switch strings.ToLower(strings.TrimSpace(input)) { + case "", "all": + return nil, nil + case "text": + secretType = shared.PaperSecretServiceSearchMySecretsRequestSecretTypeSecretTypeText + case "file": + secretType = shared.PaperSecretServiceSearchMySecretsRequestSecretTypeSecretTypeFile + default: + return nil, fmt.Errorf("--%s must be text, file, or all", secretTypeFlag) + } + return &secretType, nil +} + +func secretListSharingMode(input string) (*shared.PaperSecretServiceSearchMySecretsRequestSharingMode, error) { + var sharingMode shared.PaperSecretServiceSearchMySecretsRequestSharingMode + switch strings.ToLower(strings.TrimSpace(input)) { + case "", "all": + return nil, nil + case "internal", "team": + sharingMode = shared.PaperSecretServiceSearchMySecretsRequestSharingModePaperVaultSharingModeInternal + case "external": + sharingMode = shared.PaperSecretServiceSearchMySecretsRequestSharingModePaperVaultSharingModeExternal + default: + return nil, fmt.Errorf("--%s must be internal, external, or all", secretSharingFlag) + } + return &sharingMode, nil +} + +func createInputFormat(name string) *shared.PaperSecretServiceCreateInternalRequestInputFormat { + var format shared.PaperSecretServiceCreateInternalRequestInputFormat + switch name { + case formatJSON: + format = shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatJSON + case formatYAML: + format = shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatYaml + case formatKeyValue: + format = shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatKeyValue + default: + format = shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatPlaintext + } + return &format +} + +func createExternalInputFormat(name string) *shared.PaperSecretServiceCreateExternalRequestInputFormat { + var format shared.PaperSecretServiceCreateExternalRequestInputFormat + switch name { + case formatJSON: + format = shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatJSON + case formatYAML: + format = shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatYaml + case formatKeyValue: + format = shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatKeyValue + default: + format = shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatPlaintext + } + return &format +} + +func setContentInputFormat(name string) *shared.PaperSecretServiceSetTextContentRequestInputFormat { + var format shared.PaperSecretServiceSetTextContentRequestInputFormat + switch name { + case formatJSON: + format = shared.PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatJSON + case formatYAML: + format = shared.PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatYaml + case formatKeyValue: + format = shared.PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatKeyValue + default: + format = shared.PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatPlaintext + } + return &format +} + +type Secrets []shared.PaperSecret + +func (r *Secrets) Header() []string { + return (&Secret{}).WideHeader() +} + +func (r *Secrets) Rows() [][]string { + rows := make([][]string, 0, len(*r)) + for _, secret := range *r { + row := Secret(secret) + rows = append(rows, row.WideRows()[0]) + } + return rows +} + +type SecretAuditEvents struct { + Events []map[string]any `json:"events"` +} + +func (r *SecretAuditEvents) Header() []string { + return []string{"Event"} +} + +func (r *SecretAuditEvents) Rows() [][]string { + rows := make([][]string, 0, len(r.Events)) + for _, event := range r.Events { + data, err := json.Marshal(event) + if err != nil { + rows = append(rows, []string{fmt.Sprintf("%v", event)}) + continue + } + rows = append(rows, []string{string(data)}) + } + return rows +} + +type Secret shared.PaperSecret + +func (r *Secret) Header() []string { + return []string{ + "Display Name", + "Type", + "Status", + "Share URL", + "Max Views", + "Current Views", + "Created At", + "Content Expires At", + } +} + +func (r *Secret) WideHeader() []string { + return append([]string{"Vault Id"}, r.Header()...) +} + +func (r *Secret) rows() []string { + var secretType, status string + if r.SecretType != nil { + secretType = string(*r.SecretType) + } + if r.Status != nil { + status = string(*r.Status) + } + + maxViews := "" + if r.MaxViews != nil { + maxViews = strconv.FormatInt(*r.MaxViews, 10) + } + currentViews := "" + if r.CurrentViews != nil { + currentViews = strconv.FormatInt(*r.CurrentViews, 10) + } + + return []string{ + client.StringFromPtr(r.DisplayName), + secretType, + status, + client.StringFromPtr(r.ShareURL), + maxViews, + currentViews, + output.FormatTime(r.CreatedAt), + output.FormatTime(r.ContentExpiresAt), + } +} + +func (r *Secret) Rows() [][]string { + return [][]string{r.rows()} +} + +func (r *Secret) WideRows() [][]string { + return [][]string{append([]string{client.StringFromPtr(r.VaultID)}, r.rows()...)} +} diff --git a/cmd/cone/secret_test.go b/cmd/cone/secret_test.go new file mode 100644 index 00000000..78568552 --- /dev/null +++ b/cmd/cone/secret_test.go @@ -0,0 +1,560 @@ +package main + +import ( + "bytes" + "context" + "encoding/base64" + "io" + "os" + "path/filepath" + "strings" + "testing" + + "filippo.io/age" + + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" +) + +func TestEncryptDecryptRoundtrip(t *testing.T) { + tests := []struct { + name string + plaintext string + }{ + {name: "simple", plaintext: "hello world"}, + {name: "empty", plaintext: ""}, + {name: "multiline", plaintext: "line1\nline2\nline3"}, + {name: "json", plaintext: `{"key":"value","n":1}`}, + {name: "unicode", plaintext: "héllo 🌍 wörld"}, + {name: "large", plaintext: strings.Repeat("a", 50000)}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + identity, err := age.GenerateX25519Identity() + if err != nil { + t.Fatalf("GenerateX25519Identity() unexpected error: %v", err) + } + + encrypted, err := encryptToAgeRecipient(identity.Recipient().String(), []byte(tt.plaintext)) + if err != nil { + t.Fatalf("encryptToAgeRecipient() unexpected error: %v", err) + } + + // Encrypted output must be valid base64 of the raw Age format. + raw, err := base64.StdEncoding.DecodeString(encrypted) + if err != nil { + t.Fatalf("encrypted content is not valid base64: %v", err) + } + if !strings.HasPrefix(string(raw), "age-encryption.org/v1") { + t.Errorf("decoded content is not Age format, got prefix %q", string(raw[:min(len(raw), 22)])) + } + + got, err := decryptFromAgeIdentity(identity, encrypted) + if err != nil { + t.Fatalf("decryptFromAgeIdentity() unexpected error: %v", err) + } + if got != tt.plaintext { + t.Errorf("roundtrip = %q, want %q", got, tt.plaintext) + } + }) + } +} + +func TestEncryptToAgeRecipientInvalid(t *testing.T) { + if _, err := encryptToAgeRecipient("not-a-valid-age-recipient", []byte("data")); err == nil { + t.Error("encryptToAgeRecipient() with invalid recipient expected error, got nil") + } +} + +func TestDecryptFromAgeIdentityErrors(t *testing.T) { + identity, err := age.GenerateX25519Identity() + if err != nil { + t.Fatalf("GenerateX25519Identity() unexpected error: %v", err) + } + + tests := []struct { + name string + encrypted string + }{ + {name: "invalid base64", encrypted: "not valid base64!!!"}, + {name: "valid base64 but not age", encrypted: base64.StdEncoding.EncodeToString([]byte("plain bytes"))}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if _, err := decryptFromAgeIdentity(identity, tt.encrypted); err == nil { + t.Errorf("decryptFromAgeIdentity(%q) expected error, got nil", tt.name) + } + }) + } +} + +func TestDecryptWithWrongIdentity(t *testing.T) { + sender, err := age.GenerateX25519Identity() + if err != nil { + t.Fatalf("GenerateX25519Identity() unexpected error: %v", err) + } + other, err := age.GenerateX25519Identity() + if err != nil { + t.Fatalf("GenerateX25519Identity() unexpected error: %v", err) + } + + encrypted, err := encryptToAgeRecipient(sender.Recipient().String(), []byte("secret")) + if err != nil { + t.Fatalf("encryptToAgeRecipient() unexpected error: %v", err) + } + + if _, err := decryptFromAgeIdentity(other, encrypted); err == nil { + t.Error("decryptFromAgeIdentity() with wrong identity expected error, got nil") + } +} + +func TestCreateInputFormat(t *testing.T) { + tests := []struct { + name string + want shared.PaperSecretServiceCreateInternalRequestInputFormat + }{ + {name: "json", want: shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatJSON}, + {name: "yaml", want: shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatYaml}, + {name: "key-value", want: shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatKeyValue}, + {name: "plaintext", want: shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatPlaintext}, + {name: "unknown", want: shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatPlaintext}, + {name: "", want: shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatPlaintext}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := createInputFormat(tt.name) + if got == nil { + t.Fatal("createInputFormat() returned nil") + } + if *got != tt.want { + t.Errorf("createInputFormat(%q) = %q, want %q", tt.name, *got, tt.want) + } + }) + } +} + +func TestValidateSecretCreateInput(t *testing.T) { + tests := []struct { + name string + input secretCreateInput + wantErr string + }{ + {name: "valid internal text", input: secretCreateInput{userIDs: []string{"u1"}, hasInlineContent: true, expiresIn: "3600s"}}, + {name: "valid external file", input: secretCreateInput{emails: []string{"a@b.com"}, filePath: "/tmp/f", expiresIn: "1h"}}, + {name: "valid content file", input: secretCreateInput{userRefs: []string{"alice@example.com"}, contentFilePath: "/tmp/content", expiresIn: "3600s"}}, + {name: "no recipient", input: secretCreateInput{hasInlineContent: true, expiresIn: "3600s"}, wantErr: "one of"}, + {name: "both recipients", input: secretCreateInput{userIDs: []string{"u1"}, emails: []string{"a@b.com"}, expiresIn: "3600s", hasInlineContent: true}, wantErr: "mutually exclusive"}, + {name: "invalid email", input: secretCreateInput{emails: []string{"not an email"}, filePath: "/tmp/f", expiresIn: "3600s"}, wantErr: "invalid external email"}, + {name: "missing content source", input: secretCreateInput{userIDs: []string{"u1"}, expiresIn: "3600s"}, wantErr: "one of"}, + {name: "missing expiry", input: secretCreateInput{userIDs: []string{"u1"}, hasInlineContent: true}, wantErr: "expires-in"}, + {name: "content and file", input: secretCreateInput{userIDs: []string{"u1"}, hasInlineContent: true, filePath: "/tmp/f", expiresIn: "3600s"}, wantErr: "mutually exclusive"}, + {name: "max views too high", input: secretCreateInput{userIDs: []string{"u1"}, hasInlineContent: true, expiresIn: "3600s", maxViews: 1001}, wantErr: "between 0 and 1000"}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := validateSecretCreateInput(tt.input) + if tt.wantErr == "" { + if err != nil { + t.Fatalf("validateSecretCreateInput() unexpected error: %v", err) + } + return + } + if err == nil { + t.Fatalf("validateSecretCreateInput() expected error containing %q, got nil", tt.wantErr) + } + if !strings.Contains(err.Error(), tt.wantErr) { + t.Errorf("validateSecretCreateInput() error = %q, want contains %q", err.Error(), tt.wantErr) + } + }) + } +} + +// fakeSecretCreator captures whichever create request createSecret builds so tests can +// assert the request fields without a live API. +type fakeSecretCreator struct { + internalReq *shared.PaperSecretServiceCreateInternalRequest + externalReq *shared.PaperSecretServiceCreateExternalRequest +} + +func (f *fakeSecretCreator) CreateInternalSecret(_ context.Context, req *shared.PaperSecretServiceCreateInternalRequest) (*shared.PaperSecretServiceCreateResponse, error) { + f.internalReq = req + return &shared.PaperSecretServiceCreateResponse{}, nil +} + +func (f *fakeSecretCreator) CreateExternalSecret(_ context.Context, req *shared.PaperSecretServiceCreateExternalRequest) (*shared.PaperSecretServiceCreateResponse, error) { + f.externalReq = req + return &shared.PaperSecretServiceCreateResponse{}, nil +} + +func TestCreateSecretInternalText(t *testing.T) { + maxViews := int64(5) + f := &fakeSecretCreator{} + if _, err := createSecret(context.Background(), f, createSecretParams{ + userIDs: []string{"u1", "u2"}, + expiresIn: "3600s", + displayName: "label", + maxViews: &maxViews, + inputFormat: "json", + }); err != nil { + t.Fatalf("createSecret() unexpected error: %v", err) + } + + if f.externalReq != nil { + t.Fatal("expected internal request, external was called") + } + r := f.internalReq + if r == nil { + t.Fatal("internal request was not built") + } + if r.SecretType == nil || *r.SecretType != shared.PaperSecretServiceCreateInternalRequestSecretTypeSecretTypeText { + t.Errorf("SecretType = %v, want Text", r.SecretType) + } + if r.InputFormat == nil || *r.InputFormat != shared.PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatJSON { + t.Errorf("InputFormat = %v, want JSON", r.InputFormat) + } + if len(r.AllowedUserIds) != 2 { + t.Errorf("AllowedUserIds = %v, want 2 ids", r.AllowedUserIds) + } + if r.DisplayName == nil || *r.DisplayName != "label" { + t.Errorf("DisplayName = %v, want label", r.DisplayName) + } + if r.MaxViews == nil || *r.MaxViews != 5 { + t.Errorf("MaxViews = %v, want 5", r.MaxViews) + } + if r.ContentType != nil || r.Filename != nil || r.FileSize != nil { + t.Errorf("file metadata should be nil for TEXT, got contentType=%v filename=%v fileSize=%v", r.ContentType, r.Filename, r.FileSize) + } +} + +func TestCreateSecretInternalFile(t *testing.T) { + f := &fakeSecretCreator{} + if _, err := createSecret(context.Background(), f, createSecretParams{ + userIDs: []string{"u1"}, + expiresIn: "3600s", + inputFormat: "json", // must be ignored for files + isFile: true, + filename: "data.bin", + contentType: "application/octet-stream", + fileSize: 1234, + }); err != nil { + t.Fatalf("createSecret() unexpected error: %v", err) + } + + r := f.internalReq + if r == nil { + t.Fatal("internal request was not built") + } + if r.SecretType == nil || *r.SecretType != shared.PaperSecretServiceCreateInternalRequestSecretTypeSecretTypeFile { + t.Errorf("SecretType = %v, want File", r.SecretType) + } + if r.InputFormat != nil { + t.Errorf("InputFormat should be nil for FILE, got %v", *r.InputFormat) + } + if r.ContentType == nil || *r.ContentType != "application/octet-stream" { + t.Errorf("ContentType = %v, want application/octet-stream", r.ContentType) + } + if r.Filename == nil || *r.Filename != "data.bin" { + t.Errorf("Filename = %v, want data.bin", r.Filename) + } + if r.FileSize == nil || *r.FileSize != 1234 { + t.Errorf("FileSize = %v, want 1234", r.FileSize) + } + if r.DisplayName != nil { + t.Errorf("DisplayName should be nil when unset, got %v", *r.DisplayName) + } +} + +func TestCreateSecretExternalText(t *testing.T) { + f := &fakeSecretCreator{} + if _, err := createSecret(context.Background(), f, createSecretParams{ + emails: []string{"a@b.com"}, + expiresIn: "1h", + inputFormat: "yaml", + }); err != nil { + t.Fatalf("createSecret() unexpected error: %v", err) + } + + if f.internalReq != nil { + t.Fatal("expected external request, internal was called") + } + r := f.externalReq + if r == nil { + t.Fatal("external request was not built") + } + if r.SecretType == nil || *r.SecretType != shared.PaperSecretServiceCreateExternalRequestSecretTypeSecretTypeText { + t.Errorf("SecretType = %v, want Text", r.SecretType) + } + if r.InputFormat == nil || *r.InputFormat != shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatYaml { + t.Errorf("InputFormat = %v, want Yaml", r.InputFormat) + } + if len(r.AllowedEmails) != 1 || r.AllowedEmails[0] != "a@b.com" { + t.Errorf("AllowedEmails = %v, want [a@b.com]", r.AllowedEmails) + } +} + +func TestCreateSecretExternalFile(t *testing.T) { + f := &fakeSecretCreator{} + if _, err := createSecret(context.Background(), f, createSecretParams{ + emails: []string{"a@b.com"}, + expiresIn: "1h", + isFile: true, + filename: "report.pdf", + contentType: "application/pdf", + fileSize: 99, + }); err != nil { + t.Fatalf("createSecret() unexpected error: %v", err) + } + + r := f.externalReq + if r == nil { + t.Fatal("external request was not built") + } + if r.SecretType == nil || *r.SecretType != shared.PaperSecretServiceCreateExternalRequestSecretTypeSecretTypeFile { + t.Errorf("SecretType = %v, want File", r.SecretType) + } + if r.InputFormat != nil { + t.Errorf("InputFormat should be nil for FILE, got %v", *r.InputFormat) + } + if r.ContentType == nil || *r.ContentType != "application/pdf" { + t.Errorf("ContentType = %v, want application/pdf", r.ContentType) + } + if r.Filename == nil || *r.Filename != "report.pdf" { + t.Errorf("Filename = %v, want report.pdf", r.Filename) + } + if r.FileSize == nil || *r.FileSize != 99 { + t.Errorf("FileSize = %v, want 99", r.FileSize) + } +} + +func TestCreateExternalInputFormat(t *testing.T) { + tests := []struct { + name string + want shared.PaperSecretServiceCreateExternalRequestInputFormat + }{ + {name: "json", want: shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatJSON}, + {name: "yaml", want: shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatYaml}, + {name: "key-value", want: shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatKeyValue}, + {name: "plaintext", want: shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatPlaintext}, + {name: "unknown", want: shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatPlaintext}, + {name: "", want: shared.PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatPlaintext}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := createExternalInputFormat(tt.name) + if got == nil { + t.Fatal("createExternalInputFormat() returned nil") + } + if *got != tt.want { + t.Errorf("createExternalInputFormat(%q) = %q, want %q", tt.name, *got, tt.want) + } + }) + } +} + +// TestEncryptBytesToAgeRecipient verifies the FILE path produces raw (non-base64) Age bytes +// that decrypt back to the original, since file content is PUT verbatim rather than base64-encoded. +func TestEncryptBytesToAgeRecipient(t *testing.T) { + identity, err := age.GenerateX25519Identity() + if err != nil { + t.Fatalf("GenerateX25519Identity() unexpected error: %v", err) + } + + plaintext := []byte("binary\x00file\xff content") + raw, err := encryptBytesToAgeRecipient(identity.Recipient().String(), plaintext) + if err != nil { + t.Fatalf("encryptBytesToAgeRecipient() unexpected error: %v", err) + } + if !strings.HasPrefix(string(raw), "age-encryption.org/v1") { + t.Errorf("raw output is not Age format, got prefix %q", string(raw[:min(len(raw), 22)])) + } + + // Decrypt via the base64-wrapping helper to confirm the bytes roundtrip. + got, err := decryptFromAgeIdentity(identity, base64.StdEncoding.EncodeToString(raw)) + if err != nil { + t.Fatalf("decryptFromAgeIdentity() unexpected error: %v", err) + } + if got != string(plaintext) { + t.Errorf("roundtrip = %q, want %q", got, plaintext) + } +} + +func TestEncryptBytesToAgeRecipientInvalid(t *testing.T) { + if _, err := encryptBytesToAgeRecipient("not-a-valid-age-recipient", []byte("data")); err == nil { + t.Error("encryptBytesToAgeRecipient() with invalid recipient expected error, got nil") + } +} + +func TestSetContentInputFormat(t *testing.T) { + tests := []struct { + name string + want shared.PaperSecretServiceSetTextContentRequestInputFormat + }{ + {name: "json", want: shared.PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatJSON}, + {name: "yaml", want: shared.PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatYaml}, + {name: "key-value", want: shared.PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatKeyValue}, + {name: "plaintext", want: shared.PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatPlaintext}, + {name: "unknown", want: shared.PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatPlaintext}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := setContentInputFormat(tt.name) + if got == nil { + t.Fatal("setContentInputFormat() returned nil") + } + if *got != tt.want { + t.Errorf("setContentInputFormat(%q) = %q, want %q", tt.name, *got, tt.want) + } + }) + } +} + +func TestNormalizeSecretDuration(t *testing.T) { + tests := []struct { + name string + input string + want string + wantErr string + }{ + {name: "one week", input: "1w", want: "604800s"}, + {name: "seconds", input: "3600s", want: "3600s"}, + {name: "too short", input: "59m", wantErr: "between 1h and 30d"}, + {name: "too long", input: "31d", wantErr: "between 1h and 30d"}, + {name: "empty", wantErr: "required"}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := normalizeSecretDuration(tt.input) + if tt.wantErr == "" { + if err != nil { + t.Fatalf("normalizeSecretDuration() unexpected error: %v", err) + } + if got != tt.want { + t.Fatalf("normalizeSecretDuration() = %q, want %q", got, tt.want) + } + return + } + if err == nil || !strings.Contains(err.Error(), tt.wantErr) { + t.Fatalf("normalizeSecretDuration() error = %v, want contains %q", err, tt.wantErr) + } + }) + } +} + +func TestNormalizeSecretInputFormat(t *testing.T) { + tests := map[string]string{ + "": "plaintext", + "text": "plaintext", + "json": "json", + "yml": "yaml", + "env": "key-value", + "key_value": "key-value", + } + for input, want := range tests { + t.Run(input, func(t *testing.T) { + got, err := normalizeSecretInputFormat(input) + if err != nil { + t.Fatalf("normalizeSecretInputFormat() unexpected error: %v", err) + } + if got != want { + t.Fatalf("normalizeSecretInputFormat() = %q, want %q", got, want) + } + }) + } + if _, err := normalizeSecretInputFormat("toml"); err == nil { + t.Fatal("normalizeSecretInputFormat() expected error") + } +} + +func TestValidateSecretTextContent(t *testing.T) { + if err := validateSecretTextContent(`{"ok":true}`, "json"); err != nil { + t.Fatalf("validateSecretTextContent() valid json unexpected error: %v", err) + } + if err := validateSecretTextContent(`{"ok":`, "json"); err == nil { + t.Fatal("validateSecretTextContent() invalid json expected error") + } + if err := validateSecretTextContent("", "plaintext"); err == nil { + t.Fatal("validateSecretTextContent() empty content expected error") + } + if err := validateSecretTextContent(strings.Repeat("a", maxTextSecretPlaintextBytes+1), "plaintext"); err == nil { + t.Fatal("validateSecretTextContent() oversized content expected error") + } +} + +func TestShareCodeFromSecretRef(t *testing.T) { + tests := map[string]string{ + "ABCD-EFGH-IJKL": "ABCD-EFGH-IJKL", + "abcd-efgh-ijkl": "ABCD-EFGH-IJKL", + "https://tenant.example.com/secrets/view/abcd-efgh-ijkl": "ABCD-EFGH-IJKL", + "https://tenant.example.com/ext/secrets/share/abcd-efgh-ijkl?x=ignore": "ABCD-EFGH-IJKL", + "not-a-share-code": "", + } + for input, want := range tests { + t.Run(input, func(t *testing.T) { + if got := shareCodeFromSecretRef(input); got != want { + t.Fatalf("shareCodeFromSecretRef() = %q, want %q", got, want) + } + }) + } +} + +func TestWriteDecryptedFileAtomically(t *testing.T) { + dir := t.TempDir() + dst := filepath.Join(dir, "secret.txt") + if err := writeDecryptedFileAtomically(dst, bytes.NewReader([]byte("secret"))); err != nil { + t.Fatalf("writeDecryptedFileAtomically() unexpected error: %v", err) + } + //nolint:gosec // test reads a file path created under t.TempDir. + got, err := os.ReadFile(dst) + if err != nil { + t.Fatalf("ReadFile() unexpected error: %v", err) + } + if string(got) != "secret" { + t.Fatalf("written content = %q, want secret", got) + } + entries, err := os.ReadDir(dir) + if err != nil { + t.Fatalf("ReadDir() unexpected error: %v", err) + } + if len(entries) != 1 || entries[0].Name() != "secret.txt" { + t.Fatalf("temp file was not cleaned up, entries=%v", entries) + } + if err := writeDecryptedFileAtomically(dst, bytes.NewReader([]byte("again"))); err == nil { + t.Fatal("writeDecryptedFileAtomically() expected existing destination error") + } +} + +func TestEncryptFileToTemp(t *testing.T) { + identity, err := age.GenerateX25519Identity() + if err != nil { + t.Fatalf("GenerateX25519Identity() unexpected error: %v", err) + } + src := filepath.Join(t.TempDir(), "source.bin") + want := []byte("file secret") + if err := os.WriteFile(src, want, 0o600); err != nil { + t.Fatalf("WriteFile() unexpected error: %v", err) + } + tmp, err := encryptFileToTemp(src, identity.Recipient().String()) + if err != nil { + t.Fatalf("encryptFileToTemp() unexpected error: %v", err) + } + defer func() { _ = tmp.Close() }() + defer func() { _ = os.Remove(tmp.Name()) }() + + r, err := age.Decrypt(tmp, identity) + if err != nil { + t.Fatalf("Decrypt() unexpected error: %v", err) + } + got, err := io.ReadAll(r) + if err != nil { + t.Fatalf("ReadAll() unexpected error: %v", err) + } + if !bytes.Equal(got, want) { + t.Fatalf("decrypt = %q, want %q", got, want) + } +} diff --git a/go.mod b/go.mod index 5d90cab7..e081445f 100644 --- a/go.mod +++ b/go.mod @@ -10,8 +10,9 @@ require ( ) require ( + filippo.io/age v1.2.1 github.com/conductorone/baton-sdk v0.3.17 - github.com/conductorone/conductorone-sdk-go v1.27.2-0.20260113184555-c2a4cbf81d4c + github.com/conductorone/conductorone-sdk-go v1.28.2 github.com/pterm/pterm v0.12.81 github.com/toqueteos/webbrowser v1.2.0 github.com/xhit/go-str2duration/v2 v2.1.0 @@ -22,7 +23,6 @@ require ( atomicgo.dev/cursor v0.2.0 // indirect atomicgo.dev/keyboard v0.2.9 // indirect atomicgo.dev/schedule v0.1.0 // indirect - filippo.io/age v1.2.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/containerd/console v1.0.5 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect @@ -59,5 +59,5 @@ require ( golang.org/x/sys v0.33.0 // indirect golang.org/x/text v0.26.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 - gopkg.in/yaml.v3 v3.0.1 // indirect + gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.sum b/go.sum index e210013f..680231a1 100644 --- a/go.sum +++ b/go.sum @@ -30,8 +30,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/conductorone/baton-sdk v0.3.17 h1:aJNr4T2xr7rDa4P2nwKEHjJngI5JcNgfBZZ9aeeliHc= github.com/conductorone/baton-sdk v0.3.17/go.mod h1:lWZHgu025Rsgs5jvBrhilGti0zWF2+YfaFY/bWOS/g0= -github.com/conductorone/conductorone-sdk-go v1.27.2-0.20260113184555-c2a4cbf81d4c h1:ogMr+Lssoks5dRSSVTpctWzKwdu69ZpvGd3ZkMif1cg= -github.com/conductorone/conductorone-sdk-go v1.27.2-0.20260113184555-c2a4cbf81d4c/go.mod h1:XfnxsPIsLn6s01PD46kU9tEUUljTRik7aviJIwB7D0k= +github.com/conductorone/conductorone-sdk-go v1.28.2 h1:7ZTZZuj4rbjOEl1fFj4CTd5dGpARxE3NvgzK/DZo0iE= +github.com/conductorone/conductorone-sdk-go v1.28.2/go.mod h1:XfnxsPIsLn6s01PD46kU9tEUUljTRik7aviJIwB7D0k= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/qqsc= github.com/containerd/console v1.0.5/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= diff --git a/pkg/client/client.go b/pkg/client/client.go index a292fe0a..a27d1842 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -3,6 +3,7 @@ package client import ( "context" "fmt" + "io" "net/http" "net/url" "os" @@ -197,6 +198,19 @@ type C1Client interface { CreateAppEntitlement(ctx context.Context, appID string, resourceTypeID string, resourceID string, displayName string, slug string) (*shared.AppEntitlement, error) UpdateEntitlement(ctx context.Context, appID, entitlementID string, req *shared.UpdateAppEntitlementRequest) error HasRequestForm(ctx context.Context, appID string, entitlementID string) (bool, error) + CreateInternalSecret(ctx context.Context, req *shared.PaperSecretServiceCreateInternalRequest) (*shared.PaperSecretServiceCreateResponse, error) + CreateExternalSecret(ctx context.Context, req *shared.PaperSecretServiceCreateExternalRequest) (*shared.PaperSecretServiceCreateResponse, error) + SetSecretTextContent(ctx context.Context, vaultID string, encryptedContent string, inputFormat *shared.PaperSecretServiceSetTextContentRequestInputFormat) error + UploadSecretFile(ctx context.Context, uploadURL string, encrypted []byte) error + UploadSecretFileReader(ctx context.Context, uploadURL string, encrypted io.Reader, contentLength int64) error + DownloadSecretFile(ctx context.Context, downloadURL string) (io.ReadCloser, error) + GetSecret(ctx context.Context, vaultID string) (*shared.PaperSecret, error) + GetSecretByShareCode(ctx context.Context, shareCode string) (*shared.PaperSecret, error) + GetSecretContent(ctx context.Context, vaultID string, readerRecipient string) (*shared.PaperSecretServiceGetContentResponse, error) + SearchMySecrets(ctx context.Context, req *shared.PaperSecretServiceSearchMySecretsRequest) ([]shared.PaperSecret, error) + RevokeSecret(ctx context.Context, vaultID string) (*shared.PaperSecret, error) + SearchSecretAuditEvents(ctx context.Context, vaultID string, pageSize int) ([]map[string]any, error) + SearchUsers(ctx context.Context, req *shared.SearchUsersRequest) ([]*shared.User, error) } func (c *client) BaseURL() string { diff --git a/pkg/client/secret.go b/pkg/client/secret.go new file mode 100644 index 00000000..79045fda --- /dev/null +++ b/pkg/client/secret.go @@ -0,0 +1,254 @@ +package client + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "strings" + + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" +) + +// CreateInternalSecret creates an internal secret and returns the create response. +// The response carries the vault ID (primary identifier) and the age recipient +// public key, which must be used to encrypt content before calling SetSecretTextContent. +func (c *client) CreateInternalSecret( + ctx context.Context, + req *shared.PaperSecretServiceCreateInternalRequest, +) (*shared.PaperSecretServiceCreateResponse, error) { + resp, err := c.sdk.PaperSecret.CreateInternal(ctx, req) + if err != nil { + return nil, err + } + + if err := NewHTTPError(resp.RawResponse); err != nil { + return nil, err + } + return resp.PaperSecretServiceCreateResponse, nil +} + +// CreateExternalSecret creates a secret shared with external email recipients +// (who authenticate via email magic link or Google OAuth) and returns the create +// response. Like CreateInternalSecret, the response carries the vault ID and the +// age recipient public key used to encrypt content before upload. +func (c *client) CreateExternalSecret( + ctx context.Context, + req *shared.PaperSecretServiceCreateExternalRequest, +) (*shared.PaperSecretServiceCreateResponse, error) { + resp, err := c.sdk.PaperSecret.CreateExternal(ctx, req) + if err != nil { + return nil, err + } + + if err := NewHTTPError(resp.RawResponse); err != nil { + return nil, err + } + return resp.PaperSecretServiceCreateResponse, nil +} + +// UploadSecretFile uploads the Age-encrypted bytes of a FILE secret to the capability +// upload URL returned by CreateInternalSecret/CreateExternalSecret. The encrypted bytes +// are sent verbatim as the PUT body (they must begin with the Age header +// "age-encryption.org/v1"). The upload URL is self-authorizing, so a bare HTTP client is +// used to avoid attaching the ConductorOne bearer token to the (foreign) storage host. +func (c *client) UploadSecretFile(ctx context.Context, uploadURL string, encrypted []byte) error { + return c.UploadSecretFileReader(ctx, uploadURL, bytes.NewReader(encrypted), int64(len(encrypted))) +} + +func (c *client) UploadSecretFileReader(ctx context.Context, uploadURL string, encrypted io.Reader, contentLength int64) error { + req, err := http.NewRequestWithContext(ctx, http.MethodPut, uploadURL, encrypted) + if err != nil { + return err + } + req.ContentLength = contentLength + req.Header.Set("Content-Type", "application/octet-stream") + + resp, err := http.DefaultClient.Do(req) + if err != nil { + return err + } + defer func() { _ = resp.Body.Close() }() + + if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusMultipleChoices { + body, _ := io.ReadAll(io.LimitReader(resp.Body, 4096)) + return fmt.Errorf("file upload failed: %s: %s", resp.Status, strings.TrimSpace(string(body))) + } + return nil +} + +func (c *client) DownloadSecretFile(ctx context.Context, downloadURL string) (io.ReadCloser, error) { + req, err := http.NewRequestWithContext(ctx, http.MethodGet, downloadURL, nil) + if err != nil { + return nil, err + } + + resp, err := http.DefaultClient.Do(req) + if err != nil { + return nil, err + } + + if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusMultipleChoices { + defer func() { _ = resp.Body.Close() }() + body, _ := io.ReadAll(io.LimitReader(resp.Body, 4096)) + return nil, fmt.Errorf("file download failed: %s: %s", resp.Status, strings.TrimSpace(string(body))) + } + return resp.Body, nil +} + +// SetSecretTextContent uploads the encrypted content for a TEXT secret. The +// encryptedContent must already be Age-encrypted to the recipient returned by +// CreateInternalSecret; the SDK base64-encodes the bytes for transport. +func (c *client) SetSecretTextContent( + ctx context.Context, + vaultID string, + encryptedContent string, + inputFormat *shared.PaperSecretServiceSetTextContentRequestInputFormat, +) error { + resp, err := c.sdk.PaperSecret.SetTextContent(ctx, operations.C1APISecretsV1PaperSecretServiceSetTextContentRequest{ + VaultID: vaultID, + PaperSecretServiceSetTextContentRequest: &shared.PaperSecretServiceSetTextContentRequest{ + EncryptedContent: &encryptedContent, + InputFormat: inputFormat, + }, + }) + if err != nil { + return err + } + + if err := NewHTTPError(resp.RawResponse); err != nil { + return err + } + return nil +} + +// GetSecretContent fetches a secret's content. The server re-encrypts the content to +// readerRecipient (an Age "age1..." recipient), so the caller must hold the matching +// Age identity to decrypt the returned bytes. Reading may count against the secret's +// view limit. +func (c *client) GetSecretContent( + ctx context.Context, + vaultID string, + readerRecipient string, +) (*shared.PaperSecretServiceGetContentResponse, error) { + resp, err := c.sdk.PaperSecret.GetContent(ctx, operations.C1APISecretsV1PaperSecretServiceGetContentRequest{ + VaultID: vaultID, + PaperSecretServiceGetContentRequest: &shared.PaperSecretServiceGetContentRequest{ + ReaderRecipient: &readerRecipient, + }, + }) + if err != nil { + return nil, err + } + + if err := NewHTTPError(resp.RawResponse); err != nil { + return nil, err + } + return resp.PaperSecretServiceGetContentResponse, nil +} + +// GetSecret returns the metadata for a secret by its vault ID. +func (c *client) GetSecret(ctx context.Context, vaultID string) (*shared.PaperSecret, error) { + resp, err := c.sdk.PaperSecret.Get(ctx, operations.C1APISecretsV1PaperSecretServiceGetRequest{ + VaultID: vaultID, + }) + if err != nil { + return nil, err + } + + if err := NewHTTPError(resp.RawResponse); err != nil { + return nil, err + } + if resp.PaperSecretServiceGetResponse == nil || resp.PaperSecretServiceGetResponse.PaperSecret == nil { + return nil, fmt.Errorf("get secret response was empty") + } + return resp.PaperSecretServiceGetResponse.PaperSecret, nil +} + +func (c *client) GetSecretByShareCode(ctx context.Context, shareCode string) (*shared.PaperSecret, error) { + resp, err := c.sdk.PaperSecret.GetByShareCode(ctx, operations.C1APISecretsV1PaperSecretServiceGetByShareCodeRequest{ + ShareCode: shareCode, + }) + if err != nil { + return nil, err + } + + if err := NewHTTPError(resp.RawResponse); err != nil { + return nil, err + } + if resp.PaperSecretServiceGetResponse == nil || resp.PaperSecretServiceGetResponse.PaperSecret == nil { + return nil, fmt.Errorf("get secret by share code response was empty") + } + return resp.PaperSecretServiceGetResponse.PaperSecret, nil +} + +func (c *client) SearchMySecrets(ctx context.Context, req *shared.PaperSecretServiceSearchMySecretsRequest) ([]shared.PaperSecret, error) { + if req == nil { + req = &shared.PaperSecretServiceSearchMySecretsRequest{} + } + var out []shared.PaperSecret + for { + resp, err := c.sdk.PaperSecret.SearchMySecrets(ctx, req) + if err != nil { + return nil, err + } + if err := NewHTTPError(resp.RawResponse); err != nil { + return nil, err + } + if resp.PaperSecretServiceSearchResponse != nil { + out = append(out, resp.PaperSecretServiceSearchResponse.List...) + token := StringFromPtr(resp.PaperSecretServiceSearchResponse.NextPageToken) + if token != "" { + req.PageToken = &token + continue + } + } + return out, nil + } +} + +func (c *client) RevokeSecret(ctx context.Context, vaultID string) (*shared.PaperSecret, error) { + resp, err := c.sdk.PaperSecret.Revoke(ctx, operations.C1APISecretsV1PaperSecretServiceRevokeRequest{ + VaultID: vaultID, + PaperSecretServiceRevokeRequest: &shared.PaperSecretServiceRevokeRequest{}, + }) + if err != nil { + return nil, err + } + + if err := NewHTTPError(resp.RawResponse); err != nil { + return nil, err + } + if resp.PaperSecretServiceRevokeResponse == nil || resp.PaperSecretServiceRevokeResponse.PaperSecret == nil { + return nil, fmt.Errorf("revoke secret response was empty") + } + return resp.PaperSecretServiceRevokeResponse.PaperSecret, nil +} + +func (c *client) SearchSecretAuditEvents(ctx context.Context, vaultID string, pageSize int) ([]map[string]any, error) { + req := &shared.PaperSecretServiceSearchAuditEventsRequest{ + VaultID: &vaultID, + PageSize: &pageSize, + } + var out []map[string]any + for { + resp, err := c.sdk.PaperSecret.SearchAuditEvents(ctx, req) + if err != nil { + return nil, err + } + if err := NewHTTPError(resp.RawResponse); err != nil { + return nil, err + } + if resp.PaperSecretServiceSearchAuditEventsResponse != nil { + out = append(out, resp.PaperSecretServiceSearchAuditEventsResponse.List...) + token := StringFromPtr(resp.PaperSecretServiceSearchAuditEventsResponse.NextPageToken) + if token != "" { + req.PageToken = &token + continue + } + } + return out, nil + } +} diff --git a/pkg/client/user.go b/pkg/client/user.go index a57a8e79..94f55e73 100644 --- a/pkg/client/user.go +++ b/pkg/client/user.go @@ -29,3 +29,23 @@ func (c *client) GetUser(ctx context.Context, userID string) (*shared.User, erro return view.User, nil } + +func (c *client) SearchUsers(ctx context.Context, req *shared.SearchUsersRequest) ([]*shared.User, error) { + resp, err := c.sdk.UserSearch.Search(ctx, req) + if err != nil { + return nil, err + } + if err := NewHTTPError(resp.RawResponse); err != nil { + return nil, err + } + if resp.SearchUsersResponse == nil { + return nil, nil + } + users := make([]*shared.User, 0, len(resp.SearchUsersResponse.List)) + for _, view := range resp.SearchUsersResponse.List { + if view.User != nil { + users = append(users, view.User) + } + } + return users, nil +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/README.md b/vendor/github.com/conductorone/conductorone-sdk-go/README.md index cfbe1c91..73434b77 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/README.md +++ b/vendor/github.com/conductorone/conductorone-sdk-go/README.md @@ -3,7 +3,7 @@ ## Summary -ConductorOne API: The ConductorOne API is a HTTP API for managing ConductorOne resources. +C1 API: The C1 API is a HTTP API for managing C1 resources. @@ -74,6 +74,13 @@ func main() {
Available methods +### [A2Ui](docs/sdks/a2ui/README.md) + +* [CreateSurfaceFeedback](docs/sdks/a2ui/README.md#createsurfacefeedback) - Create Surface Feedback +* [ListSurfaceFeedback](docs/sdks/a2ui/README.md#listsurfacefeedback) - List Surface Feedback +* [ListSurfaces](docs/sdks/a2ui/README.md#listsurfaces) - List Surfaces +* [SubmitAction](docs/sdks/a2ui/README.md#submitaction) - Submit Action + ### [AccessConflict](docs/sdks/accessconflict/README.md) * [CreateMonitor](docs/sdks/accessconflict/README.md#createmonitor) - Create Monitor @@ -89,6 +96,12 @@ func main() { * [List](docs/sdks/accessreview/README.md#list) - List * [Update](docs/sdks/accessreview/README.md#update) - Update +### [AccessReviewSetupEntitlement](docs/sdks/accessreviewsetupentitlement/README.md) + +* [GetCampaignScopeAndEntitlements](docs/sdks/accessreviewsetupentitlement/README.md#getcampaignscopeandentitlements) - Get Campaign Scope And Entitlements +* [SetCampaignScopeAndEntitlements](docs/sdks/accessreviewsetupentitlement/README.md#setcampaignscopeandentitlements) - Set Campaign Scope And Entitlements +* [SetCampaignScopeByResourceType](docs/sdks/accessreviewsetupentitlement/README.md#setcampaignscopebyresourcetype) - Set Campaign Scope By Resource Type + ### [AccessReviewTemplate](docs/sdks/accessreviewtemplate/README.md) * [Create](docs/sdks/accessreviewtemplate/README.md#create) - Create @@ -96,6 +109,12 @@ func main() { * [Get](docs/sdks/accessreviewtemplate/README.md#get) - Get * [Update](docs/sdks/accessreviewtemplate/README.md#update) - Update +### [AccessReviewTemplateSetupEntitlement](docs/sdks/accessreviewtemplatesetupentitlement/README.md) + +* [GetScopeAndEntitlements](docs/sdks/accessreviewtemplatesetupentitlement/README.md#getscopeandentitlements) - Get Scope And Entitlements +* [SetScopeAndEntitlements](docs/sdks/accessreviewtemplatesetupentitlement/README.md#setscopeandentitlements) - Set Scope And Entitlements +* [SetScopeByResourceType](docs/sdks/accessreviewtemplatesetupentitlement/README.md#setscopebyresourcetype) - Set Scope By Resource Type + ### [AccountProvisionPolicyTest](docs/sdks/accountprovisionpolicytest/README.md) * [Test](docs/sdks/accountprovisionpolicytest/README.md#test) - Test @@ -121,6 +140,12 @@ func main() { * [Remove](docs/sdks/appentitlementowners/README.md#remove) - Remove * [Set](docs/sdks/appentitlementowners/README.md#set) - Set +### [AppEntitlementOwnersV2](docs/sdks/appentitlementownersv2/README.md) + +* [SearchEntitlementOwners](docs/sdks/appentitlementownersv2/README.md#searchentitlementowners) - Search Entitlement Owners +* [SearchUserOwners](docs/sdks/appentitlementownersv2/README.md#searchuserowners) - Search User Owners +* [Set](docs/sdks/appentitlementownersv2/README.md#set) - Set + ### [AppEntitlements](docs/sdks/appentitlements/README.md) * [AddAutomationExclusion](docs/sdks/appentitlements/README.md#addautomationexclusion) - Add Automation Exclusion @@ -171,6 +196,18 @@ func main() { * [Remove](docs/sdks/appowners/README.md#remove) - Remove * [Set](docs/sdks/appowners/README.md#set) - Set +### [AppOwnersV2](docs/sdks/appownersv2/README.md) + +* [CreateEntitlementOwner](docs/sdks/appownersv2/README.md#createentitlementowner) - Create Entitlement Owner +* [CreateUserOwner](docs/sdks/appownersv2/README.md#createuserowner) - Create User Owner +* [DeleteEntitlementOwner](docs/sdks/appownersv2/README.md#deleteentitlementowner) - Delete Entitlement Owner +* [DeleteUserOwner](docs/sdks/appownersv2/README.md#deleteuserowner) - Delete User Owner +* [GetEntitlementOwner](docs/sdks/appownersv2/README.md#getentitlementowner) - Get Entitlement Owner +* [GetUserOwner](docs/sdks/appownersv2/README.md#getuserowner) - Get User Owner +* [SearchEntitlementOwners](docs/sdks/appownersv2/README.md#searchentitlementowners) - Search Entitlement Owners +* [SearchUserOwners](docs/sdks/appownersv2/README.md#searchuserowners) - Search User Owners +* [Set](docs/sdks/appownersv2/README.md#set) - Set + ### [AppReport](docs/sdks/appreport/README.md) * [List](docs/sdks/appreport/README.md#list) - List @@ -220,6 +257,7 @@ func main() { ### [AppSearch](docs/sdks/appsearch/README.md) * [Search](docs/sdks/appsearch/README.md#search) - Search +* [SearchUserOwnership](docs/sdks/appsearch/README.md#searchuserownership) - Search User Ownership ### [AppUsageControls](docs/sdks/appusagecontrols/README.md) @@ -260,11 +298,13 @@ func main() { ### [Automation](docs/sdks/automation/README.md) +* [ClearAutomationCircuitBreaker](docs/sdks/automation/README.md#clearautomationcircuitbreaker) - Clear Automation Circuit Breaker * [CreateAutomation](docs/sdks/automation/README.md#createautomation) - Create Automation * [DeleteAutomation](docs/sdks/automation/README.md#deleteautomation) - Delete Automation * [ExecuteAutomation](docs/sdks/automation/README.md#executeautomation) - Execute Automation * [GetAutomation](docs/sdks/automation/README.md#getautomation) - Get Automation * [ListAutomations](docs/sdks/automation/README.md#listautomations) - List Automations +* [ResolvePausedAutomationExecutions](docs/sdks/automation/README.md#resolvepausedautomationexecutions) - Resolve Paused Automation Executions * [UpdateAutomation](docs/sdks/automation/README.md#updateautomation) - Update Automation ### [AutomationExecution](docs/sdks/automationexecution/README.md) @@ -278,6 +318,7 @@ func main() { ### [AutomationExecutionSearch](docs/sdks/automationexecutionsearch/README.md) +* [SearchAllAutomationExecutions](docs/sdks/automationexecutionsearch/README.md#searchallautomationexecutions) - Search All Automation Executions * [SearchAutomationExecutions](docs/sdks/automationexecutionsearch/README.md#searchautomationexecutions) - Search Automation Executions ### [AutomationSearch](docs/sdks/automationsearch/README.md) @@ -313,6 +354,17 @@ func main() { * [ConfigurationSchema](docs/sdks/connectorcatalog/README.md#configurationschema) - Configuration Schema +### [ConnectorOwnersV2](docs/sdks/connectorownersv2/README.md) + +* [SearchEntitlementOwners](docs/sdks/connectorownersv2/README.md#searchentitlementowners) - Search Entitlement Owners +* [SearchUserOwners](docs/sdks/connectorownersv2/README.md#searchuserowners) - Search User Owners +* [Set](docs/sdks/connectorownersv2/README.md#set) - Set + +### [Contacts](docs/sdks/contacts/README.md) + +* [GetContacts](docs/sdks/contacts/README.md#getcontacts) - Get Contacts +* [UpdateContacts](docs/sdks/contacts/README.md#updatecontacts) - Update Contacts + ### [Directory](docs/sdks/directory/README.md) * [Create](docs/sdks/directory/README.md#create) - Create @@ -334,17 +386,45 @@ func main() { * [Search](docs/sdks/exportssearch/README.md#search) - Search +### [ExternalClientSearch](docs/sdks/externalclientsearch/README.md) + +* [Search](docs/sdks/externalclientsearch/README.md#search) - NOTE: Searches external client grants for all users + +### [Finding](docs/sdks/finding/README.md) + +* [BulkCreateFindingTasks](docs/sdks/finding/README.md#bulkcreatefindingtasks) - Bulk Create Finding Tasks +* [BulkUpdateFindingState](docs/sdks/finding/README.md#bulkupdatefindingstate) - Bulk Update Finding State +* [CreateFindingTask](docs/sdks/finding/README.md#createfindingtask) - Create Finding Task +* [GetFinding](docs/sdks/finding/README.md#getfinding) - Get Finding +* [UpdateFindingState](docs/sdks/finding/README.md#updatefindingstate) - Update Finding State + +### [FindingRoutingRule](docs/sdks/findingroutingrule/README.md) + +* [CreateFindingRoutingRule](docs/sdks/findingroutingrule/README.md#createfindingroutingrule) - Create Finding Routing Rule +* [DeleteFindingRoutingRule](docs/sdks/findingroutingrule/README.md#deletefindingroutingrule) - Delete Finding Routing Rule +* [GetFindingRoutingRule](docs/sdks/findingroutingrule/README.md#getfindingroutingrule) - Get Finding Routing Rule +* [ListFindingRoutingRules](docs/sdks/findingroutingrule/README.md#listfindingroutingrules) - List Finding Routing Rules +* [UpdateFindingRoutingRule](docs/sdks/findingroutingrule/README.md#updatefindingroutingrule) - Update Finding Routing Rule + +### [FindingSearch](docs/sdks/findingsearch/README.md) + +* [Search](docs/sdks/findingsearch/README.md#search) - Search + ### [Functions](docs/sdks/functions/README.md) +* [CreateFinalCommit](docs/sdks/functions/README.md#createfinalcommit) - Create Final Commit * [CreateFunction](docs/sdks/functions/README.md#createfunction) - Create Function +* [CreateInitialCommit](docs/sdks/functions/README.md#createinitialcommit) - Create Initial Commit * [CreateTag](docs/sdks/functions/README.md#createtag) - Create Tag * [DeleteFunction](docs/sdks/functions/README.md#deletefunction) - Delete Function +* [GetCommitContent](docs/sdks/functions/README.md#getcommitcontent) - Get Commit Content * [GetFunction](docs/sdks/functions/README.md#getfunction) - Get Function -* [GetFunctionSecretEncryptionKey](docs/sdks/functions/README.md#getfunctionsecretencryptionkey) - Get Function Secret Encryption Key +* [GetLockFile](docs/sdks/functions/README.md#getlockfile) - Get Lock File * [Invoke](docs/sdks/functions/README.md#invoke) - Invoke * [ListCommits](docs/sdks/functions/README.md#listcommits) - List Commits * [ListFunctions](docs/sdks/functions/README.md#listfunctions) - List Functions * [ListTags](docs/sdks/functions/README.md#listtags) - List Tags +* [Test](docs/sdks/functions/README.md#test) - Test * [UpdateFunction](docs/sdks/functions/README.md#updatefunction) - Update Function ### [FunctionsInvocation](docs/sdks/functionsinvocation/README.md) @@ -352,15 +432,75 @@ func main() { * [Get](docs/sdks/functionsinvocation/README.md#get) - Get * [List](docs/sdks/functionsinvocation/README.md#list) - List +### [FunctionsInvocationSearch](docs/sdks/functionsinvocationsearch/README.md) + +* [Search](docs/sdks/functionsinvocationsearch/README.md#search) - Search + ### [FunctionsSearch](docs/sdks/functionssearch/README.md) * [Search](docs/sdks/functionssearch/README.md#search) - Search +### [Hooks](docs/sdks/hooks/README.md) + +* [Create](docs/sdks/hooks/README.md#create) - Create +* [Delete](docs/sdks/hooks/README.md#delete) - Delete +* [Get](docs/sdks/hooks/README.md#get) - Get +* [List](docs/sdks/hooks/README.md#list) - List +* [Update](docs/sdks/hooks/README.md#update) - Update + +### [HooksSearch](docs/sdks/hookssearch/README.md) + +* [Search](docs/sdks/hookssearch/README.md#search) - Search + +### [LocalDirectoryConfig](docs/sdks/localdirectoryconfig/README.md) + +* [Create](docs/sdks/localdirectoryconfig/README.md#create) - Create +* [Delete](docs/sdks/localdirectoryconfig/README.md#delete) - Delete +* [Get](docs/sdks/localdirectoryconfig/README.md#get) - Get +* [List](docs/sdks/localdirectoryconfig/README.md#list) - List +* [Update](docs/sdks/localdirectoryconfig/README.md#update) - Update + +### [LocalUserInvitation](docs/sdks/localuserinvitation/README.md) + +* [Create](docs/sdks/localuserinvitation/README.md#create) - Create +* [Get](docs/sdks/localuserinvitation/README.md#get) - Get +* [Revoke](docs/sdks/localuserinvitation/README.md#revoke) - Revoke +* [Search](docs/sdks/localuserinvitation/README.md#search) - Search + +### [OnboardingSettings](docs/sdks/onboardingsettings/README.md) + +* [Get](docs/sdks/onboardingsettings/README.md#get) - Get +* [Update](docs/sdks/onboardingsettings/README.md#update) - Update + ### [OrgDomain](docs/sdks/orgdomain/README.md) * [List](docs/sdks/orgdomain/README.md#list) - List * [Update](docs/sdks/orgdomain/README.md#update) - Update +### [OrgNotificationSettings](docs/sdks/orgnotificationsettings/README.md) + +* [Get](docs/sdks/orgnotificationsettings/README.md#get) - Get +* [Update](docs/sdks/orgnotificationsettings/README.md#update) - Update + +### [PaperSecret](docs/sdks/papersecret/README.md) + +* [CreateExternal](docs/sdks/papersecret/README.md#createexternal) - Create External +* [CreateInternal](docs/sdks/papersecret/README.md#createinternal) - Create Internal +* [Get](docs/sdks/papersecret/README.md#get) - Get +* [GetByShareCode](docs/sdks/papersecret/README.md#getbysharecode) - Get By Share Code +* [GetContent](docs/sdks/papersecret/README.md#getcontent) - Get Content +* [Revoke](docs/sdks/papersecret/README.md#revoke) - Revoke +* [SearchAuditEvents](docs/sdks/papersecret/README.md#searchauditevents) - Search Audit Events +* [SearchMySecrets](docs/sdks/papersecret/README.md#searchmysecrets) - Search My Secrets +* [SetTextContent](docs/sdks/papersecret/README.md#settextcontent) - Set Text Content + +### [PaperSecretAdmin](docs/sdks/papersecretadmin/README.md) + +* [Get](docs/sdks/papersecretadmin/README.md#get) - Get +* [Revoke](docs/sdks/papersecretadmin/README.md#revoke) - Revoke +* [Search](docs/sdks/papersecretadmin/README.md#search) - Search +* [SearchAuditEvents](docs/sdks/papersecretadmin/README.md#searchauditevents) - Search Audit Events + ### [PersonalClient](docs/sdks/personalclient/README.md) * [Create](docs/sdks/personalclient/README.md#create) - Create @@ -389,6 +529,22 @@ func main() { * [ValidateCEL](docs/sdks/policyvalidate/README.md#validatecel) - Validate Cel +### [Principal](docs/sdks/principal/README.md) + +* [AddBinding](docs/sdks/principal/README.md#addbinding) - Add Binding +* [Create](docs/sdks/principal/README.md#create) - Create +* [CreateCredential](docs/sdks/principal/README.md#createcredential) - Create Credential +* [Delete](docs/sdks/principal/README.md#delete) - Delete +* [DeleteBinding](docs/sdks/principal/README.md#deletebinding) - Delete Binding +* [Get](docs/sdks/principal/README.md#get) - Get +* [GetCredential](docs/sdks/principal/README.md#getcredential) - Get Credential +* [List](docs/sdks/principal/README.md#list) - List +* [ListBindings](docs/sdks/principal/README.md#listbindings) - List Bindings +* [ListCredentials](docs/sdks/principal/README.md#listcredentials) - List Credentials +* [RevokeCredential](docs/sdks/principal/README.md#revokecredential) - Revoke Credential +* [Update](docs/sdks/principal/README.md#update) - Update +* [UpdateCredential](docs/sdks/principal/README.md#updatecredential) - Update Credential + ### [RequestCatalogManagement](docs/sdks/requestcatalogmanagement/README.md) * [AddAccessEntitlements](docs/sdks/requestcatalogmanagement/README.md#addaccessentitlements) - Add Access Entitlements @@ -428,6 +584,25 @@ func main() { * [RemoveEntitlementBinding](docs/sdks/requestschema/README.md#removeentitlementbinding) - Remove Entitlement Binding * [Update](docs/sdks/requestschema/README.md#update) - Update +### [RoleMiningManagement](docs/sdks/roleminingmanagement/README.md) + +* [CreateAccessProfileFromCohort](docs/sdks/roleminingmanagement/README.md#createaccessprofilefromcohort) - Create Access Profile From Cohort +* [GetCustomAnalysisResult](docs/sdks/roleminingmanagement/README.md#getcustomanalysisresult) - Get Custom Analysis Result +* [GetLatestRun](docs/sdks/roleminingmanagement/README.md#getlatestrun) - Get Latest Run +* [GetRoleMiningConfig](docs/sdks/roleminingmanagement/README.md#getroleminingconfig) - Get Role Mining Config +* [GetSuggestion](docs/sdks/roleminingmanagement/README.md#getsuggestion) - Get Suggestion +* [ListRuns](docs/sdks/roleminingmanagement/README.md#listruns) - List Runs +* [ListSuggestions](docs/sdks/roleminingmanagement/README.md#listsuggestions) - List Suggestions +* [SearchCohortUsers](docs/sdks/roleminingmanagement/README.md#searchcohortusers) - Search Cohort Users +* [TriggerAnalysis](docs/sdks/roleminingmanagement/README.md#triggeranalysis) - Trigger Analysis +* [TriggerCustomAnalysis](docs/sdks/roleminingmanagement/README.md#triggercustomanalysis) - Trigger Custom Analysis +* [UpdateRoleMiningConfig](docs/sdks/roleminingmanagement/README.md#updateroleminingconfig) - Update Role Mining Config +* [UpdateSuggestionState](docs/sdks/roleminingmanagement/README.md#updatesuggestionstate) - Update Suggestion State + +### [RoleMiningManagementSearch](docs/sdks/roleminingmanagementsearch/README.md) + +* [Search](docs/sdks/roleminingmanagementsearch/README.md#search) - Search + ### [Roles](docs/sdks/roles/README.md) * [Get](docs/sdks/roles/README.md#get) - Get @@ -440,6 +615,24 @@ func main() { * [TestSourceIP](docs/sdks/sessionsettings/README.md#testsourceip) - Test Source Ip * [Update](docs/sdks/sessionsettings/README.md#update) - Update +### [SSFReceiverEvent](docs/sdks/ssfreceiverevent/README.md) + +* [List](docs/sdks/ssfreceiverevent/README.md#list) - List + +### [SSFReceiverEventSearch](docs/sdks/ssfreceivereventsearch/README.md) + +* [Search](docs/sdks/ssfreceivereventsearch/README.md#search) - Search + +### [SSFReceiverStream](docs/sdks/ssfreceiverstream/README.md) + +* [Create](docs/sdks/ssfreceiverstream/README.md#create) - Create +* [Delete](docs/sdks/ssfreceiverstream/README.md#delete) - Delete +* [Get](docs/sdks/ssfreceiverstream/README.md#get) - Get +* [GetStats](docs/sdks/ssfreceiverstream/README.md#getstats) - Get Stats +* [List](docs/sdks/ssfreceiverstream/README.md#list) - List +* [Test](docs/sdks/ssfreceiverstream/README.md#test) - Test +* [Update](docs/sdks/ssfreceiverstream/README.md#update) - Update + ### [StepUpProvider](docs/sdks/stepupprovider/README.md) * [Create](docs/sdks/stepupprovider/README.md#create) - Create @@ -491,6 +684,22 @@ func main() { * [Search](docs/sdks/tasksearch/README.md#search) - Search +### [TenantAuthConfig](docs/sdks/tenantauthconfig/README.md) + +* [Create](docs/sdks/tenantauthconfig/README.md#create) - Create +* [Delete](docs/sdks/tenantauthconfig/README.md#delete) - Delete +* [Get](docs/sdks/tenantauthconfig/README.md#get) - Get +* [List](docs/sdks/tenantauthconfig/README.md#list) - List +* [Update](docs/sdks/tenantauthconfig/README.md#update) - Update + +### [TenantEmailProvider](docs/sdks/tenantemailprovider/README.md) + +* [Get](docs/sdks/tenantemailprovider/README.md#get) - Get +* [GetEmailCapabilities](docs/sdks/tenantemailprovider/README.md#getemailcapabilities) - Get Email Capabilities +* [SearchAuditEvents](docs/sdks/tenantemailprovider/README.md#searchauditevents) - Search Audit Events +* [Test](docs/sdks/tenantemailprovider/README.md#test) - Test +* [Update](docs/sdks/tenantemailprovider/README.md#update) - Update + ### [User](docs/sdks/user/README.md) * [Get](docs/sdks/user/README.md#get) - Get @@ -498,6 +707,11 @@ func main() { * [List](docs/sdks/user/README.md#list) - List * [SetExpiringUserDelegationBindingByAdmin](docs/sdks/user/README.md#setexpiringuserdelegationbindingbyadmin) - Set Expiring User Delegation Binding By Admin +### [UserNotificationSettings](docs/sdks/usernotificationsettings/README.md) + +* [Get](docs/sdks/usernotificationsettings/README.md#get) - Get +* [Update](docs/sdks/usernotificationsettings/README.md#update) - Update + ### [UserSearch](docs/sdks/usersearch/README.md) * [Search](docs/sdks/usersearch/README.md#search) - Search @@ -522,6 +736,22 @@ func main() { * [Search](docs/sdks/webhookssearch/README.md#search) - Search +### [WorkloadFederation](docs/sdks/workloadfederation/README.md) + +* [CreateProvider](docs/sdks/workloadfederation/README.md#createprovider) - Create Provider +* [CreateTrust](docs/sdks/workloadfederation/README.md#createtrust) - Create Trust +* [DeleteProvider](docs/sdks/workloadfederation/README.md#deleteprovider) - Delete Provider +* [DeleteTrust](docs/sdks/workloadfederation/README.md#deletetrust) - Delete Trust +* [GetProvider](docs/sdks/workloadfederation/README.md#getprovider) - Get Provider +* [GetTrust](docs/sdks/workloadfederation/README.md#gettrust) - Get Trust +* [ListProviders](docs/sdks/workloadfederation/README.md#listproviders) - List Providers +* [ListTrusts](docs/sdks/workloadfederation/README.md#listtrusts) - List Trusts +* [SearchTrusts](docs/sdks/workloadfederation/README.md#searchtrusts) - Search Trusts +* [TestCEL](docs/sdks/workloadfederation/README.md#testcel) - Test Cel +* [TestToken](docs/sdks/workloadfederation/README.md#testtoken) - Test Token +* [UpdateProvider](docs/sdks/workloadfederation/README.md#updateprovider) - Update Provider +* [UpdateTrust](docs/sdks/workloadfederation/README.md#updatetrust) - Update Trust +
@@ -692,6 +922,7 @@ package main import ( "context" conductoronesdkgo "github.com/conductorone/conductorone-sdk-go" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" "github.com/conductorone/conductorone-sdk-go/pkg/retry" "log" @@ -708,7 +939,9 @@ func main() { }), ) - res, err := s.AccessReview.Create(ctx, nil, operations.WithRetries( + res, err := s.A2UI.CreateSurfaceFeedback(ctx, operations.C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackRequest{ + SurfaceID: "", + }, operations.WithRetries( retry.Config{ Strategy: "backoff", Backoff: &retry.BackoffStrategy{ @@ -722,7 +955,7 @@ func main() { if err != nil { log.Fatal(err) } - if res.AccessReviewServiceCreateResponse != nil { + if res.A2UIServiceCreateSurfaceFeedbackResponse != nil { // handle response } } @@ -736,6 +969,7 @@ package main import ( "context" conductoronesdkgo "github.com/conductorone/conductorone-sdk-go" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" "github.com/conductorone/conductorone-sdk-go/pkg/retry" "log" @@ -762,11 +996,13 @@ func main() { }), ) - res, err := s.AccessReview.Create(ctx, nil) + res, err := s.A2UI.CreateSurfaceFeedback(ctx, operations.C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackRequest{ + SurfaceID: "", + }) if err != nil { log.Fatal(err) } - if res.AccessReviewServiceCreateResponse != nil { + if res.A2UIServiceCreateSurfaceFeedbackResponse != nil { // handle response } } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/RELEASES.md b/vendor/github.com/conductorone/conductorone-sdk-go/RELEASES.md index 27568f6f..6677a57d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/RELEASES.md +++ b/vendor/github.com/conductorone/conductorone-sdk-go/RELEASES.md @@ -88,4 +88,34 @@ Based on: ### Generated - [go v1.26.1] . ### Releases -- [Go v1.26.1] https://github.com/ConductorOne/conductorone-sdk-go/releases/tag/v1.26.1 - . \ No newline at end of file +- [Go v1.26.1] https://github.com/ConductorOne/conductorone-sdk-go/releases/tag/v1.26.1 - . + +## 2026-05-05 21:45:43 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.762.0 (2.882.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v1.28.0] . +### Releases +- [Go v1.28.0] https://github.com/ConductorOne/conductorone-sdk-go/releases/tag/v1.28.0 - . + +## 2026-05-06 00:49:24 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.762.0 (2.882.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v1.28.1] . +### Releases +- [Go v1.28.1] https://github.com/ConductorOne/conductorone-sdk-go/releases/tag/v1.28.1 - . + +## 2026-05-07 00:53:56 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.762.0 (2.882.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v1.28.2] . +### Releases +- [Go v1.28.2] https://github.com/ConductorOne/conductorone-sdk-go/releases/tag/v1.28.2 - . \ No newline at end of file diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/a2ui.go b/vendor/github.com/conductorone/conductorone-sdk-go/a2ui.go new file mode 100644 index 00000000..f7962a74 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/a2ui.go @@ -0,0 +1,865 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" +) + +type A2UI struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newA2UI(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *A2UI { + return &A2UI{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// CreateSurfaceFeedback - Create Surface Feedback +// CreateSurfaceFeedback submits feedback for a surface with a snapshot. +func (s *A2UI) CreateSurfaceFeedback(ctx context.Context, request operations.C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackRequest, opts ...operations.Option) (*operations.C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/a2ui/surfaces/{surface_id}/feedback", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.a2ui.v1.A2UIService.CreateSurfaceFeedback", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "A2UIServiceCreateSurfaceFeedbackRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.A2UIServiceCreateSurfaceFeedbackResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.A2UIServiceCreateSurfaceFeedbackResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// ListSurfaceFeedback - List Surface Feedback +// ListSurfaceFeedback lists feedback for a surface. +func (s *A2UI) ListSurfaceFeedback(ctx context.Context, request operations.C1APIA2uiV1A2UIServiceListSurfaceFeedbackRequest, opts ...operations.Option) (*operations.C1APIA2uiV1A2UIServiceListSurfaceFeedbackResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/a2ui/surfaces/{surface_id}/feedback", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.a2ui.v1.A2UIService.ListSurfaceFeedback", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIA2uiV1A2UIServiceListSurfaceFeedbackResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.A2UIServiceListSurfaceFeedbackResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.A2UIServiceListSurfaceFeedbackResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// ListSurfaces - List Surfaces +// ListSurfaces returns active surfaces for a conversation. +func (s *A2UI) ListSurfaces(ctx context.Context, request operations.C1APIA2uiV1A2UIServiceListSurfacesRequest, opts ...operations.Option) (*operations.C1APIA2uiV1A2UIServiceListSurfacesResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/a2ui/conversations/{conversation_id}/surfaces", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.a2ui.v1.A2UIService.ListSurfaces", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIA2uiV1A2UIServiceListSurfacesResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.A2UIServiceListSurfacesResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.A2UIServiceListSurfacesResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SubmitAction - Submit Action +// SubmitAction handles user actions on A2UI surfaces. +func (s *A2UI) SubmitAction(ctx context.Context, request operations.C1APIA2uiV1A2UIServiceSubmitActionRequest, opts ...operations.Option) (*operations.C1APIA2uiV1A2UIServiceSubmitActionResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/a2ui/surfaces/{surface_id}/actions", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.a2ui.v1.A2UIService.SubmitAction", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "A2UIServiceSubmitActionRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIA2uiV1A2UIServiceSubmitActionResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.A2UIServiceSubmitActionResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.A2UIServiceSubmitActionResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/accessconflict.go b/vendor/github.com/conductorone/conductorone-sdk-go/accessconflict.go index e0010947..abda825e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/accessconflict.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/accessconflict.go @@ -32,7 +32,7 @@ func newAccessConflict(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfigurati } // CreateMonitor - Create Monitor -// Invokes the c1.api.accessconflict.v1.AccessConflictService.CreateMonitor method. +// Create a new conflict monitor for defining a Separation of Duty rule. Entitlement sets are bound separately via AppEntitlementMonitorBindingService. func (s *AccessConflict) CreateMonitor(ctx context.Context, request *shared.ConflictMonitorCreateRequest, opts ...operations.Option) (*operations.C1APIAccessconflictV1AccessConflictServiceCreateMonitorResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -244,7 +244,7 @@ func (s *AccessConflict) CreateMonitor(ctx context.Context, request *shared.Conf } // DeleteMonitor - Delete Monitor -// Invokes the c1.api.accessconflict.v1.AccessConflictService.DeleteMonitor method. +// Delete a conflict monitor and its associated entitlement set bindings. func (s *AccessConflict) DeleteMonitor(ctx context.Context, request operations.C1APIAccessconflictV1AccessConflictServiceDeleteMonitorRequest, opts ...operations.Option) (*operations.C1APIAccessconflictV1AccessConflictServiceDeleteMonitorResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -456,7 +456,7 @@ func (s *AccessConflict) DeleteMonitor(ctx context.Context, request operations.C } // GetMonitor - Get Monitor -// Invokes the c1.api.accessconflict.v1.AccessConflictService.GetMonitor method. +// Retrieve a single conflict monitor by ID. func (s *AccessConflict) GetMonitor(ctx context.Context, request operations.C1APIAccessconflictV1AccessConflictServiceGetMonitorRequest, opts ...operations.Option) (*operations.C1APIAccessconflictV1AccessConflictServiceGetMonitorResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -661,7 +661,7 @@ func (s *AccessConflict) GetMonitor(ctx context.Context, request operations.C1AP } // UpdateMonitor - Update Monitor -// Invokes the c1.api.accessconflict.v1.AccessConflictService.UpdateMonitor method. +// Update the display name, description, or notification settings of a conflict monitor. func (s *AccessConflict) UpdateMonitor(ctx context.Context, request operations.C1APIAccessconflictV1AccessConflictServiceUpdateMonitorRequest, opts ...operations.Option) (*operations.C1APIAccessconflictV1AccessConflictServiceUpdateMonitorResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/accessreview.go b/vendor/github.com/conductorone/conductorone-sdk-go/accessreview.go index 2cbf086b..1f7f65f7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/accessreview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/accessreview.go @@ -32,7 +32,7 @@ func newAccessReview(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration } // Create -// Invokes the c1.api.accessreview.v1.AccessReviewService.Create method. +// Create creates a new access review campaign with the specified name, policy, and owners. func (s *AccessReview) Create(ctx context.Context, request *shared.AccessReviewServiceCreateRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewServiceCreateResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -244,7 +244,7 @@ func (s *AccessReview) Create(ctx context.Context, request *shared.AccessReviewS } // Delete -// Invokes the c1.api.accessreview.v1.AccessReviewService.Delete method. +// Delete transitions an access review campaign to the deleted state, along with its dependent objects. func (s *AccessReview) Delete(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewServiceDeleteRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewServiceDeleteResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -456,7 +456,7 @@ func (s *AccessReview) Delete(ctx context.Context, request operations.C1APIAcces } // Get -// Invokes the c1.api.accessreview.v1.AccessReviewService.Get method. +// Get retrieves a single access review campaign by ID. func (s *AccessReview) Get(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewServiceGetRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewServiceGetResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -661,7 +661,7 @@ func (s *AccessReview) Get(ctx context.Context, request operations.C1APIAccessre } // List -// Invokes the c1.api.accessreview.v1.AccessReviewService.List method. +// List returns a paginated list of access review campaigns. func (s *AccessReview) List(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewServiceListRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewServiceListResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -870,7 +870,7 @@ func (s *AccessReview) List(ctx context.Context, request operations.C1APIAccessr } // Update -// Invokes the c1.api.accessreview.v1.AccessReviewService.Update method. +// Update modifies an existing access review campaign. Use the update_mask to specify which fields to change. func (s *AccessReview) Update(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/accessreviewsetupentitlement.go b/vendor/github.com/conductorone/conductorone-sdk-go/accessreviewsetupentitlement.go new file mode 100644 index 00000000..f88623f5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/accessreviewsetupentitlement.go @@ -0,0 +1,660 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" +) + +type AccessReviewSetupEntitlement struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newAccessReviewSetupEntitlement(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *AccessReviewSetupEntitlement { + return &AccessReviewSetupEntitlement{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// GetCampaignScopeAndEntitlements - Get Campaign Scope And Entitlements +// GetCampaignScopeAndEntitlements retrieves the current scope configuration and selected entitlements for an access review campaign. +func (s *AccessReviewSetupEntitlement) GetCampaignScopeAndEntitlements(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewSetupEntitlementServiceGetCampaignScopeAndEntitlementsRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewSetupEntitlementServiceGetCampaignScopeAndEntitlementsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/access_review/{access_review_id}/scope_and_entitlements", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.accessreview.v1.AccessReviewSetupEntitlementService.GetCampaignScopeAndEntitlements", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAccessreviewV1AccessReviewSetupEntitlementServiceGetCampaignScopeAndEntitlementsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.AccessReviewSetupEntitlementAndScopeServiceSetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.AccessReviewSetupEntitlementAndScopeServiceSetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SetCampaignScopeAndEntitlements - Set Campaign Scope And Entitlements +// SetCampaignScopeAndEntitlements replaces the scope configuration and selected entitlements for an access review campaign. +func (s *AccessReviewSetupEntitlement) SetCampaignScopeAndEntitlements(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/access_review/{access_review_id}/scope_and_entitlements", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.accessreview.v1.AccessReviewSetupEntitlementService.SetCampaignScopeAndEntitlements", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "AccessReviewSetupEntitlementAndScopeServiceSetRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.AccessReviewSetupEntitlementAndScopeServiceSetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.AccessReviewSetupEntitlementAndScopeServiceSetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SetCampaignScopeByResourceType - Set Campaign Scope By Resource Type +// SetCampaignScopeByResourceType sets the campaign scope by selecting specific resource types to include in the review. +func (s *AccessReviewSetupEntitlement) SetCampaignScopeByResourceType(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/access_review/{access_review_id}/scope_by_resource_type", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.accessreview.v1.AccessReviewSetupEntitlementService.SetCampaignScopeByResourceType", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "AccessReviewSetScopeByResourceTypeRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.AccessReviewSetScopeByResourceTypeResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.AccessReviewSetScopeByResourceTypeResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/accessreviewtemplate.go b/vendor/github.com/conductorone/conductorone-sdk-go/accessreviewtemplate.go index 22aa9ad8..459d28e6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/accessreviewtemplate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/accessreviewtemplate.go @@ -32,7 +32,7 @@ func newAccessReviewTemplate(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfi } // Create -// Invokes the c1.api.accessreview.v1.AccessReviewTemplateService.Create method. +// Create creates a new access review template that defines a reusable configuration for launching campaigns. func (s *AccessReviewTemplate) Create(ctx context.Context, request *shared.AccessReviewTemplateServiceCreateRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewTemplateServiceCreateResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -244,7 +244,7 @@ func (s *AccessReviewTemplate) Create(ctx context.Context, request *shared.Acces } // Delete -// Invokes the c1.api.accessreview.v1.AccessReviewTemplateService.Delete method. +// Delete an access review template. The template can no longer be used to create campaigns. func (s *AccessReviewTemplate) Delete(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewTemplateServiceDeleteRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewTemplateServiceDeleteResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -456,7 +456,7 @@ func (s *AccessReviewTemplate) Delete(ctx context.Context, request operations.C1 } // Get -// Invokes the c1.api.accessreview.v1.AccessReviewTemplateService.Get method. +// Get retrieves a single access review template by ID. func (s *AccessReviewTemplate) Get(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewTemplateServiceGetRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewTemplateServiceGetResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -661,7 +661,7 @@ func (s *AccessReviewTemplate) Get(ctx context.Context, request operations.C1API } // Update -// Invokes the c1.api.accessreview.v1.AccessReviewTemplateService.Update method. +// Update modifies an existing access review template. Use the update_mask to specify which fields to change. func (s *AccessReviewTemplate) Update(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewTemplateServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewTemplateServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/accessreviewtemplatesetupentitlement.go b/vendor/github.com/conductorone/conductorone-sdk-go/accessreviewtemplatesetupentitlement.go new file mode 100644 index 00000000..721505a0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/accessreviewtemplatesetupentitlement.go @@ -0,0 +1,660 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" +) + +type AccessReviewTemplateSetupEntitlement struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newAccessReviewTemplateSetupEntitlement(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *AccessReviewTemplateSetupEntitlement { + return &AccessReviewTemplateSetupEntitlement{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// GetScopeAndEntitlements - Get Scope And Entitlements +// GetScopeAndEntitlements retrieves the current scope configuration and selected entitlements for an access review template. +func (s *AccessReviewTemplateSetupEntitlement) GetScopeAndEntitlements(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceGetScopeAndEntitlementsRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceGetScopeAndEntitlementsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/access_review_template/{access_review_template_id}/scope_and_entitlements", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.accessreview.v1.AccessReviewTemplateSetupEntitlementService.GetScopeAndEntitlements", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceGetScopeAndEntitlementsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.AccessReviewTemplateSetupEntitlementServiceSetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.AccessReviewTemplateSetupEntitlementServiceSetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SetScopeAndEntitlements - Set Scope And Entitlements +// SetScopeAndEntitlements replaces the scope configuration and selected entitlements for an access review template. +func (s *AccessReviewTemplateSetupEntitlement) SetScopeAndEntitlements(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/access_review_template/{access_review_template_id}/scope_and_entitlements", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.accessreview.v1.AccessReviewTemplateSetupEntitlementService.SetScopeAndEntitlements", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "AccessReviewTemplateSetupEntitlementServiceSetRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.AccessReviewTemplateSetupEntitlementServiceSetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.AccessReviewTemplateSetupEntitlementServiceSetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SetScopeByResourceType - Set Scope By Resource Type +// SetScopeByResourceType sets the template scope by selecting specific resource types to include in campaigns created from this template. +func (s *AccessReviewTemplateSetupEntitlement) SetScopeByResourceType(ctx context.Context, request operations.C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeRequest, opts ...operations.Option) (*operations.C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/access_review_template/{access_review_template_id}/scope_by_resource_type", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.accessreview.v1.AccessReviewTemplateSetupEntitlementService.SetScopeByResourceType", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "AccessReviewTemplateSetScopeByResourceTypeRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.AccessReviewTemplateSetScopeByResourceTypeResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.AccessReviewTemplateSetScopeByResourceTypeResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/accountprovisionpolicytest.go b/vendor/github.com/conductorone/conductorone-sdk-go/accountprovisionpolicytest.go index 45ee0903..7aada44b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/accountprovisionpolicytest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/accountprovisionpolicytest.go @@ -32,7 +32,7 @@ func newAccountProvisionPolicyTest(rootSDK *ConductoroneAPI, sdkConfig config.SD } // Test -// Invokes the c1.api.policy.v1.AccountProvisionPolicyTest.Test method. +// Test an account provision policy by evaluating a CEL expression and returning the computed result. func (s *AccountProvisionPolicyTest) Test(ctx context.Context, request *shared.TestAccountProvisionPolicyRequest, opts ...operations.Option) (*operations.C1APIPolicyV1AccountProvisionPolicyTestTestResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appaccessrequestsdefaults.go b/vendor/github.com/conductorone/conductorone-sdk-go/appaccessrequestsdefaults.go index c52a2b10..cd1df665 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appaccessrequestsdefaults.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appaccessrequestsdefaults.go @@ -31,7 +31,7 @@ func newAppAccessRequestsDefaults(rootSDK *ConductoroneAPI, sdkConfig config.SDK } // CancelAppAccessRequestsDefaults - Cancel App Access Requests Defaults -// Invokes the c1.api.app.v1.AppAccessRequestsDefaultsService.CancelAppAccessRequestsDefaults method. +// Cancel an in-progress apply operation for the app's access request defaults. func (s *AppAccessRequestsDefaults) CancelAppAccessRequestsDefaults(ctx context.Context, request operations.C1APIAppV1AppAccessRequestsDefaultsServiceCancelAppAccessRequestsDefaultsRequest, opts ...operations.Option) (*operations.C1APIAppV1AppAccessRequestsDefaultsServiceCancelAppAccessRequestsDefaultsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -243,7 +243,7 @@ func (s *AppAccessRequestsDefaults) CancelAppAccessRequestsDefaults(ctx context. } // CreateAppAccessRequestsDefaults - Create App Access Requests Defaults -// Invokes the c1.api.app.v1.AppAccessRequestsDefaultsService.CreateAppAccessRequestsDefaults method. +// Create or replace the access request default settings for an app. func (s *AppAccessRequestsDefaults) CreateAppAccessRequestsDefaults(ctx context.Context, request operations.C1APIAppV1AppAccessRequestsDefaultsServiceCreateAppAccessRequestsDefaultsRequest, opts ...operations.Option) (*operations.C1APIAppV1AppAccessRequestsDefaultsServiceCreateAppAccessRequestsDefaultsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -455,7 +455,7 @@ func (s *AppAccessRequestsDefaults) CreateAppAccessRequestsDefaults(ctx context. } // GetAppAccessRequestsDefaults - Get App Access Requests Defaults -// Invokes the c1.api.app.v1.AppAccessRequestsDefaultsService.GetAppAccessRequestsDefaults method. +// Retrieve the current access request default settings for an app. func (s *AppAccessRequestsDefaults) GetAppAccessRequestsDefaults(ctx context.Context, request operations.C1APIAppV1AppAccessRequestsDefaultsServiceGetAppAccessRequestsDefaultsRequest, opts ...operations.Option) (*operations.C1APIAppV1AppAccessRequestsDefaultsServiceGetAppAccessRequestsDefaultsResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementmonitorbinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementmonitorbinding.go index c93aaa6f..b404e38e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementmonitorbinding.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementmonitorbinding.go @@ -32,7 +32,7 @@ func newAppEntitlementMonitorBinding(rootSDK *ConductoroneAPI, sdkConfig config. } // CreateAppEntitlementMonitorBinding - Create App Entitlement Monitor Binding -// Invokes the c1.api.accessconflict.v1.AppEntitlementMonitorBindingService.CreateAppEntitlementMonitorBinding method. +// Bind an app entitlement to one side (A or B) of a conflict monitor. func (s *AppEntitlementMonitorBinding) CreateAppEntitlementMonitorBinding(ctx context.Context, request *shared.CreateAppEntitlementMonitorBindingRequest, opts ...operations.Option) (*operations.C1APIAccessconflictV1AppEntitlementMonitorBindingServiceCreateAppEntitlementMonitorBindingResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -244,7 +244,7 @@ func (s *AppEntitlementMonitorBinding) CreateAppEntitlementMonitorBinding(ctx co } // DeleteAppEntitlementMonitorBinding - Delete App Entitlement Monitor Binding -// Invokes the c1.api.accessconflict.v1.AppEntitlementMonitorBindingService.DeleteAppEntitlementMonitorBinding method. +// Remove an app entitlement from a conflict monitor's entitlement set. func (s *AppEntitlementMonitorBinding) DeleteAppEntitlementMonitorBinding(ctx context.Context, request *shared.DeleteAppEntitlementMonitorBindingRequest, opts ...operations.Option) (*operations.C1APIAccessconflictV1AppEntitlementMonitorBindingServiceDeleteAppEntitlementMonitorBindingResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -456,7 +456,7 @@ func (s *AppEntitlementMonitorBinding) DeleteAppEntitlementMonitorBinding(ctx co } // GetAppEntitlementMonitorBinding - Get App Entitlement Monitor Binding -// Invokes the c1.api.accessconflict.v1.AppEntitlementMonitorBindingService.GetAppEntitlementMonitorBinding method. +// Retrieve a single binding that associates an app entitlement with one side of a conflict monitor. func (s *AppEntitlementMonitorBinding) GetAppEntitlementMonitorBinding(ctx context.Context, request *shared.GetAppEntitlementMonitorBindingRequest, opts ...operations.Option) (*operations.C1APIAccessconflictV1AppEntitlementMonitorBindingServiceGetAppEntitlementMonitorBindingResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementownersv2.go b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementownersv2.go new file mode 100644 index 00000000..4a74197e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementownersv2.go @@ -0,0 +1,661 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" +) + +type AppEntitlementOwnersV2 struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newAppEntitlementOwnersV2(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *AppEntitlementOwnersV2 { + return &AppEntitlementOwnersV2{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// SearchEntitlementOwners - Search Entitlement Owners +// SearchEntitlementOwners searches for the entitlement ownership for an app entitlement. +func (s *AppEntitlementOwnersV2) SearchEntitlementOwners(ctx context.Context, request operations.C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersRequest, opts ...operations.Option) (*operations.C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/entitlements/{entitlement_id}/owners/entitlements", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppEntitlementOwners.SearchEntitlementOwners", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SearchAppEntitlementEntitlementOwnersResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SearchAppEntitlementEntitlementOwnersResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SearchUserOwners - Search User Owners +// SearchUserOwners searches for users who are owners of this app entitlement. +func (s *AppEntitlementOwnersV2) SearchUserOwners(ctx context.Context, request operations.C1APIAppV2AppEntitlementOwnersSearchUserOwnersRequest, opts ...operations.Option) (*operations.C1APIAppV2AppEntitlementOwnersSearchUserOwnersResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/entitlements/{entitlement_id}/owners/users", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppEntitlementOwners.SearchUserOwners", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppEntitlementOwnersSearchUserOwnersResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SearchAppEntitlementUserOwnersResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SearchAppEntitlementUserOwnersResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Set +// Set replaces all owners for a given app entitlement and role. +func (s *AppEntitlementOwnersV2) Set(ctx context.Context, request operations.C1APIAppV2AppEntitlementOwnersSetRequest, opts ...operations.Option) (*operations.C1APIAppV2AppEntitlementOwnersSetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/entitlements/{entitlement_id}/owners", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppEntitlementOwners.Set", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SetAppEntitlementOwnersV2Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppEntitlementOwnersSetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SetAppEntitlementOwnersV2Response + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SetAppEntitlementOwnersV2Response = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlements.go index 98312d36..8bc4cad0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlements.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlements.go @@ -31,7 +31,7 @@ func newAppEntitlements(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfigurat } // AddAutomationExclusion - Add Automation Exclusion -// Invokes the c1.api.app.v1.AppEntitlements.AddAutomationExclusion method. +// Add users to the automation exclusion list for an app entitlement. Excluded users are not affected by the automation rule. func (s *AppEntitlements) AddAutomationExclusion(ctx context.Context, request operations.C1APIAppV1AppEntitlementsAddAutomationExclusionRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsAddAutomationExclusionResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -243,7 +243,7 @@ func (s *AppEntitlements) AddAutomationExclusion(ctx context.Context, request op } // AddManuallyManagedMembers - Add Manually Managed Members -// Invokes the c1.api.app.v1.AppEntitlements.AddManuallyManagedMembers method. +// Add users as manually managed members of an app entitlement. These memberships are tracked directly by ConductorOne rather than synced from the app. func (s *AppEntitlements) AddManuallyManagedMembers(ctx context.Context, request operations.C1APIAppV1AppEntitlementsAddManuallyManagedMembersRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsAddManuallyManagedMembersResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -455,7 +455,7 @@ func (s *AppEntitlements) AddManuallyManagedMembers(ctx context.Context, request } // Create -// Invokes the c1.api.app.v1.AppEntitlements.Create method. +// Create a new app entitlement for an app. This is used to define a custom permission, group, or role within the app. func (s *AppEntitlements) Create(ctx context.Context, request operations.C1APIAppV1AppEntitlementsCreateRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsCreateResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -667,7 +667,7 @@ func (s *AppEntitlements) Create(ctx context.Context, request operations.C1APIAp } // CreateAutomation - Create Automation -// Invokes the c1.api.app.v1.AppEntitlements.CreateAutomation method. +// Create an automation rule for an app entitlement. Automations automatically provision or revoke access based on defined conditions. func (s *AppEntitlements) CreateAutomation(ctx context.Context, request operations.C1APIAppV1AppEntitlementsCreateAutomationRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsCreateAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -879,7 +879,7 @@ func (s *AppEntitlements) CreateAutomation(ctx context.Context, request operatio } // Delete -// Invokes the c1.api.app.v1.AppEntitlements.Delete method. +// Delete an app entitlement by ID. func (s *AppEntitlements) Delete(ctx context.Context, request operations.C1APIAppV1AppEntitlementsDeleteRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsDeleteResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1091,7 +1091,7 @@ func (s *AppEntitlements) Delete(ctx context.Context, request operations.C1APIAp } // DeleteAutomation - Delete Automation -// Invokes the c1.api.app.v1.AppEntitlements.DeleteAutomation method. +// Delete the automation rule for an app entitlement. func (s *AppEntitlements) DeleteAutomation(ctx context.Context, request operations.C1APIAppV1AppEntitlementsDeleteAutomationRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsDeleteAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1508,7 +1508,7 @@ func (s *AppEntitlements) Get(ctx context.Context, request operations.C1APIAppV1 } // GetAutomation - Get Automation -// Invokes the c1.api.app.v1.AppEntitlements.GetAutomation method. +// Get the automation rule for an app entitlement. func (s *AppEntitlements) GetAutomation(ctx context.Context, request operations.C1APIAppV1AppEntitlementsGetAutomationRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsGetAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1922,7 +1922,7 @@ func (s *AppEntitlements) List(ctx context.Context, request operations.C1APIAppV } // ListAutomationExclusions - List Automation Exclusions -// Invokes the c1.api.app.v1.AppEntitlements.ListAutomationExclusions method. +// List users who are excluded from the automation rule for an app entitlement. func (s *AppEntitlements) ListAutomationExclusions(ctx context.Context, request operations.C1APIAppV1AppEntitlementsListAutomationExclusionsRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsListAutomationExclusionsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -2756,7 +2756,7 @@ func (s *AppEntitlements) ListUsers(ctx context.Context, request operations.C1AP } // RemoveAutomationExclusion - Remove Automation Exclusion -// Invokes the c1.api.app.v1.AppEntitlements.RemoveAutomationExclusion method. +// Remove users from the automation exclusion list for an app entitlement. func (s *AppEntitlements) RemoveAutomationExclusion(ctx context.Context, request operations.C1APIAppV1AppEntitlementsRemoveAutomationExclusionRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsRemoveAutomationExclusionResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -2968,7 +2968,7 @@ func (s *AppEntitlements) RemoveAutomationExclusion(ctx context.Context, request } // RemoveEntitlementMembership - Remove Entitlement Membership -// Invokes the c1.api.app.v1.AppEntitlements.RemoveEntitlementMembership method. +// Remove a user from a ConductorOne-managed entitlement (catalog, group, or profile type). For access profiles, this creates a revoke task to deprovision access. func (s *AppEntitlements) RemoveEntitlementMembership(ctx context.Context, request operations.C1APIAppV1AppEntitlementsRemoveEntitlementMembershipRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsRemoveEntitlementMembershipResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -3392,7 +3392,7 @@ func (s *AppEntitlements) Update(ctx context.Context, request operations.C1APIAp } // UpdateAutomation - Update Automation -// Invokes the c1.api.app.v1.AppEntitlements.UpdateAutomation method. +// Update the automation rule for an app entitlement, including its display name, description, and conditions. func (s *AppEntitlements) UpdateAutomation(ctx context.Context, request operations.C1APIAppV1AppEntitlementsUpdateAutomationRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsUpdateAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementsearch.go index a83b9823..f4821938 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementsearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementsearch.go @@ -235,37 +235,11 @@ func (s *AppEntitlementSearch) Search(ctx context.Context, request *shared.AppEn return nil, nil } } + request.PageToken = &nCVal return s.Search( ctx, - &shared.AppEntitlementSearchServiceSearchRequest{ - AppEntitlementExpandMask: request.AppEntitlementExpandMask, - AccessReviewID: request.AccessReviewID, - Alias: request.Alias, - AppIds: request.AppIds, - AppUserIds: request.AppUserIds, - ComplianceFrameworkIds: request.ComplianceFrameworkIds, - DisplayName: request.DisplayName, - ExcludeAppIds: request.ExcludeAppIds, - ExcludeAppUserIds: request.ExcludeAppUserIds, - ExcludeImmutable: request.ExcludeImmutable, - ExcludeResourceTypeIds: request.ExcludeResourceTypeIds, - ExcludedEntitlementRefs: request.ExcludedEntitlementRefs, - IncludeDeleted: request.IncludeDeleted, - IsAutomated: request.IsAutomated, - MembershipType: request.MembershipType, - OnlyGetExpiring: request.OnlyGetExpiring, - PageSize: request.PageSize, - PageToken: &nCVal, - PolicyRefs: request.PolicyRefs, - Query: request.Query, - Refs: request.Refs, - ResourceIds: request.ResourceIds, - ResourceTraitIds: request.ResourceTraitIds, - ResourceTypeIds: request.ResourceTypeIds, - RiskLevelIds: request.RiskLevelIds, - SourceConnectorID: request.SourceConnectorID, - }, + request, opts..., ) } @@ -317,7 +291,7 @@ func (s *AppEntitlementSearch) Search(ctx context.Context, request *shared.AppEn } // SearchAppEntitlementsForAppUser - Search App Entitlements For App User -// Invokes the c1.api.app.v1.AppEntitlementSearchService.SearchAppEntitlementsForAppUser method. +// Search for app entitlements associated with a specific app user, with optional resource type trait filtering. func (s *AppEntitlementSearch) SearchAppEntitlementsForAppUser(ctx context.Context, request operations.C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsForAppUserRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsForAppUserResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -735,7 +709,7 @@ func (s *AppEntitlementSearch) SearchAppEntitlementsWithExpired(ctx context.Cont } // SearchGrants - Search Grants -// Invokes the c1.api.app.v1.AppEntitlementSearchService.SearchGrants method. +// Search grants (user-to-entitlement bindings) across apps, with filters for app, user, resource type, and entitlement. func (s *AppEntitlementSearch) SearchGrants(ctx context.Context, request *shared.AppEntitlementSearchServiceSearchGrantsRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementSearchServiceSearchGrantsResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementsproxy.go b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementsproxy.go index bdd4c736..4fa995b7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementsproxy.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementsproxy.go @@ -31,7 +31,7 @@ func newAppEntitlementsProxy(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfi } // Create -// Invokes the c1.api.app.v1.AppEntitlementsProxy.Create method. +// Create a proxy binding between a source and destination entitlement, establishing a hierarchical relationship. func (s *AppEntitlementsProxy) Create(ctx context.Context, request operations.C1APIAppV1AppEntitlementsProxyCreateRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsProxyCreateResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -243,7 +243,7 @@ func (s *AppEntitlementsProxy) Create(ctx context.Context, request operations.C1 } // Delete -// Invokes the c1.api.app.v1.AppEntitlementsProxy.Delete method. +// Delete a proxy binding between a source and destination entitlement. func (s *AppEntitlementsProxy) Delete(ctx context.Context, request operations.C1APIAppV1AppEntitlementsProxyDeleteRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsProxyDeleteResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -455,7 +455,7 @@ func (s *AppEntitlementsProxy) Delete(ctx context.Context, request operations.C1 } // Get -// Invokes the c1.api.app.v1.AppEntitlementsProxy.Get method. +// Retrieve a specific proxy binding between a source and destination entitlement. func (s *AppEntitlementsProxy) Get(ctx context.Context, request operations.C1APIAppV1AppEntitlementsProxyGetRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementsProxyGetResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementuserbinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementuserbinding.go index c905667c..359d6a60 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementuserbinding.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appentitlementuserbinding.go @@ -237,7 +237,7 @@ func (s *AppEntitlementUserBinding) ListAppUsersForIdentityWithGrant(ctx context } // RemoveGrantDuration - Remove Grant Duration -// Invokes the c1.api.app.v1.AppEntitlementUserBindingService.RemoveGrantDuration method. +// Remove the expiration time from a grant, converting it to an indefinite (standing) grant. func (s *AppEntitlementUserBinding) RemoveGrantDuration(ctx context.Context, request operations.C1APIAppV1AppEntitlementUserBindingServiceRemoveGrantDurationRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementUserBindingServiceRemoveGrantDurationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -449,7 +449,7 @@ func (s *AppEntitlementUserBinding) RemoveGrantDuration(ctx context.Context, req } // SearchGrantFeed - Search Grant Feed -// Invokes the c1.api.app.v1.AppEntitlementUserBindingService.SearchGrantFeed method. +// Search a chronological feed of grant and revoke events, filtered by app user, entitlement, or time range. func (s *AppEntitlementUserBinding) SearchGrantFeed(ctx context.Context, request *shared.SearchGrantFeedRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementUserBindingServiceSearchGrantFeedResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -661,7 +661,7 @@ func (s *AppEntitlementUserBinding) SearchGrantFeed(ctx context.Context, request } // SearchPastGrants - Search Past Grants -// Invokes the c1.api.app.v1.AppEntitlementUserBindingService.SearchPastGrants method. +// Search historical grants that have been revoked, filtered by app user or entitlement. func (s *AppEntitlementUserBinding) SearchPastGrants(ctx context.Context, request *shared.SearchPastGrantsRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementUserBindingServiceSearchPastGrantsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -873,7 +873,7 @@ func (s *AppEntitlementUserBinding) SearchPastGrants(ctx context.Context, reques } // UpdateGrantDuration - Update Grant Duration -// Invokes the c1.api.app.v1.AppEntitlementUserBindingService.UpdateGrantDuration method. +// Update the expiration time of an existing grant, changing when automatic revocation will occur. func (s *AppEntitlementUserBinding) UpdateGrantDuration(ctx context.Context, request operations.C1APIAppV1AppEntitlementUserBindingServiceUpdateGrantDurationRequest, opts ...operations.Option) (*operations.C1APIAppV1AppEntitlementUserBindingServiceUpdateGrantDurationResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appownersv2.go b/vendor/github.com/conductorone/conductorone-sdk-go/appownersv2.go new file mode 100644 index 00000000..951ff6fb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appownersv2.go @@ -0,0 +1,1919 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" +) + +type AppOwnersV2 struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newAppOwnersV2(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *AppOwnersV2 { + return &AppOwnersV2{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// CreateEntitlementOwner - Create Entitlement Owner +// CreateEntitlementOwner creates an entitlement ownership source for an app. +func (s *AppOwnersV2) CreateEntitlementOwner(ctx context.Context, request operations.C1APIAppV2AppOwnersCreateEntitlementOwnerRequest, opts ...operations.Option) (*operations.C1APIAppV2AppOwnersCreateEntitlementOwnerResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/owners/entitlements/{role_slug}/{app_entitlement_ref_app_id}/{app_entitlement_ref_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppOwners.CreateEntitlementOwner", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "CreateEntitlementOwnerRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppOwnersCreateEntitlementOwnerResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.CreateEntitlementOwnerResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.CreateEntitlementOwnerResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateUserOwner - Create User Owner +// CreateUserOwner creates a user ownership source for an app. +func (s *AppOwnersV2) CreateUserOwner(ctx context.Context, request operations.C1APIAppV2AppOwnersCreateUserOwnerRequest, opts ...operations.Option) (*operations.C1APIAppV2AppOwnersCreateUserOwnerResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/owners/users/{role_slug}/{user_ref_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppOwners.CreateUserOwner", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "CreateUserOwnerRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppOwnersCreateUserOwnerResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.CreateUserOwnerResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.CreateUserOwnerResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteEntitlementOwner - Delete Entitlement Owner +// DeleteEntitlementOwner deletes an entitlement ownership source for an app. +func (s *AppOwnersV2) DeleteEntitlementOwner(ctx context.Context, request operations.C1APIAppV2AppOwnersDeleteEntitlementOwnerRequest, opts ...operations.Option) (*operations.C1APIAppV2AppOwnersDeleteEntitlementOwnerResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/owners/entitlements/{role_slug}/{app_entitlement_ref_app_id}/{app_entitlement_ref_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppOwners.DeleteEntitlementOwner", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DeleteEntitlementOwnerRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppOwnersDeleteEntitlementOwnerResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.DeleteEntitlementOwnerResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.DeleteEntitlementOwnerResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteUserOwner - Delete User Owner +// DeleteUserOwner deletes a user ownership source for an app. +func (s *AppOwnersV2) DeleteUserOwner(ctx context.Context, request operations.C1APIAppV2AppOwnersDeleteUserOwnerRequest, opts ...operations.Option) (*operations.C1APIAppV2AppOwnersDeleteUserOwnerResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/owners/users/{role_slug}/{user_ref_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppOwners.DeleteUserOwner", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DeleteUserOwnerRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppOwnersDeleteUserOwnerResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.DeleteUserOwnerResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.DeleteUserOwnerResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetEntitlementOwner - Get Entitlement Owner +// GetEntitlementOwner gets an entitlement ownership source for an app. +func (s *AppOwnersV2) GetEntitlementOwner(ctx context.Context, request operations.C1APIAppV2AppOwnersGetEntitlementOwnerRequest, opts ...operations.Option) (*operations.C1APIAppV2AppOwnersGetEntitlementOwnerResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/owners/entitlements/{role_slug}/{app_entitlement_ref_app_id}/{app_entitlement_ref_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppOwners.GetEntitlementOwner", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppOwnersGetEntitlementOwnerResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetEntitlementOwnerResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetEntitlementOwnerResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetUserOwner - Get User Owner +// GetUserOwner gets a user ownership source for an app. +func (s *AppOwnersV2) GetUserOwner(ctx context.Context, request operations.C1APIAppV2AppOwnersGetUserOwnerRequest, opts ...operations.Option) (*operations.C1APIAppV2AppOwnersGetUserOwnerResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/owners/users/{role_slug}/{user_ref_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppOwners.GetUserOwner", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppOwnersGetUserOwnerResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetUserOwnerResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetUserOwnerResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SearchEntitlementOwners - Search Entitlement Owners +// SearchEntitlementOwners searches for entitlement ownership sources for an app. +func (s *AppOwnersV2) SearchEntitlementOwners(ctx context.Context, request operations.C1APIAppV2AppOwnersSearchEntitlementOwnersRequest, opts ...operations.Option) (*operations.C1APIAppV2AppOwnersSearchEntitlementOwnersResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/owners/entitlements", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppOwners.SearchEntitlementOwners", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppOwnersSearchEntitlementOwnersResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SearchEntitlementOwnersResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SearchEntitlementOwnersResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SearchUserOwners - Search User Owners +// SearchUserOwners searches for user ownership sources for an app. +func (s *AppOwnersV2) SearchUserOwners(ctx context.Context, request operations.C1APIAppV2AppOwnersSearchUserOwnersRequest, opts ...operations.Option) (*operations.C1APIAppV2AppOwnersSearchUserOwnersResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/owners/users", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppOwners.SearchUserOwners", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppOwnersSearchUserOwnersResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SearchUserOwnersResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SearchUserOwnersResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Set +// Set replaces all user owners for a given app and role. +func (s *AppOwnersV2) Set(ctx context.Context, request operations.C1APIAppV2AppOwnersSetRequest, opts ...operations.Option) (*operations.C1APIAppV2AppOwnersSetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/owners", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.AppOwners.Set", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SetAppOwnersRequestV2", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2AppOwnersSetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SetAppOwnersResponseV2 + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SetAppOwnersResponseV2 = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appresource.go b/vendor/github.com/conductorone/conductorone-sdk-go/appresource.go index 75f81593..11b6686b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appresource.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appresource.go @@ -31,7 +31,7 @@ func newAppResource(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, } // CreateManuallyManagedAppResource - Create Manually Managed App Resource -// Invokes the c1.api.app.v1.AppResourceService.CreateManuallyManagedAppResource method. +// Create a manually managed app resource tracked directly by ConductorOne under an existing resource type. func (s *AppResource) CreateManuallyManagedAppResource(ctx context.Context, request operations.C1APIAppV1AppResourceServiceCreateManuallyManagedAppResourceRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceServiceCreateManuallyManagedAppResourceResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -243,7 +243,7 @@ func (s *AppResource) CreateManuallyManagedAppResource(ctx context.Context, requ } // DeleteManuallyManagedAppResource - Delete Manually Managed App Resource -// Invokes the c1.api.app.v1.AppResourceService.DeleteManuallyManagedAppResource method. +// Delete a manually managed app resource and its associated entitlements from an app. func (s *AppResource) DeleteManuallyManagedAppResource(ctx context.Context, request operations.C1APIAppV1AppResourceServiceDeleteManuallyManagedAppResourceRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceServiceDeleteManuallyManagedAppResourceResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -455,7 +455,7 @@ func (s *AppResource) DeleteManuallyManagedAppResource(ctx context.Context, requ } // Get -// Invokes the c1.api.app.v1.AppResourceService.Get method. +// Retrieve a single app resource by its app, resource type, and resource ID. func (s *AppResource) Get(ctx context.Context, request operations.C1APIAppV1AppResourceServiceGetRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceServiceGetResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -660,7 +660,7 @@ func (s *AppResource) Get(ctx context.Context, request operations.C1APIAppV1AppR } // List -// Invokes the c1.api.app.v1.AppResourceService.List method. +// List app resources for a given app and optionally filter by resource type. func (s *AppResource) List(ctx context.Context, request operations.C1APIAppV1AppResourceServiceListRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceServiceListResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -869,7 +869,7 @@ func (s *AppResource) List(ctx context.Context, request operations.C1APIAppV1App } // Update -// Invokes the c1.api.app.v1.AppResourceService.Update method. +// Update an app resource's fields. Only the fields specified in the update mask are modified. func (s *AppResource) Update(ctx context.Context, request operations.C1APIAppV1AppResourceServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appresourceowners.go b/vendor/github.com/conductorone/conductorone-sdk-go/appresourceowners.go index e1d1c793..d9e2ef94 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appresourceowners.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appresourceowners.go @@ -31,7 +31,7 @@ func newAppResourceOwners(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfigur } // Add -// Invokes the c1.api.app.v1.AppResourceOwners.Add method. +// Add a user as an owner of an app resource. func (s *AppResourceOwners) Add(ctx context.Context, request operations.C1APIAppV1AppResourceOwnersAddRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceOwnersAddResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -869,7 +869,7 @@ func (s *AppResourceOwners) ListOwnerIDs(ctx context.Context, request operations } // Remove -// Invokes the c1.api.app.v1.AppResourceOwners.Remove method. +// Remove a user from the owners of an app resource. func (s *AppResourceOwners) Remove(ctx context.Context, request operations.C1APIAppV1AppResourceOwnersRemoveRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceOwnersRemoveResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appresourcesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/appresourcesearch.go index 76a0f7b7..be54fd9a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appresourcesearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appresourcesearch.go @@ -235,21 +235,11 @@ func (s *AppResourceSearch) SearchAppResourceTypes(ctx context.Context, request return nil, nil } } + request.PageToken = &nCVal return s.SearchAppResourceTypes( ctx, - &shared.SearchAppResourceTypesRequest{ - AppIds: request.AppIds, - AppUserIds: request.AppUserIds, - DisplayName: request.DisplayName, - ExcludeResourceTypeIds: request.ExcludeResourceTypeIds, - ExcludeResourceTypeTraitIds: request.ExcludeResourceTypeTraitIds, - PageSize: request.PageSize, - PageToken: &nCVal, - Query: request.Query, - ResourceTypeIds: request.ResourceTypeIds, - ResourceTypeTraitIds: request.ResourceTypeTraitIds, - }, + request, opts..., ) } @@ -301,7 +291,7 @@ func (s *AppResourceSearch) SearchAppResourceTypes(ctx context.Context, request } // SearchAppResources - Search App Resources -// Invokes the c1.api.app.v1.AppResourceSearch.SearchAppResources method. +// Search app resources based on filters specified in the request body. func (s *AppResourceSearch) SearchAppResources(ctx context.Context, request *shared.SearchAppResourcesRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceSearchSearchAppResourcesResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -501,24 +491,11 @@ func (s *AppResourceSearch) SearchAppResources(ctx context.Context, request *sha return nil, nil } } + request.PageToken = &nCVal return s.SearchAppResources( ctx, - &shared.SearchAppResourcesRequest{ - AppID: request.AppID, - AppUserIds: request.AppUserIds, - ExcludeDeletedResourceBindings: request.ExcludeDeletedResourceBindings, - ExcludeResourceIds: request.ExcludeResourceIds, - ExcludeResourceTypeTraitIds: request.ExcludeResourceTypeTraitIds, - OwnerUserIds: request.OwnerUserIds, - PageSize: request.PageSize, - PageToken: &nCVal, - Query: request.Query, - Refs: request.Refs, - ResourceIds: request.ResourceIds, - ResourceTypeIds: request.ResourceTypeIds, - ResourceTypeTraitIds: request.ResourceTypeTraitIds, - }, + request, opts..., ) } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appresourcetype.go b/vendor/github.com/conductorone/conductorone-sdk-go/appresourcetype.go index 9db3a69a..29681c44 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appresourcetype.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appresourcetype.go @@ -31,7 +31,7 @@ func newAppResourceType(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfigurat } // CreateManuallyManagedResourceType - Create Manually Managed Resource Type -// Invokes the c1.api.app.v1.AppResourceTypeService.CreateManuallyManagedResourceType method. +// Create a manually managed resource type that classifies resources within an app. func (s *AppResourceType) CreateManuallyManagedResourceType(ctx context.Context, request operations.C1APIAppV1AppResourceTypeServiceCreateManuallyManagedResourceTypeRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceTypeServiceCreateManuallyManagedResourceTypeResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -243,7 +243,7 @@ func (s *AppResourceType) CreateManuallyManagedResourceType(ctx context.Context, } // DeleteManuallyManagedResourceType - Delete Manually Managed Resource Type -// Invokes the c1.api.app.v1.AppResourceTypeService.DeleteManuallyManagedResourceType method. +// Delete a manually managed resource type and all its associated resources from an app. func (s *AppResourceType) DeleteManuallyManagedResourceType(ctx context.Context, request operations.C1APIAppV1AppResourceTypeServiceDeleteManuallyManagedResourceTypeRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceTypeServiceDeleteManuallyManagedResourceTypeResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -869,7 +869,7 @@ func (s *AppResourceType) List(ctx context.Context, request operations.C1APIAppV } // UpdateManuallyManagedResourceType - Update Manually Managed Resource Type -// Invokes the c1.api.app.v1.AppResourceTypeService.UpdateManuallyManagedResourceType method. +// Update a manually managed resource type's fields. Only the fields specified in the update mask are modified. func (s *AppResourceType) UpdateManuallyManagedResourceType(ctx context.Context, request operations.C1APIAppV1AppResourceTypeServiceUpdateManuallyManagedResourceTypeRequest, opts ...operations.Option) (*operations.C1APIAppV1AppResourceTypeServiceUpdateManuallyManagedResourceTypeResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/appsearch.go index 9be353a6..fc385603 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appsearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appsearch.go @@ -235,19 +235,11 @@ func (s *AppSearch) Search(ctx context.Context, request *shared.SearchAppsReques return nil, nil } } + request.PageToken = &nCVal return s.Search( ctx, - &shared.SearchAppsRequest{ - AppIds: request.AppIds, - DisplayName: request.DisplayName, - ExcludeAppIds: request.ExcludeAppIds, - OnlyDirectories: request.OnlyDirectories, - PageSize: request.PageSize, - PageToken: &nCVal, - PolicyRefs: request.PolicyRefs, - Query: request.Query, - }, + request, opts..., ) } @@ -297,3 +289,215 @@ func (s *AppSearch) Search(ctx context.Context, request *shared.SearchAppsReques return res, nil } + +// SearchUserOwnership - Search User Ownership +// Search all ownership assignments for a given user across apps, resources, and entitlements. +func (s *AppSearch) SearchUserOwnership(ctx context.Context, request *shared.SearchUserOwnershipRequest, opts ...operations.Option) (*operations.C1APIAppV1AppSearchSearchUserOwnershipResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/user-ownership") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v1.AppSearch.SearchUserOwnership", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV1AppSearchSearchUserOwnershipResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SearchUserOwnershipResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SearchUserOwnershipResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/appuser.go b/vendor/github.com/conductorone/conductorone-sdk-go/appuser.go index 47ab6d77..d04db270 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/appuser.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/appuser.go @@ -32,7 +32,7 @@ func newAppUser(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hoo } // List -// Invokes the c1.api.app.v1.AppUserService.List method. +// List app user accounts within a specific app, with pagination support. func (s *AppUser) List(ctx context.Context, request operations.C1APIAppV1AppUserServiceListRequest, opts ...operations.Option) (*operations.C1APIAppV1AppUserServiceListResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -241,7 +241,7 @@ func (s *AppUser) List(ctx context.Context, request operations.C1APIAppV1AppUser } // ListAppUserCredentials - List App User Credentials -// Invokes the c1.api.app.v1.AppUserService.ListAppUserCredentials method. +// List credentials associated with a specific app user account. func (s *AppUser) ListAppUserCredentials(ctx context.Context, request operations.C1APIAppV1AppUserServiceListAppUserCredentialsRequest, opts ...operations.Option) (*operations.C1APIAppV1AppUserServiceListAppUserCredentialsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -450,7 +450,7 @@ func (s *AppUser) ListAppUserCredentials(ctx context.Context, request operations } // ListAppUsersForUser - List App Users For User -// Invokes the c1.api.app.v1.AppUserService.ListAppUsersForUser method. +// List app user accounts within a specific app that are correlated to a given C1 user. func (s *AppUser) ListAppUsersForUser(ctx context.Context, request operations.C1APIAppV1AppUserServiceListAppUsersForUserRequest, opts ...operations.Option) (*operations.C1APIAppV1AppUserServiceListAppUsersForUserResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/attributes.go b/vendor/github.com/conductorone/conductorone-sdk-go/attributes.go index ac8630bc..6562307d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/attributes.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/attributes.go @@ -2337,7 +2337,7 @@ func (s *Attributes) ListAttributeValues(ctx context.Context, request operations } // ListComplianceFrameworks - List Compliance Frameworks -// Invokes the c1.api.attribute.v1.Attributes.ListComplianceFrameworks method. +// List all compliance framework attribute values (e.g., SOC 2, HIPAA) with pagination. func (s *Attributes) ListComplianceFrameworks(ctx context.Context, request operations.C1APIAttributeV1AttributesListComplianceFrameworksRequest, opts ...operations.Option) (*operations.C1APIAttributeV1AttributesListComplianceFrameworksResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -2546,7 +2546,7 @@ func (s *Attributes) ListComplianceFrameworks(ctx context.Context, request opera } // ListRiskLevels - List Risk Levels -// Invokes the c1.api.attribute.v1.Attributes.ListRiskLevels method. +// List all risk level attribute values with pagination. func (s *Attributes) ListRiskLevels(ctx context.Context, request operations.C1APIAttributeV1AttributesListRiskLevelsRequest, opts ...operations.Option) (*operations.C1APIAttributeV1AttributesListRiskLevelsResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/automation.go b/vendor/github.com/conductorone/conductorone-sdk-go/automation.go index ab8700cb..a4f6a300 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/automation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/automation.go @@ -31,9 +31,224 @@ func newAutomation(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, } } +// ClearAutomationCircuitBreaker - Clear Automation Circuit Breaker +// Clear the circuit breaker on an automation that was auto-disabled by the +// +// rate cap. Future events flow normally; existing paused executions are not +// affected (use ResolvePausedAutomationExecutions to run or cancel them). +func (s *Automation) ClearAutomationCircuitBreaker(ctx context.Context, request operations.C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/automations/{id}/circuit_breaker/clear", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.automations.v1.AutomationService.ClearAutomationCircuitBreaker", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ClearAutomationCircuitBreakerRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ClearAutomationCircuitBreakerResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ClearAutomationCircuitBreakerResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + // CreateAutomation - Create Automation -// Invokes the c1.api.automations.v1.AutomationService.CreateAutomation method. -func (s *Automation) CreateAutomation(ctx context.Context, request *shared.CreateAutomationRequestInput, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationServiceCreateAutomationResponse, error) { +// Create a new automation with the specified steps, triggers, and configuration. +func (s *Automation) CreateAutomation(ctx context.Context, request *shared.AutomationsCreateAutomationRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationServiceCreateAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ operations.SupportedOptionRetries, @@ -206,12 +421,12 @@ func (s *Automation) CreateAutomation(ctx context.Context, request *shared.Creat return nil, err } - var out shared.CreateAutomationResponseInput + var out shared.AutomationsCreateAutomationResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.CreateAutomationResponse = &out + res.AutomationsCreateAutomationResponse = &out default: rawBody, err := utils.ConsumeRawBody(httpRes) if err != nil { @@ -244,7 +459,7 @@ func (s *Automation) CreateAutomation(ctx context.Context, request *shared.Creat } // DeleteAutomation - Delete Automation -// Invokes the c1.api.automations.v1.AutomationService.DeleteAutomation method. +// Delete an automation by its unique identifier, removing it and its associated triggers. func (s *Automation) DeleteAutomation(ctx context.Context, request operations.C1APIAutomationsV1AutomationServiceDeleteAutomationRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationServiceDeleteAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -278,7 +493,7 @@ func (s *Automation) DeleteAutomation(ctx context.Context, request operations.C1 OAuth2Scopes: nil, SecuritySource: s.sdkConfiguration.Security, } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DeleteAutomationRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "AutomationsDeleteAutomationRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } @@ -418,12 +633,12 @@ func (s *Automation) DeleteAutomation(ctx context.Context, request operations.C1 return nil, err } - var out shared.DeleteAutomationResponse + var out shared.AutomationsDeleteAutomationResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.DeleteAutomationResponse = &out + res.AutomationsDeleteAutomationResponse = &out default: rawBody, err := utils.ConsumeRawBody(httpRes) if err != nil { @@ -456,7 +671,7 @@ func (s *Automation) DeleteAutomation(ctx context.Context, request operations.C1 } // ExecuteAutomation - Execute Automation -// Invokes the c1.api.automations.v1.AutomationService.ExecuteAutomation method. +// Trigger an on-demand execution of an automation, returning the new execution's identifier. func (s *Automation) ExecuteAutomation(ctx context.Context, request operations.C1APIAutomationsV1AutomationServiceExecuteAutomationRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationServiceExecuteAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -668,7 +883,7 @@ func (s *Automation) ExecuteAutomation(ctx context.Context, request operations.C } // GetAutomation - Get Automation -// Invokes the c1.api.automations.v1.AutomationService.GetAutomation method. +// Retrieve a single automation by its unique identifier. func (s *Automation) GetAutomation(ctx context.Context, request operations.C1APIAutomationsV1AutomationServiceGetAutomationRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationServiceGetAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -873,7 +1088,7 @@ func (s *Automation) GetAutomation(ctx context.Context, request operations.C1API } // ListAutomations - List Automations -// Invokes the c1.api.automations.v1.AutomationService.ListAutomations method. +// List all automations in the tenant with pagination support. func (s *Automation) ListAutomations(ctx context.Context, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationServiceListAutomationsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1077,8 +1292,222 @@ func (s *Automation) ListAutomations(ctx context.Context, opts ...operations.Opt } +// ResolvePausedAutomationExecutions - Resolve Paused Automation Executions +// Decide what to do with the executions that were paused while the +// +// automation's circuit breaker was tripped. Idempotent. +func (s *Automation) ResolvePausedAutomationExecutions(ctx context.Context, request operations.C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/automations/{id}/circuit_breaker/resolve_paused", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.automations.v1.AutomationService.ResolvePausedAutomationExecutions", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ResolvePausedAutomationExecutionsRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ResolvePausedAutomationExecutionsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ResolvePausedAutomationExecutionsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + // UpdateAutomation - Update Automation -// Invokes the c1.api.automations.v1.AutomationService.UpdateAutomation method. +// Update an existing automation's properties, steps, or triggers using a field mask. func (s *Automation) UpdateAutomation(ctx context.Context, request operations.C1APIAutomationsV1AutomationServiceUpdateAutomationRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationServiceUpdateAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/automationexecution.go b/vendor/github.com/conductorone/conductorone-sdk-go/automationexecution.go index befabca7..3ced9bff 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/automationexecution.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/automationexecution.go @@ -32,7 +32,7 @@ func newAutomationExecution(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfig } // GetAutomationExecution - Get Automation Execution -// Invokes the c1.api.automations.v1.AutomationExecutionService.GetAutomationExecution method. +// Retrieve a single automation execution by its unique identifier, with optional expanded related objects. func (s *AutomationExecution) GetAutomationExecution(ctx context.Context, request operations.C1APIAutomationsV1AutomationExecutionServiceGetAutomationExecutionRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationExecutionServiceGetAutomationExecutionResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -237,7 +237,7 @@ func (s *AutomationExecution) GetAutomationExecution(ctx context.Context, reques } // ListAutomationExecutions - List Automation Executions -// Invokes the c1.api.automations.v1.AutomationExecutionService.ListAutomationExecutions method. +// List all automation executions in the tenant with pagination support. func (s *AutomationExecution) ListAutomationExecutions(ctx context.Context, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationExecutionServiceListAutomationExecutionsResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/automationexecutionactions.go b/vendor/github.com/conductorone/conductorone-sdk-go/automationexecutionactions.go index c47aee11..621eedcb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/automationexecutionactions.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/automationexecutionactions.go @@ -31,7 +31,7 @@ func newAutomationExecutionActions(rootSDK *ConductoroneAPI, sdkConfig config.SD } // TerminateAutomation - Terminate Automation -// Invokes the c1.api.automations.v1.AutomationExecutionActionsService.TerminateAutomation method. +// Terminate a running automation execution asynchronously, stopping it and marking it as terminated. func (s *AutomationExecutionActions) TerminateAutomation(ctx context.Context, request operations.C1APIAutomationsV1AutomationExecutionActionsServiceTerminateAutomationRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationExecutionActionsServiceTerminateAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/automationexecutionsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/automationexecutionsearch.go index 99a03ce8..9e7ed85c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/automationexecutionsearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/automationexecutionsearch.go @@ -31,8 +31,220 @@ func newAutomationExecutionSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDK } } +// SearchAllAutomationExecutions - Search All Automation Executions +// Search across all automation executions in the tenant, with filters for state, template, app, and subject user. +func (s *AutomationExecutionSearch) SearchAllAutomationExecutions(ctx context.Context, request *shared.SearchAllAutomationExecutionsRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationExecutionSearchServiceSearchAllAutomationExecutionsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/all_automation_executions") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.automations.v1.AutomationExecutionSearchService.SearchAllAutomationExecutions", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAutomationsV1AutomationExecutionSearchServiceSearchAllAutomationExecutionsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SearchAllAutomationExecutionsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SearchAllAutomationExecutionsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + // SearchAutomationExecutions - Search Automation Executions -// Invokes the c1.api.automations.v1.AutomationExecutionSearchService.SearchAutomationExecutions method. +// Search for automation executions with optional filters for automation_template_id, state, and query. func (s *AutomationExecutionSearch) SearchAutomationExecutions(ctx context.Context, request *shared.SearchAutomationExecutionsRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationExecutionSearchServiceSearchAutomationExecutionsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -52,7 +264,7 @@ func (s *AutomationExecutionSearch) SearchAutomationExecutions(ctx context.Conte } else { baseURL = *o.ServerURL } - opURL, err := url.JoinPath(baseURL, "/api/v1/automation_executions/search") + opURL, err := url.JoinPath(baseURL, "/api/v1/search/automation_executions") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/automationsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/automationsearch.go index 25967c99..87a94cdb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/automationsearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/automationsearch.go @@ -32,7 +32,7 @@ func newAutomationSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfigura } // SearchAutomationTemplateVersions - Search Automation Template Versions -// Invokes the c1.api.automations.v1.AutomationSearchService.SearchAutomationTemplateVersions method. +// Search for versioned snapshots of an automation template's steps and triggers. func (s *AutomationSearch) SearchAutomationTemplateVersions(ctx context.Context, request *shared.SearchAutomationTemplateVersionsRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationSearchServiceSearchAutomationTemplateVersionsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -52,7 +52,7 @@ func (s *AutomationSearch) SearchAutomationTemplateVersions(ctx context.Context, } else { baseURL = *o.ServerURL } - opURL, err := url.JoinPath(baseURL, "/api/v1/automation_versions/search") + opURL, err := url.JoinPath(baseURL, "/api/v1/search/automation_versions") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } @@ -244,7 +244,7 @@ func (s *AutomationSearch) SearchAutomationTemplateVersions(ctx context.Context, } // SearchAutomations - Search Automations -// Invokes the c1.api.automations.v1.AutomationSearchService.SearchAutomations method. +// Search for automations matching the provided filters, including query text, template refs, app, and trigger types. func (s *AutomationSearch) SearchAutomations(ctx context.Context, request *shared.SearchAutomationsRequest, opts ...operations.Option) (*operations.C1APIAutomationsV1AutomationSearchServiceSearchAutomationsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -264,7 +264,7 @@ func (s *AutomationSearch) SearchAutomations(ctx context.Context, request *share } else { baseURL = *o.ServerURL } - opURL, err := url.JoinPath(baseURL, "/api/v1/automations/search") + opURL, err := url.JoinPath(baseURL, "/api/v1/search/automations") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/awsexternalidsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/awsexternalidsettings.go index 8a02b640..b470b740 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/awsexternalidsettings.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/awsexternalidsettings.go @@ -32,7 +32,7 @@ func newAWSExternalIDSettings(rootSDK *ConductoroneAPI, sdkConfig config.SDKConf } // Get -// Invokes the c1.api.settings.v1.AWSExternalIDSettings.Get method. +// Get retrieves the AWS external ID for the tenant, used in IAM role trust policies for AWS connectors. func (s *AWSExternalIDSettings) Get(ctx context.Context, opts ...operations.Option) (*operations.C1APISettingsV1AWSExternalIDSettingsGetResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/conductoroneapi.go b/vendor/github.com/conductorone/conductorone-sdk-go/conductoroneapi.go index 834d5d05..0a899b8f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/conductoroneapi.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/conductoroneapi.go @@ -2,7 +2,7 @@ package conductoronesdkgo -// Generated from OpenAPI doc version 0.1.0-alpha and generator version 2.794.1 +// Generated from OpenAPI doc version 0.1.0-alpha and generator version 2.882.0 import ( "context" @@ -18,7 +18,7 @@ import ( // ServerList contains the list of servers available to the SDK var ServerList = []string{ - // The ConductorOne API server for the current tenant. + // The C1 API server for the current tenant. "https://{tenantDomain}.conductor.one", } @@ -48,71 +48,101 @@ func Float64(f float64) *float64 { return &f } // Pointer provides a helper function to return a pointer to a type func Pointer[T any](v T) *T { return &v } -// ConductoroneAPI - ConductorOne API: The ConductorOne API is a HTTP API for managing ConductorOne resources. +// ConductoroneAPI - C1 API: The C1 API is a HTTP API for managing C1 resources. type ConductoroneAPI struct { - SDKVersion string - AccessReview *AccessReview - AccessReviewTemplate *AccessReviewTemplate - AccessConflict *AccessConflict - AppEntitlementMonitorBinding *AppEntitlementMonitorBinding - Apps *Apps - Connector *Connector - AppAccessRequestsDefaults *AppAccessRequestsDefaults - AppUser *AppUser - AppEntitlements *AppEntitlements - AppEntitlementSearch *AppEntitlementSearch - AppEntitlementUserBinding *AppEntitlementUserBinding - AppEntitlementOwners *AppEntitlementOwners - AppOwners *AppOwners - AppReport *AppReport - AppReportAction *AppReportAction - AppResourceType *AppResourceType - AppResource *AppResource - AppResourceOwners *AppResourceOwners - AppUsageControls *AppUsageControls - AppEntitlementsProxy *AppEntitlementsProxy - Attributes *Attributes - Auth *Auth - AutomationExecution *AutomationExecution - AutomationExecutionSearch *AutomationExecutionSearch - AutomationExecutionActions *AutomationExecutionActions - AutomationSearch *AutomationSearch - Automation *Automation - RequestCatalogManagement *RequestCatalogManagement - ConnectorCatalog *ConnectorCatalog - Directory *Directory - Functions *Functions - FunctionsInvocation *FunctionsInvocation - PersonalClient *PersonalClient - Roles *Roles - Policies *Policies - AccountProvisionPolicyTest *AccountProvisionPolicyTest - PolicyValidate *PolicyValidate - RequestSchema *RequestSchema - AppResourceSearch *AppResourceSearch - AppSearch *AppSearch - AttributeSearch *AttributeSearch - FunctionsSearch *FunctionsSearch - PersonalClientSearch *PersonalClientSearch - PolicySearch *PolicySearch - RequestCatalogSearch *RequestCatalogSearch - StepUpProvider *StepUpProvider - StepUpTransaction *StepUpTransaction - ExportsSearch *ExportsSearch - TaskSearch *TaskSearch - UserSearch *UserSearch - WebhooksSearch *WebhooksSearch - AWSExternalIDSettings *AWSExternalIDSettings - OrgDomain *OrgDomain - SessionSettings *SessionSettings - SystemLog *SystemLog - Export *Export - TaskAudit *TaskAudit - Task *Task - TaskActions *TaskActions - User *User - Vault *Vault - Webhooks *Webhooks + SDKVersion string + A2UI *A2UI + AccessReview *AccessReview + AccessReviewSetupEntitlement *AccessReviewSetupEntitlement + AccessReviewTemplate *AccessReviewTemplate + AccessReviewTemplateSetupEntitlement *AccessReviewTemplateSetupEntitlement + AccessConflict *AccessConflict + AppEntitlementMonitorBinding *AppEntitlementMonitorBinding + Apps *Apps + Connector *Connector + AppAccessRequestsDefaults *AppAccessRequestsDefaults + AppUser *AppUser + AppEntitlements *AppEntitlements + AppEntitlementSearch *AppEntitlementSearch + AppEntitlementUserBinding *AppEntitlementUserBinding + AppEntitlementOwners *AppEntitlementOwners + AppOwners *AppOwners + AppReport *AppReport + AppReportAction *AppReportAction + AppResourceType *AppResourceType + AppResource *AppResource + AppResourceOwners *AppResourceOwners + AppUsageControls *AppUsageControls + AppEntitlementsProxy *AppEntitlementsProxy + Attributes *Attributes + TenantAuthConfig *TenantAuthConfig + Auth *Auth + AutomationExecution *AutomationExecution + AutomationExecutionActions *AutomationExecutionActions + Automation *Automation + RequestCatalogManagement *RequestCatalogManagement + ConnectorCatalog *ConnectorCatalog + Directory *Directory + Finding *Finding + FindingRoutingRule *FindingRoutingRule + FindingSearch *FindingSearch + Functions *Functions + FunctionsInvocation *FunctionsInvocation + FunctionsInvocationSearch *FunctionsInvocationSearch + Hooks *Hooks + PersonalClient *PersonalClient + Roles *Roles + LocalDirectoryConfig *LocalDirectoryConfig + LocalUserInvitation *LocalUserInvitation + Policies *Policies + AccountProvisionPolicyTest *AccountProvisionPolicyTest + PolicyValidate *PolicyValidate + RequestSchema *RequestSchema + RoleMiningManagement *RoleMiningManagement + AutomationExecutionSearch *AutomationExecutionSearch + AppResourceSearch *AppResourceSearch + AppSearch *AppSearch + AttributeSearch *AttributeSearch + AutomationSearch *AutomationSearch + FunctionsSearch *FunctionsSearch + HooksSearch *HooksSearch + ExternalClientSearch *ExternalClientSearch + PersonalClientSearch *PersonalClientSearch + PolicySearch *PolicySearch + RequestCatalogSearch *RequestCatalogSearch + RoleMiningManagementSearch *RoleMiningManagementSearch + PaperSecretAdmin *PaperSecretAdmin + PaperSecret *PaperSecret + SSFReceiverEventSearch *SSFReceiverEventSearch + StepUpProvider *StepUpProvider + StepUpTransaction *StepUpTransaction + ExportsSearch *ExportsSearch + TaskSearch *TaskSearch + UserSearch *UserSearch + WebhooksSearch *WebhooksSearch + WorkloadFederation *WorkloadFederation + Principal *Principal + AWSExternalIDSettings *AWSExternalIDSettings + Contacts *Contacts + OrgDomain *OrgDomain + TenantEmailProvider *TenantEmailProvider + OrgNotificationSettings *OrgNotificationSettings + UserNotificationSettings *UserNotificationSettings + OnboardingSettings *OnboardingSettings + SessionSettings *SessionSettings + SSFReceiverStream *SSFReceiverStream + SSFReceiverEvent *SSFReceiverEvent + SystemLog *SystemLog + Export *Export + TaskAudit *TaskAudit + Task *Task + TaskActions *TaskActions + User *User + Vault *Vault + Webhooks *Webhooks + ConnectorOwnersV2 *ConnectorOwnersV2 + AppEntitlementOwnersV2 *AppEntitlementOwnersV2 + AppOwnersV2 *AppOwnersV2 sdkConfiguration config.SDKConfiguration hooks *hooks.Hooks @@ -120,7 +150,7 @@ type ConductoroneAPI struct { type SDKOption func(*ConductoroneAPI) -// WithServerURL allows the overriding of the default server URL +// WithServerURL allows providing an alternative server URL func WithServerURL(serverURL string) SDKOption { return func(sdk *ConductoroneAPI) { sdk.sdkConfiguration.ServerURL = serverURL @@ -201,9 +231,9 @@ func WithTimeout(timeout time.Duration) SDKOption { // New creates a new instance of the SDK with the provided options func New(opts ...SDKOption) *ConductoroneAPI { sdk := &ConductoroneAPI{ - SDKVersion: "1.26.1", + SDKVersion: "1.28.2", sdkConfiguration: config.SDKConfiguration{ - UserAgent: "speakeasy-sdk/go 1.26.1 2.794.1 0.1.0-alpha github.com/conductorone/conductorone-sdk-go", + UserAgent: "speakeasy-sdk/go 1.28.2 2.882.0 0.1.0-alpha github.com/conductorone/conductorone-sdk-go", ServerList: ServerList, ServerVariables: []map[string]string{ { @@ -229,8 +259,11 @@ func New(opts ...SDKOption) *ConductoroneAPI { sdk.sdkConfiguration.ServerURL = serverURL } + sdk.A2UI = newA2UI(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AccessReview = newAccessReview(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.AccessReviewSetupEntitlement = newAccessReviewSetupEntitlement(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AccessReviewTemplate = newAccessReviewTemplate(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.AccessReviewTemplateSetupEntitlement = newAccessReviewTemplateSetupEntitlement(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AccessConflict = newAccessConflict(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AppEntitlementMonitorBinding = newAppEntitlementMonitorBinding(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Apps = newApps(sdk, sdk.sdkConfiguration, sdk.hooks) @@ -250,39 +283,63 @@ func New(opts ...SDKOption) *ConductoroneAPI { sdk.AppUsageControls = newAppUsageControls(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AppEntitlementsProxy = newAppEntitlementsProxy(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Attributes = newAttributes(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.TenantAuthConfig = newTenantAuthConfig(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Auth = newAuth(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AutomationExecution = newAutomationExecution(sdk, sdk.sdkConfiguration, sdk.hooks) - sdk.AutomationExecutionSearch = newAutomationExecutionSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AutomationExecutionActions = newAutomationExecutionActions(sdk, sdk.sdkConfiguration, sdk.hooks) - sdk.AutomationSearch = newAutomationSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Automation = newAutomation(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.RequestCatalogManagement = newRequestCatalogManagement(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.ConnectorCatalog = newConnectorCatalog(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Directory = newDirectory(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Finding = newFinding(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.FindingRoutingRule = newFindingRoutingRule(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.FindingSearch = newFindingSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Functions = newFunctions(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.FunctionsInvocation = newFunctionsInvocation(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.FunctionsInvocationSearch = newFunctionsInvocationSearch(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Hooks = newHooks(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.PersonalClient = newPersonalClient(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Roles = newRoles(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.LocalDirectoryConfig = newLocalDirectoryConfig(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.LocalUserInvitation = newLocalUserInvitation(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Policies = newPolicies(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AccountProvisionPolicyTest = newAccountProvisionPolicyTest(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.PolicyValidate = newPolicyValidate(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.RequestSchema = newRequestSchema(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.RoleMiningManagement = newRoleMiningManagement(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.AutomationExecutionSearch = newAutomationExecutionSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AppResourceSearch = newAppResourceSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AppSearch = newAppSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AttributeSearch = newAttributeSearch(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.AutomationSearch = newAutomationSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.FunctionsSearch = newFunctionsSearch(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.HooksSearch = newHooksSearch(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.ExternalClientSearch = newExternalClientSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.PersonalClientSearch = newPersonalClientSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.PolicySearch = newPolicySearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.RequestCatalogSearch = newRequestCatalogSearch(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.RoleMiningManagementSearch = newRoleMiningManagementSearch(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.PaperSecretAdmin = newPaperSecretAdmin(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.PaperSecret = newPaperSecret(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.SSFReceiverEventSearch = newSSFReceiverEventSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.StepUpProvider = newStepUpProvider(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.StepUpTransaction = newStepUpTransaction(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.ExportsSearch = newExportsSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.TaskSearch = newTaskSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.UserSearch = newUserSearch(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.WebhooksSearch = newWebhooksSearch(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.WorkloadFederation = newWorkloadFederation(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Principal = newPrincipal(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.AWSExternalIDSettings = newAWSExternalIDSettings(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Contacts = newContacts(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.OrgDomain = newOrgDomain(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.TenantEmailProvider = newTenantEmailProvider(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.OrgNotificationSettings = newOrgNotificationSettings(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.UserNotificationSettings = newUserNotificationSettings(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.OnboardingSettings = newOnboardingSettings(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.SessionSettings = newSessionSettings(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.SSFReceiverStream = newSSFReceiverStream(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.SSFReceiverEvent = newSSFReceiverEvent(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.SystemLog = newSystemLog(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Export = newExport(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.TaskAudit = newTaskAudit(sdk, sdk.sdkConfiguration, sdk.hooks) @@ -291,6 +348,9 @@ func New(opts ...SDKOption) *ConductoroneAPI { sdk.User = newUser(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Vault = newVault(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Webhooks = newWebhooks(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.ConnectorOwnersV2 = newConnectorOwnersV2(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.AppEntitlementOwnersV2 = newAppEntitlementOwnersV2(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.AppOwnersV2 = newAppOwnersV2(sdk, sdk.sdkConfiguration, sdk.hooks) return sdk } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/connector.go b/vendor/github.com/conductorone/conductorone-sdk-go/connector.go index 99048755..2db19894 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/connector.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/connector.go @@ -32,7 +32,7 @@ func newConnector(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, h } // ConfirmSyncValid - Confirm Sync Valid -// Invokes the c1.api.app.v1.ConnectorService.ConfirmSyncValid method. +// Confirm that a sync which errored due to a data drop is valid, overriding the error and triggering a new sync. Only applicable when the sync status is ERRORED_NO_DATA. func (s *Connector) ConfirmSyncValid(ctx context.Context, request operations.C1APIAppV1ConnectorServiceConfirmSyncValidRequest, opts ...operations.Option) (*operations.C1APIAppV1ConnectorServiceConfirmSyncValidResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -880,7 +880,7 @@ func (s *Connector) Delete(ctx context.Context, request operations.C1APIAppV1Con } // ForceSync - Force Sync -// Invokes the c1.api.app.v1.ConnectorService.ForceSync method. +// Trigger an immediate sync for a connector. The sync is queued and may not start instantly. func (s *Connector) ForceSync(ctx context.Context, request operations.C1APIAppV1ConnectorServiceForceSyncRequest, opts ...operations.Option) (*operations.C1APIAppV1ConnectorServiceForceSyncResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1916,7 +1916,7 @@ func (s *Connector) List(ctx context.Context, request operations.C1APIAppV1Conne } // PauseSync - Pause Sync -// Invokes the c1.api.app.v1.ConnectorService.PauseSync method. +// Pause syncing and provisioning for a connector. No new syncs or grant/revoke operations will run until the connector is resumed. func (s *Connector) PauseSync(ctx context.Context, request operations.C1APIAppV1ConnectorServicePauseSyncRequest, opts ...operations.Option) (*operations.C1APIAppV1ConnectorServicePauseSyncResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -2128,7 +2128,7 @@ func (s *Connector) PauseSync(ctx context.Context, request operations.C1APIAppV1 } // ResumeSync - Resume Sync -// Invokes the c1.api.app.v1.ConnectorService.ResumeSync method. +// Resume syncing and provisioning for a connector that was previously paused. Clears the paused state and triggers a new sync. func (s *Connector) ResumeSync(ctx context.Context, request operations.C1APIAppV1ConnectorServiceResumeSyncRequest, opts ...operations.Option) (*operations.C1APIAppV1ConnectorServiceResumeSyncResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -2976,7 +2976,7 @@ func (s *Connector) Update(ctx context.Context, request operations.C1APIAppV1Con } // UpdateConnectorSchedule - Update Connector Schedule -// Invokes the c1.api.app.v1.ConnectorService.UpdateConnectorSchedule method. +// Update the sync schedule for a connector. func (s *Connector) UpdateConnectorSchedule(ctx context.Context, request operations.C1APIAppV1ConnectorServiceUpdateConnectorScheduleRequest, opts ...operations.Option) (*operations.C1APIAppV1ConnectorServiceUpdateConnectorScheduleResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -3400,7 +3400,7 @@ func (s *Connector) UpdateDelegated(ctx context.Context, request operations.C1AP } // ValidateHTTPConnectorConfig - Validate Http Connector Config -// Invokes the c1.api.app.v1.ConnectorService.ValidateHTTPConnectorConfig method. +// Validate an HTTP connector configuration and return any diagnostics or errors found. func (s *Connector) ValidateHTTPConnectorConfig(ctx context.Context, request *shared.EditorValidateRequest, opts ...operations.Option) (*operations.C1APIAppV1ConnectorServiceValidateHTTPConnectorConfigResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/connectorcatalog.go b/vendor/github.com/conductorone/conductorone-sdk-go/connectorcatalog.go index f4894c98..b161e201 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/connectorcatalog.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/connectorcatalog.go @@ -32,7 +32,7 @@ func newConnectorCatalog(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfigura } // ConfigurationSchema - Configuration Schema -// Invokes the c1.api.integration.connector.v1.ConnectorCatalogService.ConfigurationSchema method. +// Return the configuration schema describing the fields required to set up a connector of the specified type. func (s *ConnectorCatalog) ConfigurationSchema(ctx context.Context, request *shared.ConnectorCatalogServiceConfigurationSchemaRequest, opts ...operations.Option) (*operations.C1APIIntegrationConnectorV1ConnectorCatalogServiceConfigurationSchemaResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/connectorownersv2.go b/vendor/github.com/conductorone/conductorone-sdk-go/connectorownersv2.go new file mode 100644 index 00000000..787e1ce6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/connectorownersv2.go @@ -0,0 +1,661 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" +) + +type ConnectorOwnersV2 struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newConnectorOwnersV2(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *ConnectorOwnersV2 { + return &ConnectorOwnersV2{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// SearchEntitlementOwners - Search Entitlement Owners +// SearchEntitlementOwners searches for the entitlement ownership for a connector. +func (s *ConnectorOwnersV2) SearchEntitlementOwners(ctx context.Context, request operations.C1APIAppV2ConnectorOwnersSearchEntitlementOwnersRequest, opts ...operations.Option) (*operations.C1APIAppV2ConnectorOwnersSearchEntitlementOwnersResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/connectors/{connector_id}/owners/entitlements", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.ConnectorOwners.SearchEntitlementOwners", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2ConnectorOwnersSearchEntitlementOwnersResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SearchConnectorEntitlementOwnersResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SearchConnectorEntitlementOwnersResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SearchUserOwners - Search User Owners +// SearchUserOwners searches for users who are owners of this connector. +func (s *ConnectorOwnersV2) SearchUserOwners(ctx context.Context, request operations.C1APIAppV2ConnectorOwnersSearchUserOwnersRequest, opts ...operations.Option) (*operations.C1APIAppV2ConnectorOwnersSearchUserOwnersResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/connectors/{connector_id}/owners/users", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.ConnectorOwners.SearchUserOwners", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2ConnectorOwnersSearchUserOwnersResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SearchConnectorUserOwnersResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SearchConnectorUserOwnersResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Set +// Set replaces all owners for a given connector and role. +func (s *ConnectorOwnersV2) Set(ctx context.Context, request operations.C1APIAppV2ConnectorOwnersSetRequest, opts ...operations.Option) (*operations.C1APIAppV2ConnectorOwnersSetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v2/apps/{app_id}/connectors/{connector_id}/owners", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.app.v2.ConnectorOwners.Set", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SetConnectorOwnersV2Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAppV2ConnectorOwnersSetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SetConnectorOwnersV2Response + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SetConnectorOwnersV2Response = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/contacts.go b/vendor/github.com/conductorone/conductorone-sdk-go/contacts.go new file mode 100644 index 00000000..144e4ca2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/contacts.go @@ -0,0 +1,449 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type Contacts struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newContacts(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Contacts { + return &Contacts{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// GetContacts - Get Contacts +// Invokes the c1.api.settings.v1.ContactsService.GetContacts method. +func (s *Contacts) GetContacts(ctx context.Context, opts ...operations.Option) (*operations.C1APISettingsV1ContactsServiceGetContactsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/contacts") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.ContactsService.GetContacts", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1ContactsServiceGetContactsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetContactsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetContactsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// UpdateContacts - Update Contacts +// Invokes the c1.api.settings.v1.ContactsService.UpdateContacts method. +func (s *Contacts) UpdateContacts(ctx context.Context, request *shared.UpdateContactsRequest, opts ...operations.Option) (*operations.C1APISettingsV1ContactsServiceUpdateContactsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/contacts") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.ContactsService.UpdateContacts", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1ContactsServiceUpdateContactsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UpdateContactsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UpdateContactsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/export.go b/vendor/github.com/conductorone/conductorone-sdk-go/export.go index 2b169c16..94ff6ad7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/export.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/export.go @@ -244,7 +244,7 @@ func (s *Export) Create(ctx context.Context, request *shared.ExportServiceCreate } // Delete -// Delete a policy by ID. +// Delete a system log export by ID. func (s *Export) Delete(ctx context.Context, request operations.C1APISystemlogV1ExportServiceDeleteRequest, opts ...operations.Option) (*operations.C1APISystemlogV1ExportServiceDeleteResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -870,7 +870,7 @@ func (s *Export) List(ctx context.Context, request operations.C1APISystemlogV1Ex } // ListEvents - List Events -// Invokes the c1.api.systemlog.v1.ExportService.ListEvents method. +// List audit events belonging to a specific system log export. func (s *Export) ListEvents(ctx context.Context, request operations.C1APISystemlogV1ExportServiceListEventsRequest, opts ...operations.Option) (*operations.C1APISystemlogV1ExportServiceListEventsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1082,7 +1082,7 @@ func (s *Export) ListEvents(ctx context.Context, request operations.C1APISysteml } // Update -// Update a system log export by providing a policy object and an update mask. +// Update a system log export by providing an export object and an update mask. func (s *Export) Update(ctx context.Context, request operations.C1APISystemlogV1ExportServiceUpdateRequest, opts ...operations.Option) (*operations.C1APISystemlogV1ExportServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/exportssearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/exportssearch.go index e7014690..84d4d299 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/exportssearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/exportssearch.go @@ -32,7 +32,7 @@ func newExportsSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguratio } // Search -// Invokes the c1.api.systemlog.v1.ExportsSearchService.Search method. +// Search for system log exports matching the specified filters. func (s *ExportsSearch) Search(ctx context.Context, request *shared.ExportsSearchServiceSearchRequest, opts ...operations.Option) (*operations.C1APISystemlogV1ExportsSearchServiceSearchResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/externalclientsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/externalclientsearch.go new file mode 100644 index 00000000..f7e23b2d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/externalclientsearch.go @@ -0,0 +1,244 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type ExternalClientSearch struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newExternalClientSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *ExternalClientSearch { + return &ExternalClientSearch{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Search - NOTE: Searches external client grants for all users +// Search returns external client grants for all users in the tenant. +func (s *ExternalClientSearch) Search(ctx context.Context, request *shared.ExternalClientSearchServiceSearchRequest, opts ...operations.Option) (*operations.C1APIIamV1ExternalClientSearchServiceSearchResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/iam/external_clients") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.iam.v1.ExternalClientSearchService.Search", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIIamV1ExternalClientSearchServiceSearchResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ExternalClientSearchServiceSearchResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ExternalClientSearchServiceSearchResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/extra_sdk_options.go b/vendor/github.com/conductorone/conductorone-sdk-go/extra_sdk_options.go index 887ffd98..dd11d974 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/extra_sdk_options.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/extra_sdk_options.go @@ -7,9 +7,11 @@ import ( "fmt" "net/http" "net/url" + "os" "strings" "go.uber.org/zap" + "golang.org/x/oauth2" "github.com/conductorone/conductorone-sdk-go/uhttp" ) @@ -17,6 +19,17 @@ import ( const c1TenantDomain = ".conductor.one" const ClientIdGolangSDK = "2RCzHlak5q7CY14SdBc8HoZEJRf" +// Environment variable names for ConductorOne authentication. +// These are used across all ConductorOne client tools (sdk-go, cone, terraform-provider). +const ( + EnvAccessToken = "CONDUCTORONE_ACCESS_TOKEN" + EnvOIDCToken = "CONDUCTORONE_OIDC_TOKEN" + EnvClientID = "CONDUCTORONE_CLIENT_ID" + EnvClientSecret = "CONDUCTORONE_CLIENT_SECRET" + EnvTenantDomain = "CONDUCTORONE_TENANT_DOMAIN" + EnvServerURL = "CONDUCTORONE_SERVER_URL" +) + func WithTenant(input string) (SDKOption, error) { resp, err := NormalizeTenant(input) if err != nil { @@ -146,11 +159,15 @@ type CustomOptions struct { userAgent string } +// NewWithCredentials creates a ConductoroneAPI client using explicit client credentials +// (Ed25519 JWT bearer assertion). This function does NOT read environment variables; +// use [NewWithEnv] for environment-based auth. func NewWithCredentials(ctx context.Context, cred *ClientCredentials, opts ...CustomSDKOption) (*ConductoroneAPI, error) { options := &CustomOptions{} for _, opt := range opts { opt(options) } + if options.GetServerURL() == "" { resp, err := ParseClientID(cred.ClientID) if err != nil { @@ -164,6 +181,106 @@ func NewWithCredentials(ctx context.Context, cred *ClientCredentials, opts ...Cu return nil, err } + return newWithTokenSource(ctx, tokenSource, cred.ClientID, options) +} + +// NewWithOIDCToken creates a ConductoroneAPI client that exchanges an external OIDC token +// for a ConductorOne access token via RFC 8693 token exchange. +func NewWithOIDCToken(ctx context.Context, oidcToken, clientID string, opts ...CustomSDKOption) (*ConductoroneAPI, error) { + options := &CustomOptions{} + for _, opt := range opts { + opt(options) + } + return newWithOIDCToken(ctx, oidcToken, clientID, options) +} + +// NewWithAccessToken creates a ConductoroneAPI client using a pre-exchanged bearer token. +func NewWithAccessToken(ctx context.Context, accessToken, clientID string, opts ...CustomSDKOption) (*ConductoroneAPI, error) { + options := &CustomOptions{} + for _, opt := range opts { + opt(options) + } + return newWithTokenSource(ctx, oauth2.StaticTokenSource(&oauth2.Token{ + AccessToken: accessToken, + }), clientID, options) +} + +// NewWithEnv creates a ConductoroneAPI client using environment variables. +// Auth priority: +// 1. CONDUCTORONE_ACCESS_TOKEN -- static bearer token +// 2. CONDUCTORONE_OIDC_TOKEN + CONDUCTORONE_CLIENT_ID -- RFC 8693 token exchange +// 3. CONDUCTORONE_CLIENT_ID + CONDUCTORONE_CLIENT_SECRET -- Ed25519 JWT assertion +func NewWithEnv(ctx context.Context, opts ...CustomSDKOption) (*ConductoroneAPI, error) { + options := &CustomOptions{} + for _, opt := range opts { + opt(options) + } + + clientID := os.Getenv(EnvClientID) + + // Priority 1: CONDUCTORONE_ACCESS_TOKEN + if accessToken := os.Getenv(EnvAccessToken); accessToken != "" { + return newWithTokenSource(ctx, oauth2.StaticTokenSource(&oauth2.Token{ + AccessToken: accessToken, + }), clientID, options) + } + + // Priority 2: CONDUCTORONE_OIDC_TOKEN + if oidcToken := os.Getenv(EnvOIDCToken); oidcToken != "" { + if clientID == "" { + return nil, fmt.Errorf("%s requires %s", EnvOIDCToken, EnvClientID) + } + return newWithOIDCToken(ctx, oidcToken, clientID, options) + } + + // Priority 3: CONDUCTORONE_CLIENT_ID + CONDUCTORONE_CLIENT_SECRET + clientSecret := os.Getenv(EnvClientSecret) + if clientID == "" || clientSecret == "" { + return nil, fmt.Errorf("one of %s, %s, or %s+%s must be set", EnvAccessToken, EnvOIDCToken, EnvClientID, EnvClientSecret) + } + + if options.GetServerURL() == "" { + resp, err := ParseClientID(clientID) + if err != nil { + return nil, err + } + options.ClientConfig = resp + } + + tokenSource, err := NewTokenSource(ctx, clientID, clientSecret, options.GetServerURL()) + if err != nil { + return nil, err + } + + return newWithTokenSource(ctx, tokenSource, clientID, options) +} + +func newWithOIDCToken(ctx context.Context, oidcToken, clientID string, options *CustomOptions) (*ConductoroneAPI, error) { + if options.GetServerURL() == "" { + resp, err := ParseClientID(clientID) + if err != nil { + return nil, err + } + options.ClientConfig = resp + } + + tokenSource, err := NewTokenExchangeSource(ctx, oidcToken, clientID, options.GetServerURL()) + if err != nil { + return nil, err + } + + return newWithTokenSource(ctx, tokenSource, clientID, options) +} + +func newWithTokenSource(ctx context.Context, tokenSource oauth2.TokenSource, clientID string, options *CustomOptions) (*ConductoroneAPI, error) { + if options.GetServerURL() == "" && clientID != "" { + resp, err := ParseClientID(clientID) + if err != nil { + return nil, err + } + options.ClientConfig = resp + } + if options.userAgent == "" { options.userAgent = "conductorone-sdk-go" } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/finding.go b/vendor/github.com/conductorone/conductorone-sdk-go/finding.go new file mode 100644 index 00000000..050c64f5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/finding.go @@ -0,0 +1,1085 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type Finding struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newFinding(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Finding { + return &Finding{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// BulkCreateFindingTasks - Bulk Create Finding Tasks +// Bulk create tasks for findings. +func (s *Finding) BulkCreateFindingTasks(ctx context.Context, request *shared.BulkCreateFindingTasksRequest, opts ...operations.Option) (*operations.C1APIFindingV1FindingServiceBulkCreateFindingTasksResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/findings/bulk/tasks") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingService.BulkCreateFindingTasks", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingServiceBulkCreateFindingTasksResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.BulkCreateFindingTasksResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.BulkCreateFindingTasksResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// BulkUpdateFindingState - Bulk Update Finding State +// Bulk update finding states. +func (s *Finding) BulkUpdateFindingState(ctx context.Context, request *shared.BulkUpdateFindingStateRequest, opts ...operations.Option) (*operations.C1APIFindingV1FindingServiceBulkUpdateFindingStateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/findings/bulk/state") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingService.BulkUpdateFindingState", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingServiceBulkUpdateFindingStateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.BulkUpdateFindingStateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.BulkUpdateFindingStateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateFindingTask - Create Finding Task +// Create a task for a finding. +func (s *Finding) CreateFindingTask(ctx context.Context, request operations.C1APIFindingV1FindingServiceCreateFindingTaskRequest, opts ...operations.Option) (*operations.C1APIFindingV1FindingServiceCreateFindingTaskResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/findings/{finding_id}/task", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingService.CreateFindingTask", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "CreateFindingTaskRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingServiceCreateFindingTaskResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.CreateFindingTaskResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.CreateFindingTaskResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetFinding - Get Finding +// Get a single finding by ID. +func (s *Finding) GetFinding(ctx context.Context, request operations.C1APIFindingV1FindingServiceGetFindingRequest, opts ...operations.Option) (*operations.C1APIFindingV1FindingServiceGetFindingResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/findings/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingService.GetFinding", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingServiceGetFindingResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetFindingResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetFindingResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// UpdateFindingState - Update Finding State +// Update finding workflow state (snooze, accept risk, suppress, reopen, resolve). +func (s *Finding) UpdateFindingState(ctx context.Context, request operations.C1APIFindingV1FindingServiceUpdateFindingStateRequest, opts ...operations.Option) (*operations.C1APIFindingV1FindingServiceUpdateFindingStateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/findings/{finding_id}/state", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingService.UpdateFindingState", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "UpdateFindingStateRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingServiceUpdateFindingStateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UpdateFindingStateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UpdateFindingStateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/findingroutingrule.go b/vendor/github.com/conductorone/conductorone-sdk-go/findingroutingrule.go new file mode 100644 index 00000000..456b9f86 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/findingroutingrule.go @@ -0,0 +1,1078 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type FindingRoutingRule struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newFindingRoutingRule(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *FindingRoutingRule { + return &FindingRoutingRule{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// CreateFindingRoutingRule - Create Finding Routing Rule +// Create a new finding routing rule that defines which policy to use for auto-routing matching findings. +func (s *FindingRoutingRule) CreateFindingRoutingRule(ctx context.Context, request *shared.CreateFindingRoutingRuleRequest, opts ...operations.Option) (*operations.C1APIFindingV1FindingRoutingRuleServiceCreateFindingRoutingRuleResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/findings/routing-rules") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingRoutingRuleService.CreateFindingRoutingRule", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingRoutingRuleServiceCreateFindingRoutingRuleResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.CreateFindingRoutingRuleResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.CreateFindingRoutingRuleResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteFindingRoutingRule - Delete Finding Routing Rule +// Delete a finding routing rule. Findings already routed by this rule are not affected. +func (s *FindingRoutingRule) DeleteFindingRoutingRule(ctx context.Context, request operations.C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleRequest, opts ...operations.Option) (*operations.C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/findings/routing-rules/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingRoutingRuleService.DeleteFindingRoutingRule", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DeleteFindingRoutingRuleRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.DeleteFindingRoutingRuleResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.DeleteFindingRoutingRuleResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetFindingRoutingRule - Get Finding Routing Rule +// Retrieve a single finding routing rule by ID. +func (s *FindingRoutingRule) GetFindingRoutingRule(ctx context.Context, request operations.C1APIFindingV1FindingRoutingRuleServiceGetFindingRoutingRuleRequest, opts ...operations.Option) (*operations.C1APIFindingV1FindingRoutingRuleServiceGetFindingRoutingRuleResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/findings/routing-rules/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingRoutingRuleService.GetFindingRoutingRule", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingRoutingRuleServiceGetFindingRoutingRuleResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetFindingRoutingRuleResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetFindingRoutingRuleResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// ListFindingRoutingRules - List Finding Routing Rules +// List finding routing rules, optionally filtered to a specific app. +func (s *FindingRoutingRule) ListFindingRoutingRules(ctx context.Context, opts ...operations.Option) (*operations.C1APIFindingV1FindingRoutingRuleServiceListFindingRoutingRulesResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/findings/routing-rules") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingRoutingRuleService.ListFindingRoutingRules", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingRoutingRuleServiceListFindingRoutingRulesResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ListFindingRoutingRulesResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ListFindingRoutingRulesResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// UpdateFindingRoutingRule - Update Finding Routing Rule +// Update an existing finding routing rule's match criteria or target policy. +func (s *FindingRoutingRule) UpdateFindingRoutingRule(ctx context.Context, request operations.C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleRequest, opts ...operations.Option) (*operations.C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/findings/routing-rules/{routing_rule_id}/update", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingRoutingRuleService.UpdateFindingRoutingRule", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "UpdateFindingRoutingRuleRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UpdateFindingRoutingRuleResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UpdateFindingRoutingRuleResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/findingsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/findingsearch.go new file mode 100644 index 00000000..004787db --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/findingsearch.go @@ -0,0 +1,244 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type FindingSearch struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newFindingSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *FindingSearch { + return &FindingSearch{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Search +// Search findings using full-text query and filters for severity, state, type, and app. +func (s *FindingSearch) Search(ctx context.Context, request *shared.FindingSearchRequest, opts ...operations.Option) (*operations.C1APIFindingV1FindingSearchServiceSearchResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/findings/search") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.finding.v1.FindingSearchService.Search", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFindingV1FindingSearchServiceSearchResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.FindingSearchResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.FindingSearchResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/functions.go b/vendor/github.com/conductorone/conductorone-sdk-go/functions.go index 0d8619f7..79fa47a1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/functions.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/functions.go @@ -31,8 +31,220 @@ func newFunctions(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, h } } +// CreateFinalCommit - Create Final Commit +// CreateFinalCommit completes a commit after files are uploaded +func (s *Functions) CreateFinalCommit(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceCreateFinalCommitRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceCreateFinalCommitResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{function_id}/commits/{commit_id}/finalize", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.functions.v1.FunctionsService.CreateFinalCommit", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "FunctionsServiceCreateFinalCommitRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFunctionsV1FunctionsServiceCreateFinalCommitResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.FunctionsServiceCreateFinalCommitResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.FunctionsServiceCreateFinalCommitResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + // CreateFunction - Create Function -// Invokes the c1.api.functions.v1.FunctionsService.CreateFunction method. +// CreateFunction registers a new serverless function and creates its initial code commit. func (s *Functions) CreateFunction(ctx context.Context, request *shared.FunctionsServiceCreateFunctionRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceCreateFunctionResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -52,7 +264,431 @@ func (s *Functions) CreateFunction(ctx context.Context, request *shared.Function } else { baseURL = *o.ServerURL } - opURL, err := url.JoinPath(baseURL, "/api/v1/functions") + opURL, err := url.JoinPath(baseURL, "/api/v1/functions") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.functions.v1.FunctionsService.CreateFunction", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFunctionsV1FunctionsServiceCreateFunctionResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.FunctionsServiceCreateFunctionResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.FunctionsServiceCreateFunctionResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateInitialCommit - Create Initial Commit +// CreateInitialCommit starts a new commit and returns upload URLs for files +func (s *Functions) CreateInitialCommit(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceCreateInitialCommitRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceCreateInitialCommitResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{function_id}/commits", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.functions.v1.FunctionsService.CreateInitialCommit", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "FunctionsServiceCreateInitialCommitRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFunctionsV1FunctionsServiceCreateInitialCommitResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.FunctionsServiceCreateInitialCommitResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.FunctionsServiceCreateInitialCommitResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateTag - Create Tag +// CreateTag creates a named reference to a specific commit +func (s *Functions) CreateTag(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceCreateTagRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceCreateTagResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{function_id}/tags", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } @@ -62,11 +698,11 @@ func (s *Functions) CreateFunction(ctx context.Context, request *shared.Function SDKConfiguration: s.sdkConfiguration, BaseURL: baseURL, Context: ctx, - OperationID: "c1.api.functions.v1.FunctionsService.CreateFunction", + OperationID: "c1.api.functions.v1.FunctionsService.CreateTag", OAuth2Scopes: nil, SecuritySource: s.sdkConfiguration.Security, } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "FunctionsServiceCreateTagRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } @@ -191,7 +827,7 @@ func (s *Functions) CreateFunction(ctx context.Context, request *shared.Function } } - res := &operations.C1APIFunctionsV1FunctionsServiceCreateFunctionResponse{ + res := &operations.C1APIFunctionsV1FunctionsServiceCreateTagResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -206,12 +842,12 @@ func (s *Functions) CreateFunction(ctx context.Context, request *shared.Function return nil, err } - var out shared.FunctionsServiceCreateFunctionResponse + var out shared.FunctionsServiceCreateTagResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.FunctionsServiceCreateFunctionResponse = &out + res.FunctionsServiceCreateTagResponse = &out default: rawBody, err := utils.ConsumeRawBody(httpRes) if err != nil { @@ -243,9 +879,9 @@ func (s *Functions) CreateFunction(ctx context.Context, request *shared.Function } -// CreateTag - Create Tag -// CreateTag creates a named reference to a specific commit -func (s *Functions) CreateTag(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceCreateTagRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceCreateTagResponse, error) { +// DeleteFunction - Delete Function +// Delete removes a function +func (s *Functions) DeleteFunction(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceDeleteFunctionRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceDeleteFunctionResponse, error) { o := operations.Options{} supportedOptions := []string{ operations.SupportedOptionRetries, @@ -264,7 +900,7 @@ func (s *Functions) CreateTag(ctx context.Context, request operations.C1APIFunct } else { baseURL = *o.ServerURL } - opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{function_id}/tags", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{id}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } @@ -274,11 +910,11 @@ func (s *Functions) CreateTag(ctx context.Context, request operations.C1APIFunct SDKConfiguration: s.sdkConfiguration, BaseURL: baseURL, Context: ctx, - OperationID: "c1.api.functions.v1.FunctionsService.CreateTag", + OperationID: "c1.api.functions.v1.FunctionsService.DeleteFunction", OAuth2Scopes: nil, SecuritySource: s.sdkConfiguration.Security, } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "FunctionsServiceCreateTagRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "FunctionsServiceDeleteFunctionRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } @@ -294,7 +930,7 @@ func (s *Functions) CreateTag(ctx context.Context, request operations.C1APIFunct defer cancel() } - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } @@ -403,7 +1039,7 @@ func (s *Functions) CreateTag(ctx context.Context, request operations.C1APIFunct } } - res := &operations.C1APIFunctionsV1FunctionsServiceCreateTagResponse{ + res := &operations.C1APIFunctionsV1FunctionsServiceDeleteFunctionResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -418,12 +1054,12 @@ func (s *Functions) CreateTag(ctx context.Context, request operations.C1APIFunct return nil, err } - var out shared.FunctionsServiceCreateTagResponse + var out shared.FunctionsServiceDeleteFunctionResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.FunctionsServiceCreateTagResponse = &out + res.FunctionsServiceDeleteFunctionResponse = &out default: rawBody, err := utils.ConsumeRawBody(httpRes) if err != nil { @@ -455,9 +1091,11 @@ func (s *Functions) CreateTag(ctx context.Context, request operations.C1APIFunct } -// DeleteFunction - Delete Function -// Delete removes a function -func (s *Functions) DeleteFunction(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceDeleteFunctionRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceDeleteFunctionResponse, error) { +// GetCommitContent - Get Commit Content +// GetCommitContent retrieves a commit and all its file contents in a single unary response. +// +// This is a non-streaming alternative to GetCommit for REST API consumers. +func (s *Functions) GetCommitContent(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceGetCommitContentRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceGetCommitContentResponse, error) { o := operations.Options{} supportedOptions := []string{ operations.SupportedOptionRetries, @@ -476,7 +1114,7 @@ func (s *Functions) DeleteFunction(ctx context.Context, request operations.C1API } else { baseURL = *o.ServerURL } - opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{id}", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{function_id}/commits/{id}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } @@ -486,14 +1124,10 @@ func (s *Functions) DeleteFunction(ctx context.Context, request operations.C1API SDKConfiguration: s.sdkConfiguration, BaseURL: baseURL, Context: ctx, - OperationID: "c1.api.functions.v1.FunctionsService.DeleteFunction", + OperationID: "c1.api.functions.v1.FunctionsService.GetCommitContent", OAuth2Scopes: nil, SecuritySource: s.sdkConfiguration.Security, } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "FunctionsServiceDeleteFunctionRequest", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } timeout := o.Timeout if timeout == nil { @@ -506,15 +1140,12 @@ func (s *Functions) DeleteFunction(ctx context.Context, request operations.C1API defer cancel() } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if reqContentType != "" { - req.Header.Set("Content-Type", reqContentType) - } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -615,7 +1246,7 @@ func (s *Functions) DeleteFunction(ctx context.Context, request operations.C1API } } - res := &operations.C1APIFunctionsV1FunctionsServiceDeleteFunctionResponse{ + res := &operations.C1APIFunctionsV1FunctionsServiceGetCommitContentResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -630,12 +1261,12 @@ func (s *Functions) DeleteFunction(ctx context.Context, request operations.C1API return nil, err } - var out shared.FunctionsServiceDeleteFunctionResponse + var out shared.FunctionsServiceGetCommitContentResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.FunctionsServiceDeleteFunctionResponse = &out + res.FunctionsServiceGetCommitContentResponse = &out default: rawBody, err := utils.ConsumeRawBody(httpRes) if err != nil { @@ -872,9 +1503,9 @@ func (s *Functions) GetFunction(ctx context.Context, request operations.C1APIFun } -// GetFunctionSecretEncryptionKey - Get Function Secret Encryption Key -// GetFunctionSecretEncryptionKey retrieves or generates the public key for encrypting function secrets -func (s *Functions) GetFunctionSecretEncryptionKey(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceGetFunctionSecretEncryptionKeyRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceGetFunctionSecretEncryptionKeyResponse, error) { +// GetLockFile - Get Lock File +// GetLockFile retrieves the deno lock file for a specific commit, if it exists. +func (s *Functions) GetLockFile(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceGetLockFileRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceGetLockFileResponse, error) { o := operations.Options{} supportedOptions := []string{ operations.SupportedOptionRetries, @@ -893,7 +1524,7 @@ func (s *Functions) GetFunctionSecretEncryptionKey(ctx context.Context, request } else { baseURL = *o.ServerURL } - opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{function_id}/secret-encryption-key", request, nil) + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{function_id}/commits/{commit_id}/lockfile", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } @@ -903,7 +1534,7 @@ func (s *Functions) GetFunctionSecretEncryptionKey(ctx context.Context, request SDKConfiguration: s.sdkConfiguration, BaseURL: baseURL, Context: ctx, - OperationID: "c1.api.functions.v1.FunctionsService.GetFunctionSecretEncryptionKey", + OperationID: "c1.api.functions.v1.FunctionsService.GetLockFile", OAuth2Scopes: nil, SecuritySource: s.sdkConfiguration.Security, } @@ -1025,7 +1656,7 @@ func (s *Functions) GetFunctionSecretEncryptionKey(ctx context.Context, request } } - res := &operations.C1APIFunctionsV1FunctionsServiceGetFunctionSecretEncryptionKeyResponse{ + res := &operations.C1APIFunctionsV1FunctionsServiceGetLockFileResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -1040,12 +1671,12 @@ func (s *Functions) GetFunctionSecretEncryptionKey(ctx context.Context, request return nil, err } - var out shared.FunctionsServiceGetFunctionSecretEncryptionKeyResponse + var out shared.FunctionsServiceGetLockFileResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.FunctionsServiceGetFunctionSecretEncryptionKeyResponse = &out + res.FunctionsServiceGetLockFileResponse = &out default: rawBody, err := utils.ConsumeRawBody(httpRes) if err != nil { @@ -1078,7 +1709,7 @@ func (s *Functions) GetFunctionSecretEncryptionKey(ctx context.Context, request } // Invoke -// Invokes the c1.api.functions.v1.FunctionsService.Invoke method. +// Invoke executes a function at a specific commit with the provided input data. func (s *Functions) Invoke(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceInvokeRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceInvokeResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1904,6 +2535,218 @@ func (s *Functions) ListTags(ctx context.Context, request operations.C1APIFuncti } +// Test +// Test runs a function's test suite in a sandboxed environment and returns the results. +func (s *Functions) Test(ctx context.Context, request operations.C1APIFunctionsV1FunctionsServiceTestRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceTestResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{function_id}/test", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.functions.v1.FunctionsService.Test", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "FunctionsServiceTestRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFunctionsV1FunctionsServiceTestResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.FunctionsServiceTestResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.FunctionsServiceTestResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + // UpdateFunction - Update Function // Update updates an existing function's metadata func (s *Functions) UpdateFunction(ctx context.Context, request *shared.FunctionsServiceUpdateFunctionRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsServiceUpdateFunctionResponse, error) { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/functionsinvocationsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/functionsinvocationsearch.go new file mode 100644 index 00000000..09c82a78 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/functionsinvocationsearch.go @@ -0,0 +1,243 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" +) + +type FunctionsInvocationSearch struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newFunctionsInvocationSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *FunctionsInvocationSearch { + return &FunctionsInvocationSearch{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Search +// Search searches for function invocations with filtering and ordering support +func (s *FunctionsInvocationSearch) Search(ctx context.Context, request operations.C1APIFunctionsV1FunctionsInvocationSearchServiceSearchRequest, opts ...operations.Option) (*operations.C1APIFunctionsV1FunctionsInvocationSearchServiceSearchResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/functions/{function_id}/invocations/search", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.functions.v1.FunctionsInvocationSearchService.Search", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "FunctionsInvocationSearchRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIFunctionsV1FunctionsInvocationSearchServiceSearchResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.FunctionsInvocationSearchResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.FunctionsInvocationSearchResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/gen.yaml b/vendor/github.com/conductorone/conductorone-sdk-go/gen.yaml index 05707310..15874478 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/gen.yaml +++ b/vendor/github.com/conductorone/conductorone-sdk-go/gen.yaml @@ -10,6 +10,8 @@ generation: requestResponseComponentNamesFeb2024: false securityFeb2025: false sharedErrorComponentsApr2025: false + sharedNestedComponentsJan2026: false + nameOverrideFeb2026: false auth: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false @@ -17,20 +19,24 @@ generation: schemas: allOfMergeStrategy: shallowMerge requestBodyFieldName: "" + versioningStrategy: automatic persistentEdits: {} tests: generateTests: true generateNewTests: false skipResponseBodyAssertions: false go: - version: 1.26.1 + version: 1.28.2 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false baseErrorName: ConductoroneAPIError clientServerStatusCodesAsErrors: true defaultErrorName: SDKError + enableCustomCodeRegions: false + enableSkipDeserialization: false flattenGlobalSecurity: true forwardCompatibleEnumsByDefault: false + forwardCompatibleUnionsByDefault: "false" imports: option: openapi paths: @@ -50,6 +56,7 @@ go: outputModelSuffix: output packageName: github.com/conductorone/conductorone-sdk-go respectRequiredFields: false + respectTitlesForPrimitiveUnionMembers: false responseFormat: envelope sdkPackageName: "" unionStrategy: left-to-right diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/hooks.go b/vendor/github.com/conductorone/conductorone-sdk-go/hooks.go new file mode 100644 index 00000000..42ac61ca --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/hooks.go @@ -0,0 +1,1082 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type Hooks struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newHooks(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Hooks { + return &Hooks{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Create +// Invokes the c1.api.hooks.v1.HooksService.Create method. +func (s *Hooks) Create(ctx context.Context, request *shared.HooksServiceCreateRequest, opts ...operations.Option) (*operations.C1APIHooksV1HooksServiceCreateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/hooks") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.hooks.v1.HooksService.Create", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIHooksV1HooksServiceCreateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.HooksServiceCreateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.HooksServiceCreateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Delete +// Invokes the c1.api.hooks.v1.HooksService.Delete method. +func (s *Hooks) Delete(ctx context.Context, request operations.C1APIHooksV1HooksServiceDeleteRequest, opts ...operations.Option) (*operations.C1APIHooksV1HooksServiceDeleteResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/hooks/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.hooks.v1.HooksService.Delete", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "HooksServiceDeleteRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIHooksV1HooksServiceDeleteResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.HooksServiceDeleteResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.HooksServiceDeleteResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Get +// Invokes the c1.api.hooks.v1.HooksService.Get method. +func (s *Hooks) Get(ctx context.Context, request operations.C1APIHooksV1HooksServiceGetRequest, opts ...operations.Option) (*operations.C1APIHooksV1HooksServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/hooks/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.hooks.v1.HooksService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIHooksV1HooksServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.HooksServiceGetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.HooksServiceGetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// List +// Invokes the c1.api.hooks.v1.HooksService.List method. +func (s *Hooks) List(ctx context.Context, request operations.C1APIHooksV1HooksServiceListRequest, opts ...operations.Option) (*operations.C1APIHooksV1HooksServiceListResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/hooks") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.hooks.v1.HooksService.List", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIHooksV1HooksServiceListResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.HooksServiceListResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.HooksServiceListResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Update +// Invokes the c1.api.hooks.v1.HooksService.Update method. +func (s *Hooks) Update(ctx context.Context, request operations.C1APIHooksV1HooksServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIHooksV1HooksServiceUpdateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/hooks/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.hooks.v1.HooksService.Update", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "HooksServiceUpdateRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIHooksV1HooksServiceUpdateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.HooksServiceUpdateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.HooksServiceUpdateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/hookssearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/hookssearch.go new file mode 100644 index 00000000..b9b97ffd --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/hookssearch.go @@ -0,0 +1,244 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type HooksSearch struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newHooksSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *HooksSearch { + return &HooksSearch{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Search +// Invokes the c1.api.hooks.v1.HooksSearch.Search method. +func (s *HooksSearch) Search(ctx context.Context, request *shared.HooksSearchRequest, opts ...operations.Option) (*operations.C1APIHooksV1HooksSearchSearchResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/hooks") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.hooks.v1.HooksSearch.Search", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIHooksV1HooksSearchSearchResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.HooksSearchResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.HooksSearchResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/localdirectoryconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/localdirectoryconfig.go new file mode 100644 index 00000000..60cd55e6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/localdirectoryconfig.go @@ -0,0 +1,1082 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type LocalDirectoryConfig struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newLocalDirectoryConfig(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *LocalDirectoryConfig { + return &LocalDirectoryConfig{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Create +// Create a new local directory config backed by an existing App. +func (s *LocalDirectoryConfig) Create(ctx context.Context, request *shared.LocalDirectoryConfigServiceCreateRequest, opts ...operations.Option) (*operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceCreateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/local-directory-configs") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.local_directory.v1.LocalDirectoryConfigService.Create", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceCreateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.LocalDirectoryConfigServiceCreateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.LocalDirectoryConfigServiceCreateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Delete +// Delete a local directory config. Does not delete the underlying App. +func (s *LocalDirectoryConfig) Delete(ctx context.Context, request operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteRequest, opts ...operations.Option) (*operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/local-directory-configs/{app_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.local_directory.v1.LocalDirectoryConfigService.Delete", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "LocalDirectoryConfigServiceDeleteRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.LocalDirectoryConfigServiceDeleteResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.LocalDirectoryConfigServiceDeleteResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Get +// Get a local directory config by app_id. +func (s *LocalDirectoryConfig) Get(ctx context.Context, request operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceGetRequest, opts ...operations.Option) (*operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/local-directory-configs/{app_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.local_directory.v1.LocalDirectoryConfigService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.LocalDirectoryConfigServiceGetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.LocalDirectoryConfigServiceGetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// List +// List local directory configs for the tenant. +func (s *LocalDirectoryConfig) List(ctx context.Context, request operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceListRequest, opts ...operations.Option) (*operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceListResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/local-directory-configs") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.local_directory.v1.LocalDirectoryConfigService.List", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceListResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.LocalDirectoryConfigServiceListResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.LocalDirectoryConfigServiceListResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Update +// Update a local directory config. +func (s *LocalDirectoryConfig) Update(ctx context.Context, request operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateRequest, opts ...operations.Option) (*operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/local-directory-configs/{app_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.local_directory.v1.LocalDirectoryConfigService.Update", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "LocalDirectoryConfigServiceUpdateRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.LocalDirectoryConfigServiceUpdateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.LocalDirectoryConfigServiceUpdateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/localuserinvitation.go b/vendor/github.com/conductorone/conductorone-sdk-go/localuserinvitation.go new file mode 100644 index 00000000..202752d1 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/localuserinvitation.go @@ -0,0 +1,875 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type LocalUserInvitation struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newLocalUserInvitation(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *LocalUserInvitation { + return &LocalUserInvitation{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Create +// Create (send) a new invitation to a user. +func (s *LocalUserInvitation) Create(ctx context.Context, request operations.C1APILocalDirectoryV1LocalUserInvitationServiceCreateRequest, opts ...operations.Option) (*operations.C1APILocalDirectoryV1LocalUserInvitationServiceCreateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/local-directory-configs/{directory_app_id}/invitations", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.local_directory.v1.LocalUserInvitationService.Create", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "LocalUserInvitationServiceCreateRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APILocalDirectoryV1LocalUserInvitationServiceCreateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.LocalUserInvitationServiceCreateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.LocalUserInvitationServiceCreateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Get +// Get a specific invitation by id. +func (s *LocalUserInvitation) Get(ctx context.Context, request operations.C1APILocalDirectoryV1LocalUserInvitationServiceGetRequest, opts ...operations.Option) (*operations.C1APILocalDirectoryV1LocalUserInvitationServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/local-directory-configs/{directory_app_id}/invitations/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.local_directory.v1.LocalUserInvitationService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APILocalDirectoryV1LocalUserInvitationServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.LocalUserInvitationServiceGetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.LocalUserInvitationServiceGetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Revoke +// Revoke a pending invitation. +func (s *LocalUserInvitation) Revoke(ctx context.Context, request operations.C1APILocalDirectoryV1LocalUserInvitationServiceRevokeRequest, opts ...operations.Option) (*operations.C1APILocalDirectoryV1LocalUserInvitationServiceRevokeResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/local-directory-configs/{directory_app_id}/invitations/{id}/revoke", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.local_directory.v1.LocalUserInvitationService.Revoke", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "LocalUserInvitationServiceRevokeRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APILocalDirectoryV1LocalUserInvitationServiceRevokeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.LocalUserInvitationServiceRevokeResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.LocalUserInvitationServiceRevokeResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Search +// List invitations for a directory, with optional status filter. +// +// Search invitations with filters (directory, status). +func (s *LocalUserInvitation) Search(ctx context.Context, request *shared.LocalUserInvitationServiceSearchRequest, opts ...operations.Option) (*operations.C1APILocalDirectoryV1LocalUserInvitationServiceSearchResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/local-directory-invitations") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.local_directory.v1.LocalUserInvitationService.Search", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APILocalDirectoryV1LocalUserInvitationServiceSearchResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.LocalUserInvitationServiceSearchResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.LocalUserInvitationServiceSearchResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/onboardingsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/onboardingsettings.go new file mode 100644 index 00000000..6751d42c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/onboardingsettings.go @@ -0,0 +1,449 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type OnboardingSettings struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newOnboardingSettings(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *OnboardingSettings { + return &OnboardingSettings{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Get +// Get retrieves the current onboarding progress for the tenant. +func (s *OnboardingSettings) Get(ctx context.Context, opts ...operations.Option) (*operations.C1APISettingsV1OnboardingSettingsServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/onboarding") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.OnboardingSettingsService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1OnboardingSettingsServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetOnboardingSettingsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetOnboardingSettingsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Update +// Update modifies the onboarding progress, such as marking steps complete or dismissing the wizard. +func (s *OnboardingSettings) Update(ctx context.Context, request *shared.UpdateOnboardingSettingsRequest, opts ...operations.Option) (*operations.C1APISettingsV1OnboardingSettingsServiceUpdateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/onboarding") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.OnboardingSettingsService.Update", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1OnboardingSettingsServiceUpdateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UpdateOnboardingSettingsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UpdateOnboardingSettingsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/orgdomain.go b/vendor/github.com/conductorone/conductorone-sdk-go/orgdomain.go index 961d495c..a189d9aa 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/orgdomain.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/orgdomain.go @@ -32,7 +32,7 @@ func newOrgDomain(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, h } // List -// Invokes the c1.api.settings.v1.OrgDomainService.List method. +// List returns all verified domains configured for the tenant. func (s *OrgDomain) List(ctx context.Context, request operations.C1APISettingsV1OrgDomainServiceListRequest, opts ...operations.Option) (*operations.C1APISettingsV1OrgDomainServiceListResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -241,7 +241,7 @@ func (s *OrgDomain) List(ctx context.Context, request operations.C1APISettingsV1 } // Update -// Invokes the c1.api.settings.v1.OrgDomainService.Update method. +// Update replaces the tenant's set of verified domains with the provided list. func (s *OrgDomain) Update(ctx context.Context, request *shared.UpdateOrgDomainRequest, opts ...operations.Option) (*operations.C1APISettingsV1OrgDomainServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/orgnotificationsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/orgnotificationsettings.go new file mode 100644 index 00000000..682cae10 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/orgnotificationsettings.go @@ -0,0 +1,449 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type OrgNotificationSettings struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newOrgNotificationSettings(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *OrgNotificationSettings { + return &OrgNotificationSettings{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Get +// Get retrieves the organization-level notification settings, including per-channel preferences and admin-locked defaults. +func (s *OrgNotificationSettings) Get(ctx context.Context, opts ...operations.Option) (*operations.C1APISettingsV1OrgNotificationSettingsServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/notifications/org") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.OrgNotificationSettingsService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1OrgNotificationSettingsServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetOrgNotificationSettingsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetOrgNotificationSettingsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Update +// Update modifies the organization-level notification settings, such as enabling channels and locking preferences for users. +func (s *OrgNotificationSettings) Update(ctx context.Context, request *shared.UpdateOrgNotificationSettingsRequest, opts ...operations.Option) (*operations.C1APISettingsV1OrgNotificationSettingsServiceUpdateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/notifications/org") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.OrgNotificationSettingsService.Update", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1OrgNotificationSettingsServiceUpdateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UpdateOrgNotificationSettingsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UpdateOrgNotificationSettingsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/papersecret.go b/vendor/github.com/conductorone/conductorone-sdk-go/papersecret.go new file mode 100644 index 00000000..2db74690 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/papersecret.go @@ -0,0 +1,1939 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type PaperSecret struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newPaperSecret(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *PaperSecret { + return &PaperSecret{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// CreateExternal - Create External +// CreateExternal creates a secret vault for external email recipients. +func (s *PaperSecret) CreateExternal(ctx context.Context, request *shared.PaperSecretServiceCreateExternalRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretServiceCreateExternalResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/secrets/external") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretService.CreateExternal", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretServiceCreateExternalResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretServiceCreateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretServiceCreateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateInternal - Create Internal +// CreateInternal creates a secret vault for internal C1 users. +func (s *PaperSecret) CreateInternal(ctx context.Context, request *shared.PaperSecretServiceCreateInternalRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretServiceCreateInternalResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/secrets/internal") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretService.CreateInternal", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretServiceCreateInternalResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretServiceCreateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretServiceCreateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Get +// Get retrieves a secret's metadata by vault ID. +// +// Creator can always get their own secrets. Admins can get any secret. +func (s *PaperSecret) Get(ctx context.Context, request operations.C1APISecretsV1PaperSecretServiceGetRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/secrets/{vault_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretServiceGetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretServiceGetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetByShareCode - Get By Share Code +// GetByShareCode retrieves a secret by its human-friendly share code. +// +// Share codes are in XXXX-XXXX-XXXX format and are used in share URLs. +func (s *PaperSecret) GetByShareCode(ctx context.Context, request operations.C1APISecretsV1PaperSecretServiceGetByShareCodeRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretServiceGetByShareCodeResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/secrets/code/{share_code}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretService.GetByShareCode", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretServiceGetByShareCodeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretServiceGetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretServiceGetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetContent - Get Content +// GetContent retrieves the encrypted secret content for an authorized recipient. +// +// Caller must be in the secret's allowed_user_ids list (for INTERNAL secrets). +// Returns content re-encrypted to caller's ephemeral public key. +func (s *PaperSecret) GetContent(ctx context.Context, request operations.C1APISecretsV1PaperSecretServiceGetContentRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretServiceGetContentResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/secrets/{vault_id}/view", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretService.GetContent", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "PaperSecretServiceGetContentRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretServiceGetContentResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretServiceGetContentResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretServiceGetContentResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Revoke +// Revoke soft-deletes a secret (sets Vault.deleted_at, deletes content). +func (s *PaperSecret) Revoke(ctx context.Context, request operations.C1APISecretsV1PaperSecretServiceRevokeRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretServiceRevokeResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/secrets/{vault_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretService.Revoke", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "PaperSecretServiceRevokeRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretServiceRevokeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretServiceRevokeResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretServiceRevokeResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SearchAuditEvents - Search Audit Events +// SearchAuditEvents returns audit events for a secret owned by the calling user. +// +// Returns sanitized OCSF events (IP addresses stripped for non-admin consumption). +func (s *PaperSecret) SearchAuditEvents(ctx context.Context, request *shared.PaperSecretServiceSearchAuditEventsRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretServiceSearchAuditEventsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/secrets/audit_events") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretService.SearchAuditEvents", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretServiceSearchAuditEventsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretServiceSearchAuditEventsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretServiceSearchAuditEventsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SearchMySecrets - Search My Secrets +// SearchMySecrets returns secrets created by the current user. +// +// Automatically scoped to current user - no user_id filter parameter. +func (s *PaperSecret) SearchMySecrets(ctx context.Context, request *shared.PaperSecretServiceSearchMySecretsRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretServiceSearchMySecretsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/secrets/mine") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretService.SearchMySecrets", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretServiceSearchMySecretsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretServiceSearchResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretServiceSearchResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SetTextContent - Set Text Content +// SetTextContent sets the encrypted content for a text secret. +// +// Client encrypts content using age_recipient from CreateResponse. +func (s *PaperSecret) SetTextContent(ctx context.Context, request operations.C1APISecretsV1PaperSecretServiceSetTextContentRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretServiceSetTextContentResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/secrets/{vault_id}/content", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretService.SetTextContent", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "PaperSecretServiceSetTextContentRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretServiceSetTextContentResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretServiceSetTextContentResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretServiceSetTextContentResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/papersecretadmin.go b/vendor/github.com/conductorone/conductorone-sdk-go/papersecretadmin.go new file mode 100644 index 00000000..c20d0804 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/papersecretadmin.go @@ -0,0 +1,877 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type PaperSecretAdmin struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newPaperSecretAdmin(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *PaperSecretAdmin { + return &PaperSecretAdmin{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Get +// Get retrieves any secret's metadata by vault ID (admin override). +func (s *PaperSecretAdmin) Get(ctx context.Context, request operations.C1APISecretsV1PaperSecretAdminServiceGetRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretAdminServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/secrets-admin/{vault_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretAdminService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretAdminServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretAdminServiceGetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretAdminServiceGetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Revoke +// Revoke allows admin to revoke any secret (not just their own). +func (s *PaperSecretAdmin) Revoke(ctx context.Context, request operations.C1APISecretsV1PaperSecretAdminServiceRevokeRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretAdminServiceRevokeResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/secrets-admin/{vault_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretAdminService.Revoke", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "PaperSecretAdminServiceRevokeRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretAdminServiceRevokeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretAdminServiceRevokeResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretAdminServiceRevokeResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Search +// Search returns secrets across the tenant. +// +// Can filter by creator, sharing mode, status, time range, etc. +func (s *PaperSecretAdmin) Search(ctx context.Context, request *shared.PaperSecretAdminServiceSearchRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretAdminServiceSearchResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/secrets-admin") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretAdminService.Search", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretAdminServiceSearchResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretAdminServiceSearchResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretAdminServiceSearchResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SearchAuditEvents - Search Audit Events +// SearchAuditEvents returns audit events for paper secrets. +// +// Can filter by vault_id, actor (user ID or email), client IP. +func (s *PaperSecretAdmin) SearchAuditEvents(ctx context.Context, request *shared.PaperSecretAdminServiceSearchAuditEventsRequest, opts ...operations.Option) (*operations.C1APISecretsV1PaperSecretAdminServiceSearchAuditEventsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/secrets-admin/audit_events") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.secrets.v1.PaperSecretAdminService.SearchAuditEvents", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISecretsV1PaperSecretAdminServiceSearchAuditEventsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.PaperSecretAdminServiceSearchAuditEventsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.PaperSecretAdminServiceSearchAuditEventsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/personalclient.go b/vendor/github.com/conductorone/conductorone-sdk-go/personalclient.go index 0bf7ba7c..0448eb8d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/personalclient.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/personalclient.go @@ -244,7 +244,7 @@ func (s *PersonalClient) Create(ctx context.Context, request *shared.PersonalCli } // Delete -// Invokes the c1.api.iam.v1.PersonalClientService.Delete method. +// Delete a personal client credential, revoking it and preventing further API access. func (s *PersonalClient) Delete(ctx context.Context, request operations.C1APIIamV1PersonalClientServiceDeleteRequest, opts ...operations.Option) (*operations.C1APIIamV1PersonalClientServiceDeleteResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -456,7 +456,7 @@ func (s *PersonalClient) Delete(ctx context.Context, request operations.C1APIIam } // Get -// Invokes the c1.api.iam.v1.PersonalClientService.Get method. +// Get retrieves a single personal client credential by its ID. func (s *PersonalClient) Get(ctx context.Context, request operations.C1APIIamV1PersonalClientServiceGetRequest, opts ...operations.Option) (*operations.C1APIIamV1PersonalClientServiceGetResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -661,7 +661,7 @@ func (s *PersonalClient) Get(ctx context.Context, request operations.C1APIIamV1P } // List - NOTE: Only shows personal clients for the current user. -// Invokes the c1.api.iam.v1.PersonalClientService.List method. +// List returns all personal client credentials owned by the calling user. func (s *PersonalClient) List(ctx context.Context, opts ...operations.Option) (*operations.C1APIIamV1PersonalClientServiceListResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -866,7 +866,7 @@ func (s *PersonalClient) List(ctx context.Context, opts ...operations.Option) (* } // Update -// Invokes the c1.api.iam.v1.PersonalClientService.Update method. +// Update modifies an existing personal client credential. Use the update mask to specify which fields to change. func (s *PersonalClient) Update(ctx context.Context, request operations.C1APIIamV1PersonalClientServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIIamV1PersonalClientServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/personalclientsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/personalclientsearch.go index 680df852..0ca6660f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/personalclientsearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/personalclientsearch.go @@ -32,7 +32,7 @@ func newPersonalClientSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfi } // Search - NOTE: Searches personal clients for all users -// Invokes the c1.api.iam.v1.PersonalClientSearchService.Search method. +// Search finds personal client credentials across all users, with optional filtering by query text or user. func (s *PersonalClientSearch) Search(ctx context.Context, request *shared.PersonalClientSearchServiceSearchRequest, opts ...operations.Option) (*operations.C1APIIamV1PersonalClientSearchServiceSearchResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicecreatesurfacefeedback.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicecreatesurfacefeedback.go new file mode 100644 index 00000000..fbed18a5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicecreatesurfacefeedback.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackRequest struct { + A2UIServiceCreateSurfaceFeedbackRequest *shared.A2UIServiceCreateSurfaceFeedbackRequest `request:"mediaType=application/json"` + SurfaceID string `pathParam:"style=simple,explode=false,name=surface_id"` +} + +func (c *C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackRequest) GetA2UIServiceCreateSurfaceFeedbackRequest() *shared.A2UIServiceCreateSurfaceFeedbackRequest { + if c == nil { + return nil + } + return c.A2UIServiceCreateSurfaceFeedbackRequest +} + +func (c *C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackRequest) GetSurfaceID() string { + if c == nil { + return "" + } + return c.SurfaceID +} + +// #region class-body-c1apia2uiv1a2uiservicecreatesurfacefeedbackrequest +// #endregion class-body-c1apia2uiv1a2uiservicecreatesurfacefeedbackrequest + +type C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackResponse struct { + // A2UIServiceCreateSurfaceFeedbackResponse returns the created feedback. + A2UIServiceCreateSurfaceFeedbackResponse *shared.A2UIServiceCreateSurfaceFeedbackResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackResponse) GetA2UIServiceCreateSurfaceFeedbackResponse() *shared.A2UIServiceCreateSurfaceFeedbackResponse { + if c == nil { + return nil + } + return c.A2UIServiceCreateSurfaceFeedbackResponse +} + +func (c *C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIA2uiV1A2UIServiceCreateSurfaceFeedbackResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apia2uiv1a2uiservicecreatesurfacefeedbackresponse +// #endregion class-body-c1apia2uiv1a2uiservicecreatesurfacefeedbackresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicelistsurfacefeedback.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicelistsurfacefeedback.go new file mode 100644 index 00000000..5b541267 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicelistsurfacefeedback.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIA2uiV1A2UIServiceListSurfaceFeedbackRequest struct { + SurfaceID string `pathParam:"style=simple,explode=false,name=surface_id"` +} + +func (c *C1APIA2uiV1A2UIServiceListSurfaceFeedbackRequest) GetSurfaceID() string { + if c == nil { + return "" + } + return c.SurfaceID +} + +// #region class-body-c1apia2uiv1a2uiservicelistsurfacefeedbackrequest +// #endregion class-body-c1apia2uiv1a2uiservicelistsurfacefeedbackrequest + +type C1APIA2uiV1A2UIServiceListSurfaceFeedbackResponse struct { + // A2UIServiceListSurfaceFeedbackResponse returns feedback for a surface. + A2UIServiceListSurfaceFeedbackResponse *shared.A2UIServiceListSurfaceFeedbackResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIA2uiV1A2UIServiceListSurfaceFeedbackResponse) GetA2UIServiceListSurfaceFeedbackResponse() *shared.A2UIServiceListSurfaceFeedbackResponse { + if c == nil { + return nil + } + return c.A2UIServiceListSurfaceFeedbackResponse +} + +func (c *C1APIA2uiV1A2UIServiceListSurfaceFeedbackResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIA2uiV1A2UIServiceListSurfaceFeedbackResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIA2uiV1A2UIServiceListSurfaceFeedbackResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apia2uiv1a2uiservicelistsurfacefeedbackresponse +// #endregion class-body-c1apia2uiv1a2uiservicelistsurfacefeedbackresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicelistsurfaces.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicelistsurfaces.go new file mode 100644 index 00000000..2ac040da --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicelistsurfaces.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIA2uiV1A2UIServiceListSurfacesRequest struct { + ConversationID string `pathParam:"style=simple,explode=false,name=conversation_id"` +} + +func (c *C1APIA2uiV1A2UIServiceListSurfacesRequest) GetConversationID() string { + if c == nil { + return "" + } + return c.ConversationID +} + +// #region class-body-c1apia2uiv1a2uiservicelistsurfacesrequest +// #endregion class-body-c1apia2uiv1a2uiservicelistsurfacesrequest + +type C1APIA2uiV1A2UIServiceListSurfacesResponse struct { + // A2UIServiceListSurfacesResponse returns active surfaces. + A2UIServiceListSurfacesResponse *shared.A2UIServiceListSurfacesResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIA2uiV1A2UIServiceListSurfacesResponse) GetA2UIServiceListSurfacesResponse() *shared.A2UIServiceListSurfacesResponse { + if c == nil { + return nil + } + return c.A2UIServiceListSurfacesResponse +} + +func (c *C1APIA2uiV1A2UIServiceListSurfacesResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIA2uiV1A2UIServiceListSurfacesResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIA2uiV1A2UIServiceListSurfacesResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apia2uiv1a2uiservicelistsurfacesresponse +// #endregion class-body-c1apia2uiv1a2uiservicelistsurfacesresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicesubmitaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicesubmitaction.go new file mode 100644 index 00000000..818c37d1 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apia2uiv1a2uiservicesubmitaction.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIA2uiV1A2UIServiceSubmitActionRequest struct { + A2UIServiceSubmitActionRequest *shared.A2UIServiceSubmitActionRequest `request:"mediaType=application/json"` + SurfaceID string `pathParam:"style=simple,explode=false,name=surface_id"` +} + +func (c *C1APIA2uiV1A2UIServiceSubmitActionRequest) GetA2UIServiceSubmitActionRequest() *shared.A2UIServiceSubmitActionRequest { + if c == nil { + return nil + } + return c.A2UIServiceSubmitActionRequest +} + +func (c *C1APIA2uiV1A2UIServiceSubmitActionRequest) GetSurfaceID() string { + if c == nil { + return "" + } + return c.SurfaceID +} + +// #region class-body-c1apia2uiv1a2uiservicesubmitactionrequest +// #endregion class-body-c1apia2uiv1a2uiservicesubmitactionrequest + +type C1APIA2uiV1A2UIServiceSubmitActionResponse struct { + // A2UIServiceSubmitActionResponse returns the result of an action. + A2UIServiceSubmitActionResponse *shared.A2UIServiceSubmitActionResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIA2uiV1A2UIServiceSubmitActionResponse) GetA2UIServiceSubmitActionResponse() *shared.A2UIServiceSubmitActionResponse { + if c == nil { + return nil + } + return c.A2UIServiceSubmitActionResponse +} + +func (c *C1APIA2uiV1A2UIServiceSubmitActionResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIA2uiV1A2UIServiceSubmitActionResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIA2uiV1A2UIServiceSubmitActionResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apia2uiv1a2uiservicesubmitactionresponse +// #endregion class-body-c1apia2uiv1a2uiservicesubmitactionresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicecreatemonitor.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicecreatemonitor.go index ce8da5da..198027e8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicecreatemonitor.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicecreatemonitor.go @@ -8,7 +8,8 @@ import ( ) type C1APIAccessconflictV1AccessConflictServiceCreateMonitorResponse struct { - // Successful response + // A conflict monitor defines a Separation of Duty rule between two entitlement sets. + // It detects when any user holds entitlements from both set A and set B simultaneously. ConflictMonitor *shared.ConflictMonitor // HTTP response content type for this operation ContentType string @@ -45,3 +46,6 @@ func (c *C1APIAccessconflictV1AccessConflictServiceCreateMonitorResponse) GetRaw } return c.RawResponse } + +// #region class-body-c1apiaccessconflictv1accessconflictservicecreatemonitorresponse +// #endregion class-body-c1apiaccessconflictv1accessconflictservicecreatemonitorresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicedeletemonitor.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicedeletemonitor.go index a646a2b5..da7ed251 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicedeletemonitor.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicedeletemonitor.go @@ -26,8 +26,11 @@ func (c *C1APIAccessconflictV1AccessConflictServiceDeleteMonitorRequest) GetID() return c.ID } +// #region class-body-c1apiaccessconflictv1accessconflictservicedeletemonitorrequest +// #endregion class-body-c1apiaccessconflictv1accessconflictservicedeletemonitorrequest + type C1APIAccessconflictV1AccessConflictServiceDeleteMonitorResponse struct { - // Successful response + // The response message for deleting a conflict monitor. ConflictMonitorDeleteResponse *shared.ConflictMonitorDeleteResponse // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAccessconflictV1AccessConflictServiceDeleteMonitorResponse) GetRaw } return c.RawResponse } + +// #region class-body-c1apiaccessconflictv1accessconflictservicedeletemonitorresponse +// #endregion class-body-c1apiaccessconflictv1accessconflictservicedeletemonitorresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicegetmonitor.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicegetmonitor.go index 66dc127f..ebfa2086 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicegetmonitor.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictservicegetmonitor.go @@ -18,8 +18,12 @@ func (c *C1APIAccessconflictV1AccessConflictServiceGetMonitorRequest) GetID() st return c.ID } +// #region class-body-c1apiaccessconflictv1accessconflictservicegetmonitorrequest +// #endregion class-body-c1apiaccessconflictv1accessconflictservicegetmonitorrequest + type C1APIAccessconflictV1AccessConflictServiceGetMonitorResponse struct { - // Successful response + // A conflict monitor defines a Separation of Duty rule between two entitlement sets. + // It detects when any user holds entitlements from both set A and set B simultaneously. ConflictMonitor *shared.ConflictMonitor // HTTP response content type for this operation ContentType string @@ -56,3 +60,6 @@ func (c *C1APIAccessconflictV1AccessConflictServiceGetMonitorResponse) GetRawRes } return c.RawResponse } + +// #region class-body-c1apiaccessconflictv1accessconflictservicegetmonitorresponse +// #endregion class-body-c1apiaccessconflictv1accessconflictservicegetmonitorresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictserviceupdatemonitor.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictserviceupdatemonitor.go index 58729f21..c154a7a5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictserviceupdatemonitor.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1accessconflictserviceupdatemonitor.go @@ -26,8 +26,12 @@ func (c *C1APIAccessconflictV1AccessConflictServiceUpdateMonitorRequest) GetID() return c.ID } +// #region class-body-c1apiaccessconflictv1accessconflictserviceupdatemonitorrequest +// #endregion class-body-c1apiaccessconflictv1accessconflictserviceupdatemonitorrequest + type C1APIAccessconflictV1AccessConflictServiceUpdateMonitorResponse struct { - // Successful response + // A conflict monitor defines a Separation of Duty rule between two entitlement sets. + // It detects when any user holds entitlements from both set A and set B simultaneously. ConflictMonitor *shared.ConflictMonitor // HTTP response content type for this operation ContentType string @@ -64,3 +68,6 @@ func (c *C1APIAccessconflictV1AccessConflictServiceUpdateMonitorResponse) GetRaw } return c.RawResponse } + +// #region class-body-c1apiaccessconflictv1accessconflictserviceupdatemonitorresponse +// #endregion class-body-c1apiaccessconflictv1accessconflictserviceupdatemonitorresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicecreateappentitlementmonitorbinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicecreateappentitlementmonitorbinding.go index 7086c3bb..707104cd 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicecreateappentitlementmonitorbinding.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicecreateappentitlementmonitorbinding.go @@ -8,7 +8,7 @@ import ( ) type C1APIAccessconflictV1AppEntitlementMonitorBindingServiceCreateAppEntitlementMonitorBindingResponse struct { - // Successful response + // Represents the association of an app entitlement with one side (A or B) of a conflict monitor. AppEntitlementMonitorBinding *shared.AppEntitlementMonitorBinding // HTTP response content type for this operation ContentType string @@ -45,3 +45,6 @@ func (c *C1APIAccessconflictV1AppEntitlementMonitorBindingServiceCreateAppEntitl } return c.RawResponse } + +// #region class-body-c1apiaccessconflictv1appentitlementmonitorbindingservicecreateappentitlementmonitorbindingresponse +// #endregion class-body-c1apiaccessconflictv1appentitlementmonitorbindingservicecreateappentitlementmonitorbindingresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicedeleteappentitlementmonitorbinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicedeleteappentitlementmonitorbinding.go index 54822c24..786a8ff9 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicedeleteappentitlementmonitorbinding.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicedeleteappentitlementmonitorbinding.go @@ -10,7 +10,7 @@ import ( type C1APIAccessconflictV1AppEntitlementMonitorBindingServiceDeleteAppEntitlementMonitorBindingResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for deleting an app entitlement monitor binding. DeleteAppEntitlementMonitorBindingResponse *shared.DeleteAppEntitlementMonitorBindingResponse // HTTP response status code for this operation StatusCode int @@ -45,3 +45,6 @@ func (c *C1APIAccessconflictV1AppEntitlementMonitorBindingServiceDeleteAppEntitl } return c.RawResponse } + +// #region class-body-c1apiaccessconflictv1appentitlementmonitorbindingservicedeleteappentitlementmonitorbindingresponse +// #endregion class-body-c1apiaccessconflictv1appentitlementmonitorbindingservicedeleteappentitlementmonitorbindingresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicegetappentitlementmonitorbinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicegetappentitlementmonitorbinding.go index 1721bacb..b3b4275a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicegetappentitlementmonitorbinding.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessconflictv1appentitlementmonitorbindingservicegetappentitlementmonitorbinding.go @@ -8,7 +8,7 @@ import ( ) type C1APIAccessconflictV1AppEntitlementMonitorBindingServiceGetAppEntitlementMonitorBindingResponse struct { - // Successful response + // Represents the association of an app entitlement with one side (A or B) of a conflict monitor. AppEntitlementMonitorBinding *shared.AppEntitlementMonitorBinding // HTTP response content type for this operation ContentType string @@ -45,3 +45,6 @@ func (c *C1APIAccessconflictV1AppEntitlementMonitorBindingServiceGetAppEntitleme } return c.RawResponse } + +// #region class-body-c1apiaccessconflictv1appentitlementmonitorbindingservicegetappentitlementmonitorbindingresponse +// #endregion class-body-c1apiaccessconflictv1appentitlementmonitorbindingservicegetappentitlementmonitorbindingresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicecreate.go index f7ee38fb..3bd08a30 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicecreate.go @@ -45,3 +45,6 @@ func (c *C1APIAccessreviewV1AccessReviewServiceCreateResponse) GetRawResponse() } return c.RawResponse } + +// #region class-body-c1apiaccessreviewv1accessreviewservicecreateresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicedelete.go index cfb4aa1c..830ba96a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicedelete.go @@ -26,6 +26,9 @@ func (c *C1APIAccessreviewV1AccessReviewServiceDeleteRequest) GetID() string { return c.ID } +// #region class-body-c1apiaccessreviewv1accessreviewservicedeleterequest +// #endregion class-body-c1apiaccessreviewv1accessreviewservicedeleterequest + type C1APIAccessreviewV1AccessReviewServiceDeleteResponse struct { // Successful response AccessReviewServiceDeleteResponse *shared.AccessReviewServiceDeleteResponse @@ -64,3 +67,6 @@ func (c *C1APIAccessreviewV1AccessReviewServiceDeleteResponse) GetRawResponse() } return c.RawResponse } + +// #region class-body-c1apiaccessreviewv1accessreviewservicedeleteresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewserviceget.go index 747ab1cf..314308ff 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIAccessreviewV1AccessReviewServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apiaccessreviewv1accessreviewservicegetrequest +// #endregion class-body-c1apiaccessreviewv1accessreviewservicegetrequest + type C1APIAccessreviewV1AccessReviewServiceGetResponse struct { // Successful response AccessReviewServiceGetResponse *shared.AccessReviewServiceGetResponse @@ -56,3 +59,6 @@ func (c *C1APIAccessreviewV1AccessReviewServiceGetResponse) GetRawResponse() *ht } return c.RawResponse } + +// #region class-body-c1apiaccessreviewv1accessreviewservicegetresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicelist.go index ef3829b4..b68dcc80 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewservicelist.go @@ -26,6 +26,9 @@ func (c *C1APIAccessreviewV1AccessReviewServiceListRequest) GetPageToken() *stri return c.PageToken } +// #region class-body-c1apiaccessreviewv1accessreviewservicelistrequest +// #endregion class-body-c1apiaccessreviewv1accessreviewservicelistrequest + type C1APIAccessreviewV1AccessReviewServiceListResponse struct { // Successful response AccessReviewServiceListResponse *shared.AccessReviewServiceListResponse @@ -64,3 +67,6 @@ func (c *C1APIAccessreviewV1AccessReviewServiceListResponse) GetRawResponse() *h } return c.RawResponse } + +// #region class-body-c1apiaccessreviewv1accessreviewservicelistresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewserviceupdate.go index 29bc9c9f..d31515e8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewserviceupdate.go @@ -26,6 +26,9 @@ func (c *C1APIAccessreviewV1AccessReviewServiceUpdateRequest) GetID() string { return c.ID } +// #region class-body-c1apiaccessreviewv1accessreviewserviceupdaterequest +// #endregion class-body-c1apiaccessreviewv1accessreviewserviceupdaterequest + type C1APIAccessreviewV1AccessReviewServiceUpdateResponse struct { // Successful response AccessReviewServiceUpdateResponse *shared.AccessReviewServiceUpdateResponse @@ -64,3 +67,6 @@ func (c *C1APIAccessreviewV1AccessReviewServiceUpdateResponse) GetRawResponse() } return c.RawResponse } + +// #region class-body-c1apiaccessreviewv1accessreviewserviceupdateresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewsetupentitlementservicegetcampaignscopeandentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewsetupentitlementservicegetcampaignscopeandentitlements.go new file mode 100644 index 00000000..a0de0aa5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewsetupentitlementservicegetcampaignscopeandentitlements.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAccessreviewV1AccessReviewSetupEntitlementServiceGetCampaignScopeAndEntitlementsRequest struct { + AccessReviewID string `pathParam:"style=simple,explode=false,name=access_review_id"` +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceGetCampaignScopeAndEntitlementsRequest) GetAccessReviewID() string { + if c == nil { + return "" + } + return c.AccessReviewID +} + +// #region class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicegetcampaignscopeandentitlementsrequest +// #endregion class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicegetcampaignscopeandentitlementsrequest + +type C1APIAccessreviewV1AccessReviewSetupEntitlementServiceGetCampaignScopeAndEntitlementsResponse struct { + // Successful response + AccessReviewSetupEntitlementAndScopeServiceSetResponse *shared.AccessReviewSetupEntitlementAndScopeServiceSetResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceGetCampaignScopeAndEntitlementsResponse) GetAccessReviewSetupEntitlementAndScopeServiceSetResponse() *shared.AccessReviewSetupEntitlementAndScopeServiceSetResponse { + if c == nil { + return nil + } + return c.AccessReviewSetupEntitlementAndScopeServiceSetResponse +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceGetCampaignScopeAndEntitlementsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceGetCampaignScopeAndEntitlementsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceGetCampaignScopeAndEntitlementsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicegetcampaignscopeandentitlementsresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicegetcampaignscopeandentitlementsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopeandentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopeandentitlements.go new file mode 100644 index 00000000..8928a387 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopeandentitlements.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsRequest struct { + AccessReviewSetupEntitlementAndScopeServiceSetRequest *shared.AccessReviewSetupEntitlementAndScopeServiceSetRequest `request:"mediaType=application/json"` + AccessReviewID string `pathParam:"style=simple,explode=false,name=access_review_id"` +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsRequest) GetAccessReviewSetupEntitlementAndScopeServiceSetRequest() *shared.AccessReviewSetupEntitlementAndScopeServiceSetRequest { + if c == nil { + return nil + } + return c.AccessReviewSetupEntitlementAndScopeServiceSetRequest +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsRequest) GetAccessReviewID() string { + if c == nil { + return "" + } + return c.AccessReviewID +} + +// #region class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopeandentitlementsrequest +// #endregion class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopeandentitlementsrequest + +type C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsResponse struct { + // Successful response + AccessReviewSetupEntitlementAndScopeServiceSetResponse *shared.AccessReviewSetupEntitlementAndScopeServiceSetResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsResponse) GetAccessReviewSetupEntitlementAndScopeServiceSetResponse() *shared.AccessReviewSetupEntitlementAndScopeServiceSetResponse { + if c == nil { + return nil + } + return c.AccessReviewSetupEntitlementAndScopeServiceSetResponse +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeAndEntitlementsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopeandentitlementsresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopeandentitlementsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopebyresourcetype.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopebyresourcetype.go new file mode 100644 index 00000000..39071368 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopebyresourcetype.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeRequest struct { + AccessReviewSetScopeByResourceTypeRequest *shared.AccessReviewSetScopeByResourceTypeRequest `request:"mediaType=application/json"` + AccessReviewID string `pathParam:"style=simple,explode=false,name=access_review_id"` +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeRequest) GetAccessReviewSetScopeByResourceTypeRequest() *shared.AccessReviewSetScopeByResourceTypeRequest { + if c == nil { + return nil + } + return c.AccessReviewSetScopeByResourceTypeRequest +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeRequest) GetAccessReviewID() string { + if c == nil { + return "" + } + return c.AccessReviewID +} + +// #region class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopebyresourcetyperequest +// #endregion class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopebyresourcetyperequest + +type C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeResponse struct { + // Successful response + AccessReviewSetScopeByResourceTypeResponse *shared.AccessReviewSetScopeByResourceTypeResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeResponse) GetAccessReviewSetScopeByResourceTypeResponse() *shared.AccessReviewSetScopeByResourceTypeResponse { + if c == nil { + return nil + } + return c.AccessReviewSetScopeByResourceTypeResponse +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAccessreviewV1AccessReviewSetupEntitlementServiceSetCampaignScopeByResourceTypeResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopebyresourcetyperesponse +// #endregion class-body-c1apiaccessreviewv1accessreviewsetupentitlementservicesetcampaignscopebyresourcetyperesponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateservicecreate.go index 576c3249..bea1f57b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateservicecreate.go @@ -45,3 +45,6 @@ func (c *C1APIAccessreviewV1AccessReviewTemplateServiceCreateResponse) GetRawRes } return c.RawResponse } + +// #region class-body-c1apiaccessreviewv1accessreviewtemplateservicecreateresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplateservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateservicedelete.go index 885131c9..cd49d616 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateservicedelete.go @@ -26,6 +26,9 @@ func (c *C1APIAccessreviewV1AccessReviewTemplateServiceDeleteRequest) GetID() st return c.ID } +// #region class-body-c1apiaccessreviewv1accessreviewtemplateservicedeleterequest +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplateservicedeleterequest + type C1APIAccessreviewV1AccessReviewTemplateServiceDeleteResponse struct { // Successful response AccessReviewTemplateServiceDeleteResponse *shared.AccessReviewTemplateServiceDeleteResponse @@ -64,3 +67,6 @@ func (c *C1APIAccessreviewV1AccessReviewTemplateServiceDeleteResponse) GetRawRes } return c.RawResponse } + +// #region class-body-c1apiaccessreviewv1accessreviewtemplateservicedeleteresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplateservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateserviceget.go index f037139b..4d95323a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIAccessreviewV1AccessReviewTemplateServiceGetRequest) GetID() strin return c.ID } +// #region class-body-c1apiaccessreviewv1accessreviewtemplateservicegetrequest +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplateservicegetrequest + type C1APIAccessreviewV1AccessReviewTemplateServiceGetResponse struct { // Successful response AccessReviewTemplateServiceGetResponse *shared.AccessReviewTemplateServiceGetResponse @@ -56,3 +59,6 @@ func (c *C1APIAccessreviewV1AccessReviewTemplateServiceGetResponse) GetRawRespon } return c.RawResponse } + +// #region class-body-c1apiaccessreviewv1accessreviewtemplateservicegetresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplateservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateserviceupdate.go index 5ccc3218..e3be29c0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplateserviceupdate.go @@ -26,6 +26,9 @@ func (c *C1APIAccessreviewV1AccessReviewTemplateServiceUpdateRequest) GetID() st return c.ID } +// #region class-body-c1apiaccessreviewv1accessreviewtemplateserviceupdaterequest +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplateserviceupdaterequest + type C1APIAccessreviewV1AccessReviewTemplateServiceUpdateResponse struct { // Successful response AccessReviewTemplateServiceUpdateResponse *shared.AccessReviewTemplateServiceUpdateResponse @@ -64,3 +67,6 @@ func (c *C1APIAccessreviewV1AccessReviewTemplateServiceUpdateResponse) GetRawRes } return c.RawResponse } + +// #region class-body-c1apiaccessreviewv1accessreviewtemplateserviceupdateresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplateserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicegetscopeandentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicegetscopeandentitlements.go new file mode 100644 index 00000000..fa4014c6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicegetscopeandentitlements.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceGetScopeAndEntitlementsRequest struct { + AccessReviewTemplateID string `pathParam:"style=simple,explode=false,name=access_review_template_id"` +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceGetScopeAndEntitlementsRequest) GetAccessReviewTemplateID() string { + if c == nil { + return "" + } + return c.AccessReviewTemplateID +} + +// #region class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicegetscopeandentitlementsrequest +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicegetscopeandentitlementsrequest + +type C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceGetScopeAndEntitlementsResponse struct { + // Successful response + AccessReviewTemplateSetupEntitlementServiceSetResponse *shared.AccessReviewTemplateSetupEntitlementServiceSetResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceGetScopeAndEntitlementsResponse) GetAccessReviewTemplateSetupEntitlementServiceSetResponse() *shared.AccessReviewTemplateSetupEntitlementServiceSetResponse { + if c == nil { + return nil + } + return c.AccessReviewTemplateSetupEntitlementServiceSetResponse +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceGetScopeAndEntitlementsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceGetScopeAndEntitlementsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceGetScopeAndEntitlementsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicegetscopeandentitlementsresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicegetscopeandentitlementsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopeandentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopeandentitlements.go new file mode 100644 index 00000000..25ace13a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopeandentitlements.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsRequest struct { + AccessReviewTemplateSetupEntitlementServiceSetRequest *shared.AccessReviewTemplateSetupEntitlementServiceSetRequest `request:"mediaType=application/json"` + AccessReviewTemplateID string `pathParam:"style=simple,explode=false,name=access_review_template_id"` +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsRequest) GetAccessReviewTemplateSetupEntitlementServiceSetRequest() *shared.AccessReviewTemplateSetupEntitlementServiceSetRequest { + if c == nil { + return nil + } + return c.AccessReviewTemplateSetupEntitlementServiceSetRequest +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsRequest) GetAccessReviewTemplateID() string { + if c == nil { + return "" + } + return c.AccessReviewTemplateID +} + +// #region class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopeandentitlementsrequest +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopeandentitlementsrequest + +type C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsResponse struct { + // Successful response + AccessReviewTemplateSetupEntitlementServiceSetResponse *shared.AccessReviewTemplateSetupEntitlementServiceSetResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsResponse) GetAccessReviewTemplateSetupEntitlementServiceSetResponse() *shared.AccessReviewTemplateSetupEntitlementServiceSetResponse { + if c == nil { + return nil + } + return c.AccessReviewTemplateSetupEntitlementServiceSetResponse +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeAndEntitlementsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopeandentitlementsresponse +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopeandentitlementsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopebyresourcetype.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopebyresourcetype.go new file mode 100644 index 00000000..053afdf0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopebyresourcetype.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeRequest struct { + AccessReviewTemplateSetScopeByResourceTypeRequest *shared.AccessReviewTemplateSetScopeByResourceTypeRequest `request:"mediaType=application/json"` + AccessReviewTemplateID string `pathParam:"style=simple,explode=false,name=access_review_template_id"` +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeRequest) GetAccessReviewTemplateSetScopeByResourceTypeRequest() *shared.AccessReviewTemplateSetScopeByResourceTypeRequest { + if c == nil { + return nil + } + return c.AccessReviewTemplateSetScopeByResourceTypeRequest +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeRequest) GetAccessReviewTemplateID() string { + if c == nil { + return "" + } + return c.AccessReviewTemplateID +} + +// #region class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopebyresourcetyperequest +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopebyresourcetyperequest + +type C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeResponse struct { + // Successful response + AccessReviewTemplateSetScopeByResourceTypeResponse *shared.AccessReviewTemplateSetScopeByResourceTypeResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeResponse) GetAccessReviewTemplateSetScopeByResourceTypeResponse() *shared.AccessReviewTemplateSetScopeByResourceTypeResponse { + if c == nil { + return nil + } + return c.AccessReviewTemplateSetScopeByResourceTypeResponse +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAccessreviewV1AccessReviewTemplateSetupEntitlementServiceSetScopeByResourceTypeResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopebyresourcetyperesponse +// #endregion class-body-c1apiaccessreviewv1accessreviewtemplatesetupentitlementservicesetscopebyresourcetyperesponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicecancelappaccessrequestsdefaults.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicecancelappaccessrequestsdefaults.go index 7e1fdc8d..61c84812 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicecancelappaccessrequestsdefaults.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicecancelappaccessrequestsdefaults.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppAccessRequestsDefaultsServiceCancelAppAccessRequestsDefaul return c.AppID } +// #region class-body-c1apiappv1appaccessrequestsdefaultsservicecancelappaccessrequestsdefaultsrequest +// #endregion class-body-c1apiappv1appaccessrequestsdefaultsservicecancelappaccessrequestsdefaultsrequest + type C1APIAppV1AppAccessRequestsDefaultsServiceCancelAppAccessRequestsDefaultsResponse struct { // Successful response AppAccessRequestDefaults *shared.AppAccessRequestDefaults @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppAccessRequestsDefaultsServiceCancelAppAccessRequestsDefaul } return c.RawResponse } + +// #region class-body-c1apiappv1appaccessrequestsdefaultsservicecancelappaccessrequestsdefaultsresponse +// #endregion class-body-c1apiappv1appaccessrequestsdefaultsservicecancelappaccessrequestsdefaultsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicecreateappaccessrequestsdefaults.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicecreateappaccessrequestsdefaults.go index 618a498f..56523ddb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicecreateappaccessrequestsdefaults.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicecreateappaccessrequestsdefaults.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppAccessRequestsDefaultsServiceCreateAppAccessRequestsDefaul return c.AppID } +// #region class-body-c1apiappv1appaccessrequestsdefaultsservicecreateappaccessrequestsdefaultsrequest +// #endregion class-body-c1apiappv1appaccessrequestsdefaultsservicecreateappaccessrequestsdefaultsrequest + type C1APIAppV1AppAccessRequestsDefaultsServiceCreateAppAccessRequestsDefaultsResponse struct { // Successful response AppAccessRequestDefaults *shared.AppAccessRequestDefaults @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppAccessRequestsDefaultsServiceCreateAppAccessRequestsDefaul } return c.RawResponse } + +// #region class-body-c1apiappv1appaccessrequestsdefaultsservicecreateappaccessrequestsdefaultsresponse +// #endregion class-body-c1apiappv1appaccessrequestsdefaultsservicecreateappaccessrequestsdefaultsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicegetappaccessrequestsdefaults.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicegetappaccessrequestsdefaults.go index faf95bf7..61cca769 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicegetappaccessrequestsdefaults.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appaccessrequestsdefaultsservicegetappaccessrequestsdefaults.go @@ -18,6 +18,9 @@ func (c *C1APIAppV1AppAccessRequestsDefaultsServiceGetAppAccessRequestsDefaultsR return c.AppID } +// #region class-body-c1apiappv1appaccessrequestsdefaultsservicegetappaccessrequestsdefaultsrequest +// #endregion class-body-c1apiappv1appaccessrequestsdefaultsservicegetappaccessrequestsdefaultsrequest + type C1APIAppV1AppAccessRequestsDefaultsServiceGetAppAccessRequestsDefaultsResponse struct { // Successful response AppAccessRequestDefaults *shared.AppAccessRequestDefaults @@ -56,3 +59,6 @@ func (c *C1APIAppV1AppAccessRequestsDefaultsServiceGetAppAccessRequestsDefaultsR } return c.RawResponse } + +// #region class-body-c1apiappv1appaccessrequestsdefaultsservicegetappaccessrequestsdefaultsresponse +// #endregion class-body-c1apiappv1appaccessrequestsdefaultsservicegetappaccessrequestsdefaultsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersadd.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersadd.go index 1493fec8..7ae86b13 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersadd.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersadd.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementOwnersAddRequest) GetEntitlementID() string { return c.EntitlementID } +// #region class-body-c1apiappv1appentitlementownersaddrequest +// #endregion class-body-c1apiappv1appentitlementownersaddrequest + type C1APIAppV1AppEntitlementOwnersAddResponse struct { // The empty response message for adding an app entitlement owner. AddAppEntitlementOwnerResponse *shared.AddAppEntitlementOwnerResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementOwnersAddResponse) GetRawResponse() *http.Respo } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementownersaddresponse +// #endregion class-body-c1apiappv1appentitlementownersaddresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersdelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersdelete.go index d5872f5a..e0fd3f8d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersdelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersdelete.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementOwnersDeleteRequest) GetEntitlementID() string return c.EntitlementID } +// #region class-body-c1apiappv1appentitlementownersdeleterequest +// #endregion class-body-c1apiappv1appentitlementownersdeleterequest + type C1APIAppV1AppEntitlementOwnersDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementOwnersDeleteResponse) GetRawResponse() *http.Re } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementownersdeleteresponse +// #endregion class-body-c1apiappv1appentitlementownersdeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownerslist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownerslist.go index 2084c5ee..34518514 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownerslist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownerslist.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1AppEntitlementOwnersListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiappv1appentitlementownerslistrequest +// #endregion class-body-c1apiappv1appentitlementownerslistrequest + type C1APIAppV1AppEntitlementOwnersListResponse struct { // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppEntitlementOwnersListResponse) GetRawResponse() *http.Resp } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementownerslistresponse +// #endregion class-body-c1apiappv1appentitlementownerslistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownerslistownerids.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownerslistownerids.go index e2b10eee..bfd45771 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownerslistownerids.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownerslistownerids.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppEntitlementOwnersListOwnerIDsRequest) GetEntitlementID() s return c.EntitlementID } +// #region class-body-c1apiappv1appentitlementownerslistowneridsrequest +// #endregion class-body-c1apiappv1appentitlementownerslistowneridsrequest + type C1APIAppV1AppEntitlementOwnersListOwnerIDsResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppEntitlementOwnersListOwnerIDsResponse) GetRawResponse() *h } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementownerslistowneridsresponse +// #endregion class-body-c1apiappv1appentitlementownerslistowneridsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersremove.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersremove.go index 290e9ed2..10b2f7de 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersremove.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersremove.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1AppEntitlementOwnersRemoveRequest) GetUserID() string { return c.UserID } +// #region class-body-c1apiappv1appentitlementownersremoverequest +// #endregion class-body-c1apiappv1appentitlementownersremoverequest + type C1APIAppV1AppEntitlementOwnersRemoveResponse struct { // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppEntitlementOwnersRemoveResponse) GetRawResponse() *http.Re } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementownersremoveresponse +// #endregion class-body-c1apiappv1appentitlementownersremoveresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersset.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersset.go index 36c3b6e5..b72b261f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersset.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementownersset.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementOwnersSetRequest) GetEntitlementID() string { return c.EntitlementID } +// #region class-body-c1apiappv1appentitlementownerssetrequest +// #endregion class-body-c1apiappv1appentitlementownerssetrequest + type C1APIAppV1AppEntitlementOwnersSetResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementOwnersSetResponse) GetRawResponse() *http.Respo } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementownerssetresponse +// #endregion class-body-c1apiappv1appentitlementownerssetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsaddautomationexclusion.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsaddautomationexclusion.go index bed0d6fe..b638cccd 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsaddautomationexclusion.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsaddautomationexclusion.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementsAddAutomationExclusionRequest) GetAppID() stri return c.AppID } +// #region class-body-c1apiappv1appentitlementsaddautomationexclusionrequest +// #endregion class-body-c1apiappv1appentitlementsaddautomationexclusionrequest + type C1APIAppV1AppEntitlementsAddAutomationExclusionResponse struct { // Empty response with a status code indicating success. AddAutomationExclusionResponse *shared.AddAutomationExclusionResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementsAddAutomationExclusionResponse) GetRawResponse } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsaddautomationexclusionresponse +// #endregion class-body-c1apiappv1appentitlementsaddautomationexclusionresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsaddmanuallymanagedmembers.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsaddmanuallymanagedmembers.go index 7d7f3d68..210ae756 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsaddmanuallymanagedmembers.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsaddmanuallymanagedmembers.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementsAddManuallyManagedMembersRequest) GetAppID() s return c.AppID } +// #region class-body-c1apiappv1appentitlementsaddmanuallymanagedmembersrequest +// #endregion class-body-c1apiappv1appentitlementsaddmanuallymanagedmembersrequest + type C1APIAppV1AppEntitlementsAddManuallyManagedMembersResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementsAddManuallyManagedMembersResponse) GetRawRespo } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsaddmanuallymanagedmembersresponse +// #endregion class-body-c1apiappv1appentitlementsaddmanuallymanagedmembersresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementscreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementscreate.go index 183c2473..86e094a0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementscreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementscreate.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppEntitlementsCreateRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1appentitlementscreaterequest +// #endregion class-body-c1apiappv1appentitlementscreaterequest + type C1APIAppV1AppEntitlementsCreateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppEntitlementsCreateResponse) GetRawResponse() *http.Respons } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementscreateresponse +// #endregion class-body-c1apiappv1appentitlementscreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementscreateautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementscreateautomation.go index d18e782c..36229b56 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementscreateautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementscreateautomation.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementsCreateAutomationRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1appentitlementscreateautomationrequest +// #endregion class-body-c1apiappv1appentitlementscreateautomationrequest + type C1APIAppV1AppEntitlementsCreateAutomationResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementsCreateAutomationResponse) GetRawResponse() *ht } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementscreateautomationresponse +// #endregion class-body-c1apiappv1appentitlementscreateautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsdelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsdelete.go index a2b1a2db..ab8947c5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsdelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsdelete.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementsDeleteRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1appentitlementsdeleterequest +// #endregion class-body-c1apiappv1appentitlementsdeleterequest + type C1APIAppV1AppEntitlementsDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementsDeleteResponse) GetRawResponse() *http.Respons } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsdeleteresponse +// #endregion class-body-c1apiappv1appentitlementsdeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsdeleteautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsdeleteautomation.go index 06f944e2..34eb909e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsdeleteautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsdeleteautomation.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementsDeleteAutomationRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1appentitlementsdeleteautomationrequest +// #endregion class-body-c1apiappv1appentitlementsdeleteautomationrequest + type C1APIAppV1AppEntitlementsDeleteAutomationResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementsDeleteAutomationResponse) GetRawResponse() *ht } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsdeleteautomationresponse +// #endregion class-body-c1apiappv1appentitlementsdeleteautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearch.go index d7bd1abc..ecbb95f7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearch.go @@ -47,3 +47,6 @@ func (c *C1APIAppV1AppEntitlementSearchServiceSearchResponse) GetRawResponse() * } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsearchservicesearchresponse +// #endregion class-body-c1apiappv1appentitlementsearchservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchappentitlementsforappuser.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchappentitlementsforappuser.go index 77a0356f..82497998 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchappentitlementsforappuser.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchappentitlementsforappuser.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsForAppUserReq return c.PageToken } +// #region class-body-c1apiappv1appentitlementsearchservicesearchappentitlementsforappuserrequest +// #endregion class-body-c1apiappv1appentitlementsearchservicesearchappentitlementsforappuserrequest + type C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsForAppUserResponse struct { // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsForAppUserRes } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsearchservicesearchappentitlementsforappuserresponse +// #endregion class-body-c1apiappv1appentitlementsearchservicesearchappentitlementsforappuserresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchappentitlementswithexpired.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchappentitlementswithexpired.go index a82aeecc..5588d5f6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchappentitlementswithexpired.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchappentitlementswithexpired.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsWithExpiredRe return c.PageToken } +// #region class-body-c1apiappv1appentitlementsearchservicesearchappentitlementswithexpiredrequest +// #endregion class-body-c1apiappv1appentitlementsearchservicesearchappentitlementswithexpiredrequest + type C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsWithExpiredResponse struct { // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsWithExpiredRe } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsearchservicesearchappentitlementswithexpiredresponse +// #endregion class-body-c1apiappv1appentitlementsearchservicesearchappentitlementswithexpiredresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchgrants.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchgrants.go index 6439b2d7..c6ec4d68 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchgrants.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsearchservicesearchgrants.go @@ -45,3 +45,6 @@ func (c *C1APIAppV1AppEntitlementSearchServiceSearchGrantsResponse) GetRawRespon } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsearchservicesearchgrantsresponse +// #endregion class-body-c1apiappv1appentitlementsearchservicesearchgrantsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsget.go index 1be54e89..d64e6353 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsget.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppEntitlementsGetRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1appentitlementsgetrequest +// #endregion class-body-c1apiappv1appentitlementsgetrequest + type C1APIAppV1AppEntitlementsGetResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppEntitlementsGetResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsgetresponse +// #endregion class-body-c1apiappv1appentitlementsgetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsgetautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsgetautomation.go index 5297840c..c7b94858 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsgetautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsgetautomation.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppEntitlementsGetAutomationRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1appentitlementsgetautomationrequest +// #endregion class-body-c1apiappv1appentitlementsgetautomationrequest + type C1APIAppV1AppEntitlementsGetAutomationResponse struct { // Successful response AppEntitlementServiceGetAutomationResponse *shared.AppEntitlementServiceGetAutomationResponse @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppEntitlementsGetAutomationResponse) GetRawResponse() *http. } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsgetautomationresponse +// #endregion class-body-c1apiappv1appentitlementsgetautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslist.go index 3c27633f..e7242ef4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslist.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementsListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiappv1appentitlementslistrequest +// #endregion class-body-c1apiappv1appentitlementslistrequest + type C1APIAppV1AppEntitlementsListResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementsListResponse) GetRawResponse() *http.Response } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementslistresponse +// #endregion class-body-c1apiappv1appentitlementslistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistautomationexclusions.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistautomationexclusions.go index f4ffaa9b..49781839 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistautomationexclusions.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistautomationexclusions.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppEntitlementsListAutomationExclusionsRequest) GetAppID() st return c.AppID } +// #region class-body-c1apiappv1appentitlementslistautomationexclusionsrequest +// #endregion class-body-c1apiappv1appentitlementslistautomationexclusionsrequest + type C1APIAppV1AppEntitlementsListAutomationExclusionsResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppEntitlementsListAutomationExclusionsResponse) GetRawRespon } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementslistautomationexclusionsresponse +// #endregion class-body-c1apiappv1appentitlementslistautomationexclusionsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistforappresource.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistforappresource.go index d1da0d3d..e0d96695 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistforappresource.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistforappresource.go @@ -50,6 +50,9 @@ func (c *C1APIAppV1AppEntitlementsListForAppResourceRequest) GetPageToken() *str return c.PageToken } +// #region class-body-c1apiappv1appentitlementslistforappresourcerequest +// #endregion class-body-c1apiappv1appentitlementslistforappresourcerequest + type C1APIAppV1AppEntitlementsListForAppResourceResponse struct { // HTTP response content type for this operation ContentType string @@ -88,3 +91,6 @@ func (c *C1APIAppV1AppEntitlementsListForAppResourceResponse) GetRawResponse() * } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementslistforappresourceresponse +// #endregion class-body-c1apiappv1appentitlementslistforappresourceresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistforappuser.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistforappuser.go index 87cf7a0e..91d83e96 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistforappuser.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistforappuser.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1AppEntitlementsListForAppUserRequest) GetPageToken() *string return c.PageToken } +// #region class-body-c1apiappv1appentitlementslistforappuserrequest +// #endregion class-body-c1apiappv1appentitlementslistforappuserrequest + type C1APIAppV1AppEntitlementsListForAppUserResponse struct { // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppEntitlementsListForAppUserResponse) GetRawResponse() *http } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementslistforappuserresponse +// #endregion class-body-c1apiappv1appentitlementslistforappuserresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistusers.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistusers.go index b17a9eae..c70f2746 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistusers.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementslistusers.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1AppEntitlementsListUsersRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiappv1appentitlementslistusersrequest +// #endregion class-body-c1apiappv1appentitlementslistusersrequest + type C1APIAppV1AppEntitlementsListUsersResponse struct { // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppEntitlementsListUsersResponse) GetRawResponse() *http.Resp } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementslistusersresponse +// #endregion class-body-c1apiappv1appentitlementslistusersresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxycreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxycreate.go index 761fc64b..f8f96202 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxycreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxycreate.go @@ -50,10 +50,13 @@ func (c *C1APIAppV1AppEntitlementsProxyCreateRequest) GetSrcAppID() string { return c.SrcAppID } +// #region class-body-c1apiappv1appentitlementsproxycreaterequest +// #endregion class-body-c1apiappv1appentitlementsproxycreaterequest + type C1APIAppV1AppEntitlementsProxyCreateResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for creating an entitlement proxy binding. CreateAppEntitlementProxyResponse *shared.CreateAppEntitlementProxyResponse // HTTP response status code for this operation StatusCode int @@ -88,3 +91,6 @@ func (c *C1APIAppV1AppEntitlementsProxyCreateResponse) GetRawResponse() *http.Re } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsproxycreateresponse +// #endregion class-body-c1apiappv1appentitlementsproxycreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxydelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxydelete.go index 797bb296..4e4062af 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxydelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxydelete.go @@ -50,10 +50,13 @@ func (c *C1APIAppV1AppEntitlementsProxyDeleteRequest) GetSrcAppID() string { return c.SrcAppID } +// #region class-body-c1apiappv1appentitlementsproxydeleterequest +// #endregion class-body-c1apiappv1appentitlementsproxydeleterequest + type C1APIAppV1AppEntitlementsProxyDeleteResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The empty response message for deleting an entitlement proxy binding. DeleteAppEntitlementProxyResponse *shared.DeleteAppEntitlementProxyResponse // HTTP response status code for this operation StatusCode int @@ -88,3 +91,6 @@ func (c *C1APIAppV1AppEntitlementsProxyDeleteResponse) GetRawResponse() *http.Re } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsproxydeleteresponse +// #endregion class-body-c1apiappv1appentitlementsproxydeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxyget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxyget.go index 5b08e2fa..4a7b0971 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxyget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsproxyget.go @@ -42,10 +42,13 @@ func (c *C1APIAppV1AppEntitlementsProxyGetRequest) GetSrcAppID() string { return c.SrcAppID } +// #region class-body-c1apiappv1appentitlementsproxygetrequest +// #endregion class-body-c1apiappv1appentitlementsproxygetrequest + type C1APIAppV1AppEntitlementsProxyGetResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for getting a specific entitlement proxy binding. GetAppEntitlementProxyResponse *shared.GetAppEntitlementProxyResponse // HTTP response status code for this operation StatusCode int @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppEntitlementsProxyGetResponse) GetRawResponse() *http.Respo } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsproxygetresponse +// #endregion class-body-c1apiappv1appentitlementsproxygetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsremoveautomationexclusion.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsremoveautomationexclusion.go index 7a05be9f..84ab5383 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsremoveautomationexclusion.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsremoveautomationexclusion.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementsRemoveAutomationExclusionRequest) GetAppID() s return c.AppID } +// #region class-body-c1apiappv1appentitlementsremoveautomationexclusionrequest +// #endregion class-body-c1apiappv1appentitlementsremoveautomationexclusionrequest + type C1APIAppV1AppEntitlementsRemoveAutomationExclusionResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementsRemoveAutomationExclusionResponse) GetRawRespo } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsremoveautomationexclusionresponse +// #endregion class-body-c1apiappv1appentitlementsremoveautomationexclusionresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsremoveentitlementmembership.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsremoveentitlementmembership.go index fe7f9bbb..0050b5d3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsremoveentitlementmembership.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsremoveentitlementmembership.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementsRemoveEntitlementMembershipRequest) GetAppID() return c.AppID } +// #region class-body-c1apiappv1appentitlementsremoveentitlementmembershiprequest +// #endregion class-body-c1apiappv1appentitlementsremoveentitlementmembershiprequest + type C1APIAppV1AppEntitlementsRemoveEntitlementMembershipResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementsRemoveEntitlementMembershipResponse) GetRawRes } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsremoveentitlementmembershipresponse +// #endregion class-body-c1apiappv1appentitlementsremoveentitlementmembershipresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsupdate.go index 61873a20..51220328 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsupdate.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementsUpdateRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1appentitlementsupdaterequest +// #endregion class-body-c1apiappv1appentitlementsupdaterequest + type C1APIAppV1AppEntitlementsUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementsUpdateResponse) GetUpdateAppEntitlementRespons } return c.UpdateAppEntitlementResponse } + +// #region class-body-c1apiappv1appentitlementsupdateresponse +// #endregion class-body-c1apiappv1appentitlementsupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsupdateautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsupdateautomation.go index 4c02f947..19e3d836 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsupdateautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementsupdateautomation.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementsUpdateAutomationRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1appentitlementsupdateautomationrequest +// #endregion class-body-c1apiappv1appentitlementsupdateautomationrequest + type C1APIAppV1AppEntitlementsUpdateAutomationResponse struct { // Successful response AppEntitlementServiceUpdateAutomationResponse *shared.AppEntitlementServiceUpdateAutomationResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementsUpdateAutomationResponse) GetRawResponse() *ht } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementsupdateautomationresponse +// #endregion class-body-c1apiappv1appentitlementsupdateautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicelistappusersforidentitywithgrant.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicelistappusersforidentitywithgrant.go index 34d35fbc..c0491544 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicelistappusersforidentitywithgrant.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicelistappusersforidentitywithgrant.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppEntitlementUserBindingServiceListAppUsersForIdentityWithGr return c.IdentityUserID } +// #region class-body-c1apiappv1appentitlementuserbindingservicelistappusersforidentitywithgrantrequest +// #endregion class-body-c1apiappv1appentitlementuserbindingservicelistappusersforidentitywithgrantrequest + type C1APIAppV1AppEntitlementUserBindingServiceListAppUsersForIdentityWithGrantResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppEntitlementUserBindingServiceListAppUsersForIdentityWithGr } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementuserbindingservicelistappusersforidentitywithgrantresponse +// #endregion class-body-c1apiappv1appentitlementuserbindingservicelistappusersforidentitywithgrantresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingserviceremovegrantduration.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingserviceremovegrantduration.go index c37902cd..b1e85521 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingserviceremovegrantduration.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingserviceremovegrantduration.go @@ -42,10 +42,13 @@ func (c *C1APIAppV1AppEntitlementUserBindingServiceRemoveGrantDurationRequest) G return c.AppUserID } +// #region class-body-c1apiappv1appentitlementuserbindingserviceremovegrantdurationrequest +// #endregion class-body-c1apiappv1appentitlementuserbindingserviceremovegrantdurationrequest + type C1APIAppV1AppEntitlementUserBindingServiceRemoveGrantDurationResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for removing the expiration time from a grant. RemoveGrantDurationResponse *shared.RemoveGrantDurationResponse // HTTP response status code for this operation StatusCode int @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppEntitlementUserBindingServiceRemoveGrantDurationResponse) } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementuserbindingserviceremovegrantdurationresponse +// #endregion class-body-c1apiappv1appentitlementuserbindingserviceremovegrantdurationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicesearchgrantfeed.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicesearchgrantfeed.go index b72557d1..555fb59f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicesearchgrantfeed.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicesearchgrantfeed.go @@ -45,3 +45,6 @@ func (c *C1APIAppV1AppEntitlementUserBindingServiceSearchGrantFeedResponse) GetR } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementuserbindingservicesearchgrantfeedresponse +// #endregion class-body-c1apiappv1appentitlementuserbindingservicesearchgrantfeedresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicesearchpastgrants.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicesearchpastgrants.go index c5422de2..a5771f49 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicesearchpastgrants.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingservicesearchpastgrants.go @@ -45,3 +45,6 @@ func (c *C1APIAppV1AppEntitlementUserBindingServiceSearchPastGrantsResponse) Get } return c.RawResponse } + +// #region class-body-c1apiappv1appentitlementuserbindingservicesearchpastgrantsresponse +// #endregion class-body-c1apiappv1appentitlementuserbindingservicesearchpastgrantsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingserviceupdategrantduration.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingserviceupdategrantduration.go index c0e51afb..a11f767b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingserviceupdategrantduration.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appentitlementuserbindingserviceupdategrantduration.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1AppEntitlementUserBindingServiceUpdateGrantDurationRequest) G return c.AppUserID } +// #region class-body-c1apiappv1appentitlementuserbindingserviceupdategrantdurationrequest +// #endregion class-body-c1apiappv1appentitlementuserbindingserviceupdategrantdurationrequest + type C1APIAppV1AppEntitlementUserBindingServiceUpdateGrantDurationResponse struct { // HTTP response content type for this operation ContentType string @@ -49,7 +52,7 @@ type C1APIAppV1AppEntitlementUserBindingServiceUpdateGrantDurationResponse struc StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // The response message for updating the duration of a grant. UpdateGrantDurationResponse *shared.UpdateGrantDurationResponse } @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppEntitlementUserBindingServiceUpdateGrantDurationResponse) } return c.UpdateGrantDurationResponse } + +// #region class-body-c1apiappv1appentitlementuserbindingserviceupdategrantdurationresponse +// #endregion class-body-c1apiappv1appentitlementuserbindingserviceupdategrantdurationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersadd.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersadd.go index 0a54aaee..607dec43 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersadd.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersadd.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppOwnersAddRequest) GetUserID() string { return c.UserID } +// #region class-body-c1apiappv1appownersaddrequest +// #endregion class-body-c1apiappv1appownersaddrequest + type C1APIAppV1AppOwnersAddResponse struct { // Empty response with a status code indicating success AddAppOwnerResponse *shared.AddAppOwnerResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppOwnersAddResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appownersaddresponse +// #endregion class-body-c1apiappv1appownersaddresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersdelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersdelete.go index 827aad98..a3f2ef26 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersdelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersdelete.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppOwnersDeleteRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1appownersdeleterequest +// #endregion class-body-c1apiappv1appownersdeleterequest + type C1APIAppV1AppOwnersDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppOwnersDeleteResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appownersdeleteresponse +// #endregion class-body-c1apiappv1appownersdeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownerslist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownerslist.go index c0c79bad..dbbf8ed2 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownerslist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownerslist.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppOwnersListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiappv1appownerslistrequest +// #endregion class-body-c1apiappv1appownerslistrequest + type C1APIAppV1AppOwnersListResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppOwnersListResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appownerslistresponse +// #endregion class-body-c1apiappv1appownerslistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownerslistownerids.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownerslistownerids.go index bb4ff329..f174c08a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownerslistownerids.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownerslistownerids.go @@ -18,6 +18,9 @@ func (c *C1APIAppV1AppOwnersListOwnerIDsRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1appownerslistowneridsrequest +// #endregion class-body-c1apiappv1appownerslistowneridsrequest + type C1APIAppV1AppOwnersListOwnerIDsResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIAppV1AppOwnersListOwnerIDsResponse) GetRawResponse() *http.Respons } return c.RawResponse } + +// #region class-body-c1apiappv1appownerslistowneridsresponse +// #endregion class-body-c1apiappv1appownerslistowneridsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersremove.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersremove.go index b059bd01..7c0ff8df 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersremove.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersremove.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppOwnersRemoveRequest) GetUserID() string { return c.UserID } +// #region class-body-c1apiappv1appownersremoverequest +// #endregion class-body-c1apiappv1appownersremoverequest + type C1APIAppV1AppOwnersRemoveResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppOwnersRemoveResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appownersremoveresponse +// #endregion class-body-c1apiappv1appownersremoveresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersset.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersset.go index 70897d81..f9a64f53 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersset.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appownersset.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppOwnersSetRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1appownerssetrequest +// #endregion class-body-c1apiappv1appownerssetrequest + type C1APIAppV1AppOwnersSetResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppOwnersSetResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appownerssetresponse +// #endregion class-body-c1apiappv1appownerssetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appreportactionservicegeneratereport.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appreportactionservicegeneratereport.go index dd091d8b..0809345a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appreportactionservicegeneratereport.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appreportactionservicegeneratereport.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppReportActionServiceGenerateReportRequest) GetAppID() strin return c.AppID } +// #region class-body-c1apiappv1appreportactionservicegeneratereportrequest +// #endregion class-body-c1apiappv1appreportactionservicegeneratereportrequest + type C1APIAppV1AppReportActionServiceGenerateReportResponse struct { // Empty response body. Status code indicates success. AppActionsServiceGenerateReportResponse *shared.AppActionsServiceGenerateReportResponse @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppReportActionServiceGenerateReportResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apiappv1appreportactionservicegeneratereportresponse +// #endregion class-body-c1apiappv1appreportactionservicegeneratereportresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appreportservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appreportservicelist.go index ae8e654a..368e1ed3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appreportservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appreportservicelist.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppReportServiceListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiappv1appreportservicelistrequest +// #endregion class-body-c1apiappv1appreportservicelistrequest + type C1APIAppV1AppReportServiceListResponse struct { // The AppReportServiceListResponse message contains a list of results and a nextPageToken if applicable. AppReportServiceListResponse *shared.AppReportServiceListResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppReportServiceListResponse) GetRawResponse() *http.Response } return c.RawResponse } + +// #region class-body-c1apiappv1appreportservicelistresponse +// #endregion class-body-c1apiappv1appreportservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersadd.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersadd.go index fff45e7b..31d70583 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersadd.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersadd.go @@ -42,8 +42,11 @@ func (c *C1APIAppV1AppResourceOwnersAddRequest) GetResourceTypeID() string { return c.ResourceTypeID } +// #region class-body-c1apiappv1appresourceownersaddrequest +// #endregion class-body-c1apiappv1appresourceownersaddrequest + type C1APIAppV1AppResourceOwnersAddResponse struct { - // Successful response + // The empty response message for adding an owner to an app resource. AddAppResourceOwnerResponse *shared.AddAppResourceOwnerResponse // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppResourceOwnersAddResponse) GetRawResponse() *http.Response } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceownersaddresponse +// #endregion class-body-c1apiappv1appresourceownersaddresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersdelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersdelete.go index 7d16f28d..07e057aa 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersdelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersdelete.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1AppResourceOwnersDeleteRequest) GetResourceTypeID() string { return c.ResourceTypeID } +// #region class-body-c1apiappv1appresourceownersdeleterequest +// #endregion class-body-c1apiappv1appresourceownersdeleterequest + type C1APIAppV1AppResourceOwnersDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppResourceOwnersDeleteResponse) GetRawResponse() *http.Respo } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceownersdeleteresponse +// #endregion class-body-c1apiappv1appresourceownersdeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownerslist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownerslist.go index 714595e0..cbd52830 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownerslist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownerslist.go @@ -50,6 +50,9 @@ func (c *C1APIAppV1AppResourceOwnersListRequest) GetResourceTypeID() string { return c.ResourceTypeID } +// #region class-body-c1apiappv1appresourceownerslistrequest +// #endregion class-body-c1apiappv1appresourceownerslistrequest + type C1APIAppV1AppResourceOwnersListResponse struct { // HTTP response content type for this operation ContentType string @@ -88,3 +91,6 @@ func (c *C1APIAppV1AppResourceOwnersListResponse) GetRawResponse() *http.Respons } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceownerslistresponse +// #endregion class-body-c1apiappv1appresourceownerslistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownerslistownerids.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownerslistownerids.go index 0365ae7d..9a28a6c4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownerslistownerids.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownerslistownerids.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppResourceOwnersListOwnerIDsRequest) GetResourceTypeID() str return c.ResourceTypeID } +// #region class-body-c1apiappv1appresourceownerslistowneridsrequest +// #endregion class-body-c1apiappv1appresourceownerslistowneridsrequest + type C1APIAppV1AppResourceOwnersListOwnerIDsResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppResourceOwnersListOwnerIDsResponse) GetRawResponse() *http } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceownerslistowneridsresponse +// #endregion class-body-c1apiappv1appresourceownerslistowneridsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersremove.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersremove.go index 261f58df..af21f83b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersremove.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersremove.go @@ -42,10 +42,13 @@ func (c *C1APIAppV1AppResourceOwnersRemoveRequest) GetResourceTypeID() string { return c.ResourceTypeID } +// #region class-body-c1apiappv1appresourceownersremoverequest +// #endregion class-body-c1apiappv1appresourceownersremoverequest + type C1APIAppV1AppResourceOwnersRemoveResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The empty response message for removing an owner from an app resource. RemoveAppResourceOwnerResponse *shared.RemoveAppResourceOwnerResponse // HTTP response status code for this operation StatusCode int @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppResourceOwnersRemoveResponse) GetRawResponse() *http.Respo } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceownersremoveresponse +// #endregion class-body-c1apiappv1appresourceownersremoveresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersset.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersset.go index 96b14e56..f1dcddc6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersset.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceownersset.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1AppResourceOwnersSetRequest) GetResourceTypeID() string { return c.ResourceTypeID } +// #region class-body-c1apiappv1appresourceownerssetrequest +// #endregion class-body-c1apiappv1appresourceownerssetrequest + type C1APIAppV1AppResourceOwnersSetResponse struct { // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppResourceOwnersSetResponse) GetRawResponse() *http.Response } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceownerssetresponse +// #endregion class-body-c1apiappv1appresourceownerssetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcesearchsearchappresources.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcesearchsearchappresources.go index 973b1a33..533bfa7c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcesearchsearchappresources.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcesearchsearchappresources.go @@ -10,7 +10,7 @@ import ( type C1APIAppV1AppResourceSearchSearchAppResourcesResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The SearchAppResourcesResponse message contains a list of results and a nextPageToken if applicable. SearchAppResourcesResponse *shared.SearchAppResourcesResponse // HTTP response status code for this operation StatusCode int @@ -47,3 +47,6 @@ func (c *C1APIAppV1AppResourceSearchSearchAppResourcesResponse) GetRawResponse() } return c.RawResponse } + +// #region class-body-c1apiappv1appresourcesearchsearchappresourcesresponse +// #endregion class-body-c1apiappv1appresourcesearchsearchappresourcesresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcesearchsearchappresourcetypes.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcesearchsearchappresourcetypes.go index c6b7a056..fc548ca7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcesearchsearchappresourcetypes.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcesearchsearchappresourcetypes.go @@ -47,3 +47,6 @@ func (c *C1APIAppV1AppResourceSearchSearchAppResourceTypesResponse) GetRawRespon } return c.RawResponse } + +// #region class-body-c1apiappv1appresourcesearchsearchappresourcetypesresponse +// #endregion class-body-c1apiappv1appresourcesearchsearchappresourcetypesresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicecreatemanuallymanagedappresource.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicecreatemanuallymanagedappresource.go index b70fc6ee..524dece9 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicecreatemanuallymanagedappresource.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicecreatemanuallymanagedappresource.go @@ -34,10 +34,13 @@ func (c *C1APIAppV1AppResourceServiceCreateManuallyManagedAppResourceRequest) Ge return c.AppResourceTypeID } +// #region class-body-c1apiappv1appresourceservicecreatemanuallymanagedappresourcerequest +// #endregion class-body-c1apiappv1appresourceservicecreatemanuallymanagedappresourcerequest + type C1APIAppV1AppResourceServiceCreateManuallyManagedAppResourceResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for creating a manually managed app resource. CreateManuallyManagedAppResourceResponse *shared.CreateManuallyManagedAppResourceResponse // HTTP response status code for this operation StatusCode int @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppResourceServiceCreateManuallyManagedAppResourceResponse) G } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceservicecreatemanuallymanagedappresourceresponse +// #endregion class-body-c1apiappv1appresourceservicecreatemanuallymanagedappresourceresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicedeletemanuallymanagedappresource.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicedeletemanuallymanagedappresource.go index 3fd4ae34..aa9e72bc 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicedeletemanuallymanagedappresource.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicedeletemanuallymanagedappresource.go @@ -42,10 +42,13 @@ func (c *C1APIAppV1AppResourceServiceDeleteManuallyManagedAppResourceRequest) Ge return c.ID } +// #region class-body-c1apiappv1appresourceservicedeletemanuallymanagedappresourcerequest +// #endregion class-body-c1apiappv1appresourceservicedeletemanuallymanagedappresourcerequest + type C1APIAppV1AppResourceServiceDeleteManuallyManagedAppResourceResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The empty response message for deleting a manually managed app resource. DeleteManuallyManagedAppResourceResponse *shared.DeleteManuallyManagedAppResourceResponse // HTTP response status code for this operation StatusCode int @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppResourceServiceDeleteManuallyManagedAppResourceResponse) G } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceservicedeletemanuallymanagedappresourceresponse +// #endregion class-body-c1apiappv1appresourceservicedeletemanuallymanagedappresourceresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceserviceget.go index ee4ef92a..31f52b5e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceserviceget.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppResourceServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1appresourceservicegetrequest +// #endregion class-body-c1apiappv1appresourceservicegetrequest + type C1APIAppV1AppResourceServiceGetResponse struct { // The app resource service get response contains the app resource view and array of expanded items indicated by the request's expand mask. AppResourceServiceGetResponse *shared.AppResourceServiceGetResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppResourceServiceGetResponse) GetRawResponse() *http.Respons } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceservicegetresponse +// #endregion class-body-c1apiappv1appresourceservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicelist.go index 648df66a..bed357fb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceservicelist.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1AppResourceServiceListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiappv1appresourceservicelistrequest +// #endregion class-body-c1apiappv1appresourceservicelistrequest + type C1APIAppV1AppResourceServiceListResponse struct { // The AppResourceServiceListResponse message contains a list of results and a nextPageToken if applicable. AppResourceServiceListResponse *shared.AppResourceServiceListResponse @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppResourceServiceListResponse) GetRawResponse() *http.Respon } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceservicelistresponse +// #endregion class-body-c1apiappv1appresourceservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceserviceupdate.go index 0b117575..c72fe34f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourceserviceupdate.go @@ -42,8 +42,11 @@ func (c *C1APIAppV1AppResourceServiceUpdateRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1appresourceserviceupdaterequest +// #endregion class-body-c1apiappv1appresourceserviceupdaterequest + type C1APIAppV1AppResourceServiceUpdateResponse struct { - // Successful response + // The response message for updating an app resource. AppResourceServiceUpdateResponse *shared.AppResourceServiceUpdateResponse // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppResourceServiceUpdateResponse) GetRawResponse() *http.Resp } return c.RawResponse } + +// #region class-body-c1apiappv1appresourceserviceupdateresponse +// #endregion class-body-c1apiappv1appresourceserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicecreatemanuallymanagedresourcetype.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicecreatemanuallymanagedresourcetype.go index 36555e6f..e7f37769 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicecreatemanuallymanagedresourcetype.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicecreatemanuallymanagedresourcetype.go @@ -26,10 +26,13 @@ func (c *C1APIAppV1AppResourceTypeServiceCreateManuallyManagedResourceTypeReques return c.AppID } +// #region class-body-c1apiappv1appresourcetypeservicecreatemanuallymanagedresourcetyperequest +// #endregion class-body-c1apiappv1appresourcetypeservicecreatemanuallymanagedresourcetyperequest + type C1APIAppV1AppResourceTypeServiceCreateManuallyManagedResourceTypeResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for creating a manually managed resource type. CreateManuallyManagedResourceTypeResponse *shared.CreateManuallyManagedResourceTypeResponse // HTTP response status code for this operation StatusCode int @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppResourceTypeServiceCreateManuallyManagedResourceTypeRespon } return c.RawResponse } + +// #region class-body-c1apiappv1appresourcetypeservicecreatemanuallymanagedresourcetyperesponse +// #endregion class-body-c1apiappv1appresourcetypeservicecreatemanuallymanagedresourcetyperesponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicedeletemanuallymanagedresourcetype.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicedeletemanuallymanagedresourcetype.go index 7cd82d89..1efa6c63 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicedeletemanuallymanagedresourcetype.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicedeletemanuallymanagedresourcetype.go @@ -34,10 +34,13 @@ func (c *C1APIAppV1AppResourceTypeServiceDeleteManuallyManagedResourceTypeReques return c.ID } +// #region class-body-c1apiappv1appresourcetypeservicedeletemanuallymanagedresourcetyperequest +// #endregion class-body-c1apiappv1appresourcetypeservicedeletemanuallymanagedresourcetyperequest + type C1APIAppV1AppResourceTypeServiceDeleteManuallyManagedResourceTypeResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The empty response message for deleting a manually managed resource type. DeleteManuallyManagedResourceTypeResponse *shared.DeleteManuallyManagedResourceTypeResponse // HTTP response status code for this operation StatusCode int @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppResourceTypeServiceDeleteManuallyManagedResourceTypeRespon } return c.RawResponse } + +// #region class-body-c1apiappv1appresourcetypeservicedeletemanuallymanagedresourcetyperesponse +// #endregion class-body-c1apiappv1appresourcetypeservicedeletemanuallymanagedresourcetyperesponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeserviceget.go index 31c76f4a..c4a4a9ae 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeserviceget.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppResourceTypeServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1appresourcetypeservicegetrequest +// #endregion class-body-c1apiappv1appresourcetypeservicegetrequest + type C1APIAppV1AppResourceTypeServiceGetResponse struct { // The AppResourceTypeServiceGetResponse contains an expanded array containing the expanded values indicated by the expand mask // in the request and an app resource type view containing the resource type and JSONPATHs indicating which objects are where in the expand mask. @@ -65,3 +68,6 @@ func (c *C1APIAppV1AppResourceTypeServiceGetResponse) GetRawResponse() *http.Res } return c.RawResponse } + +// #region class-body-c1apiappv1appresourcetypeservicegetresponse +// #endregion class-body-c1apiappv1appresourcetypeservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicelist.go index 84639d1c..88b5ba9d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeservicelist.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppResourceTypeServiceListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiappv1appresourcetypeservicelistrequest +// #endregion class-body-c1apiappv1appresourcetypeservicelistrequest + type C1APIAppV1AppResourceTypeServiceListResponse struct { // The AppResourceTypeServiceListResponse message contains a list of results and a nextPageToken if applicable. AppResourceTypeServiceListResponse *shared.AppResourceTypeServiceListResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppResourceTypeServiceListResponse) GetRawResponse() *http.Re } return c.RawResponse } + +// #region class-body-c1apiappv1appresourcetypeservicelistresponse +// #endregion class-body-c1apiappv1appresourcetypeservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeserviceupdatemanuallymanagedresourcetype.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeserviceupdatemanuallymanagedresourcetype.go index 627548b8..213d2976 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeserviceupdatemanuallymanagedresourcetype.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appresourcetypeserviceupdatemanuallymanagedresourcetype.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppResourceTypeServiceUpdateManuallyManagedResourceTypeReques return c.ID } +// #region class-body-c1apiappv1appresourcetypeserviceupdatemanuallymanagedresourcetyperequest +// #endregion class-body-c1apiappv1appresourcetypeserviceupdatemanuallymanagedresourcetyperequest + type C1APIAppV1AppResourceTypeServiceUpdateManuallyManagedResourceTypeResponse struct { // HTTP response content type for this operation ContentType string @@ -41,7 +44,7 @@ type C1APIAppV1AppResourceTypeServiceUpdateManuallyManagedResourceTypeResponse s StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // The response message for updating a manually managed resource type. UpdateManuallyManagedResourceTypeResponse *shared.UpdateManuallyManagedResourceTypeResponse } @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppResourceTypeServiceUpdateManuallyManagedResourceTypeRespon } return c.UpdateManuallyManagedResourceTypeResponse } + +// #region class-body-c1apiappv1appresourcetypeserviceupdatemanuallymanagedresourcetyperesponse +// #endregion class-body-c1apiappv1appresourcetypeserviceupdatemanuallymanagedresourcetyperesponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appscreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appscreate.go index faa3aaa5..7938303e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appscreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appscreate.go @@ -45,3 +45,6 @@ func (c *C1APIAppV1AppsCreateResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appscreateresponse +// #endregion class-body-c1apiappv1appscreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsdelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsdelete.go index 15f34c06..43b5174d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsdelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsdelete.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppsDeleteRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1appsdeleterequest +// #endregion class-body-c1apiappv1appsdeleterequest + type C1APIAppV1AppsDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppsDeleteResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appsdeleteresponse +// #endregion class-body-c1apiappv1appsdeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsearchsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsearchsearch.go index 8355e36e..a2c3528b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsearchsearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsearchsearch.go @@ -47,3 +47,6 @@ func (c *C1APIAppV1AppSearchSearchResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appsearchsearchresponse +// #endregion class-body-c1apiappv1appsearchsearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsearchsearchuserownership.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsearchsearchuserownership.go new file mode 100644 index 00000000..72b29168 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsearchsearchuserownership.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV1AppSearchSearchUserOwnershipResponse struct { + // HTTP response content type for this operation + ContentType string + // The SearchUserOwnershipResponse message contains a paginated list of ownership entries. + SearchUserOwnershipResponse *shared.SearchUserOwnershipResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV1AppSearchSearchUserOwnershipResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV1AppSearchSearchUserOwnershipResponse) GetSearchUserOwnershipResponse() *shared.SearchUserOwnershipResponse { + if c == nil { + return nil + } + return c.SearchUserOwnershipResponse +} + +func (c *C1APIAppV1AppSearchSearchUserOwnershipResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV1AppSearchSearchUserOwnershipResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv1appsearchsearchuserownershipresponse +// #endregion class-body-c1apiappv1appsearchsearchuserownershipresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsget.go index 03c42a34..37e53cb7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsget.go @@ -18,6 +18,9 @@ func (c *C1APIAppV1AppsGetRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1appsgetrequest +// #endregion class-body-c1apiappv1appsgetrequest + type C1APIAppV1AppsGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIAppV1AppsGetResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appsgetresponse +// #endregion class-body-c1apiappv1appsgetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appslist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appslist.go index e54b53d6..2e2c7c9d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appslist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appslist.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppsListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiappv1appslistrequest +// #endregion class-body-c1apiappv1appslistrequest + type C1APIAppV1AppsListResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppsListResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appslistresponse +// #endregion class-body-c1apiappv1appslistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsupdate.go index d87de32f..e7d59447 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appsupdate.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppsUpdateRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1appsupdaterequest +// #endregion class-body-c1apiappv1appsupdaterequest + type C1APIAppV1AppsUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppsUpdateResponse) GetUpdateAppResponse() *shared.UpdateAppR } return c.UpdateAppResponse } + +// #region class-body-c1apiappv1appsupdateresponse +// #endregion class-body-c1apiappv1appsupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appusagecontrolsserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appusagecontrolsserviceget.go index 0bfaa375..d1431fd4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appusagecontrolsserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appusagecontrolsserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIAppV1AppUsageControlsServiceGetRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1appusagecontrolsservicegetrequest +// #endregion class-body-c1apiappv1appusagecontrolsservicegetrequest + type C1APIAppV1AppUsageControlsServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIAppV1AppUsageControlsServiceGetResponse) GetRawResponse() *http.Re } return c.RawResponse } + +// #region class-body-c1apiappv1appusagecontrolsservicegetresponse +// #endregion class-body-c1apiappv1appusagecontrolsservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appusagecontrolsserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appusagecontrolsserviceupdate.go index d3c9c82b..cf223e5e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appusagecontrolsserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appusagecontrolsserviceupdate.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1AppUsageControlsServiceUpdateRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1appusagecontrolsserviceupdaterequest +// #endregion class-body-c1apiappv1appusagecontrolsserviceupdaterequest + type C1APIAppV1AppUsageControlsServiceUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAppV1AppUsageControlsServiceUpdateResponse) GetUpdateAppUsageContr } return c.UpdateAppUsageControlsResponse } + +// #region class-body-c1apiappv1appusagecontrolsserviceupdateresponse +// #endregion class-body-c1apiappv1appusagecontrolsserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelist.go index 941a200a..c0a60369 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelist.go @@ -34,8 +34,11 @@ func (c *C1APIAppV1AppUserServiceListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiappv1appuserservicelistrequest +// #endregion class-body-c1apiappv1appuserservicelistrequest + type C1APIAppV1AppUserServiceListResponse struct { - // Successful response + // The response message for listing app users. AppUserServiceListResponse *shared.AppUserServiceListResponse // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppUserServiceListResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiappv1appuserservicelistresponse +// #endregion class-body-c1apiappv1appuserservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelistappusercredentials.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelistappusercredentials.go index 82e174c5..5334834a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelistappusercredentials.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelistappusercredentials.go @@ -42,8 +42,11 @@ func (c *C1APIAppV1AppUserServiceListAppUserCredentialsRequest) GetPageToken() * return c.PageToken } +// #region class-body-c1apiappv1appuserservicelistappusercredentialsrequest +// #endregion class-body-c1apiappv1appuserservicelistappusercredentialsrequest + type C1APIAppV1AppUserServiceListAppUserCredentialsResponse struct { - // Successful response + // The response message for listing credentials of an app user. AppUserServiceListCredentialsResponse *shared.AppUserServiceListCredentialsResponse // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppUserServiceListAppUserCredentialsResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apiappv1appuserservicelistappusercredentialsresponse +// #endregion class-body-c1apiappv1appuserservicelistappusercredentialsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelistappusersforuser.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelistappusersforuser.go index e4b95961..28fb5106 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelistappusersforuser.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicelistappusersforuser.go @@ -42,8 +42,11 @@ func (c *C1APIAppV1AppUserServiceListAppUsersForUserRequest) GetUserID() string return c.UserID } +// #region class-body-c1apiappv1appuserservicelistappusersforuserrequest +// #endregion class-body-c1apiappv1appuserservicelistappusersforuserrequest + type C1APIAppV1AppUserServiceListAppUsersForUserResponse struct { - // Successful response + // The response message for listing app users correlated to a specific C1 user. AppUsersForUserServiceListResponse *shared.AppUsersForUserServiceListResponse // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1AppUserServiceListAppUsersForUserResponse) GetRawResponse() * } return c.RawResponse } + +// #region class-body-c1apiappv1appuserservicelistappusersforuserresponse +// #endregion class-body-c1apiappv1appuserservicelistappusersforuserresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicesearch.go index 441d1d12..1a8e0386 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicesearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserservicesearch.go @@ -45,3 +45,6 @@ func (c *C1APIAppV1AppUserServiceSearchResponse) GetRawResponse() *http.Response } return c.RawResponse } + +// #region class-body-c1apiappv1appuserservicesearchresponse +// #endregion class-body-c1apiappv1appuserservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserserviceupdate.go index 75348dd6..43f0cf1f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1appuserserviceupdate.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1AppUserServiceUpdateRequest) GetAppUserID() string { return c.AppUserID } +// #region class-body-c1apiappv1appuserserviceupdaterequest +// #endregion class-body-c1apiappv1appuserserviceupdaterequest + type C1APIAppV1AppUserServiceUpdateResponse struct { // Successful response AppUserServiceUpdateResponse *shared.AppUserServiceUpdateResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1AppUserServiceUpdateResponse) GetRawResponse() *http.Response } return c.RawResponse } + +// #region class-body-c1apiappv1appuserserviceupdateresponse +// #endregion class-body-c1apiappv1appuserserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceconfirmsyncvalid.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceconfirmsyncvalid.go index 268fea50..e5ad1253 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceconfirmsyncvalid.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceconfirmsyncvalid.go @@ -42,8 +42,11 @@ func (c *C1APIAppV1ConnectorServiceConfirmSyncValidRequest) GetSyncLifecycleID() return c.SyncLifecycleID } +// #region class-body-c1apiappv1connectorserviceconfirmsyncvalidrequest +// #endregion class-body-c1apiappv1connectorserviceconfirmsyncvalidrequest + type C1APIAppV1ConnectorServiceConfirmSyncValidResponse struct { - // Successful response + // Empty response body. Status code indicates success. ConfirmSyncValidResponse *shared.ConfirmSyncValidResponse // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIAppV1ConnectorServiceConfirmSyncValidResponse) GetRawResponse() *h } return c.RawResponse } + +// #region class-body-c1apiappv1connectorserviceconfirmsyncvalidresponse +// #endregion class-body-c1apiappv1connectorserviceconfirmsyncvalidresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicecreate.go index dd9dbec1..0dabcf8e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicecreate.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1ConnectorServiceCreateRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1connectorservicecreaterequest +// #endregion class-body-c1apiappv1connectorservicecreaterequest + type C1APIAppV1ConnectorServiceCreateResponse struct { // The ConnectorServiceCreateResponse is the response returned from creating a connector. ConnectorServiceCreateResponse *shared.ConnectorServiceCreateResponse @@ -64,3 +67,6 @@ func (c *C1APIAppV1ConnectorServiceCreateResponse) GetRawResponse() *http.Respon } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicecreateresponse +// #endregion class-body-c1apiappv1connectorservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicecreatedelegated.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicecreatedelegated.go index 36802ee5..8e17190b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicecreatedelegated.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicecreatedelegated.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1ConnectorServiceCreateDelegatedRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apiappv1connectorservicecreatedelegatedrequest +// #endregion class-body-c1apiappv1connectorservicecreatedelegatedrequest + type C1APIAppV1ConnectorServiceCreateDelegatedResponse struct { // The ConnectorServiceCreateResponse is the response returned from creating a connector. ConnectorServiceCreateResponse *shared.ConnectorServiceCreateResponse @@ -64,3 +67,6 @@ func (c *C1APIAppV1ConnectorServiceCreateDelegatedResponse) GetRawResponse() *ht } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicecreatedelegatedresponse +// #endregion class-body-c1apiappv1connectorservicecreatedelegatedresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicedelete.go index 6261c320..6729a04f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicedelete.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1ConnectorServiceDeleteRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1connectorservicedeleterequest +// #endregion class-body-c1apiappv1connectorservicedeleterequest + type C1APIAppV1ConnectorServiceDeleteResponse struct { // Empty response body. Status code indicates success. ConnectorServiceDeleteResponse *shared.ConnectorServiceDeleteResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1ConnectorServiceDeleteResponse) GetRawResponse() *http.Respon } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicedeleteresponse +// #endregion class-body-c1apiappv1connectorservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceforcesync.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceforcesync.go index 0276e880..a1e60cc2 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceforcesync.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceforcesync.go @@ -34,10 +34,13 @@ func (c *C1APIAppV1ConnectorServiceForceSyncRequest) GetConnectorID() string { return c.ConnectorID } +// #region class-body-c1apiappv1connectorserviceforcesyncrequest +// #endregion class-body-c1apiappv1connectorserviceforcesyncrequest + type C1APIAppV1ConnectorServiceForceSyncResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // Empty response body. Status code indicates success. ForceSyncResponse *shared.ForceSyncResponse // HTTP response status code for this operation StatusCode int @@ -72,3 +75,6 @@ func (c *C1APIAppV1ConnectorServiceForceSyncResponse) GetRawResponse() *http.Res } return c.RawResponse } + +// #region class-body-c1apiappv1connectorserviceforcesyncresponse +// #endregion class-body-c1apiappv1connectorserviceforcesyncresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceget.go index a1e2bc3a..08fbf7c0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceget.go @@ -26,6 +26,9 @@ func (c *C1APIAppV1ConnectorServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1connectorservicegetrequest +// #endregion class-body-c1apiappv1connectorservicegetrequest + type C1APIAppV1ConnectorServiceGetResponse struct { // The ConnectorServiceGetResponse message contains the connectorView, and an expand mask. ConnectorServiceGetResponse *shared.ConnectorServiceGetResponse @@ -64,3 +67,6 @@ func (c *C1APIAppV1ConnectorServiceGetResponse) GetRawResponse() *http.Response } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicegetresponse +// #endregion class-body-c1apiappv1connectorservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicegetconnectorsyncdownloadurl.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicegetconnectorsyncdownloadurl.go index 419da0f1..cb50197c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicegetconnectorsyncdownloadurl.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicegetconnectorsyncdownloadurl.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1ConnectorServiceGetConnectorSyncDownloadURLRequest) GetSyncID return c.SyncID } +// #region class-body-c1apiappv1connectorservicegetconnectorsyncdownloadurlrequest +// #endregion class-body-c1apiappv1connectorservicegetconnectorsyncdownloadurlrequest + type C1APIAppV1ConnectorServiceGetConnectorSyncDownloadURLResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAppV1ConnectorServiceGetConnectorSyncDownloadURLResponse) GetRawRe } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicegetconnectorsyncdownloadurlresponse +// #endregion class-body-c1apiappv1connectorservicegetconnectorsyncdownloadurlresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicegetcredentials.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicegetcredentials.go index 891dab66..8339a47b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicegetcredentials.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicegetcredentials.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1ConnectorServiceGetCredentialsRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1connectorservicegetcredentialsrequest +// #endregion class-body-c1apiappv1connectorservicegetcredentialsrequest + type C1APIAppV1ConnectorServiceGetCredentialsResponse struct { // ConnectorServiceGetCredentialsResponse is the response returned by the get method. ConnectorServiceGetCredentialsResponse *shared.ConnectorServiceGetCredentialsResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1ConnectorServiceGetCredentialsResponse) GetRawResponse() *htt } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicegetcredentialsresponse +// #endregion class-body-c1apiappv1connectorservicegetcredentialsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicelist.go index f8340dfc..07c120e8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicelist.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1ConnectorServiceListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiappv1connectorservicelistrequest +// #endregion class-body-c1apiappv1connectorservicelistrequest + type C1APIAppV1ConnectorServiceListResponse struct { // The ConnectorServiceListResponse message contains a list of results and a nextPageToken if applicable ConnectorServiceListResponse *shared.ConnectorServiceListResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1ConnectorServiceListResponse) GetRawResponse() *http.Response } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicelistresponse +// #endregion class-body-c1apiappv1connectorservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicepausesync.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicepausesync.go index e28e17d6..73a02b7a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicepausesync.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicepausesync.go @@ -34,10 +34,13 @@ func (c *C1APIAppV1ConnectorServicePauseSyncRequest) GetConnectorID() string { return c.ConnectorID } +// #region class-body-c1apiappv1connectorservicepausesyncrequest +// #endregion class-body-c1apiappv1connectorservicepausesyncrequest + type C1APIAppV1ConnectorServicePauseSyncResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // Empty response body. Status code indicates success. PauseSyncResponse *shared.PauseSyncResponse // HTTP response status code for this operation StatusCode int @@ -72,3 +75,6 @@ func (c *C1APIAppV1ConnectorServicePauseSyncResponse) GetRawResponse() *http.Res } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicepausesyncresponse +// #endregion class-body-c1apiappv1connectorservicepausesyncresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceresumesync.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceresumesync.go index 4d29f3f0..311cc788 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceresumesync.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceresumesync.go @@ -34,10 +34,13 @@ func (c *C1APIAppV1ConnectorServiceResumeSyncRequest) GetConnectorID() string { return c.ConnectorID } +// #region class-body-c1apiappv1connectorserviceresumesyncrequest +// #endregion class-body-c1apiappv1connectorserviceresumesyncrequest + type C1APIAppV1ConnectorServiceResumeSyncResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // Empty response body. Status code indicates success. ResumeSyncResponse *shared.ResumeSyncResponse // HTTP response status code for this operation StatusCode int @@ -72,3 +75,6 @@ func (c *C1APIAppV1ConnectorServiceResumeSyncResponse) GetRawResponse() *http.Re } return c.RawResponse } + +// #region class-body-c1apiappv1connectorserviceresumesyncresponse +// #endregion class-body-c1apiappv1connectorserviceresumesyncresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicerevokecredential.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicerevokecredential.go index 1b53eb68..39a6531e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicerevokecredential.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicerevokecredential.go @@ -42,6 +42,9 @@ func (c *C1APIAppV1ConnectorServiceRevokeCredentialRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1connectorservicerevokecredentialrequest +// #endregion class-body-c1apiappv1connectorservicerevokecredentialrequest + type C1APIAppV1ConnectorServiceRevokeCredentialResponse struct { // Empty response body. Status code indicates success. ConnectorServiceRevokeCredentialResponse *shared.ConnectorServiceRevokeCredentialResponse @@ -80,3 +83,6 @@ func (c *C1APIAppV1ConnectorServiceRevokeCredentialResponse) GetRawResponse() *h } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicerevokecredentialresponse +// #endregion class-body-c1apiappv1connectorservicerevokecredentialresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicerotatecredential.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicerotatecredential.go index 12035f9f..ceae365a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicerotatecredential.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicerotatecredential.go @@ -45,3 +45,6 @@ func (c *C1APIAppV1ConnectorServiceRotateCredentialResponse) GetRawResponse() *h } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicerotatecredentialresponse +// #endregion class-body-c1apiappv1connectorservicerotatecredentialresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdate.go index 17b5a613..c4bf955a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdate.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1ConnectorServiceUpdateRequest) GetID() string { return c.ID } +// #region class-body-c1apiappv1connectorserviceupdaterequest +// #endregion class-body-c1apiappv1connectorserviceupdaterequest + type C1APIAppV1ConnectorServiceUpdateResponse struct { // ConnectorServiceUpdateResponse is the response returned by the update method. ConnectorServiceUpdateResponse *shared.ConnectorServiceUpdateResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1ConnectorServiceUpdateResponse) GetRawResponse() *http.Respon } return c.RawResponse } + +// #region class-body-c1apiappv1connectorserviceupdateresponse +// #endregion class-body-c1apiappv1connectorserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdateconnectorschedule.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdateconnectorschedule.go index 3fe390dc..af6211b9 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdateconnectorschedule.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdateconnectorschedule.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1ConnectorServiceUpdateConnectorScheduleRequest) GetConnectorI return c.ConnectorID } +// #region class-body-c1apiappv1connectorserviceupdateconnectorschedulerequest +// #endregion class-body-c1apiappv1connectorserviceupdateconnectorschedulerequest + type C1APIAppV1ConnectorServiceUpdateConnectorScheduleResponse struct { // HTTP response content type for this operation ContentType string @@ -41,7 +44,7 @@ type C1APIAppV1ConnectorServiceUpdateConnectorScheduleResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // Empty response body. Status code indicates success. UpdateConnectorScheduleResponse *shared.UpdateConnectorScheduleResponse } @@ -72,3 +75,6 @@ func (c *C1APIAppV1ConnectorServiceUpdateConnectorScheduleResponse) GetUpdateCon } return c.UpdateConnectorScheduleResponse } + +// #region class-body-c1apiappv1connectorserviceupdateconnectorscheduleresponse +// #endregion class-body-c1apiappv1connectorserviceupdateconnectorscheduleresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdatedelegated.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdatedelegated.go index d95fd49a..6da47717 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdatedelegated.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorserviceupdatedelegated.go @@ -34,6 +34,9 @@ func (c *C1APIAppV1ConnectorServiceUpdateDelegatedRequest) GetConnectorID() stri return c.ConnectorID } +// #region class-body-c1apiappv1connectorserviceupdatedelegatedrequest +// #endregion class-body-c1apiappv1connectorserviceupdatedelegatedrequest + type C1APIAppV1ConnectorServiceUpdateDelegatedResponse struct { // ConnectorServiceUpdateResponse is the response returned by the update method. ConnectorServiceUpdateResponse *shared.ConnectorServiceUpdateResponse @@ -72,3 +75,6 @@ func (c *C1APIAppV1ConnectorServiceUpdateDelegatedResponse) GetRawResponse() *ht } return c.RawResponse } + +// #region class-body-c1apiappv1connectorserviceupdatedelegatedresponse +// #endregion class-body-c1apiappv1connectorserviceupdatedelegatedresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicevalidatehttpconnectorconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicevalidatehttpconnectorconfig.go index 040d61f6..f2a9074a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicevalidatehttpconnectorconfig.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv1connectorservicevalidatehttpconnectorconfig.go @@ -10,7 +10,7 @@ import ( type C1APIAppV1ConnectorServiceValidateHTTPConnectorConfigResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The EditorValidateResponse message contains validation results. EditorValidateResponse *shared.EditorValidateResponse // HTTP response status code for this operation StatusCode int @@ -45,3 +45,6 @@ func (c *C1APIAppV1ConnectorServiceValidateHTTPConnectorConfigResponse) GetRawRe } return c.RawResponse } + +// #region class-body-c1apiappv1connectorservicevalidatehttpconnectorconfigresponse +// #endregion class-body-c1apiappv1connectorservicevalidatehttpconnectorconfigresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appentitlementownerssearchentitlementowners.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appentitlementownerssearchentitlementowners.go new file mode 100644 index 00000000..33ba4d40 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appentitlementownerssearchentitlementowners.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersRequest struct { + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + EntitlementID string `pathParam:"style=simple,explode=false,name=entitlement_id"` + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` + RoleSlug *string `queryParam:"style=form,explode=true,name=role_slug"` +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersRequest) GetEntitlementID() string { + if c == nil { + return "" + } + return c.EntitlementID +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersRequest) GetRoleSlug() *string { + if c == nil { + return nil + } + return c.RoleSlug +} + +// #region class-body-c1apiappv2appentitlementownerssearchentitlementownersrequest +// #endregion class-body-c1apiappv2appentitlementownerssearchentitlementownersrequest + +type C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersResponse struct { + // HTTP response content type for this operation + ContentType string + // SearchAppEntitlementEntitlementOwnersResponse is the response for searching entitlement ownership sources on an entitlement. + SearchAppEntitlementEntitlementOwnersResponse *shared.SearchAppEntitlementEntitlementOwnersResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersResponse) GetSearchAppEntitlementEntitlementOwnersResponse() *shared.SearchAppEntitlementEntitlementOwnersResponse { + if c == nil { + return nil + } + return c.SearchAppEntitlementEntitlementOwnersResponse +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchEntitlementOwnersResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appentitlementownerssearchentitlementownersresponse +// #endregion class-body-c1apiappv2appentitlementownerssearchentitlementownersresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appentitlementownerssearchuserowners.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appentitlementownerssearchuserowners.go new file mode 100644 index 00000000..e04ca881 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appentitlementownerssearchuserowners.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppEntitlementOwnersSearchUserOwnersRequest struct { + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + EntitlementID string `pathParam:"style=simple,explode=false,name=entitlement_id"` + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` + RoleSlug *string `queryParam:"style=form,explode=true,name=role_slug"` +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchUserOwnersRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchUserOwnersRequest) GetEntitlementID() string { + if c == nil { + return "" + } + return c.EntitlementID +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchUserOwnersRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchUserOwnersRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchUserOwnersRequest) GetRoleSlug() *string { + if c == nil { + return nil + } + return c.RoleSlug +} + +// #region class-body-c1apiappv2appentitlementownerssearchuserownersrequest +// #endregion class-body-c1apiappv2appentitlementownerssearchuserownersrequest + +type C1APIAppV2AppEntitlementOwnersSearchUserOwnersResponse struct { + // HTTP response content type for this operation + ContentType string + // SearchAppEntitlementUserOwnersResponse is the response for searching user ownership sources on an entitlement. + SearchAppEntitlementUserOwnersResponse *shared.SearchAppEntitlementUserOwnersResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchUserOwnersResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchUserOwnersResponse) GetSearchAppEntitlementUserOwnersResponse() *shared.SearchAppEntitlementUserOwnersResponse { + if c == nil { + return nil + } + return c.SearchAppEntitlementUserOwnersResponse +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchUserOwnersResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppEntitlementOwnersSearchUserOwnersResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appentitlementownerssearchuserownersresponse +// #endregion class-body-c1apiappv2appentitlementownerssearchuserownersresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appentitlementownersset.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appentitlementownersset.go new file mode 100644 index 00000000..9c58b2d8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appentitlementownersset.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppEntitlementOwnersSetRequest struct { + SetAppEntitlementOwnersV2Request *shared.SetAppEntitlementOwnersV2Request `request:"mediaType=application/json"` + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + EntitlementID string `pathParam:"style=simple,explode=false,name=entitlement_id"` +} + +func (c *C1APIAppV2AppEntitlementOwnersSetRequest) GetSetAppEntitlementOwnersV2Request() *shared.SetAppEntitlementOwnersV2Request { + if c == nil { + return nil + } + return c.SetAppEntitlementOwnersV2Request +} + +func (c *C1APIAppV2AppEntitlementOwnersSetRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppEntitlementOwnersSetRequest) GetEntitlementID() string { + if c == nil { + return "" + } + return c.EntitlementID +} + +// #region class-body-c1apiappv2appentitlementownerssetrequest +// #endregion class-body-c1apiappv2appentitlementownerssetrequest + +type C1APIAppV2AppEntitlementOwnersSetResponse struct { + // HTTP response content type for this operation + ContentType string + // SetAppEntitlementOwnersV2Response is the empty response for setting app entitlement owners. + SetAppEntitlementOwnersV2Response *shared.SetAppEntitlementOwnersV2Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppEntitlementOwnersSetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppEntitlementOwnersSetResponse) GetSetAppEntitlementOwnersV2Response() *shared.SetAppEntitlementOwnersV2Response { + if c == nil { + return nil + } + return c.SetAppEntitlementOwnersV2Response +} + +func (c *C1APIAppV2AppEntitlementOwnersSetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppEntitlementOwnersSetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appentitlementownerssetresponse +// #endregion class-body-c1apiappv2appentitlementownerssetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerscreateentitlementowner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerscreateentitlementowner.go new file mode 100644 index 00000000..e8054932 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerscreateentitlementowner.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppOwnersCreateEntitlementOwnerRequest struct { + CreateEntitlementOwnerRequest *shared.CreateEntitlementOwnerRequest `request:"mediaType=application/json"` + AppEntitlementRefAppID string `pathParam:"style=simple,explode=false,name=app_entitlement_ref_app_id"` + AppEntitlementRefID string `pathParam:"style=simple,explode=false,name=app_entitlement_ref_id"` + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + RoleSlug string `pathParam:"style=simple,explode=false,name=role_slug"` +} + +func (c *C1APIAppV2AppOwnersCreateEntitlementOwnerRequest) GetCreateEntitlementOwnerRequest() *shared.CreateEntitlementOwnerRequest { + if c == nil { + return nil + } + return c.CreateEntitlementOwnerRequest +} + +func (c *C1APIAppV2AppOwnersCreateEntitlementOwnerRequest) GetAppEntitlementRefAppID() string { + if c == nil { + return "" + } + return c.AppEntitlementRefAppID +} + +func (c *C1APIAppV2AppOwnersCreateEntitlementOwnerRequest) GetAppEntitlementRefID() string { + if c == nil { + return "" + } + return c.AppEntitlementRefID +} + +func (c *C1APIAppV2AppOwnersCreateEntitlementOwnerRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppOwnersCreateEntitlementOwnerRequest) GetRoleSlug() string { + if c == nil { + return "" + } + return c.RoleSlug +} + +// #region class-body-c1apiappv2appownerscreateentitlementownerrequest +// #endregion class-body-c1apiappv2appownerscreateentitlementownerrequest + +type C1APIAppV2AppOwnersCreateEntitlementOwnerResponse struct { + // HTTP response content type for this operation + ContentType string + // CreateEntitlementOwnerResponse is the response for creating an entitlement ownership source. + CreateEntitlementOwnerResponse *shared.CreateEntitlementOwnerResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppOwnersCreateEntitlementOwnerResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppOwnersCreateEntitlementOwnerResponse) GetCreateEntitlementOwnerResponse() *shared.CreateEntitlementOwnerResponse { + if c == nil { + return nil + } + return c.CreateEntitlementOwnerResponse +} + +func (c *C1APIAppV2AppOwnersCreateEntitlementOwnerResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppOwnersCreateEntitlementOwnerResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appownerscreateentitlementownerresponse +// #endregion class-body-c1apiappv2appownerscreateentitlementownerresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerscreateuserowner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerscreateuserowner.go new file mode 100644 index 00000000..469e0676 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerscreateuserowner.go @@ -0,0 +1,88 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppOwnersCreateUserOwnerRequest struct { + CreateUserOwnerRequest *shared.CreateUserOwnerRequest `request:"mediaType=application/json"` + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + RoleSlug string `pathParam:"style=simple,explode=false,name=role_slug"` + UserRefID string `pathParam:"style=simple,explode=false,name=user_ref_id"` +} + +func (c *C1APIAppV2AppOwnersCreateUserOwnerRequest) GetCreateUserOwnerRequest() *shared.CreateUserOwnerRequest { + if c == nil { + return nil + } + return c.CreateUserOwnerRequest +} + +func (c *C1APIAppV2AppOwnersCreateUserOwnerRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppOwnersCreateUserOwnerRequest) GetRoleSlug() string { + if c == nil { + return "" + } + return c.RoleSlug +} + +func (c *C1APIAppV2AppOwnersCreateUserOwnerRequest) GetUserRefID() string { + if c == nil { + return "" + } + return c.UserRefID +} + +// #region class-body-c1apiappv2appownerscreateuserownerrequest +// #endregion class-body-c1apiappv2appownerscreateuserownerrequest + +type C1APIAppV2AppOwnersCreateUserOwnerResponse struct { + // HTTP response content type for this operation + ContentType string + // CreateUserOwnerResponse is the response for creating a user ownership source. + CreateUserOwnerResponse *shared.CreateUserOwnerResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppOwnersCreateUserOwnerResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppOwnersCreateUserOwnerResponse) GetCreateUserOwnerResponse() *shared.CreateUserOwnerResponse { + if c == nil { + return nil + } + return c.CreateUserOwnerResponse +} + +func (c *C1APIAppV2AppOwnersCreateUserOwnerResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppOwnersCreateUserOwnerResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appownerscreateuserownerresponse +// #endregion class-body-c1apiappv2appownerscreateuserownerresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersdeleteentitlementowner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersdeleteentitlementowner.go new file mode 100644 index 00000000..24448cea --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersdeleteentitlementowner.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppOwnersDeleteEntitlementOwnerRequest struct { + DeleteEntitlementOwnerRequest *shared.DeleteEntitlementOwnerRequest `request:"mediaType=application/json"` + AppEntitlementRefAppID string `pathParam:"style=simple,explode=false,name=app_entitlement_ref_app_id"` + AppEntitlementRefID string `pathParam:"style=simple,explode=false,name=app_entitlement_ref_id"` + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + RoleSlug string `pathParam:"style=simple,explode=false,name=role_slug"` +} + +func (c *C1APIAppV2AppOwnersDeleteEntitlementOwnerRequest) GetDeleteEntitlementOwnerRequest() *shared.DeleteEntitlementOwnerRequest { + if c == nil { + return nil + } + return c.DeleteEntitlementOwnerRequest +} + +func (c *C1APIAppV2AppOwnersDeleteEntitlementOwnerRequest) GetAppEntitlementRefAppID() string { + if c == nil { + return "" + } + return c.AppEntitlementRefAppID +} + +func (c *C1APIAppV2AppOwnersDeleteEntitlementOwnerRequest) GetAppEntitlementRefID() string { + if c == nil { + return "" + } + return c.AppEntitlementRefID +} + +func (c *C1APIAppV2AppOwnersDeleteEntitlementOwnerRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppOwnersDeleteEntitlementOwnerRequest) GetRoleSlug() string { + if c == nil { + return "" + } + return c.RoleSlug +} + +// #region class-body-c1apiappv2appownersdeleteentitlementownerrequest +// #endregion class-body-c1apiappv2appownersdeleteentitlementownerrequest + +type C1APIAppV2AppOwnersDeleteEntitlementOwnerResponse struct { + // HTTP response content type for this operation + ContentType string + // DeleteEntitlementOwnerResponse is the empty response for deleting an entitlement ownership source. + DeleteEntitlementOwnerResponse *shared.DeleteEntitlementOwnerResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppOwnersDeleteEntitlementOwnerResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppOwnersDeleteEntitlementOwnerResponse) GetDeleteEntitlementOwnerResponse() *shared.DeleteEntitlementOwnerResponse { + if c == nil { + return nil + } + return c.DeleteEntitlementOwnerResponse +} + +func (c *C1APIAppV2AppOwnersDeleteEntitlementOwnerResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppOwnersDeleteEntitlementOwnerResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appownersdeleteentitlementownerresponse +// #endregion class-body-c1apiappv2appownersdeleteentitlementownerresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersdeleteuserowner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersdeleteuserowner.go new file mode 100644 index 00000000..bcb74046 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersdeleteuserowner.go @@ -0,0 +1,88 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppOwnersDeleteUserOwnerRequest struct { + DeleteUserOwnerRequest *shared.DeleteUserOwnerRequest `request:"mediaType=application/json"` + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + RoleSlug string `pathParam:"style=simple,explode=false,name=role_slug"` + UserRefID string `pathParam:"style=simple,explode=false,name=user_ref_id"` +} + +func (c *C1APIAppV2AppOwnersDeleteUserOwnerRequest) GetDeleteUserOwnerRequest() *shared.DeleteUserOwnerRequest { + if c == nil { + return nil + } + return c.DeleteUserOwnerRequest +} + +func (c *C1APIAppV2AppOwnersDeleteUserOwnerRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppOwnersDeleteUserOwnerRequest) GetRoleSlug() string { + if c == nil { + return "" + } + return c.RoleSlug +} + +func (c *C1APIAppV2AppOwnersDeleteUserOwnerRequest) GetUserRefID() string { + if c == nil { + return "" + } + return c.UserRefID +} + +// #region class-body-c1apiappv2appownersdeleteuserownerrequest +// #endregion class-body-c1apiappv2appownersdeleteuserownerrequest + +type C1APIAppV2AppOwnersDeleteUserOwnerResponse struct { + // HTTP response content type for this operation + ContentType string + // DeleteUserOwnerResponse is the empty response for deleting a user ownership source. + DeleteUserOwnerResponse *shared.DeleteUserOwnerResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppOwnersDeleteUserOwnerResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppOwnersDeleteUserOwnerResponse) GetDeleteUserOwnerResponse() *shared.DeleteUserOwnerResponse { + if c == nil { + return nil + } + return c.DeleteUserOwnerResponse +} + +func (c *C1APIAppV2AppOwnersDeleteUserOwnerResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppOwnersDeleteUserOwnerResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appownersdeleteuserownerresponse +// #endregion class-body-c1apiappv2appownersdeleteuserownerresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersgetentitlementowner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersgetentitlementowner.go new file mode 100644 index 00000000..2ef11a06 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersgetentitlementowner.go @@ -0,0 +1,88 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppOwnersGetEntitlementOwnerRequest struct { + AppEntitlementRefAppID string `pathParam:"style=simple,explode=false,name=app_entitlement_ref_app_id"` + AppEntitlementRefID string `pathParam:"style=simple,explode=false,name=app_entitlement_ref_id"` + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + RoleSlug string `pathParam:"style=simple,explode=false,name=role_slug"` +} + +func (c *C1APIAppV2AppOwnersGetEntitlementOwnerRequest) GetAppEntitlementRefAppID() string { + if c == nil { + return "" + } + return c.AppEntitlementRefAppID +} + +func (c *C1APIAppV2AppOwnersGetEntitlementOwnerRequest) GetAppEntitlementRefID() string { + if c == nil { + return "" + } + return c.AppEntitlementRefID +} + +func (c *C1APIAppV2AppOwnersGetEntitlementOwnerRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppOwnersGetEntitlementOwnerRequest) GetRoleSlug() string { + if c == nil { + return "" + } + return c.RoleSlug +} + +// #region class-body-c1apiappv2appownersgetentitlementownerrequest +// #endregion class-body-c1apiappv2appownersgetentitlementownerrequest + +type C1APIAppV2AppOwnersGetEntitlementOwnerResponse struct { + // HTTP response content type for this operation + ContentType string + // GetEntitlementOwnerResponse is the response for getting an entitlement ownership source. + GetEntitlementOwnerResponse *shared.GetEntitlementOwnerResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppOwnersGetEntitlementOwnerResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppOwnersGetEntitlementOwnerResponse) GetGetEntitlementOwnerResponse() *shared.GetEntitlementOwnerResponse { + if c == nil { + return nil + } + return c.GetEntitlementOwnerResponse +} + +func (c *C1APIAppV2AppOwnersGetEntitlementOwnerResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppOwnersGetEntitlementOwnerResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appownersgetentitlementownerresponse +// #endregion class-body-c1apiappv2appownersgetentitlementownerresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersgetuserowner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersgetuserowner.go new file mode 100644 index 00000000..86132409 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersgetuserowner.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppOwnersGetUserOwnerRequest struct { + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + RoleSlug string `pathParam:"style=simple,explode=false,name=role_slug"` + UserRefID string `pathParam:"style=simple,explode=false,name=user_ref_id"` +} + +func (c *C1APIAppV2AppOwnersGetUserOwnerRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppOwnersGetUserOwnerRequest) GetRoleSlug() string { + if c == nil { + return "" + } + return c.RoleSlug +} + +func (c *C1APIAppV2AppOwnersGetUserOwnerRequest) GetUserRefID() string { + if c == nil { + return "" + } + return c.UserRefID +} + +// #region class-body-c1apiappv2appownersgetuserownerrequest +// #endregion class-body-c1apiappv2appownersgetuserownerrequest + +type C1APIAppV2AppOwnersGetUserOwnerResponse struct { + // HTTP response content type for this operation + ContentType string + // GetUserOwnerResponse is the response for getting a user ownership source. + GetUserOwnerResponse *shared.GetUserOwnerResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppOwnersGetUserOwnerResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppOwnersGetUserOwnerResponse) GetGetUserOwnerResponse() *shared.GetUserOwnerResponse { + if c == nil { + return nil + } + return c.GetUserOwnerResponse +} + +func (c *C1APIAppV2AppOwnersGetUserOwnerResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppOwnersGetUserOwnerResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appownersgetuserownerresponse +// #endregion class-body-c1apiappv2appownersgetuserownerresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerssearchentitlementowners.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerssearchentitlementowners.go new file mode 100644 index 00000000..52fb28e6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerssearchentitlementowners.go @@ -0,0 +1,88 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppOwnersSearchEntitlementOwnersRequest struct { + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` + RoleSlug *string `queryParam:"style=form,explode=true,name=role_slug"` +} + +func (c *C1APIAppV2AppOwnersSearchEntitlementOwnersRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppOwnersSearchEntitlementOwnersRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APIAppV2AppOwnersSearchEntitlementOwnersRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +func (c *C1APIAppV2AppOwnersSearchEntitlementOwnersRequest) GetRoleSlug() *string { + if c == nil { + return nil + } + return c.RoleSlug +} + +// #region class-body-c1apiappv2appownerssearchentitlementownersrequest +// #endregion class-body-c1apiappv2appownerssearchentitlementownersrequest + +type C1APIAppV2AppOwnersSearchEntitlementOwnersResponse struct { + // HTTP response content type for this operation + ContentType string + // SearchEntitlementOwnersResponse is the response for searching entitlement ownership sources. + SearchEntitlementOwnersResponse *shared.SearchEntitlementOwnersResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppOwnersSearchEntitlementOwnersResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppOwnersSearchEntitlementOwnersResponse) GetSearchEntitlementOwnersResponse() *shared.SearchEntitlementOwnersResponse { + if c == nil { + return nil + } + return c.SearchEntitlementOwnersResponse +} + +func (c *C1APIAppV2AppOwnersSearchEntitlementOwnersResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppOwnersSearchEntitlementOwnersResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appownerssearchentitlementownersresponse +// #endregion class-body-c1apiappv2appownerssearchentitlementownersresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerssearchuserowners.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerssearchuserowners.go new file mode 100644 index 00000000..1ca4eb83 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownerssearchuserowners.go @@ -0,0 +1,88 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppOwnersSearchUserOwnersRequest struct { + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` + RoleSlug *string `queryParam:"style=form,explode=true,name=role_slug"` +} + +func (c *C1APIAppV2AppOwnersSearchUserOwnersRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2AppOwnersSearchUserOwnersRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APIAppV2AppOwnersSearchUserOwnersRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +func (c *C1APIAppV2AppOwnersSearchUserOwnersRequest) GetRoleSlug() *string { + if c == nil { + return nil + } + return c.RoleSlug +} + +// #region class-body-c1apiappv2appownerssearchuserownersrequest +// #endregion class-body-c1apiappv2appownerssearchuserownersrequest + +type C1APIAppV2AppOwnersSearchUserOwnersResponse struct { + // HTTP response content type for this operation + ContentType string + // SearchUserOwnersResponse is the response for searching user ownership sources. + SearchUserOwnersResponse *shared.SearchUserOwnersResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppOwnersSearchUserOwnersResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppOwnersSearchUserOwnersResponse) GetSearchUserOwnersResponse() *shared.SearchUserOwnersResponse { + if c == nil { + return nil + } + return c.SearchUserOwnersResponse +} + +func (c *C1APIAppV2AppOwnersSearchUserOwnersResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppOwnersSearchUserOwnersResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appownerssearchuserownersresponse +// #endregion class-body-c1apiappv2appownerssearchuserownersresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersset.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersset.go new file mode 100644 index 00000000..ea491162 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2appownersset.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2AppOwnersSetRequest struct { + SetAppOwnersRequestV2 *shared.SetAppOwnersRequestV2 `request:"mediaType=application/json"` + AppID string `pathParam:"style=simple,explode=false,name=app_id"` +} + +func (c *C1APIAppV2AppOwnersSetRequest) GetSetAppOwnersRequestV2() *shared.SetAppOwnersRequestV2 { + if c == nil { + return nil + } + return c.SetAppOwnersRequestV2 +} + +func (c *C1APIAppV2AppOwnersSetRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +// #region class-body-c1apiappv2appownerssetrequest +// #endregion class-body-c1apiappv2appownerssetrequest + +type C1APIAppV2AppOwnersSetResponse struct { + // HTTP response content type for this operation + ContentType string + // SetAppOwnersResponse is the empty response for setting app owners. + SetAppOwnersResponseV2 *shared.SetAppOwnersResponseV2 + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2AppOwnersSetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2AppOwnersSetResponse) GetSetAppOwnersResponseV2() *shared.SetAppOwnersResponseV2 { + if c == nil { + return nil + } + return c.SetAppOwnersResponseV2 +} + +func (c *C1APIAppV2AppOwnersSetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2AppOwnersSetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2appownerssetresponse +// #endregion class-body-c1apiappv2appownerssetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2connectorownerssearchentitlementowners.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2connectorownerssearchentitlementowners.go new file mode 100644 index 00000000..d192b793 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2connectorownerssearchentitlementowners.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2ConnectorOwnersSearchEntitlementOwnersRequest struct { + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + ConnectorID string `pathParam:"style=simple,explode=false,name=connector_id"` + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` + RoleSlug *string `queryParam:"style=form,explode=true,name=role_slug"` +} + +func (c *C1APIAppV2ConnectorOwnersSearchEntitlementOwnersRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2ConnectorOwnersSearchEntitlementOwnersRequest) GetConnectorID() string { + if c == nil { + return "" + } + return c.ConnectorID +} + +func (c *C1APIAppV2ConnectorOwnersSearchEntitlementOwnersRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APIAppV2ConnectorOwnersSearchEntitlementOwnersRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +func (c *C1APIAppV2ConnectorOwnersSearchEntitlementOwnersRequest) GetRoleSlug() *string { + if c == nil { + return nil + } + return c.RoleSlug +} + +// #region class-body-c1apiappv2connectorownerssearchentitlementownersrequest +// #endregion class-body-c1apiappv2connectorownerssearchentitlementownersrequest + +type C1APIAppV2ConnectorOwnersSearchEntitlementOwnersResponse struct { + // HTTP response content type for this operation + ContentType string + // SearchConnectorEntitlementOwnersResponse is the response for searching entitlement ownership sources on a connector. + SearchConnectorEntitlementOwnersResponse *shared.SearchConnectorEntitlementOwnersResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2ConnectorOwnersSearchEntitlementOwnersResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2ConnectorOwnersSearchEntitlementOwnersResponse) GetSearchConnectorEntitlementOwnersResponse() *shared.SearchConnectorEntitlementOwnersResponse { + if c == nil { + return nil + } + return c.SearchConnectorEntitlementOwnersResponse +} + +func (c *C1APIAppV2ConnectorOwnersSearchEntitlementOwnersResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2ConnectorOwnersSearchEntitlementOwnersResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2connectorownerssearchentitlementownersresponse +// #endregion class-body-c1apiappv2connectorownerssearchentitlementownersresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2connectorownerssearchuserowners.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2connectorownerssearchuserowners.go new file mode 100644 index 00000000..24f40a8c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2connectorownerssearchuserowners.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2ConnectorOwnersSearchUserOwnersRequest struct { + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + ConnectorID string `pathParam:"style=simple,explode=false,name=connector_id"` + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` + RoleSlug *string `queryParam:"style=form,explode=true,name=role_slug"` +} + +func (c *C1APIAppV2ConnectorOwnersSearchUserOwnersRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2ConnectorOwnersSearchUserOwnersRequest) GetConnectorID() string { + if c == nil { + return "" + } + return c.ConnectorID +} + +func (c *C1APIAppV2ConnectorOwnersSearchUserOwnersRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APIAppV2ConnectorOwnersSearchUserOwnersRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +func (c *C1APIAppV2ConnectorOwnersSearchUserOwnersRequest) GetRoleSlug() *string { + if c == nil { + return nil + } + return c.RoleSlug +} + +// #region class-body-c1apiappv2connectorownerssearchuserownersrequest +// #endregion class-body-c1apiappv2connectorownerssearchuserownersrequest + +type C1APIAppV2ConnectorOwnersSearchUserOwnersResponse struct { + // HTTP response content type for this operation + ContentType string + // SearchConnectorUserOwnersResponse is the response for searching user ownership sources on a connector. + SearchConnectorUserOwnersResponse *shared.SearchConnectorUserOwnersResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2ConnectorOwnersSearchUserOwnersResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2ConnectorOwnersSearchUserOwnersResponse) GetSearchConnectorUserOwnersResponse() *shared.SearchConnectorUserOwnersResponse { + if c == nil { + return nil + } + return c.SearchConnectorUserOwnersResponse +} + +func (c *C1APIAppV2ConnectorOwnersSearchUserOwnersResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2ConnectorOwnersSearchUserOwnersResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2connectorownerssearchuserownersresponse +// #endregion class-body-c1apiappv2connectorownerssearchuserownersresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2connectorownersset.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2connectorownersset.go new file mode 100644 index 00000000..a0f09cc4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiappv2connectorownersset.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAppV2ConnectorOwnersSetRequest struct { + SetConnectorOwnersV2Request *shared.SetConnectorOwnersV2Request `request:"mediaType=application/json"` + AppID string `pathParam:"style=simple,explode=false,name=app_id"` + ConnectorID string `pathParam:"style=simple,explode=false,name=connector_id"` +} + +func (c *C1APIAppV2ConnectorOwnersSetRequest) GetSetConnectorOwnersV2Request() *shared.SetConnectorOwnersV2Request { + if c == nil { + return nil + } + return c.SetConnectorOwnersV2Request +} + +func (c *C1APIAppV2ConnectorOwnersSetRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +func (c *C1APIAppV2ConnectorOwnersSetRequest) GetConnectorID() string { + if c == nil { + return "" + } + return c.ConnectorID +} + +// #region class-body-c1apiappv2connectorownerssetrequest +// #endregion class-body-c1apiappv2connectorownerssetrequest + +type C1APIAppV2ConnectorOwnersSetResponse struct { + // HTTP response content type for this operation + ContentType string + // SetConnectorOwnersV2Response is the empty response for setting connector owners. + SetConnectorOwnersV2Response *shared.SetConnectorOwnersV2Response + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAppV2ConnectorOwnersSetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAppV2ConnectorOwnersSetResponse) GetSetConnectorOwnersV2Response() *shared.SetConnectorOwnersV2Response { + if c == nil { + return nil + } + return c.SetConnectorOwnersV2Response +} + +func (c *C1APIAppV2ConnectorOwnersSetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAppV2ConnectorOwnersSetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiappv2connectorownerssetresponse +// #endregion class-body-c1apiappv2connectorownerssetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreateattributevalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreateattributevalue.go index 59467e5d..f3f76f19 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreateattributevalue.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreateattributevalue.go @@ -45,3 +45,6 @@ func (c *C1APIAttributeV1AttributesCreateAttributeValueResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apiattributev1attributescreateattributevalueresponse +// #endregion class-body-c1apiattributev1attributescreateattributevalueresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreatecomplianceframeworkattributevalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreatecomplianceframeworkattributevalue.go index 122082bc..6889804c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreatecomplianceframeworkattributevalue.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreatecomplianceframeworkattributevalue.go @@ -45,3 +45,6 @@ func (c *C1APIAttributeV1AttributesCreateComplianceFrameworkAttributeValueRespon } return c.RawResponse } + +// #region class-body-c1apiattributev1attributescreatecomplianceframeworkattributevalueresponse +// #endregion class-body-c1apiattributev1attributescreatecomplianceframeworkattributevalueresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreaterisklevelattributevalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreaterisklevelattributevalue.go index 35ca8268..85d9e69b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreaterisklevelattributevalue.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributescreaterisklevelattributevalue.go @@ -45,3 +45,6 @@ func (c *C1APIAttributeV1AttributesCreateRiskLevelAttributeValueResponse) GetRaw } return c.RawResponse } + +// #region class-body-c1apiattributev1attributescreaterisklevelattributevalueresponse +// #endregion class-body-c1apiattributev1attributescreaterisklevelattributevalueresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeleteattributevalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeleteattributevalue.go index 53498242..867774c0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeleteattributevalue.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeleteattributevalue.go @@ -26,6 +26,9 @@ func (c *C1APIAttributeV1AttributesDeleteAttributeValueRequest) GetID() string { return c.ID } +// #region class-body-c1apiattributev1attributesdeleteattributevaluerequest +// #endregion class-body-c1apiattributev1attributesdeleteattributevaluerequest + type C1APIAttributeV1AttributesDeleteAttributeValueResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAttributeV1AttributesDeleteAttributeValueResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apiattributev1attributesdeleteattributevalueresponse +// #endregion class-body-c1apiattributev1attributesdeleteattributevalueresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeletecomplianceframeworkattributevalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeletecomplianceframeworkattributevalue.go index 43a384cb..524322ed 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeletecomplianceframeworkattributevalue.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeletecomplianceframeworkattributevalue.go @@ -26,6 +26,9 @@ func (c *C1APIAttributeV1AttributesDeleteComplianceFrameworkAttributeValueReques return c.ID } +// #region class-body-c1apiattributev1attributesdeletecomplianceframeworkattributevaluerequest +// #endregion class-body-c1apiattributev1attributesdeletecomplianceframeworkattributevaluerequest + type C1APIAttributeV1AttributesDeleteComplianceFrameworkAttributeValueResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAttributeV1AttributesDeleteComplianceFrameworkAttributeValueRespon } return c.RawResponse } + +// #region class-body-c1apiattributev1attributesdeletecomplianceframeworkattributevalueresponse +// #endregion class-body-c1apiattributev1attributesdeletecomplianceframeworkattributevalueresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeleterisklevelattributevalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeleterisklevelattributevalue.go index 315d74f2..e5d5e937 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeleterisklevelattributevalue.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesdeleterisklevelattributevalue.go @@ -26,6 +26,9 @@ func (c *C1APIAttributeV1AttributesDeleteRiskLevelAttributeValueRequest) GetID() return c.ID } +// #region class-body-c1apiattributev1attributesdeleterisklevelattributevaluerequest +// #endregion class-body-c1apiattributev1attributesdeleterisklevelattributevaluerequest + type C1APIAttributeV1AttributesDeleteRiskLevelAttributeValueResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAttributeV1AttributesDeleteRiskLevelAttributeValueResponse) GetRaw } return c.RawResponse } + +// #region class-body-c1apiattributev1attributesdeleterisklevelattributevalueresponse +// #endregion class-body-c1apiattributev1attributesdeleterisklevelattributevalueresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesearchsearchattributevalues.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesearchsearchattributevalues.go index f2651d38..5328549d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesearchsearchattributevalues.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesearchsearchattributevalues.go @@ -45,3 +45,6 @@ func (c *C1APIAttributeV1AttributeSearchSearchAttributeValuesResponse) GetRawRes } return c.RawResponse } + +// #region class-body-c1apiattributev1attributesearchsearchattributevaluesresponse +// #endregion class-body-c1apiattributev1attributesearchsearchattributevaluesresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetattributevalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetattributevalue.go index 455c0c7f..e46b8c16 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetattributevalue.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetattributevalue.go @@ -18,6 +18,9 @@ func (c *C1APIAttributeV1AttributesGetAttributeValueRequest) GetID() string { return c.ID } +// #region class-body-c1apiattributev1attributesgetattributevaluerequest +// #endregion class-body-c1apiattributev1attributesgetattributevaluerequest + type C1APIAttributeV1AttributesGetAttributeValueResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIAttributeV1AttributesGetAttributeValueResponse) GetRawResponse() * } return c.RawResponse } + +// #region class-body-c1apiattributev1attributesgetattributevalueresponse +// #endregion class-body-c1apiattributev1attributesgetattributevalueresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetcomplianceframeworkattributevalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetcomplianceframeworkattributevalue.go index 988e086f..bd901263 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetcomplianceframeworkattributevalue.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetcomplianceframeworkattributevalue.go @@ -18,6 +18,9 @@ func (c *C1APIAttributeV1AttributesGetComplianceFrameworkAttributeValueRequest) return c.ID } +// #region class-body-c1apiattributev1attributesgetcomplianceframeworkattributevaluerequest +// #endregion class-body-c1apiattributev1attributesgetcomplianceframeworkattributevaluerequest + type C1APIAttributeV1AttributesGetComplianceFrameworkAttributeValueResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIAttributeV1AttributesGetComplianceFrameworkAttributeValueResponse) } return c.RawResponse } + +// #region class-body-c1apiattributev1attributesgetcomplianceframeworkattributevalueresponse +// #endregion class-body-c1apiattributev1attributesgetcomplianceframeworkattributevalueresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetrisklevelattributevalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetrisklevelattributevalue.go index 38d0e615..eebd06f2 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetrisklevelattributevalue.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributesgetrisklevelattributevalue.go @@ -18,6 +18,9 @@ func (c *C1APIAttributeV1AttributesGetRiskLevelAttributeValueRequest) GetID() st return c.ID } +// #region class-body-c1apiattributev1attributesgetrisklevelattributevaluerequest +// #endregion class-body-c1apiattributev1attributesgetrisklevelattributevaluerequest + type C1APIAttributeV1AttributesGetRiskLevelAttributeValueResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIAttributeV1AttributesGetRiskLevelAttributeValueResponse) GetRawRes } return c.RawResponse } + +// #region class-body-c1apiattributev1attributesgetrisklevelattributevalueresponse +// #endregion class-body-c1apiattributev1attributesgetrisklevelattributevalueresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistattributetypes.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistattributetypes.go index 7cb161da..69ee5b86 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistattributetypes.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistattributetypes.go @@ -26,6 +26,9 @@ func (c *C1APIAttributeV1AttributesListAttributeTypesRequest) GetPageToken() *st return c.PageToken } +// #region class-body-c1apiattributev1attributeslistattributetypesrequest +// #endregion class-body-c1apiattributev1attributeslistattributetypesrequest + type C1APIAttributeV1AttributesListAttributeTypesResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAttributeV1AttributesListAttributeTypesResponse) GetRawResponse() } return c.RawResponse } + +// #region class-body-c1apiattributev1attributeslistattributetypesresponse +// #endregion class-body-c1apiattributev1attributeslistattributetypesresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistattributevalues.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistattributevalues.go index cd7f7787..552572a1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistattributevalues.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistattributevalues.go @@ -34,6 +34,9 @@ func (c *C1APIAttributeV1AttributesListAttributeValuesRequest) GetPageToken() *s return c.PageToken } +// #region class-body-c1apiattributev1attributeslistattributevaluesrequest +// #endregion class-body-c1apiattributev1attributeslistattributevaluesrequest + type C1APIAttributeV1AttributesListAttributeValuesResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIAttributeV1AttributesListAttributeValuesResponse) GetRawResponse() } return c.RawResponse } + +// #region class-body-c1apiattributev1attributeslistattributevaluesresponse +// #endregion class-body-c1apiattributev1attributeslistattributevaluesresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistcomplianceframeworks.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistcomplianceframeworks.go index 4411e236..d902f29e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistcomplianceframeworks.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistcomplianceframeworks.go @@ -26,10 +26,13 @@ func (c *C1APIAttributeV1AttributesListComplianceFrameworksRequest) GetPageToken return c.PageToken } +// #region class-body-c1apiattributev1attributeslistcomplianceframeworksrequest +// #endregion class-body-c1apiattributev1attributeslistcomplianceframeworksrequest + type C1APIAttributeV1AttributesListComplianceFrameworksResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // ListComplianceFrameworksResponse is the response for listing compliance framework attribute values. ListComplianceFrameworksResponse *shared.ListComplianceFrameworksResponse // HTTP response status code for this operation StatusCode int @@ -64,3 +67,6 @@ func (c *C1APIAttributeV1AttributesListComplianceFrameworksResponse) GetRawRespo } return c.RawResponse } + +// #region class-body-c1apiattributev1attributeslistcomplianceframeworksresponse +// #endregion class-body-c1apiattributev1attributeslistcomplianceframeworksresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistrisklevels.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistrisklevels.go index 218b8d61..1e12ad03 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistrisklevels.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiattributev1attributeslistrisklevels.go @@ -26,10 +26,13 @@ func (c *C1APIAttributeV1AttributesListRiskLevelsRequest) GetPageToken() *string return c.PageToken } +// #region class-body-c1apiattributev1attributeslistrisklevelsrequest +// #endregion class-body-c1apiattributev1attributeslistrisklevelsrequest + type C1APIAttributeV1AttributesListRiskLevelsResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // ListRiskLevelsResponse is the response for listing risk level attribute values. ListRiskLevelsResponse *shared.ListRiskLevelsResponse // HTTP response status code for this operation StatusCode int @@ -64,3 +67,6 @@ func (c *C1APIAttributeV1AttributesListRiskLevelsResponse) GetRawResponse() *htt } return c.RawResponse } + +// #region class-body-c1apiattributev1attributeslistrisklevelsresponse +// #endregion class-body-c1apiattributev1attributeslistrisklevelsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigservicecreate.go new file mode 100644 index 00000000..89c70057 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigservicecreate.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAuthConfigV1TenantAuthConfigServiceCreateResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + TenantAuthConfigServiceCreateResponse *shared.TenantAuthConfigServiceCreateResponse +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceCreateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceCreateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceCreateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceCreateResponse) GetTenantAuthConfigServiceCreateResponse() *shared.TenantAuthConfigServiceCreateResponse { + if c == nil { + return nil + } + return c.TenantAuthConfigServiceCreateResponse +} + +// #region class-body-c1apiauthconfigv1tenantauthconfigservicecreateresponse +// #endregion class-body-c1apiauthconfigv1tenantauthconfigservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigservicedelete.go new file mode 100644 index 00000000..37d55d40 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigservicedelete.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAuthConfigV1TenantAuthConfigServiceDeleteRequest struct { + TenantAuthConfigServiceDeleteRequest *shared.TenantAuthConfigServiceDeleteRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceDeleteRequest) GetTenantAuthConfigServiceDeleteRequest() *shared.TenantAuthConfigServiceDeleteRequest { + if c == nil { + return nil + } + return c.TenantAuthConfigServiceDeleteRequest +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceDeleteRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiauthconfigv1tenantauthconfigservicedeleterequest +// #endregion class-body-c1apiauthconfigv1tenantauthconfigservicedeleterequest + +type C1APIAuthConfigV1TenantAuthConfigServiceDeleteResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + TenantAuthConfigServiceDeleteResponse *shared.TenantAuthConfigServiceDeleteResponse +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceDeleteResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceDeleteResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceDeleteResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceDeleteResponse) GetTenantAuthConfigServiceDeleteResponse() *shared.TenantAuthConfigServiceDeleteResponse { + if c == nil { + return nil + } + return c.TenantAuthConfigServiceDeleteResponse +} + +// #region class-body-c1apiauthconfigv1tenantauthconfigservicedeleteresponse +// #endregion class-body-c1apiauthconfigv1tenantauthconfigservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigserviceget.go new file mode 100644 index 00000000..6c328923 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigserviceget.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAuthConfigV1TenantAuthConfigServiceGetRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceGetRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiauthconfigv1tenantauthconfigservicegetrequest +// #endregion class-body-c1apiauthconfigv1tenantauthconfigservicegetrequest + +type C1APIAuthConfigV1TenantAuthConfigServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + TenantAuthConfigServiceGetResponse *shared.TenantAuthConfigServiceGetResponse +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceGetResponse) GetTenantAuthConfigServiceGetResponse() *shared.TenantAuthConfigServiceGetResponse { + if c == nil { + return nil + } + return c.TenantAuthConfigServiceGetResponse +} + +// #region class-body-c1apiauthconfigv1tenantauthconfigservicegetresponse +// #endregion class-body-c1apiauthconfigv1tenantauthconfigservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigservicelist.go new file mode 100644 index 00000000..0a467d98 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigservicelist.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAuthConfigV1TenantAuthConfigServiceListRequest struct { + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceListRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceListRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +// #region class-body-c1apiauthconfigv1tenantauthconfigservicelistrequest +// #endregion class-body-c1apiauthconfigv1tenantauthconfigservicelistrequest + +type C1APIAuthConfigV1TenantAuthConfigServiceListResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + TenantAuthConfigServiceListResponse *shared.TenantAuthConfigServiceListResponse +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceListResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceListResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceListResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceListResponse) GetTenantAuthConfigServiceListResponse() *shared.TenantAuthConfigServiceListResponse { + if c == nil { + return nil + } + return c.TenantAuthConfigServiceListResponse +} + +// #region class-body-c1apiauthconfigv1tenantauthconfigservicelistresponse +// #endregion class-body-c1apiauthconfigv1tenantauthconfigservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigserviceupdate.go new file mode 100644 index 00000000..46f4c0e1 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthconfigv1tenantauthconfigserviceupdate.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAuthConfigV1TenantAuthConfigServiceUpdateRequest struct { + TenantAuthConfigServiceUpdateRequest *shared.TenantAuthConfigServiceUpdateRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceUpdateRequest) GetTenantAuthConfigServiceUpdateRequest() *shared.TenantAuthConfigServiceUpdateRequest { + if c == nil { + return nil + } + return c.TenantAuthConfigServiceUpdateRequest +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceUpdateRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiauthconfigv1tenantauthconfigserviceupdaterequest +// #endregion class-body-c1apiauthconfigv1tenantauthconfigserviceupdaterequest + +type C1APIAuthConfigV1TenantAuthConfigServiceUpdateResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + TenantAuthConfigServiceUpdateResponse *shared.TenantAuthConfigServiceUpdateResponse +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceUpdateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceUpdateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceUpdateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIAuthConfigV1TenantAuthConfigServiceUpdateResponse) GetTenantAuthConfigServiceUpdateResponse() *shared.TenantAuthConfigServiceUpdateResponse { + if c == nil { + return nil + } + return c.TenantAuthConfigServiceUpdateResponse +} + +// #region class-body-c1apiauthconfigv1tenantauthconfigserviceupdateresponse +// #endregion class-body-c1apiauthconfigv1tenantauthconfigserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthv1authintrospect.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthv1authintrospect.go index 32b501cb..16fa29d0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthv1authintrospect.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiauthv1authintrospect.go @@ -45,3 +45,6 @@ func (c *C1APIAuthV1AuthIntrospectResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiauthv1authintrospectresponse +// #endregion class-body-c1apiauthv1authintrospectresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionactionsserviceterminateautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionactionsserviceterminateautomation.go index 22c1764d..08d874a1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionactionsserviceterminateautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionactionsserviceterminateautomation.go @@ -4,6 +4,7 @@ package operations import ( "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" "net/http" ) @@ -12,6 +13,17 @@ type C1APIAutomationsV1AutomationExecutionActionsServiceTerminateAutomationReque ID int64 `integer:"string" pathParam:"style=simple,explode=false,name=id"` } +func (c C1APIAutomationsV1AutomationExecutionActionsServiceTerminateAutomationRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *C1APIAutomationsV1AutomationExecutionActionsServiceTerminateAutomationRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { + return err + } + return nil +} + func (c *C1APIAutomationsV1AutomationExecutionActionsServiceTerminateAutomationRequest) GetTerminateAutomationRequest() *shared.TerminateAutomationRequest { if c == nil { return nil @@ -26,6 +38,9 @@ func (c *C1APIAutomationsV1AutomationExecutionActionsServiceTerminateAutomationR return c.ID } +// #region class-body-c1apiautomationsv1automationexecutionactionsserviceterminateautomationrequest +// #endregion class-body-c1apiautomationsv1automationexecutionactionsserviceterminateautomationrequest + type C1APIAutomationsV1AutomationExecutionActionsServiceTerminateAutomationResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +79,6 @@ func (c *C1APIAutomationsV1AutomationExecutionActionsServiceTerminateAutomationR } return c.TerminateAutomationResponse } + +// #region class-body-c1apiautomationsv1automationexecutionactionsserviceterminateautomationresponse +// #endregion class-body-c1apiautomationsv1automationexecutionactionsserviceterminateautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionsearchservicesearchallautomationexecutions.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionsearchservicesearchallautomationexecutions.go new file mode 100644 index 00000000..47e3a3be --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionsearchservicesearchallautomationexecutions.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAutomationsV1AutomationExecutionSearchServiceSearchAllAutomationExecutionsResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + SearchAllAutomationExecutionsResponse *shared.SearchAllAutomationExecutionsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAutomationsV1AutomationExecutionSearchServiceSearchAllAutomationExecutionsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAutomationsV1AutomationExecutionSearchServiceSearchAllAutomationExecutionsResponse) GetSearchAllAutomationExecutionsResponse() *shared.SearchAllAutomationExecutionsResponse { + if c == nil { + return nil + } + return c.SearchAllAutomationExecutionsResponse +} + +func (c *C1APIAutomationsV1AutomationExecutionSearchServiceSearchAllAutomationExecutionsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAutomationsV1AutomationExecutionSearchServiceSearchAllAutomationExecutionsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiautomationsv1automationexecutionsearchservicesearchallautomationexecutionsresponse +// #endregion class-body-c1apiautomationsv1automationexecutionsearchservicesearchallautomationexecutionsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionsearchservicesearchautomationexecutions.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionsearchservicesearchautomationexecutions.go index f39dce65..2398b748 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionsearchservicesearchautomationexecutions.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionsearchservicesearchautomationexecutions.go @@ -45,3 +45,6 @@ func (c *C1APIAutomationsV1AutomationExecutionSearchServiceSearchAutomationExecu } return c.RawResponse } + +// #region class-body-c1apiautomationsv1automationexecutionsearchservicesearchautomationexecutionsresponse +// #endregion class-body-c1apiautomationsv1automationexecutionsearchservicesearchautomationexecutionsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionservicegetautomationexecution.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionservicegetautomationexecution.go index dcc0ec03..d213dd25 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionservicegetautomationexecution.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionservicegetautomationexecution.go @@ -4,6 +4,7 @@ package operations import ( "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" "net/http" ) @@ -11,6 +12,17 @@ type C1APIAutomationsV1AutomationExecutionServiceGetAutomationExecutionRequest s ID int64 `integer:"string" pathParam:"style=simple,explode=false,name=id"` } +func (c C1APIAutomationsV1AutomationExecutionServiceGetAutomationExecutionRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *C1APIAutomationsV1AutomationExecutionServiceGetAutomationExecutionRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { + return err + } + return nil +} + func (c *C1APIAutomationsV1AutomationExecutionServiceGetAutomationExecutionRequest) GetID() int64 { if c == nil { return 0 @@ -18,6 +30,9 @@ func (c *C1APIAutomationsV1AutomationExecutionServiceGetAutomationExecutionReque return c.ID } +// #region class-body-c1apiautomationsv1automationexecutionservicegetautomationexecutionrequest +// #endregion class-body-c1apiautomationsv1automationexecutionservicegetautomationexecutionrequest + type C1APIAutomationsV1AutomationExecutionServiceGetAutomationExecutionResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +71,6 @@ func (c *C1APIAutomationsV1AutomationExecutionServiceGetAutomationExecutionRespo } return c.RawResponse } + +// #region class-body-c1apiautomationsv1automationexecutionservicegetautomationexecutionresponse +// #endregion class-body-c1apiautomationsv1automationexecutionservicegetautomationexecutionresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionservicelistautomationexecutions.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionservicelistautomationexecutions.go index aa80739b..1e52e59b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionservicelistautomationexecutions.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationexecutionservicelistautomationexecutions.go @@ -45,3 +45,6 @@ func (c *C1APIAutomationsV1AutomationExecutionServiceListAutomationExecutionsRes } return c.RawResponse } + +// #region class-body-c1apiautomationsv1automationexecutionservicelistautomationexecutionsresponse +// #endregion class-body-c1apiautomationsv1automationexecutionservicelistautomationexecutionsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationsearchservicesearchautomations.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationsearchservicesearchautomations.go index b8975d59..bca45f9c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationsearchservicesearchautomations.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationsearchservicesearchautomations.go @@ -45,3 +45,6 @@ func (c *C1APIAutomationsV1AutomationSearchServiceSearchAutomationsResponse) Get } return c.RawResponse } + +// #region class-body-c1apiautomationsv1automationsearchservicesearchautomationsresponse +// #endregion class-body-c1apiautomationsv1automationsearchservicesearchautomationsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationsearchservicesearchautomationtemplateversions.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationsearchservicesearchautomationtemplateversions.go index 2fa10ba3..4a0c40df 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationsearchservicesearchautomationtemplateversions.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationsearchservicesearchautomationtemplateversions.go @@ -45,3 +45,6 @@ func (c *C1APIAutomationsV1AutomationSearchServiceSearchAutomationTemplateVersio } return c.RawResponse } + +// #region class-body-c1apiautomationsv1automationsearchservicesearchautomationtemplateversionsresponse +// #endregion class-body-c1apiautomationsv1automationsearchservicesearchautomationtemplateversionsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceclearautomationcircuitbreaker.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceclearautomationcircuitbreaker.go new file mode 100644 index 00000000..cde98e93 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceclearautomationcircuitbreaker.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerRequest struct { + ClearAutomationCircuitBreakerRequest *shared.ClearAutomationCircuitBreakerRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerRequest) GetClearAutomationCircuitBreakerRequest() *shared.ClearAutomationCircuitBreakerRequest { + if c == nil { + return nil + } + return c.ClearAutomationCircuitBreakerRequest +} + +func (c *C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiautomationsv1automationserviceclearautomationcircuitbreakerrequest +// #endregion class-body-c1apiautomationsv1automationserviceclearautomationcircuitbreakerrequest + +type C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerResponse struct { + // Successful response + ClearAutomationCircuitBreakerResponse *shared.ClearAutomationCircuitBreakerResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerResponse) GetClearAutomationCircuitBreakerResponse() *shared.ClearAutomationCircuitBreakerResponse { + if c == nil { + return nil + } + return c.ClearAutomationCircuitBreakerResponse +} + +func (c *C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAutomationsV1AutomationServiceClearAutomationCircuitBreakerResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiautomationsv1automationserviceclearautomationcircuitbreakerresponse +// #endregion class-body-c1apiautomationsv1automationserviceclearautomationcircuitbreakerresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicecreateautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicecreateautomation.go index 0bc1b275..ee608966 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicecreateautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicecreateautomation.go @@ -8,28 +8,28 @@ import ( ) type C1APIAutomationsV1AutomationServiceCreateAutomationResponse struct { + // Successful response + AutomationsCreateAutomationResponse *shared.AutomationsCreateAutomationResponse // HTTP response content type for this operation ContentType string - // Successful response - CreateAutomationResponse *shared.CreateAutomationResponseInput // HTTP response status code for this operation StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } -func (c *C1APIAutomationsV1AutomationServiceCreateAutomationResponse) GetContentType() string { +func (c *C1APIAutomationsV1AutomationServiceCreateAutomationResponse) GetAutomationsCreateAutomationResponse() *shared.AutomationsCreateAutomationResponse { if c == nil { - return "" + return nil } - return c.ContentType + return c.AutomationsCreateAutomationResponse } -func (c *C1APIAutomationsV1AutomationServiceCreateAutomationResponse) GetCreateAutomationResponse() *shared.CreateAutomationResponseInput { +func (c *C1APIAutomationsV1AutomationServiceCreateAutomationResponse) GetContentType() string { if c == nil { - return nil + return "" } - return c.CreateAutomationResponse + return c.ContentType } func (c *C1APIAutomationsV1AutomationServiceCreateAutomationResponse) GetStatusCode() int { @@ -45,3 +45,6 @@ func (c *C1APIAutomationsV1AutomationServiceCreateAutomationResponse) GetRawResp } return c.RawResponse } + +// #region class-body-c1apiautomationsv1automationservicecreateautomationresponse +// #endregion class-body-c1apiautomationsv1automationservicecreateautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicedeleteautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicedeleteautomation.go index 66651d87..9269bc3f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicedeleteautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicedeleteautomation.go @@ -8,15 +8,15 @@ import ( ) type C1APIAutomationsV1AutomationServiceDeleteAutomationRequest struct { - DeleteAutomationRequest *shared.DeleteAutomationRequest `request:"mediaType=application/json"` - ID string `pathParam:"style=simple,explode=false,name=id"` + AutomationsDeleteAutomationRequest *shared.AutomationsDeleteAutomationRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` } -func (c *C1APIAutomationsV1AutomationServiceDeleteAutomationRequest) GetDeleteAutomationRequest() *shared.DeleteAutomationRequest { +func (c *C1APIAutomationsV1AutomationServiceDeleteAutomationRequest) GetAutomationsDeleteAutomationRequest() *shared.AutomationsDeleteAutomationRequest { if c == nil { return nil } - return c.DeleteAutomationRequest + return c.AutomationsDeleteAutomationRequest } func (c *C1APIAutomationsV1AutomationServiceDeleteAutomationRequest) GetID() string { @@ -26,29 +26,32 @@ func (c *C1APIAutomationsV1AutomationServiceDeleteAutomationRequest) GetID() str return c.ID } +// #region class-body-c1apiautomationsv1automationservicedeleteautomationrequest +// #endregion class-body-c1apiautomationsv1automationservicedeleteautomationrequest + type C1APIAutomationsV1AutomationServiceDeleteAutomationResponse struct { + // Successful response + AutomationsDeleteAutomationResponse *shared.AutomationsDeleteAutomationResponse // HTTP response content type for this operation ContentType string - // Successful response - DeleteAutomationResponse *shared.DeleteAutomationResponse // HTTP response status code for this operation StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } -func (c *C1APIAutomationsV1AutomationServiceDeleteAutomationResponse) GetContentType() string { +func (c *C1APIAutomationsV1AutomationServiceDeleteAutomationResponse) GetAutomationsDeleteAutomationResponse() *shared.AutomationsDeleteAutomationResponse { if c == nil { - return "" + return nil } - return c.ContentType + return c.AutomationsDeleteAutomationResponse } -func (c *C1APIAutomationsV1AutomationServiceDeleteAutomationResponse) GetDeleteAutomationResponse() *shared.DeleteAutomationResponse { +func (c *C1APIAutomationsV1AutomationServiceDeleteAutomationResponse) GetContentType() string { if c == nil { - return nil + return "" } - return c.DeleteAutomationResponse + return c.ContentType } func (c *C1APIAutomationsV1AutomationServiceDeleteAutomationResponse) GetStatusCode() int { @@ -64,3 +67,6 @@ func (c *C1APIAutomationsV1AutomationServiceDeleteAutomationResponse) GetRawResp } return c.RawResponse } + +// #region class-body-c1apiautomationsv1automationservicedeleteautomationresponse +// #endregion class-body-c1apiautomationsv1automationservicedeleteautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceexecuteautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceexecuteautomation.go index e9a3d7c0..ed4294f3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceexecuteautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceexecuteautomation.go @@ -26,6 +26,9 @@ func (c *C1APIAutomationsV1AutomationServiceExecuteAutomationRequest) GetID() st return c.ID } +// #region class-body-c1apiautomationsv1automationserviceexecuteautomationrequest +// #endregion class-body-c1apiautomationsv1automationserviceexecuteautomationrequest + type C1APIAutomationsV1AutomationServiceExecuteAutomationResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAutomationsV1AutomationServiceExecuteAutomationResponse) GetRawRes } return c.RawResponse } + +// #region class-body-c1apiautomationsv1automationserviceexecuteautomationresponse +// #endregion class-body-c1apiautomationsv1automationserviceexecuteautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicegetautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicegetautomation.go index 87e944d2..91fcfe46 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicegetautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicegetautomation.go @@ -18,6 +18,9 @@ func (c *C1APIAutomationsV1AutomationServiceGetAutomationRequest) GetID() string return c.ID } +// #region class-body-c1apiautomationsv1automationservicegetautomationrequest +// #endregion class-body-c1apiautomationsv1automationservicegetautomationrequest + type C1APIAutomationsV1AutomationServiceGetAutomationResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIAutomationsV1AutomationServiceGetAutomationResponse) GetRawRespons } return c.RawResponse } + +// #region class-body-c1apiautomationsv1automationservicegetautomationresponse +// #endregion class-body-c1apiautomationsv1automationservicegetautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicelistautomations.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicelistautomations.go index 3baa5177..e2664c02 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicelistautomations.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationservicelistautomations.go @@ -45,3 +45,6 @@ func (c *C1APIAutomationsV1AutomationServiceListAutomationsResponse) GetRawRespo } return c.RawResponse } + +// #region class-body-c1apiautomationsv1automationservicelistautomationsresponse +// #endregion class-body-c1apiautomationsv1automationservicelistautomationsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceresolvepausedautomationexecutions.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceresolvepausedautomationexecutions.go new file mode 100644 index 00000000..79f9cee9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceresolvepausedautomationexecutions.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsRequest struct { + ResolvePausedAutomationExecutionsRequest *shared.ResolvePausedAutomationExecutionsRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsRequest) GetResolvePausedAutomationExecutionsRequest() *shared.ResolvePausedAutomationExecutionsRequest { + if c == nil { + return nil + } + return c.ResolvePausedAutomationExecutionsRequest +} + +func (c *C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiautomationsv1automationserviceresolvepausedautomationexecutionsrequest +// #endregion class-body-c1apiautomationsv1automationserviceresolvepausedautomationexecutionsrequest + +type C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ResolvePausedAutomationExecutionsResponse *shared.ResolvePausedAutomationExecutionsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsResponse) GetResolvePausedAutomationExecutionsResponse() *shared.ResolvePausedAutomationExecutionsResponse { + if c == nil { + return nil + } + return c.ResolvePausedAutomationExecutionsResponse +} + +func (c *C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIAutomationsV1AutomationServiceResolvePausedAutomationExecutionsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiautomationsv1automationserviceresolvepausedautomationexecutionsresponse +// #endregion class-body-c1apiautomationsv1automationserviceresolvepausedautomationexecutionsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceupdateautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceupdateautomation.go index 8fb63c5e..775e4b34 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceupdateautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiautomationsv1automationserviceupdateautomation.go @@ -26,6 +26,9 @@ func (c *C1APIAutomationsV1AutomationServiceUpdateAutomationRequest) GetID() str return c.ID } +// #region class-body-c1apiautomationsv1automationserviceupdateautomationrequest +// #endregion class-body-c1apiautomationsv1automationserviceupdateautomationrequest + type C1APIAutomationsV1AutomationServiceUpdateAutomationResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIAutomationsV1AutomationServiceUpdateAutomationResponse) GetUpdateA } return c.UpdateAutomationResponse } + +// #region class-body-c1apiautomationsv1automationserviceupdateautomationresponse +// #endregion class-body-c1apiautomationsv1automationserviceupdateautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicecreate.go index 832dec7d..a01bd348 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicecreate.go @@ -45,3 +45,6 @@ func (c *C1APIDirectoryV1DirectoryServiceCreateResponse) GetRawResponse() *http. } return c.RawResponse } + +// #region class-body-c1apidirectoryv1directoryservicecreateresponse +// #endregion class-body-c1apidirectoryv1directoryservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicedelete.go index 3fb12491..99b1480f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicedelete.go @@ -26,6 +26,9 @@ func (c *C1APIDirectoryV1DirectoryServiceDeleteRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apidirectoryv1directoryservicedeleterequest +// #endregion class-body-c1apidirectoryv1directoryservicedeleterequest + type C1APIDirectoryV1DirectoryServiceDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIDirectoryV1DirectoryServiceDeleteResponse) GetRawResponse() *http. } return c.RawResponse } + +// #region class-body-c1apidirectoryv1directoryservicedeleteresponse +// #endregion class-body-c1apidirectoryv1directoryservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryserviceget.go index 29ada61f..1f90c70e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIDirectoryV1DirectoryServiceGetRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apidirectoryv1directoryservicegetrequest +// #endregion class-body-c1apidirectoryv1directoryservicegetrequest + type C1APIDirectoryV1DirectoryServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -57,3 +60,6 @@ func (c *C1APIDirectoryV1DirectoryServiceGetResponse) GetRawResponse() *http.Res } return c.RawResponse } + +// #region class-body-c1apidirectoryv1directoryservicegetresponse +// #endregion class-body-c1apidirectoryv1directoryservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicelist.go index 4560a759..324f36ba 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryservicelist.go @@ -26,6 +26,9 @@ func (c *C1APIDirectoryV1DirectoryServiceListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apidirectoryv1directoryservicelistrequest +// #endregion class-body-c1apidirectoryv1directoryservicelistrequest + type C1APIDirectoryV1DirectoryServiceListResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIDirectoryV1DirectoryServiceListResponse) GetRawResponse() *http.Re } return c.RawResponse } + +// #region class-body-c1apidirectoryv1directoryservicelistresponse +// #endregion class-body-c1apidirectoryv1directoryservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryserviceupdate.go index 663c9f5e..4650200a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apidirectoryv1directoryserviceupdate.go @@ -26,6 +26,9 @@ func (c *C1APIDirectoryV1DirectoryServiceUpdateRequest) GetAppID() string { return c.AppID } +// #region class-body-c1apidirectoryv1directoryserviceupdaterequest +// #endregion class-body-c1apidirectoryv1directoryserviceupdaterequest + type C1APIDirectoryV1DirectoryServiceUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIDirectoryV1DirectoryServiceUpdateResponse) GetRawResponse() *http. } return c.RawResponse } + +// #region class-body-c1apidirectoryv1directoryserviceupdateresponse +// #endregion class-body-c1apidirectoryv1directoryserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicecreatefindingroutingrule.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicecreatefindingroutingrule.go new file mode 100644 index 00000000..24adbbdd --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicecreatefindingroutingrule.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingRoutingRuleServiceCreateFindingRoutingRuleResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + CreateFindingRoutingRuleResponse *shared.CreateFindingRoutingRuleResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceCreateFindingRoutingRuleResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceCreateFindingRoutingRuleResponse) GetCreateFindingRoutingRuleResponse() *shared.CreateFindingRoutingRuleResponse { + if c == nil { + return nil + } + return c.CreateFindingRoutingRuleResponse +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceCreateFindingRoutingRuleResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceCreateFindingRoutingRuleResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifindingv1findingroutingruleservicecreatefindingroutingruleresponse +// #endregion class-body-c1apifindingv1findingroutingruleservicecreatefindingroutingruleresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicedeletefindingroutingrule.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicedeletefindingroutingrule.go new file mode 100644 index 00000000..5ae00199 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicedeletefindingroutingrule.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleRequest struct { + DeleteFindingRoutingRuleRequest *shared.DeleteFindingRoutingRuleRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleRequest) GetDeleteFindingRoutingRuleRequest() *shared.DeleteFindingRoutingRuleRequest { + if c == nil { + return nil + } + return c.DeleteFindingRoutingRuleRequest +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apifindingv1findingroutingruleservicedeletefindingroutingrulerequest +// #endregion class-body-c1apifindingv1findingroutingruleservicedeletefindingroutingrulerequest + +type C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + DeleteFindingRoutingRuleResponse *shared.DeleteFindingRoutingRuleResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleResponse) GetDeleteFindingRoutingRuleResponse() *shared.DeleteFindingRoutingRuleResponse { + if c == nil { + return nil + } + return c.DeleteFindingRoutingRuleResponse +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceDeleteFindingRoutingRuleResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifindingv1findingroutingruleservicedeletefindingroutingruleresponse +// #endregion class-body-c1apifindingv1findingroutingruleservicedeletefindingroutingruleresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicegetfindingroutingrule.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicegetfindingroutingrule.go new file mode 100644 index 00000000..2a364253 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicegetfindingroutingrule.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingRoutingRuleServiceGetFindingRoutingRuleRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceGetFindingRoutingRuleRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apifindingv1findingroutingruleservicegetfindingroutingrulerequest +// #endregion class-body-c1apifindingv1findingroutingruleservicegetfindingroutingrulerequest + +type C1APIFindingV1FindingRoutingRuleServiceGetFindingRoutingRuleResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetFindingRoutingRuleResponse *shared.GetFindingRoutingRuleResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceGetFindingRoutingRuleResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceGetFindingRoutingRuleResponse) GetGetFindingRoutingRuleResponse() *shared.GetFindingRoutingRuleResponse { + if c == nil { + return nil + } + return c.GetFindingRoutingRuleResponse +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceGetFindingRoutingRuleResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceGetFindingRoutingRuleResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifindingv1findingroutingruleservicegetfindingroutingruleresponse +// #endregion class-body-c1apifindingv1findingroutingruleservicegetfindingroutingruleresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicelistfindingroutingrules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicelistfindingroutingrules.go new file mode 100644 index 00000000..b2b38d9b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleservicelistfindingroutingrules.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingRoutingRuleServiceListFindingRoutingRulesResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ListFindingRoutingRulesResponse *shared.ListFindingRoutingRulesResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceListFindingRoutingRulesResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceListFindingRoutingRulesResponse) GetListFindingRoutingRulesResponse() *shared.ListFindingRoutingRulesResponse { + if c == nil { + return nil + } + return c.ListFindingRoutingRulesResponse +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceListFindingRoutingRulesResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceListFindingRoutingRulesResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifindingv1findingroutingruleservicelistfindingroutingrulesresponse +// #endregion class-body-c1apifindingv1findingroutingruleservicelistfindingroutingrulesresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleserviceupdatefindingroutingrule.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleserviceupdatefindingroutingrule.go new file mode 100644 index 00000000..766a7b57 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingroutingruleserviceupdatefindingroutingrule.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleRequest struct { + UpdateFindingRoutingRuleRequest *shared.UpdateFindingRoutingRuleRequest `request:"mediaType=application/json"` + RoutingRuleID string `pathParam:"style=simple,explode=false,name=routing_rule_id"` +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleRequest) GetUpdateFindingRoutingRuleRequest() *shared.UpdateFindingRoutingRuleRequest { + if c == nil { + return nil + } + return c.UpdateFindingRoutingRuleRequest +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleRequest) GetRoutingRuleID() string { + if c == nil { + return "" + } + return c.RoutingRuleID +} + +// #region class-body-c1apifindingv1findingroutingruleserviceupdatefindingroutingrulerequest +// #endregion class-body-c1apifindingv1findingroutingruleserviceupdatefindingroutingrulerequest + +type C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + UpdateFindingRoutingRuleResponse *shared.UpdateFindingRoutingRuleResponse +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIFindingV1FindingRoutingRuleServiceUpdateFindingRoutingRuleResponse) GetUpdateFindingRoutingRuleResponse() *shared.UpdateFindingRoutingRuleResponse { + if c == nil { + return nil + } + return c.UpdateFindingRoutingRuleResponse +} + +// #region class-body-c1apifindingv1findingroutingruleserviceupdatefindingroutingruleresponse +// #endregion class-body-c1apifindingv1findingroutingruleserviceupdatefindingroutingruleresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingsearchservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingsearchservicesearch.go new file mode 100644 index 00000000..9d63a88d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingsearchservicesearch.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingSearchServiceSearchResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + FindingSearchResponse *shared.FindingSearchResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFindingV1FindingSearchServiceSearchResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingSearchServiceSearchResponse) GetFindingSearchResponse() *shared.FindingSearchResponse { + if c == nil { + return nil + } + return c.FindingSearchResponse +} + +func (c *C1APIFindingV1FindingSearchServiceSearchResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingSearchServiceSearchResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifindingv1findingsearchservicesearchresponse +// #endregion class-body-c1apifindingv1findingsearchservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicebulkcreatefindingtasks.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicebulkcreatefindingtasks.go new file mode 100644 index 00000000..87cc04a3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicebulkcreatefindingtasks.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingServiceBulkCreateFindingTasksResponse struct { + // Successful response + BulkCreateFindingTasksResponse *shared.BulkCreateFindingTasksResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFindingV1FindingServiceBulkCreateFindingTasksResponse) GetBulkCreateFindingTasksResponse() *shared.BulkCreateFindingTasksResponse { + if c == nil { + return nil + } + return c.BulkCreateFindingTasksResponse +} + +func (c *C1APIFindingV1FindingServiceBulkCreateFindingTasksResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingServiceBulkCreateFindingTasksResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingServiceBulkCreateFindingTasksResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifindingv1findingservicebulkcreatefindingtasksresponse +// #endregion class-body-c1apifindingv1findingservicebulkcreatefindingtasksresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicebulkupdatefindingstate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicebulkupdatefindingstate.go new file mode 100644 index 00000000..28fc27d9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicebulkupdatefindingstate.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingServiceBulkUpdateFindingStateResponse struct { + // Successful response + BulkUpdateFindingStateResponse *shared.BulkUpdateFindingStateResponse + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFindingV1FindingServiceBulkUpdateFindingStateResponse) GetBulkUpdateFindingStateResponse() *shared.BulkUpdateFindingStateResponse { + if c == nil { + return nil + } + return c.BulkUpdateFindingStateResponse +} + +func (c *C1APIFindingV1FindingServiceBulkUpdateFindingStateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingServiceBulkUpdateFindingStateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingServiceBulkUpdateFindingStateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifindingv1findingservicebulkupdatefindingstateresponse +// #endregion class-body-c1apifindingv1findingservicebulkupdatefindingstateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicecreatefindingtask.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicecreatefindingtask.go new file mode 100644 index 00000000..58cb5150 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicecreatefindingtask.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingServiceCreateFindingTaskRequest struct { + CreateFindingTaskRequest *shared.CreateFindingTaskRequest `request:"mediaType=application/json"` + FindingID string `pathParam:"style=simple,explode=false,name=finding_id"` +} + +func (c *C1APIFindingV1FindingServiceCreateFindingTaskRequest) GetCreateFindingTaskRequest() *shared.CreateFindingTaskRequest { + if c == nil { + return nil + } + return c.CreateFindingTaskRequest +} + +func (c *C1APIFindingV1FindingServiceCreateFindingTaskRequest) GetFindingID() string { + if c == nil { + return "" + } + return c.FindingID +} + +// #region class-body-c1apifindingv1findingservicecreatefindingtaskrequest +// #endregion class-body-c1apifindingv1findingservicecreatefindingtaskrequest + +type C1APIFindingV1FindingServiceCreateFindingTaskResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + CreateFindingTaskResponse *shared.CreateFindingTaskResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFindingV1FindingServiceCreateFindingTaskResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingServiceCreateFindingTaskResponse) GetCreateFindingTaskResponse() *shared.CreateFindingTaskResponse { + if c == nil { + return nil + } + return c.CreateFindingTaskResponse +} + +func (c *C1APIFindingV1FindingServiceCreateFindingTaskResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingServiceCreateFindingTaskResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifindingv1findingservicecreatefindingtaskresponse +// #endregion class-body-c1apifindingv1findingservicecreatefindingtaskresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicegetfinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicegetfinding.go new file mode 100644 index 00000000..6cfd60d4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingservicegetfinding.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingServiceGetFindingRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIFindingV1FindingServiceGetFindingRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apifindingv1findingservicegetfindingrequest +// #endregion class-body-c1apifindingv1findingservicegetfindingrequest + +type C1APIFindingV1FindingServiceGetFindingResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetFindingResponse *shared.GetFindingResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFindingV1FindingServiceGetFindingResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingServiceGetFindingResponse) GetGetFindingResponse() *shared.GetFindingResponse { + if c == nil { + return nil + } + return c.GetFindingResponse +} + +func (c *C1APIFindingV1FindingServiceGetFindingResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingServiceGetFindingResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifindingv1findingservicegetfindingresponse +// #endregion class-body-c1apifindingv1findingservicegetfindingresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingserviceupdatefindingstate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingserviceupdatefindingstate.go new file mode 100644 index 00000000..ccb862ad --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifindingv1findingserviceupdatefindingstate.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFindingV1FindingServiceUpdateFindingStateRequest struct { + UpdateFindingStateRequest *shared.UpdateFindingStateRequest `request:"mediaType=application/json"` + FindingID string `pathParam:"style=simple,explode=false,name=finding_id"` +} + +func (c *C1APIFindingV1FindingServiceUpdateFindingStateRequest) GetUpdateFindingStateRequest() *shared.UpdateFindingStateRequest { + if c == nil { + return nil + } + return c.UpdateFindingStateRequest +} + +func (c *C1APIFindingV1FindingServiceUpdateFindingStateRequest) GetFindingID() string { + if c == nil { + return "" + } + return c.FindingID +} + +// #region class-body-c1apifindingv1findingserviceupdatefindingstaterequest +// #endregion class-body-c1apifindingv1findingserviceupdatefindingstaterequest + +type C1APIFindingV1FindingServiceUpdateFindingStateResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + UpdateFindingStateResponse *shared.UpdateFindingStateResponse +} + +func (c *C1APIFindingV1FindingServiceUpdateFindingStateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFindingV1FindingServiceUpdateFindingStateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFindingV1FindingServiceUpdateFindingStateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIFindingV1FindingServiceUpdateFindingStateResponse) GetUpdateFindingStateResponse() *shared.UpdateFindingStateResponse { + if c == nil { + return nil + } + return c.UpdateFindingStateResponse +} + +// #region class-body-c1apifindingv1findingserviceupdatefindingstateresponse +// #endregion class-body-c1apifindingv1findingserviceupdatefindingstateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationsearchservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationsearchservicesearch.go new file mode 100644 index 00000000..b9bda220 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationsearchservicesearch.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFunctionsV1FunctionsInvocationSearchServiceSearchRequest struct { + FunctionsInvocationSearchRequest *shared.FunctionsInvocationSearchRequest `request:"mediaType=application/json"` + FunctionID string `pathParam:"style=simple,explode=false,name=function_id"` +} + +func (c *C1APIFunctionsV1FunctionsInvocationSearchServiceSearchRequest) GetFunctionsInvocationSearchRequest() *shared.FunctionsInvocationSearchRequest { + if c == nil { + return nil + } + return c.FunctionsInvocationSearchRequest +} + +func (c *C1APIFunctionsV1FunctionsInvocationSearchServiceSearchRequest) GetFunctionID() string { + if c == nil { + return "" + } + return c.FunctionID +} + +// #region class-body-c1apifunctionsv1functionsinvocationsearchservicesearchrequest +// #endregion class-body-c1apifunctionsv1functionsinvocationsearchservicesearchrequest + +type C1APIFunctionsV1FunctionsInvocationSearchServiceSearchResponse struct { + // HTTP response content type for this operation + ContentType string + // FunctionsInvocationSearchResponse is the response for searching function invocations. + FunctionsInvocationSearchResponse *shared.FunctionsInvocationSearchResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFunctionsV1FunctionsInvocationSearchServiceSearchResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFunctionsV1FunctionsInvocationSearchServiceSearchResponse) GetFunctionsInvocationSearchResponse() *shared.FunctionsInvocationSearchResponse { + if c == nil { + return nil + } + return c.FunctionsInvocationSearchResponse +} + +func (c *C1APIFunctionsV1FunctionsInvocationSearchServiceSearchResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFunctionsV1FunctionsInvocationSearchServiceSearchResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifunctionsv1functionsinvocationsearchservicesearchresponse +// #endregion class-body-c1apifunctionsv1functionsinvocationsearchservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationserviceget.go index 7c8d6649..35df82c8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationserviceget.go @@ -26,6 +26,9 @@ func (c *C1APIFunctionsV1FunctionsInvocationServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apifunctionsv1functionsinvocationservicegetrequest +// #endregion class-body-c1apifunctionsv1functionsinvocationservicegetrequest + type C1APIFunctionsV1FunctionsInvocationServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIFunctionsV1FunctionsInvocationServiceGetResponse) GetRawResponse() } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsinvocationservicegetresponse +// #endregion class-body-c1apifunctionsv1functionsinvocationservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationservicelist.go index 41bcfb57..a14a5484 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsinvocationservicelist.go @@ -18,6 +18,9 @@ func (c *C1APIFunctionsV1FunctionsInvocationServiceListRequest) GetFunctionID() return c.FunctionID } +// #region class-body-c1apifunctionsv1functionsinvocationservicelistrequest +// #endregion class-body-c1apifunctionsv1functionsinvocationservicelistrequest + type C1APIFunctionsV1FunctionsInvocationServiceListResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIFunctionsV1FunctionsInvocationServiceListResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsinvocationservicelistresponse +// #endregion class-body-c1apifunctionsv1functionsinvocationservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionssearchsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionssearchsearch.go index 91bcae43..34a759d4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionssearchsearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionssearchsearch.go @@ -45,3 +45,6 @@ func (c *C1APIFunctionsV1FunctionsSearchSearchResponse) GetRawResponse() *http.R } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionssearchsearchresponse +// #endregion class-body-c1apifunctionsv1functionssearchsearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatefinalcommit.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatefinalcommit.go new file mode 100644 index 00000000..936c8f6c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatefinalcommit.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFunctionsV1FunctionsServiceCreateFinalCommitRequest struct { + FunctionsServiceCreateFinalCommitRequest *shared.FunctionsServiceCreateFinalCommitRequest `request:"mediaType=application/json"` + CommitID string `pathParam:"style=simple,explode=false,name=commit_id"` + FunctionID string `pathParam:"style=simple,explode=false,name=function_id"` +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateFinalCommitRequest) GetFunctionsServiceCreateFinalCommitRequest() *shared.FunctionsServiceCreateFinalCommitRequest { + if c == nil { + return nil + } + return c.FunctionsServiceCreateFinalCommitRequest +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateFinalCommitRequest) GetCommitID() string { + if c == nil { + return "" + } + return c.CommitID +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateFinalCommitRequest) GetFunctionID() string { + if c == nil { + return "" + } + return c.FunctionID +} + +// #region class-body-c1apifunctionsv1functionsservicecreatefinalcommitrequest +// #endregion class-body-c1apifunctionsv1functionsservicecreatefinalcommitrequest + +type C1APIFunctionsV1FunctionsServiceCreateFinalCommitResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + FunctionsServiceCreateFinalCommitResponse *shared.FunctionsServiceCreateFinalCommitResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateFinalCommitResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateFinalCommitResponse) GetFunctionsServiceCreateFinalCommitResponse() *shared.FunctionsServiceCreateFinalCommitResponse { + if c == nil { + return nil + } + return c.FunctionsServiceCreateFinalCommitResponse +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateFinalCommitResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateFinalCommitResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifunctionsv1functionsservicecreatefinalcommitresponse +// #endregion class-body-c1apifunctionsv1functionsservicecreatefinalcommitresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatefunction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatefunction.go index f0619299..6805c2da 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatefunction.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatefunction.go @@ -45,3 +45,6 @@ func (c *C1APIFunctionsV1FunctionsServiceCreateFunctionResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsservicecreatefunctionresponse +// #endregion class-body-c1apifunctionsv1functionsservicecreatefunctionresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreateinitialcommit.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreateinitialcommit.go new file mode 100644 index 00000000..0cd87c4a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreateinitialcommit.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFunctionsV1FunctionsServiceCreateInitialCommitRequest struct { + FunctionsServiceCreateInitialCommitRequest *shared.FunctionsServiceCreateInitialCommitRequest `request:"mediaType=application/json"` + FunctionID string `pathParam:"style=simple,explode=false,name=function_id"` +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateInitialCommitRequest) GetFunctionsServiceCreateInitialCommitRequest() *shared.FunctionsServiceCreateInitialCommitRequest { + if c == nil { + return nil + } + return c.FunctionsServiceCreateInitialCommitRequest +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateInitialCommitRequest) GetFunctionID() string { + if c == nil { + return "" + } + return c.FunctionID +} + +// #region class-body-c1apifunctionsv1functionsservicecreateinitialcommitrequest +// #endregion class-body-c1apifunctionsv1functionsservicecreateinitialcommitrequest + +type C1APIFunctionsV1FunctionsServiceCreateInitialCommitResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + FunctionsServiceCreateInitialCommitResponse *shared.FunctionsServiceCreateInitialCommitResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateInitialCommitResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateInitialCommitResponse) GetFunctionsServiceCreateInitialCommitResponse() *shared.FunctionsServiceCreateInitialCommitResponse { + if c == nil { + return nil + } + return c.FunctionsServiceCreateInitialCommitResponse +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateInitialCommitResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFunctionsV1FunctionsServiceCreateInitialCommitResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifunctionsv1functionsservicecreateinitialcommitresponse +// #endregion class-body-c1apifunctionsv1functionsservicecreateinitialcommitresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatetag.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatetag.go index 301e421d..e9e9e769 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatetag.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicecreatetag.go @@ -26,6 +26,9 @@ func (c *C1APIFunctionsV1FunctionsServiceCreateTagRequest) GetFunctionID() strin return c.FunctionID } +// #region class-body-c1apifunctionsv1functionsservicecreatetagrequest +// #endregion class-body-c1apifunctionsv1functionsservicecreatetagrequest + type C1APIFunctionsV1FunctionsServiceCreateTagResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIFunctionsV1FunctionsServiceCreateTagResponse) GetRawResponse() *ht } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsservicecreatetagresponse +// #endregion class-body-c1apifunctionsv1functionsservicecreatetagresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicedeletefunction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicedeletefunction.go index e3718509..2df1a2f7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicedeletefunction.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicedeletefunction.go @@ -26,6 +26,9 @@ func (c *C1APIFunctionsV1FunctionsServiceDeleteFunctionRequest) GetID() string { return c.ID } +// #region class-body-c1apifunctionsv1functionsservicedeletefunctionrequest +// #endregion class-body-c1apifunctionsv1functionsservicedeletefunctionrequest + type C1APIFunctionsV1FunctionsServiceDeleteFunctionResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIFunctionsV1FunctionsServiceDeleteFunctionResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsservicedeletefunctionresponse +// #endregion class-body-c1apifunctionsv1functionsservicedeletefunctionresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetcommitcontent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetcommitcontent.go new file mode 100644 index 00000000..e3a3941c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetcommitcontent.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFunctionsV1FunctionsServiceGetCommitContentRequest struct { + FunctionID string `pathParam:"style=simple,explode=false,name=function_id"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIFunctionsV1FunctionsServiceGetCommitContentRequest) GetFunctionID() string { + if c == nil { + return "" + } + return c.FunctionID +} + +func (c *C1APIFunctionsV1FunctionsServiceGetCommitContentRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apifunctionsv1functionsservicegetcommitcontentrequest +// #endregion class-body-c1apifunctionsv1functionsservicegetcommitcontentrequest + +type C1APIFunctionsV1FunctionsServiceGetCommitContentResponse struct { + // HTTP response content type for this operation + ContentType string + // FunctionsServiceGetCommitContentResponse contains a commit and all its file contents. + FunctionsServiceGetCommitContentResponse *shared.FunctionsServiceGetCommitContentResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFunctionsV1FunctionsServiceGetCommitContentResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFunctionsV1FunctionsServiceGetCommitContentResponse) GetFunctionsServiceGetCommitContentResponse() *shared.FunctionsServiceGetCommitContentResponse { + if c == nil { + return nil + } + return c.FunctionsServiceGetCommitContentResponse +} + +func (c *C1APIFunctionsV1FunctionsServiceGetCommitContentResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFunctionsV1FunctionsServiceGetCommitContentResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifunctionsv1functionsservicegetcommitcontentresponse +// #endregion class-body-c1apifunctionsv1functionsservicegetcommitcontentresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetfunction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetfunction.go index 344e8868..fac43374 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetfunction.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetfunction.go @@ -18,6 +18,9 @@ func (c *C1APIFunctionsV1FunctionsServiceGetFunctionRequest) GetID() string { return c.ID } +// #region class-body-c1apifunctionsv1functionsservicegetfunctionrequest +// #endregion class-body-c1apifunctionsv1functionsservicegetfunctionrequest + type C1APIFunctionsV1FunctionsServiceGetFunctionResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIFunctionsV1FunctionsServiceGetFunctionResponse) GetRawResponse() * } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsservicegetfunctionresponse +// #endregion class-body-c1apifunctionsv1functionsservicegetfunctionresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetfunctionsecretencryptionkey.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetfunctionsecretencryptionkey.go deleted file mode 100644 index d9f73498..00000000 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetfunctionsecretencryptionkey.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package operations - -import ( - "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" - "net/http" -) - -type C1APIFunctionsV1FunctionsServiceGetFunctionSecretEncryptionKeyRequest struct { - FunctionID string `pathParam:"style=simple,explode=false,name=function_id"` -} - -func (c *C1APIFunctionsV1FunctionsServiceGetFunctionSecretEncryptionKeyRequest) GetFunctionID() string { - if c == nil { - return "" - } - return c.FunctionID -} - -type C1APIFunctionsV1FunctionsServiceGetFunctionSecretEncryptionKeyResponse struct { - // HTTP response content type for this operation - ContentType string - // Successful response - FunctionsServiceGetFunctionSecretEncryptionKeyResponse *shared.FunctionsServiceGetFunctionSecretEncryptionKeyResponse - // HTTP response status code for this operation - StatusCode int - // Raw HTTP response; suitable for custom response parsing - RawResponse *http.Response -} - -func (c *C1APIFunctionsV1FunctionsServiceGetFunctionSecretEncryptionKeyResponse) GetContentType() string { - if c == nil { - return "" - } - return c.ContentType -} - -func (c *C1APIFunctionsV1FunctionsServiceGetFunctionSecretEncryptionKeyResponse) GetFunctionsServiceGetFunctionSecretEncryptionKeyResponse() *shared.FunctionsServiceGetFunctionSecretEncryptionKeyResponse { - if c == nil { - return nil - } - return c.FunctionsServiceGetFunctionSecretEncryptionKeyResponse -} - -func (c *C1APIFunctionsV1FunctionsServiceGetFunctionSecretEncryptionKeyResponse) GetStatusCode() int { - if c == nil { - return 0 - } - return c.StatusCode -} - -func (c *C1APIFunctionsV1FunctionsServiceGetFunctionSecretEncryptionKeyResponse) GetRawResponse() *http.Response { - if c == nil { - return nil - } - return c.RawResponse -} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetlockfile.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetlockfile.go new file mode 100644 index 00000000..7e1c7d3a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicegetlockfile.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFunctionsV1FunctionsServiceGetLockFileRequest struct { + CommitID string `pathParam:"style=simple,explode=false,name=commit_id"` + FunctionID string `pathParam:"style=simple,explode=false,name=function_id"` +} + +func (c *C1APIFunctionsV1FunctionsServiceGetLockFileRequest) GetCommitID() string { + if c == nil { + return "" + } + return c.CommitID +} + +func (c *C1APIFunctionsV1FunctionsServiceGetLockFileRequest) GetFunctionID() string { + if c == nil { + return "" + } + return c.FunctionID +} + +// #region class-body-c1apifunctionsv1functionsservicegetlockfilerequest +// #endregion class-body-c1apifunctionsv1functionsservicegetlockfilerequest + +type C1APIFunctionsV1FunctionsServiceGetLockFileResponse struct { + // HTTP response content type for this operation + ContentType string + // FunctionsServiceGetLockFileResponse returns the deno lock file content for a commit. + FunctionsServiceGetLockFileResponse *shared.FunctionsServiceGetLockFileResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFunctionsV1FunctionsServiceGetLockFileResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFunctionsV1FunctionsServiceGetLockFileResponse) GetFunctionsServiceGetLockFileResponse() *shared.FunctionsServiceGetLockFileResponse { + if c == nil { + return nil + } + return c.FunctionsServiceGetLockFileResponse +} + +func (c *C1APIFunctionsV1FunctionsServiceGetLockFileResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFunctionsV1FunctionsServiceGetLockFileResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifunctionsv1functionsservicegetlockfileresponse +// #endregion class-body-c1apifunctionsv1functionsservicegetlockfileresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsserviceinvoke.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsserviceinvoke.go index e66f5f0d..b5766d54 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsserviceinvoke.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsserviceinvoke.go @@ -26,6 +26,9 @@ func (c *C1APIFunctionsV1FunctionsServiceInvokeRequest) GetFunctionID() string { return c.FunctionID } +// #region class-body-c1apifunctionsv1functionsserviceinvokerequest +// #endregion class-body-c1apifunctionsv1functionsserviceinvokerequest + type C1APIFunctionsV1FunctionsServiceInvokeResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIFunctionsV1FunctionsServiceInvokeResponse) GetRawResponse() *http. } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsserviceinvokeresponse +// #endregion class-body-c1apifunctionsv1functionsserviceinvokeresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelistcommits.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelistcommits.go index 0a492bd9..69b0b83b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelistcommits.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelistcommits.go @@ -18,6 +18,9 @@ func (c *C1APIFunctionsV1FunctionsServiceListCommitsRequest) GetFunctionID() str return c.FunctionID } +// #region class-body-c1apifunctionsv1functionsservicelistcommitsrequest +// #endregion class-body-c1apifunctionsv1functionsservicelistcommitsrequest + type C1APIFunctionsV1FunctionsServiceListCommitsResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIFunctionsV1FunctionsServiceListCommitsResponse) GetRawResponse() * } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsservicelistcommitsresponse +// #endregion class-body-c1apifunctionsv1functionsservicelistcommitsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelistfunctions.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelistfunctions.go index 05d9db54..ca70b88e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelistfunctions.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelistfunctions.go @@ -45,3 +45,6 @@ func (c *C1APIFunctionsV1FunctionsServiceListFunctionsResponse) GetRawResponse() } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsservicelistfunctionsresponse +// #endregion class-body-c1apifunctionsv1functionsservicelistfunctionsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelisttags.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelisttags.go index e7863942..86b92800 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelisttags.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicelisttags.go @@ -18,6 +18,9 @@ func (c *C1APIFunctionsV1FunctionsServiceListTagsRequest) GetFunctionID() string return c.FunctionID } +// #region class-body-c1apifunctionsv1functionsservicelisttagsrequest +// #endregion class-body-c1apifunctionsv1functionsservicelisttagsrequest + type C1APIFunctionsV1FunctionsServiceListTagsResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIFunctionsV1FunctionsServiceListTagsResponse) GetRawResponse() *htt } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsservicelisttagsresponse +// #endregion class-body-c1apifunctionsv1functionsservicelisttagsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicetest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicetest.go new file mode 100644 index 00000000..c3316370 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsservicetest.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIFunctionsV1FunctionsServiceTestRequest struct { + FunctionsServiceTestRequest *shared.FunctionsServiceTestRequest `request:"mediaType=application/json"` + FunctionID string `pathParam:"style=simple,explode=false,name=function_id"` +} + +func (c *C1APIFunctionsV1FunctionsServiceTestRequest) GetFunctionsServiceTestRequest() *shared.FunctionsServiceTestRequest { + if c == nil { + return nil + } + return c.FunctionsServiceTestRequest +} + +func (c *C1APIFunctionsV1FunctionsServiceTestRequest) GetFunctionID() string { + if c == nil { + return "" + } + return c.FunctionID +} + +// #region class-body-c1apifunctionsv1functionsservicetestrequest +// #endregion class-body-c1apifunctionsv1functionsservicetestrequest + +type C1APIFunctionsV1FunctionsServiceTestResponse struct { + // HTTP response content type for this operation + ContentType string + // FunctionsServiceTestResponse contains test execution results. + FunctionsServiceTestResponse *shared.FunctionsServiceTestResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIFunctionsV1FunctionsServiceTestResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIFunctionsV1FunctionsServiceTestResponse) GetFunctionsServiceTestResponse() *shared.FunctionsServiceTestResponse { + if c == nil { + return nil + } + return c.FunctionsServiceTestResponse +} + +func (c *C1APIFunctionsV1FunctionsServiceTestResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIFunctionsV1FunctionsServiceTestResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apifunctionsv1functionsservicetestresponse +// #endregion class-body-c1apifunctionsv1functionsservicetestresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsserviceupdatefunction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsserviceupdatefunction.go index 964bbbb8..c74d0dae 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsserviceupdatefunction.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apifunctionsv1functionsserviceupdatefunction.go @@ -45,3 +45,6 @@ func (c *C1APIFunctionsV1FunctionsServiceUpdateFunctionResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apifunctionsv1functionsserviceupdatefunctionresponse +// #endregion class-body-c1apifunctionsv1functionsserviceupdatefunctionresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hookssearchsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hookssearchsearch.go new file mode 100644 index 00000000..ed5811ac --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hookssearchsearch.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIHooksV1HooksSearchSearchResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + HooksSearchResponse *shared.HooksSearchResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIHooksV1HooksSearchSearchResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIHooksV1HooksSearchSearchResponse) GetHooksSearchResponse() *shared.HooksSearchResponse { + if c == nil { + return nil + } + return c.HooksSearchResponse +} + +func (c *C1APIHooksV1HooksSearchSearchResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIHooksV1HooksSearchSearchResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apihooksv1hookssearchsearchresponse +// #endregion class-body-c1apihooksv1hookssearchsearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksservicecreate.go new file mode 100644 index 00000000..4252780d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksservicecreate.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIHooksV1HooksServiceCreateResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + HooksServiceCreateResponse *shared.HooksServiceCreateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIHooksV1HooksServiceCreateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIHooksV1HooksServiceCreateResponse) GetHooksServiceCreateResponse() *shared.HooksServiceCreateResponse { + if c == nil { + return nil + } + return c.HooksServiceCreateResponse +} + +func (c *C1APIHooksV1HooksServiceCreateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIHooksV1HooksServiceCreateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apihooksv1hooksservicecreateresponse +// #endregion class-body-c1apihooksv1hooksservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksservicedelete.go new file mode 100644 index 00000000..3d4d9312 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksservicedelete.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIHooksV1HooksServiceDeleteRequest struct { + HooksServiceDeleteRequest *shared.HooksServiceDeleteRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIHooksV1HooksServiceDeleteRequest) GetHooksServiceDeleteRequest() *shared.HooksServiceDeleteRequest { + if c == nil { + return nil + } + return c.HooksServiceDeleteRequest +} + +func (c *C1APIHooksV1HooksServiceDeleteRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apihooksv1hooksservicedeleterequest +// #endregion class-body-c1apihooksv1hooksservicedeleterequest + +type C1APIHooksV1HooksServiceDeleteResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + HooksServiceDeleteResponse *shared.HooksServiceDeleteResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIHooksV1HooksServiceDeleteResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIHooksV1HooksServiceDeleteResponse) GetHooksServiceDeleteResponse() *shared.HooksServiceDeleteResponse { + if c == nil { + return nil + } + return c.HooksServiceDeleteResponse +} + +func (c *C1APIHooksV1HooksServiceDeleteResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIHooksV1HooksServiceDeleteResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apihooksv1hooksservicedeleteresponse +// #endregion class-body-c1apihooksv1hooksservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksserviceget.go new file mode 100644 index 00000000..f081379e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksserviceget.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIHooksV1HooksServiceGetRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIHooksV1HooksServiceGetRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apihooksv1hooksservicegetrequest +// #endregion class-body-c1apihooksv1hooksservicegetrequest + +type C1APIHooksV1HooksServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + HooksServiceGetResponse *shared.HooksServiceGetResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIHooksV1HooksServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIHooksV1HooksServiceGetResponse) GetHooksServiceGetResponse() *shared.HooksServiceGetResponse { + if c == nil { + return nil + } + return c.HooksServiceGetResponse +} + +func (c *C1APIHooksV1HooksServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIHooksV1HooksServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apihooksv1hooksservicegetresponse +// #endregion class-body-c1apihooksv1hooksservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksservicelist.go new file mode 100644 index 00000000..8e8da85f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksservicelist.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIHooksV1HooksServiceListRequest struct { + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` +} + +func (c *C1APIHooksV1HooksServiceListRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APIHooksV1HooksServiceListRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +// #region class-body-c1apihooksv1hooksservicelistrequest +// #endregion class-body-c1apihooksv1hooksservicelistrequest + +type C1APIHooksV1HooksServiceListResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + HooksServiceListResponse *shared.HooksServiceListResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIHooksV1HooksServiceListResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIHooksV1HooksServiceListResponse) GetHooksServiceListResponse() *shared.HooksServiceListResponse { + if c == nil { + return nil + } + return c.HooksServiceListResponse +} + +func (c *C1APIHooksV1HooksServiceListResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIHooksV1HooksServiceListResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apihooksv1hooksservicelistresponse +// #endregion class-body-c1apihooksv1hooksservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksserviceupdate.go new file mode 100644 index 00000000..9181d1bc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apihooksv1hooksserviceupdate.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIHooksV1HooksServiceUpdateRequest struct { + HooksServiceUpdateRequest *shared.HooksServiceUpdateRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIHooksV1HooksServiceUpdateRequest) GetHooksServiceUpdateRequest() *shared.HooksServiceUpdateRequest { + if c == nil { + return nil + } + return c.HooksServiceUpdateRequest +} + +func (c *C1APIHooksV1HooksServiceUpdateRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apihooksv1hooksserviceupdaterequest +// #endregion class-body-c1apihooksv1hooksserviceupdaterequest + +type C1APIHooksV1HooksServiceUpdateResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + HooksServiceUpdateResponse *shared.HooksServiceUpdateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIHooksV1HooksServiceUpdateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIHooksV1HooksServiceUpdateResponse) GetHooksServiceUpdateResponse() *shared.HooksServiceUpdateResponse { + if c == nil { + return nil + } + return c.HooksServiceUpdateResponse +} + +func (c *C1APIHooksV1HooksServiceUpdateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIHooksV1HooksServiceUpdateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apihooksv1hooksserviceupdateresponse +// #endregion class-body-c1apihooksv1hooksserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1externalclientsearchservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1externalclientsearchservicesearch.go new file mode 100644 index 00000000..c8ba3759 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1externalclientsearchservicesearch.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIIamV1ExternalClientSearchServiceSearchResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ExternalClientSearchServiceSearchResponse *shared.ExternalClientSearchServiceSearchResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIIamV1ExternalClientSearchServiceSearchResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIIamV1ExternalClientSearchServiceSearchResponse) GetExternalClientSearchServiceSearchResponse() *shared.ExternalClientSearchServiceSearchResponse { + if c == nil { + return nil + } + return c.ExternalClientSearchServiceSearchResponse +} + +func (c *C1APIIamV1ExternalClientSearchServiceSearchResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIIamV1ExternalClientSearchServiceSearchResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiiamv1externalclientsearchservicesearchresponse +// #endregion class-body-c1apiiamv1externalclientsearchservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientsearchservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientsearchservicesearch.go index 81432fc3..b17c6f5a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientsearchservicesearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientsearchservicesearch.go @@ -45,3 +45,6 @@ func (c *C1APIIamV1PersonalClientSearchServiceSearchResponse) GetRawResponse() * } return c.RawResponse } + +// #region class-body-c1apiiamv1personalclientsearchservicesearchresponse +// #endregion class-body-c1apiiamv1personalclientsearchservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicecreate.go index 893241e3..667c7105 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicecreate.go @@ -45,3 +45,6 @@ func (c *C1APIIamV1PersonalClientServiceCreateResponse) GetRawResponse() *http.R } return c.RawResponse } + +// #region class-body-c1apiiamv1personalclientservicecreateresponse +// #endregion class-body-c1apiiamv1personalclientservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicedelete.go index 8cdfb50b..443829dd 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicedelete.go @@ -26,6 +26,9 @@ func (c *C1APIIamV1PersonalClientServiceDeleteRequest) GetID() string { return c.ID } +// #region class-body-c1apiiamv1personalclientservicedeleterequest +// #endregion class-body-c1apiiamv1personalclientservicedeleterequest + type C1APIIamV1PersonalClientServiceDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIIamV1PersonalClientServiceDeleteResponse) GetRawResponse() *http.R } return c.RawResponse } + +// #region class-body-c1apiiamv1personalclientservicedeleteresponse +// #endregion class-body-c1apiiamv1personalclientservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientserviceget.go index 360a3ff4..53f85f03 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIIamV1PersonalClientServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apiiamv1personalclientservicegetrequest +// #endregion class-body-c1apiiamv1personalclientservicegetrequest + type C1APIIamV1PersonalClientServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIIamV1PersonalClientServiceGetResponse) GetRawResponse() *http.Resp } return c.RawResponse } + +// #region class-body-c1apiiamv1personalclientservicegetresponse +// #endregion class-body-c1apiiamv1personalclientservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicelist.go index faba25b7..e92858e9 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientservicelist.go @@ -45,3 +45,6 @@ func (c *C1APIIamV1PersonalClientServiceListResponse) GetRawResponse() *http.Res } return c.RawResponse } + +// #region class-body-c1apiiamv1personalclientservicelistresponse +// #endregion class-body-c1apiiamv1personalclientservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientserviceupdate.go index 29616f7c..920bacac 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1personalclientserviceupdate.go @@ -26,6 +26,9 @@ func (c *C1APIIamV1PersonalClientServiceUpdateRequest) GetID() string { return c.ID } +// #region class-body-c1apiiamv1personalclientserviceupdaterequest +// #endregion class-body-c1apiiamv1personalclientserviceupdaterequest + type C1APIIamV1PersonalClientServiceUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIIamV1PersonalClientServiceUpdateResponse) GetRawResponse() *http.R } return c.RawResponse } + +// #region class-body-c1apiiamv1personalclientserviceupdateresponse +// #endregion class-body-c1apiiamv1personalclientserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1rolesget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1rolesget.go index 03ccc2a1..1023e44a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1rolesget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1rolesget.go @@ -18,6 +18,9 @@ func (c *C1APIIamV1RolesGetRequest) GetRoleID() string { return c.RoleID } +// #region class-body-c1apiiamv1rolesgetrequest +// #endregion class-body-c1apiiamv1rolesgetrequest + type C1APIIamV1RolesGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIIamV1RolesGetResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiiamv1rolesgetresponse +// #endregion class-body-c1apiiamv1rolesgetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1roleslist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1roleslist.go index 6cfc52cb..4d995f5a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1roleslist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1roleslist.go @@ -26,6 +26,9 @@ func (c *C1APIIamV1RolesListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiiamv1roleslistrequest +// #endregion class-body-c1apiiamv1roleslistrequest + type C1APIIamV1RolesListResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIIamV1RolesListResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiiamv1roleslistresponse +// #endregion class-body-c1apiiamv1roleslistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1rolesupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1rolesupdate.go index cc2c17fe..11d8c04f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1rolesupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiiamv1rolesupdate.go @@ -26,6 +26,9 @@ func (c *C1APIIamV1RolesUpdateRequest) GetRoleID() string { return c.RoleID } +// #region class-body-c1apiiamv1rolesupdaterequest +// #endregion class-body-c1apiiamv1rolesupdaterequest + type C1APIIamV1RolesUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIIamV1RolesUpdateResponse) GetUpdateRolesResponse() *shared.UpdateR } return c.UpdateRolesResponse } + +// #region class-body-c1apiiamv1rolesupdateresponse +// #endregion class-body-c1apiiamv1rolesupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiintegrationconnectorv1connectorcatalogserviceconfigurationschema.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiintegrationconnectorv1connectorcatalogserviceconfigurationschema.go index 8d9220fd..0c17d450 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiintegrationconnectorv1connectorcatalogserviceconfigurationschema.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiintegrationconnectorv1connectorcatalogserviceconfigurationschema.go @@ -8,7 +8,7 @@ import ( ) type C1APIIntegrationConnectorV1ConnectorCatalogServiceConfigurationSchemaResponse struct { - // Successful response + // ConnectorCatalogServiceConfigurationSchemaResponse is the response containing the connector's configuration schema. ConnectorCatalogServiceConfigurationSchemaResponse *shared.ConnectorCatalogServiceConfigurationSchemaResponse // HTTP response content type for this operation ContentType string @@ -45,3 +45,6 @@ func (c *C1APIIntegrationConnectorV1ConnectorCatalogServiceConfigurationSchemaRe } return c.RawResponse } + +// #region class-body-c1apiintegrationconnectorv1connectorcatalogserviceconfigurationschemaresponse +// #endregion class-body-c1apiintegrationconnectorv1connectorcatalogserviceconfigurationschemaresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigservicecreate.go new file mode 100644 index 00000000..9e16598c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigservicecreate.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APILocalDirectoryV1LocalDirectoryConfigServiceCreateResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + LocalDirectoryConfigServiceCreateResponse *shared.LocalDirectoryConfigServiceCreateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceCreateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceCreateResponse) GetLocalDirectoryConfigServiceCreateResponse() *shared.LocalDirectoryConfigServiceCreateResponse { + if c == nil { + return nil + } + return c.LocalDirectoryConfigServiceCreateResponse +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceCreateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceCreateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apilocaldirectoryv1localdirectoryconfigservicecreateresponse +// #endregion class-body-c1apilocaldirectoryv1localdirectoryconfigservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigservicedelete.go new file mode 100644 index 00000000..9d8ec354 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigservicedelete.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteRequest struct { + LocalDirectoryConfigServiceDeleteRequest *shared.LocalDirectoryConfigServiceDeleteRequest `request:"mediaType=application/json"` + AppID string `pathParam:"style=simple,explode=false,name=app_id"` +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteRequest) GetLocalDirectoryConfigServiceDeleteRequest() *shared.LocalDirectoryConfigServiceDeleteRequest { + if c == nil { + return nil + } + return c.LocalDirectoryConfigServiceDeleteRequest +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +// #region class-body-c1apilocaldirectoryv1localdirectoryconfigservicedeleterequest +// #endregion class-body-c1apilocaldirectoryv1localdirectoryconfigservicedeleterequest + +type C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + LocalDirectoryConfigServiceDeleteResponse *shared.LocalDirectoryConfigServiceDeleteResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteResponse) GetLocalDirectoryConfigServiceDeleteResponse() *shared.LocalDirectoryConfigServiceDeleteResponse { + if c == nil { + return nil + } + return c.LocalDirectoryConfigServiceDeleteResponse +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceDeleteResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apilocaldirectoryv1localdirectoryconfigservicedeleteresponse +// #endregion class-body-c1apilocaldirectoryv1localdirectoryconfigservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigserviceget.go new file mode 100644 index 00000000..163002ca --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigserviceget.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APILocalDirectoryV1LocalDirectoryConfigServiceGetRequest struct { + AppID string `pathParam:"style=simple,explode=false,name=app_id"` +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceGetRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +// #region class-body-c1apilocaldirectoryv1localdirectoryconfigservicegetrequest +// #endregion class-body-c1apilocaldirectoryv1localdirectoryconfigservicegetrequest + +type C1APILocalDirectoryV1LocalDirectoryConfigServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + LocalDirectoryConfigServiceGetResponse *shared.LocalDirectoryConfigServiceGetResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceGetResponse) GetLocalDirectoryConfigServiceGetResponse() *shared.LocalDirectoryConfigServiceGetResponse { + if c == nil { + return nil + } + return c.LocalDirectoryConfigServiceGetResponse +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apilocaldirectoryv1localdirectoryconfigservicegetresponse +// #endregion class-body-c1apilocaldirectoryv1localdirectoryconfigservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigservicelist.go new file mode 100644 index 00000000..473521d8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigservicelist.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APILocalDirectoryV1LocalDirectoryConfigServiceListRequest struct { + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceListRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceListRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +// #region class-body-c1apilocaldirectoryv1localdirectoryconfigservicelistrequest +// #endregion class-body-c1apilocaldirectoryv1localdirectoryconfigservicelistrequest + +type C1APILocalDirectoryV1LocalDirectoryConfigServiceListResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + LocalDirectoryConfigServiceListResponse *shared.LocalDirectoryConfigServiceListResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceListResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceListResponse) GetLocalDirectoryConfigServiceListResponse() *shared.LocalDirectoryConfigServiceListResponse { + if c == nil { + return nil + } + return c.LocalDirectoryConfigServiceListResponse +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceListResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceListResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apilocaldirectoryv1localdirectoryconfigservicelistresponse +// #endregion class-body-c1apilocaldirectoryv1localdirectoryconfigservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigserviceupdate.go new file mode 100644 index 00000000..4e858ae2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localdirectoryconfigserviceupdate.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateRequest struct { + LocalDirectoryConfigServiceUpdateRequest *shared.LocalDirectoryConfigServiceUpdateRequest `request:"mediaType=application/json"` + AppID string `pathParam:"style=simple,explode=false,name=app_id"` +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateRequest) GetLocalDirectoryConfigServiceUpdateRequest() *shared.LocalDirectoryConfigServiceUpdateRequest { + if c == nil { + return nil + } + return c.LocalDirectoryConfigServiceUpdateRequest +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateRequest) GetAppID() string { + if c == nil { + return "" + } + return c.AppID +} + +// #region class-body-c1apilocaldirectoryv1localdirectoryconfigserviceupdaterequest +// #endregion class-body-c1apilocaldirectoryv1localdirectoryconfigserviceupdaterequest + +type C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + LocalDirectoryConfigServiceUpdateResponse *shared.LocalDirectoryConfigServiceUpdateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateResponse) GetLocalDirectoryConfigServiceUpdateResponse() *shared.LocalDirectoryConfigServiceUpdateResponse { + if c == nil { + return nil + } + return c.LocalDirectoryConfigServiceUpdateResponse +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APILocalDirectoryV1LocalDirectoryConfigServiceUpdateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apilocaldirectoryv1localdirectoryconfigserviceupdateresponse +// #endregion class-body-c1apilocaldirectoryv1localdirectoryconfigserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationservicecreate.go new file mode 100644 index 00000000..bb1a747b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationservicecreate.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APILocalDirectoryV1LocalUserInvitationServiceCreateRequest struct { + LocalUserInvitationServiceCreateRequest *shared.LocalUserInvitationServiceCreateRequest `request:"mediaType=application/json"` + DirectoryAppID string `pathParam:"style=simple,explode=false,name=directory_app_id"` +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceCreateRequest) GetLocalUserInvitationServiceCreateRequest() *shared.LocalUserInvitationServiceCreateRequest { + if c == nil { + return nil + } + return c.LocalUserInvitationServiceCreateRequest +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceCreateRequest) GetDirectoryAppID() string { + if c == nil { + return "" + } + return c.DirectoryAppID +} + +// #region class-body-c1apilocaldirectoryv1localuserinvitationservicecreaterequest +// #endregion class-body-c1apilocaldirectoryv1localuserinvitationservicecreaterequest + +type C1APILocalDirectoryV1LocalUserInvitationServiceCreateResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + LocalUserInvitationServiceCreateResponse *shared.LocalUserInvitationServiceCreateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceCreateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceCreateResponse) GetLocalUserInvitationServiceCreateResponse() *shared.LocalUserInvitationServiceCreateResponse { + if c == nil { + return nil + } + return c.LocalUserInvitationServiceCreateResponse +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceCreateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceCreateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apilocaldirectoryv1localuserinvitationservicecreateresponse +// #endregion class-body-c1apilocaldirectoryv1localuserinvitationservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationserviceget.go new file mode 100644 index 00000000..93cf6466 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationserviceget.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APILocalDirectoryV1LocalUserInvitationServiceGetRequest struct { + DirectoryAppID string `pathParam:"style=simple,explode=false,name=directory_app_id"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceGetRequest) GetDirectoryAppID() string { + if c == nil { + return "" + } + return c.DirectoryAppID +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceGetRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apilocaldirectoryv1localuserinvitationservicegetrequest +// #endregion class-body-c1apilocaldirectoryv1localuserinvitationservicegetrequest + +type C1APILocalDirectoryV1LocalUserInvitationServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + LocalUserInvitationServiceGetResponse *shared.LocalUserInvitationServiceGetResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceGetResponse) GetLocalUserInvitationServiceGetResponse() *shared.LocalUserInvitationServiceGetResponse { + if c == nil { + return nil + } + return c.LocalUserInvitationServiceGetResponse +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apilocaldirectoryv1localuserinvitationservicegetresponse +// #endregion class-body-c1apilocaldirectoryv1localuserinvitationservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationservicerevoke.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationservicerevoke.go new file mode 100644 index 00000000..b99a1a7e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationservicerevoke.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APILocalDirectoryV1LocalUserInvitationServiceRevokeRequest struct { + LocalUserInvitationServiceRevokeRequest *shared.LocalUserInvitationServiceRevokeRequest `request:"mediaType=application/json"` + DirectoryAppID string `pathParam:"style=simple,explode=false,name=directory_app_id"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceRevokeRequest) GetLocalUserInvitationServiceRevokeRequest() *shared.LocalUserInvitationServiceRevokeRequest { + if c == nil { + return nil + } + return c.LocalUserInvitationServiceRevokeRequest +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceRevokeRequest) GetDirectoryAppID() string { + if c == nil { + return "" + } + return c.DirectoryAppID +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceRevokeRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apilocaldirectoryv1localuserinvitationservicerevokerequest +// #endregion class-body-c1apilocaldirectoryv1localuserinvitationservicerevokerequest + +type C1APILocalDirectoryV1LocalUserInvitationServiceRevokeResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + LocalUserInvitationServiceRevokeResponse *shared.LocalUserInvitationServiceRevokeResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceRevokeResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceRevokeResponse) GetLocalUserInvitationServiceRevokeResponse() *shared.LocalUserInvitationServiceRevokeResponse { + if c == nil { + return nil + } + return c.LocalUserInvitationServiceRevokeResponse +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceRevokeResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceRevokeResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apilocaldirectoryv1localuserinvitationservicerevokeresponse +// #endregion class-body-c1apilocaldirectoryv1localuserinvitationservicerevokeresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationservicesearch.go new file mode 100644 index 00000000..d56e9e14 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apilocaldirectoryv1localuserinvitationservicesearch.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APILocalDirectoryV1LocalUserInvitationServiceSearchResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + LocalUserInvitationServiceSearchResponse *shared.LocalUserInvitationServiceSearchResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceSearchResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceSearchResponse) GetLocalUserInvitationServiceSearchResponse() *shared.LocalUserInvitationServiceSearchResponse { + if c == nil { + return nil + } + return c.LocalUserInvitationServiceSearchResponse +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceSearchResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APILocalDirectoryV1LocalUserInvitationServiceSearchResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apilocaldirectoryv1localuserinvitationservicesearchresponse +// #endregion class-body-c1apilocaldirectoryv1localuserinvitationservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1accountprovisionpolicytesttest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1accountprovisionpolicytesttest.go index 92d02b9a..0f62e37c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1accountprovisionpolicytesttest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1accountprovisionpolicytesttest.go @@ -14,7 +14,7 @@ type C1APIPolicyV1AccountProvisionPolicyTestTestResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // TestAccountProvisionPolicyResponse is the response for testing an account provision policy. TestAccountProvisionPolicyResponse *shared.TestAccountProvisionPolicyResponse } @@ -45,3 +45,6 @@ func (c *C1APIPolicyV1AccountProvisionPolicyTestTestResponse) GetTestAccountProv } return c.TestAccountProvisionPolicyResponse } + +// #region class-body-c1apipolicyv1accountprovisionpolicytesttestresponse +// #endregion class-body-c1apipolicyv1accountprovisionpolicytesttestresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiescreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiescreate.go index e6ac99de..e288980d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiescreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiescreate.go @@ -45,3 +45,6 @@ func (c *C1APIPolicyV1PoliciesCreateResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apipolicyv1policiescreateresponse +// #endregion class-body-c1apipolicyv1policiescreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesdelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesdelete.go index c75f1500..a2ca6ee2 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesdelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesdelete.go @@ -26,6 +26,9 @@ func (c *C1APIPolicyV1PoliciesDeleteRequest) GetID() string { return c.ID } +// #region class-body-c1apipolicyv1policiesdeleterequest +// #endregion class-body-c1apipolicyv1policiesdeleterequest + type C1APIPolicyV1PoliciesDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIPolicyV1PoliciesDeleteResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apipolicyv1policiesdeleteresponse +// #endregion class-body-c1apipolicyv1policiesdeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesget.go index 0d3d5bc1..25d8952d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesget.go @@ -18,6 +18,9 @@ func (c *C1APIPolicyV1PoliciesGetRequest) GetID() string { return c.ID } +// #region class-body-c1apipolicyv1policiesgetrequest +// #endregion class-body-c1apipolicyv1policiesgetrequest + type C1APIPolicyV1PoliciesGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIPolicyV1PoliciesGetResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apipolicyv1policiesgetresponse +// #endregion class-body-c1apipolicyv1policiesgetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policieslist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policieslist.go index 2460aabd..36c27820 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policieslist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policieslist.go @@ -26,6 +26,9 @@ func (c *C1APIPolicyV1PoliciesListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apipolicyv1policieslistrequest +// #endregion class-body-c1apipolicyv1policieslistrequest + type C1APIPolicyV1PoliciesListResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIPolicyV1PoliciesListResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apipolicyv1policieslistresponse +// #endregion class-body-c1apipolicyv1policieslistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesupdate.go index ad2e279a..df354e04 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policiesupdate.go @@ -26,6 +26,9 @@ func (c *C1APIPolicyV1PoliciesUpdateRequest) GetID() string { return c.ID } +// #region class-body-c1apipolicyv1policiesupdaterequest +// #endregion class-body-c1apipolicyv1policiesupdaterequest + type C1APIPolicyV1PoliciesUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIPolicyV1PoliciesUpdateResponse) GetUpdatePolicyResponse() *shared. } return c.UpdatePolicyResponse } + +// #region class-body-c1apipolicyv1policiesupdateresponse +// #endregion class-body-c1apipolicyv1policiesupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policysearchsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policysearchsearch.go index ed6b66cb..ce9b51e1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policysearchsearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policysearchsearch.go @@ -47,3 +47,6 @@ func (c *C1APIPolicyV1PolicySearchSearchResponse) GetRawResponse() *http.Respons } return c.RawResponse } + +// #region class-body-c1apipolicyv1policysearchsearchresponse +// #endregion class-body-c1apipolicyv1policysearchsearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policyvalidatevalidatecel.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policyvalidatevalidatecel.go index 542802f4..b90e845b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policyvalidatevalidatecel.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apipolicyv1policyvalidatevalidatecel.go @@ -11,7 +11,7 @@ type C1APIPolicyV1PolicyValidateValidateCELResponse struct { // HTTP response content type for this operation ContentType string // Successful response - EditorValidateResponse *shared.EditorValidateResponse + PolicyEditorValidateResponse *shared.PolicyEditorValidateResponse // HTTP response status code for this operation StatusCode int // Raw HTTP response; suitable for custom response parsing @@ -25,11 +25,11 @@ func (c *C1APIPolicyV1PolicyValidateValidateCELResponse) GetContentType() string return c.ContentType } -func (c *C1APIPolicyV1PolicyValidateValidateCELResponse) GetEditorValidateResponse() *shared.EditorValidateResponse { +func (c *C1APIPolicyV1PolicyValidateValidateCELResponse) GetPolicyEditorValidateResponse() *shared.PolicyEditorValidateResponse { if c == nil { return nil } - return c.EditorValidateResponse + return c.PolicyEditorValidateResponse } func (c *C1APIPolicyV1PolicyValidateValidateCELResponse) GetStatusCode() int { @@ -45,3 +45,6 @@ func (c *C1APIPolicyV1PolicyValidateValidateCELResponse) GetRawResponse() *http. } return c.RawResponse } + +// #region class-body-c1apipolicyv1policyvalidatevalidatecelresponse +// #endregion class-body-c1apipolicyv1policyvalidatevalidatecelresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceaddaccessentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceaddaccessentitlements.go index 9cf85e11..05ed7f52 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceaddaccessentitlements.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceaddaccessentitlements.go @@ -26,6 +26,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceAddAccessEntitlemen return c.CatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceaddaccessentitlementsrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceaddaccessentitlementsrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceAddAccessEntitlementsResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceAddAccessEntitlemen } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceaddaccessentitlementsresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceaddaccessentitlementsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceaddappentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceaddappentitlements.go index 1ecaef42..b6b0bb47 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceaddappentitlements.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceaddappentitlements.go @@ -26,6 +26,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceAddAppEntitlementsR return c.CatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceaddappentitlementsrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceaddappentitlementsrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceAddAppEntitlementsResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceAddAppEntitlementsR } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceaddappentitlementsresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceaddappentitlementsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreate.go index 47a5b400..3bc5df14 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreate.go @@ -45,3 +45,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceCreateResponse) Get } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicecreateresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreatebundleautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreatebundleautomation.go index 5434a490..072e5690 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreatebundleautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreatebundleautomation.go @@ -26,6 +26,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceCreateBundleAutomat return c.RequestCatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicecreatebundleautomationrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicecreatebundleautomationrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceCreateBundleAutomationResponse struct { // Successful response BundleAutomation *shared.BundleAutomation @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceCreateBundleAutomat } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicecreatebundleautomationresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicecreatebundleautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreaterequestableentry.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreaterequestableentry.go index 31c80e63..dea82df1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreaterequestableentry.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicecreaterequestableentry.go @@ -42,6 +42,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceCreateRequestableEn return c.EntitlementID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicecreaterequestableentryrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicecreaterequestableentryrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceCreateRequestableEntryResponse struct { // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceCreateRequestableEn } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicecreaterequestableentryresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicecreaterequestableentryresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedelete.go index b3b90581..f145f55c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedelete.go @@ -26,6 +26,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteRequest) GetI return c.ID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeleterequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeleterequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteResponse) Get } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeleteresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedeletebundleautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedeletebundleautomation.go index c50b72e3..7c568565 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedeletebundleautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedeletebundleautomation.go @@ -26,10 +26,13 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteBundleAutomat return c.RequestCatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeletebundleautomationrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeletebundleautomationrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteBundleAutomationResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for deleting a bundle automation. DeleteBundleAutomationResponse *shared.DeleteBundleAutomationResponse // HTTP response status code for this operation StatusCode int @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteBundleAutomat } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeletebundleautomationresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeletebundleautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedeleterequestableentry.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedeleterequestableentry.go index 0a369801..e185945e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedeleterequestableentry.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicedeleterequestableentry.go @@ -42,6 +42,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteRequestableEn return c.EntitlementID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeleterequestableentryrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeleterequestableentryrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteRequestableEntryResponse struct { // HTTP response content type for this operation ContentType string @@ -80,3 +83,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteRequestableEn } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeleterequestableentryresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicedeleterequestableentryresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceforcerunbundleautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceforcerunbundleautomation.go index 1036daa3..a5b6461c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceforcerunbundleautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceforcerunbundleautomation.go @@ -26,10 +26,13 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceForceRunBundleAutom return c.RequestCatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceforcerunbundleautomationrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceforcerunbundleautomationrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceForceRunBundleAutomationResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for triggering a bundle automation run. ForceRunBundleAutomationResponse *shared.ForceRunBundleAutomationResponse // HTTP response status code for this operation StatusCode int @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceForceRunBundleAutom } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceforcerunbundleautomationresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceforcerunbundleautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceget.go index 713a6a61..0b91e913 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceGetRequest) GetID() return c.ID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceGetResponse) GetRaw } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicegetbundleautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicegetbundleautomation.go index 792b5a48..eced1647 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicegetbundleautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicegetbundleautomation.go @@ -18,6 +18,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceGetBundleAutomation return c.RequestCatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetbundleautomationrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetbundleautomationrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceGetBundleAutomationResponse struct { // Successful response BundleAutomation *shared.BundleAutomation @@ -56,3 +59,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceGetBundleAutomation } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetbundleautomationresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetbundleautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicegetrequestableentry.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicegetrequestableentry.go index 54f609a0..573a032e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicegetrequestableentry.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicegetrequestableentry.go @@ -34,6 +34,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceGetRequestableEntry return c.EntitlementID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetrequestableentryrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetrequestableentryrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceGetRequestableEntryResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceGetRequestableEntry } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetrequestableentryresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicegetrequestableentryresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelist.go index 1bc52d7c..7a7d7f83 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelist.go @@ -26,6 +26,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceListRequest) GetPag return c.PageToken } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceListResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceListResponse) GetRa } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistallentitlementidsperapp.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistallentitlementidsperapp.go index 58e67e62..98f9b163 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistallentitlementidsperapp.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistallentitlementidsperapp.go @@ -18,10 +18,13 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceListAllEntitlementI return c.CatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistallentitlementidsperapprequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistallentitlementidsperapprequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceListAllEntitlementIdsPerAppResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message containing all requestable entitlement references in the catalog. RequestCatalogManagementServiceListAllEntitlementIdsPerCatalogResponse *shared.RequestCatalogManagementServiceListAllEntitlementIdsPerCatalogResponse // HTTP response status code for this operation StatusCode int @@ -56,3 +59,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceListAllEntitlementI } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistallentitlementidsperappresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistallentitlementidsperappresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementsforaccess.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementsforaccess.go index 9883260d..05768916 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementsforaccess.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementsforaccess.go @@ -34,6 +34,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceListEntitlementsFor return c.PageToken } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementsforaccessrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementsforaccessrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceListEntitlementsForAccessResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceListEntitlementsFor } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementsforaccessresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementsforaccessresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementspercatalog.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementspercatalog.go index 07529ccd..d0c9aac1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementspercatalog.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementspercatalog.go @@ -34,6 +34,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceListEntitlementsPer return c.PageToken } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementspercatalogrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementspercatalogrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceListEntitlementsPerCatalogResponse struct { // HTTP response content type for this operation ContentType string @@ -72,3 +75,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceListEntitlementsPer } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementspercatalogresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicelistentitlementspercatalogresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceremoveaccessentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceremoveaccessentitlements.go index eb10cd43..bb4e295c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceremoveaccessentitlements.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceremoveaccessentitlements.go @@ -26,6 +26,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceRemoveAccessEntitle return c.CatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceremoveaccessentitlementsrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceremoveaccessentitlementsrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceRemoveAccessEntitlementsResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceRemoveAccessEntitle } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceremoveaccessentitlementsresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceremoveaccessentitlementsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceremoveappentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceremoveappentitlements.go index 134259ae..97f497bb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceremoveappentitlements.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceremoveappentitlements.go @@ -26,6 +26,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceRemoveAppEntitlemen return c.CatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceremoveappentitlementsrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceremoveappentitlementsrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceRemoveAppEntitlementsResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceRemoveAppEntitlemen } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceremoveappentitlementsresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceremoveappentitlementsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceresumepausedbundleautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceresumepausedbundleautomation.go index 53aac243..6ea264cc 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceresumepausedbundleautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceresumepausedbundleautomation.go @@ -26,10 +26,13 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceResumePausedBundleA return c.RequestCatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceresumepausedbundleautomationrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceresumepausedbundleautomationrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceResumePausedBundleAutomationResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for resuming a paused bundle automation. ResumePausedBundleAutomationResponse *shared.ResumePausedBundleAutomationResponse // HTTP response status code for this operation StatusCode int @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceResumePausedBundleA } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceresumepausedbundleautomationresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceresumepausedbundleautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicesetbundleautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicesetbundleautomation.go index 82fc7733..d0811f83 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicesetbundleautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementservicesetbundleautomation.go @@ -26,6 +26,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceSetBundleAutomation return c.RequestCatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicesetbundleautomationrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicesetbundleautomationrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceSetBundleAutomationResponse struct { // Successful response BundleAutomation *shared.BundleAutomation @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceSetBundleAutomation } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementservicesetbundleautomationresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementservicesetbundleautomationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceupdate.go index 72a8ed90..aefd8343 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceupdate.go @@ -26,6 +26,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceUpdateRequest) GetI return c.ID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceupdaterequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceupdaterequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceUpdateResponse) Get } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceupdateresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceupdateappentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceupdateappentitlements.go index ac6851e0..29eb4e26 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceupdateappentitlements.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogmanagementserviceupdateappentitlements.go @@ -26,6 +26,9 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceUpdateAppEntitlemen return c.CatalogID } +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceupdateappentitlementsrequest +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceupdateappentitlementsrequest + type C1APIRequestcatalogV1RequestCatalogManagementServiceUpdateAppEntitlementsResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogManagementServiceUpdateAppEntitlemen } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogmanagementserviceupdateappentitlementsresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogmanagementserviceupdateappentitlementsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogsearchservicesearchentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogsearchservicesearchentitlements.go index 555c0d1f..2099f658 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogsearchservicesearchentitlements.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestcatalogv1requestcatalogsearchservicesearchentitlements.go @@ -45,3 +45,6 @@ func (c *C1APIRequestcatalogV1RequestCatalogSearchServiceSearchEntitlementsRespo } return c.RawResponse } + +// #region class-body-c1apirequestcatalogv1requestcatalogsearchservicesearchentitlementsresponse +// #endregion class-body-c1apirequestcatalogv1requestcatalogsearchservicesearchentitlementsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicecreate.go index db4989f2..7cd9347a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicecreate.go @@ -10,7 +10,7 @@ import ( type C1APIRequestSchemaV1RequestSchemaServiceCreateResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for creating a request schema. RequestSchemaServiceCreateResponse *shared.RequestSchemaServiceCreateResponse // HTTP response status code for this operation StatusCode int @@ -45,3 +45,6 @@ func (c *C1APIRequestSchemaV1RequestSchemaServiceCreateResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apirequestschemav1requestschemaservicecreateresponse +// #endregion class-body-c1apirequestschemav1requestschemaservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicecreateentitlementbinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicecreateentitlementbinding.go index 20a6f552..7fb341a4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicecreateentitlementbinding.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicecreateentitlementbinding.go @@ -10,7 +10,7 @@ import ( type C1APIRequestSchemaV1RequestSchemaServiceCreateEntitlementBindingResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for creating a single entitlement binding. RequestSchemaServiceCreateEntitlementBindingResponse *shared.RequestSchemaServiceCreateEntitlementBindingResponse // HTTP response status code for this operation StatusCode int @@ -45,3 +45,6 @@ func (c *C1APIRequestSchemaV1RequestSchemaServiceCreateEntitlementBindingRespons } return c.RawResponse } + +// #region class-body-c1apirequestschemav1requestschemaservicecreateentitlementbindingresponse +// #endregion class-body-c1apirequestschemav1requestschemaservicecreateentitlementbindingresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicedelete.go index 97de4c10..3d7093f5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicedelete.go @@ -26,10 +26,13 @@ func (c *C1APIRequestSchemaV1RequestSchemaServiceDeleteRequest) GetRequestSchema return c.RequestSchemaID } +// #region class-body-c1apirequestschemav1requestschemaservicedeleterequest +// #endregion class-body-c1apirequestschemav1requestschemaservicedeleterequest + type C1APIRequestSchemaV1RequestSchemaServiceDeleteResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for deleting a request schema. RequestSchemaServiceDeleteResponse *shared.RequestSchemaServiceDeleteResponse // HTTP response status code for this operation StatusCode int @@ -64,3 +67,6 @@ func (c *C1APIRequestSchemaV1RequestSchemaServiceDeleteResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apirequestschemav1requestschemaservicedeleteresponse +// #endregion class-body-c1apirequestschemav1requestschemaservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicefindbindingforappentitlement.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicefindbindingforappentitlement.go index 5ac027d5..4f177daf 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicefindbindingforappentitlement.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaservicefindbindingforappentitlement.go @@ -10,7 +10,7 @@ import ( type C1APIRequestSchemaV1RequestSchemaServiceFindBindingForAppEntitlementResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message containing the binding for the specified app entitlement. RequestSchemaServiceFindBindingForAppEntitlementResponse *shared.RequestSchemaServiceFindBindingForAppEntitlementResponse // HTTP response status code for this operation StatusCode int @@ -45,3 +45,6 @@ func (c *C1APIRequestSchemaV1RequestSchemaServiceFindBindingForAppEntitlementRes } return c.RawResponse } + +// #region class-body-c1apirequestschemav1requestschemaservicefindbindingforappentitlementresponse +// #endregion class-body-c1apirequestschemav1requestschemaservicefindbindingforappentitlementresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceget.go index a860a81a..2210954d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceget.go @@ -18,10 +18,13 @@ func (c *C1APIRequestSchemaV1RequestSchemaServiceGetRequest) GetRequestSchemaID( return c.RequestSchemaID } +// #region class-body-c1apirequestschemav1requestschemaservicegetrequest +// #endregion class-body-c1apirequestschemav1requestschemaservicegetrequest + type C1APIRequestSchemaV1RequestSchemaServiceGetResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for retrieving a request schema. RequestSchemaServiceGetResponse *shared.RequestSchemaServiceGetResponse // HTTP response status code for this operation StatusCode int @@ -56,3 +59,6 @@ func (c *C1APIRequestSchemaV1RequestSchemaServiceGetResponse) GetRawResponse() * } return c.RawResponse } + +// #region class-body-c1apirequestschemav1requestschemaservicegetresponse +// #endregion class-body-c1apirequestschemav1requestschemaservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceremoveentitlementbinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceremoveentitlementbinding.go index c50c7cdd..70f19051 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceremoveentitlementbinding.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceremoveentitlementbinding.go @@ -10,7 +10,7 @@ import ( type C1APIRequestSchemaV1RequestSchemaServiceRemoveEntitlementBindingResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for removing a single entitlement binding. RequestSchemaServiceRemoveEntitlementBindingResponse *shared.RequestSchemaServiceRemoveEntitlementBindingResponse // HTTP response status code for this operation StatusCode int @@ -45,3 +45,6 @@ func (c *C1APIRequestSchemaV1RequestSchemaServiceRemoveEntitlementBindingRespons } return c.RawResponse } + +// #region class-body-c1apirequestschemav1requestschemaserviceremoveentitlementbindingresponse +// #endregion class-body-c1apirequestschemav1requestschemaserviceremoveentitlementbindingresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceupdate.go index ab339b13..965d18fb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apirequestschemav1requestschemaserviceupdate.go @@ -26,10 +26,13 @@ func (c *C1APIRequestSchemaV1RequestSchemaServiceUpdateRequest) GetRequestSchema return c.RequestSchemaID } +// #region class-body-c1apirequestschemav1requestschemaserviceupdaterequest +// #endregion class-body-c1apirequestschemav1requestschemaserviceupdaterequest + type C1APIRequestSchemaV1RequestSchemaServiceUpdateResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // The response message for updating a request schema. RequestSchemaServiceUpdateResponse *shared.RequestSchemaServiceUpdateResponse // HTTP response status code for this operation StatusCode int @@ -64,3 +67,6 @@ func (c *C1APIRequestSchemaV1RequestSchemaServiceUpdateResponse) GetRawResponse( } return c.RawResponse } + +// #region class-body-c1apirequestschemav1requestschemaserviceupdateresponse +// #endregion class-body-c1apirequestschemav1requestschemaserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementsearchservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementsearchservicesearch.go new file mode 100644 index 00000000..212f05bc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementsearchservicesearch.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementSearchServiceSearchResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + RoleMiningSearchSuggestionsResponse *shared.RoleMiningSearchSuggestionsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementSearchServiceSearchResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementSearchServiceSearchResponse) GetRoleMiningSearchSuggestionsResponse() *shared.RoleMiningSearchSuggestionsResponse { + if c == nil { + return nil + } + return c.RoleMiningSearchSuggestionsResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementSearchServiceSearchResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementSearchServiceSearchResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementsearchservicesearchresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementsearchservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicecreateaccessprofilefromcohort.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicecreateaccessprofilefromcohort.go new file mode 100644 index 00000000..a9dbb7c0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicecreateaccessprofilefromcohort.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceCreateAccessProfileFromCohortResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + CreateAccessProfileFromCohortResponse *shared.CreateAccessProfileFromCohortResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceCreateAccessProfileFromCohortResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceCreateAccessProfileFromCohortResponse) GetCreateAccessProfileFromCohortResponse() *shared.CreateAccessProfileFromCohortResponse { + if c == nil { + return nil + } + return c.CreateAccessProfileFromCohortResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceCreateAccessProfileFromCohortResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceCreateAccessProfileFromCohortResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicecreateaccessprofilefromcohortresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicecreateaccessprofilefromcohortresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetcustomanalysisresult.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetcustomanalysisresult.go new file mode 100644 index 00000000..5359a9e2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetcustomanalysisresult.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceGetCustomAnalysisResultRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetCustomAnalysisResultRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetcustomanalysisresultrequest +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetcustomanalysisresultrequest + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceGetCustomAnalysisResultResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetCustomAnalysisResultResponse *shared.GetCustomAnalysisResultResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetCustomAnalysisResultResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetCustomAnalysisResultResponse) GetGetCustomAnalysisResultResponse() *shared.GetCustomAnalysisResultResponse { + if c == nil { + return nil + } + return c.GetCustomAnalysisResultResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetCustomAnalysisResultResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetCustomAnalysisResultResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetcustomanalysisresultresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetcustomanalysisresultresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetlatestrun.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetlatestrun.go new file mode 100644 index 00000000..8905189c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetlatestrun.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceGetLatestRunResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetLatestRunResponse *shared.GetLatestRunResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetLatestRunResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetLatestRunResponse) GetGetLatestRunResponse() *shared.GetLatestRunResponse { + if c == nil { + return nil + } + return c.GetLatestRunResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetLatestRunResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetLatestRunResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetlatestrunresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetlatestrunresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetroleminingconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetroleminingconfig.go new file mode 100644 index 00000000..6d1f6b9f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetroleminingconfig.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceGetRoleMiningConfigResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetRoleMiningConfigResponse *shared.GetRoleMiningConfigResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetRoleMiningConfigResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetRoleMiningConfigResponse) GetGetRoleMiningConfigResponse() *shared.GetRoleMiningConfigResponse { + if c == nil { + return nil + } + return c.GetRoleMiningConfigResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetRoleMiningConfigResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetRoleMiningConfigResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetroleminingconfigresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetroleminingconfigresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetsuggestion.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetsuggestion.go new file mode 100644 index 00000000..1594fbcd --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicegetsuggestion.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceGetSuggestionRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetSuggestionRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetsuggestionrequest +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetsuggestionrequest + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceGetSuggestionResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetSuggestionResponse *shared.GetSuggestionResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetSuggestionResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetSuggestionResponse) GetGetSuggestionResponse() *shared.GetSuggestionResponse { + if c == nil { + return nil + } + return c.GetSuggestionResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetSuggestionResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceGetSuggestionResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetsuggestionresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicegetsuggestionresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicelistruns.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicelistruns.go new file mode 100644 index 00000000..3eaa3e43 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicelistruns.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceListRunsResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ListRunsResponse *shared.ListRunsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceListRunsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceListRunsResponse) GetListRunsResponse() *shared.ListRunsResponse { + if c == nil { + return nil + } + return c.ListRunsResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceListRunsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceListRunsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicelistrunsresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicelistrunsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicelistsuggestions.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicelistsuggestions.go new file mode 100644 index 00000000..0d94d62a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicelistsuggestions.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceListSuggestionsResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ListSuggestionsResponse *shared.ListSuggestionsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceListSuggestionsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceListSuggestionsResponse) GetListSuggestionsResponse() *shared.ListSuggestionsResponse { + if c == nil { + return nil + } + return c.ListSuggestionsResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceListSuggestionsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceListSuggestionsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicelistsuggestionsresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicelistsuggestionsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicesearchcohortusers.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicesearchcohortusers.go new file mode 100644 index 00000000..511b582e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicesearchcohortusers.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersRequest struct { + SearchCohortUsersRequest *shared.SearchCohortUsersRequest `request:"mediaType=application/json"` + SuggestionID string `pathParam:"style=simple,explode=false,name=suggestion_id"` +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersRequest) GetSearchCohortUsersRequest() *shared.SearchCohortUsersRequest { + if c == nil { + return nil + } + return c.SearchCohortUsersRequest +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersRequest) GetSuggestionID() string { + if c == nil { + return "" + } + return c.SuggestionID +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicesearchcohortusersrequest +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicesearchcohortusersrequest + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + SearchCohortUsersResponse *shared.SearchCohortUsersResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersResponse) GetSearchCohortUsersResponse() *shared.SearchCohortUsersResponse { + if c == nil { + return nil + } + return c.SearchCohortUsersResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicesearchcohortusersresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicesearchcohortusersresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicetriggeranalysis.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicetriggeranalysis.go new file mode 100644 index 00000000..4e6de5be --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicetriggeranalysis.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerAnalysisResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + TriggerAnalysisResponse *shared.TriggerAnalysisResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerAnalysisResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerAnalysisResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerAnalysisResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerAnalysisResponse) GetTriggerAnalysisResponse() *shared.TriggerAnalysisResponse { + if c == nil { + return nil + } + return c.TriggerAnalysisResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicetriggeranalysisresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicetriggeranalysisresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicetriggercustomanalysis.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicetriggercustomanalysis.go new file mode 100644 index 00000000..27aa5bd8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementservicetriggercustomanalysis.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerCustomAnalysisResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + TriggerCustomAnalysisResponse *shared.TriggerCustomAnalysisResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerCustomAnalysisResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerCustomAnalysisResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerCustomAnalysisResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerCustomAnalysisResponse) GetTriggerCustomAnalysisResponse() *shared.TriggerCustomAnalysisResponse { + if c == nil { + return nil + } + return c.TriggerCustomAnalysisResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementservicetriggercustomanalysisresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementservicetriggercustomanalysisresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementserviceupdateroleminingconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementserviceupdateroleminingconfig.go new file mode 100644 index 00000000..ffbde8fc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementserviceupdateroleminingconfig.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateRoleMiningConfigResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + UpdateRoleMiningConfigResponse *shared.UpdateRoleMiningConfigResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateRoleMiningConfigResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateRoleMiningConfigResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateRoleMiningConfigResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateRoleMiningConfigResponse) GetUpdateRoleMiningConfigResponse() *shared.UpdateRoleMiningConfigResponse { + if c == nil { + return nil + } + return c.UpdateRoleMiningConfigResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementserviceupdateroleminingconfigresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementserviceupdateroleminingconfigresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementserviceupdatesuggestionstate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementserviceupdatesuggestionstate.go new file mode 100644 index 00000000..a70c875b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiroleminingmanagementv1roleminingmanagementserviceupdatesuggestionstate.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateRequest struct { + UpdateSuggestionStateRequest *shared.UpdateSuggestionStateRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateRequest) GetUpdateSuggestionStateRequest() *shared.UpdateSuggestionStateRequest { + if c == nil { + return nil + } + return c.UpdateSuggestionStateRequest +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementserviceupdatesuggestionstaterequest +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementserviceupdatesuggestionstaterequest + +type C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + UpdateSuggestionStateResponse *shared.UpdateSuggestionStateResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateResponse) GetUpdateSuggestionStateResponse() *shared.UpdateSuggestionStateResponse { + if c == nil { + return nil + } + return c.UpdateSuggestionStateResponse +} + +// #region class-body-c1apiroleminingmanagementv1roleminingmanagementserviceupdatesuggestionstateresponse +// #endregion class-body-c1apiroleminingmanagementv1roleminingmanagementserviceupdatesuggestionstateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminserviceget.go new file mode 100644 index 00000000..24d14a50 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminserviceget.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretAdminServiceGetRequest struct { + VaultID string `pathParam:"style=simple,explode=false,name=vault_id"` +} + +func (c *C1APISecretsV1PaperSecretAdminServiceGetRequest) GetVaultID() string { + if c == nil { + return "" + } + return c.VaultID +} + +// #region class-body-c1apisecretsv1papersecretadminservicegetrequest +// #endregion class-body-c1apisecretsv1papersecretadminservicegetrequest + +type C1APISecretsV1PaperSecretAdminServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretAdminServiceGetResponse *shared.PaperSecretAdminServiceGetResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretAdminServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretAdminServiceGetResponse) GetPaperSecretAdminServiceGetResponse() *shared.PaperSecretAdminServiceGetResponse { + if c == nil { + return nil + } + return c.PaperSecretAdminServiceGetResponse +} + +func (c *C1APISecretsV1PaperSecretAdminServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretAdminServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretadminservicegetresponse +// #endregion class-body-c1apisecretsv1papersecretadminservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminservicerevoke.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminservicerevoke.go new file mode 100644 index 00000000..3e005814 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminservicerevoke.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretAdminServiceRevokeRequest struct { + PaperSecretAdminServiceRevokeRequest *shared.PaperSecretAdminServiceRevokeRequest `request:"mediaType=application/json"` + VaultID string `pathParam:"style=simple,explode=false,name=vault_id"` +} + +func (c *C1APISecretsV1PaperSecretAdminServiceRevokeRequest) GetPaperSecretAdminServiceRevokeRequest() *shared.PaperSecretAdminServiceRevokeRequest { + if c == nil { + return nil + } + return c.PaperSecretAdminServiceRevokeRequest +} + +func (c *C1APISecretsV1PaperSecretAdminServiceRevokeRequest) GetVaultID() string { + if c == nil { + return "" + } + return c.VaultID +} + +// #region class-body-c1apisecretsv1papersecretadminservicerevokerequest +// #endregion class-body-c1apisecretsv1papersecretadminservicerevokerequest + +type C1APISecretsV1PaperSecretAdminServiceRevokeResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretAdminServiceRevokeResponse *shared.PaperSecretAdminServiceRevokeResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretAdminServiceRevokeResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretAdminServiceRevokeResponse) GetPaperSecretAdminServiceRevokeResponse() *shared.PaperSecretAdminServiceRevokeResponse { + if c == nil { + return nil + } + return c.PaperSecretAdminServiceRevokeResponse +} + +func (c *C1APISecretsV1PaperSecretAdminServiceRevokeResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretAdminServiceRevokeResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretadminservicerevokeresponse +// #endregion class-body-c1apisecretsv1papersecretadminservicerevokeresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminservicesearch.go new file mode 100644 index 00000000..32d69717 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminservicesearch.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretAdminServiceSearchResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretAdminServiceSearchResponse *shared.PaperSecretAdminServiceSearchResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretAdminServiceSearchResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretAdminServiceSearchResponse) GetPaperSecretAdminServiceSearchResponse() *shared.PaperSecretAdminServiceSearchResponse { + if c == nil { + return nil + } + return c.PaperSecretAdminServiceSearchResponse +} + +func (c *C1APISecretsV1PaperSecretAdminServiceSearchResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretAdminServiceSearchResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretadminservicesearchresponse +// #endregion class-body-c1apisecretsv1papersecretadminservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminservicesearchauditevents.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminservicesearchauditevents.go new file mode 100644 index 00000000..c95c0e67 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretadminservicesearchauditevents.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretAdminServiceSearchAuditEventsResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretAdminServiceSearchAuditEventsResponse *shared.PaperSecretAdminServiceSearchAuditEventsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretAdminServiceSearchAuditEventsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretAdminServiceSearchAuditEventsResponse) GetPaperSecretAdminServiceSearchAuditEventsResponse() *shared.PaperSecretAdminServiceSearchAuditEventsResponse { + if c == nil { + return nil + } + return c.PaperSecretAdminServiceSearchAuditEventsResponse +} + +func (c *C1APISecretsV1PaperSecretAdminServiceSearchAuditEventsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretAdminServiceSearchAuditEventsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretadminservicesearchauditeventsresponse +// #endregion class-body-c1apisecretsv1papersecretadminservicesearchauditeventsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicecreateexternal.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicecreateexternal.go new file mode 100644 index 00000000..e5e5959f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicecreateexternal.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretServiceCreateExternalResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretServiceCreateResponse *shared.PaperSecretServiceCreateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretServiceCreateExternalResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretServiceCreateExternalResponse) GetPaperSecretServiceCreateResponse() *shared.PaperSecretServiceCreateResponse { + if c == nil { + return nil + } + return c.PaperSecretServiceCreateResponse +} + +func (c *C1APISecretsV1PaperSecretServiceCreateExternalResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretServiceCreateExternalResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretservicecreateexternalresponse +// #endregion class-body-c1apisecretsv1papersecretservicecreateexternalresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicecreateinternal.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicecreateinternal.go new file mode 100644 index 00000000..d351d551 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicecreateinternal.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretServiceCreateInternalResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretServiceCreateResponse *shared.PaperSecretServiceCreateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretServiceCreateInternalResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretServiceCreateInternalResponse) GetPaperSecretServiceCreateResponse() *shared.PaperSecretServiceCreateResponse { + if c == nil { + return nil + } + return c.PaperSecretServiceCreateResponse +} + +func (c *C1APISecretsV1PaperSecretServiceCreateInternalResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretServiceCreateInternalResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretservicecreateinternalresponse +// #endregion class-body-c1apisecretsv1papersecretservicecreateinternalresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretserviceget.go new file mode 100644 index 00000000..79fd8216 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretserviceget.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretServiceGetRequest struct { + VaultID string `pathParam:"style=simple,explode=false,name=vault_id"` +} + +func (c *C1APISecretsV1PaperSecretServiceGetRequest) GetVaultID() string { + if c == nil { + return "" + } + return c.VaultID +} + +// #region class-body-c1apisecretsv1papersecretservicegetrequest +// #endregion class-body-c1apisecretsv1papersecretservicegetrequest + +type C1APISecretsV1PaperSecretServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretServiceGetResponse *shared.PaperSecretServiceGetResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretServiceGetResponse) GetPaperSecretServiceGetResponse() *shared.PaperSecretServiceGetResponse { + if c == nil { + return nil + } + return c.PaperSecretServiceGetResponse +} + +func (c *C1APISecretsV1PaperSecretServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretservicegetresponse +// #endregion class-body-c1apisecretsv1papersecretservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicegetbysharecode.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicegetbysharecode.go new file mode 100644 index 00000000..b21de2ed --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicegetbysharecode.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretServiceGetByShareCodeRequest struct { + ShareCode string `pathParam:"style=simple,explode=false,name=share_code"` +} + +func (c *C1APISecretsV1PaperSecretServiceGetByShareCodeRequest) GetShareCode() string { + if c == nil { + return "" + } + return c.ShareCode +} + +// #region class-body-c1apisecretsv1papersecretservicegetbysharecoderequest +// #endregion class-body-c1apisecretsv1papersecretservicegetbysharecoderequest + +type C1APISecretsV1PaperSecretServiceGetByShareCodeResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretServiceGetResponse *shared.PaperSecretServiceGetResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretServiceGetByShareCodeResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretServiceGetByShareCodeResponse) GetPaperSecretServiceGetResponse() *shared.PaperSecretServiceGetResponse { + if c == nil { + return nil + } + return c.PaperSecretServiceGetResponse +} + +func (c *C1APISecretsV1PaperSecretServiceGetByShareCodeResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretServiceGetByShareCodeResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretservicegetbysharecoderesponse +// #endregion class-body-c1apisecretsv1papersecretservicegetbysharecoderesponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicegetcontent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicegetcontent.go new file mode 100644 index 00000000..e1cd331a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicegetcontent.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretServiceGetContentRequest struct { + PaperSecretServiceGetContentRequest *shared.PaperSecretServiceGetContentRequest `request:"mediaType=application/json"` + VaultID string `pathParam:"style=simple,explode=false,name=vault_id"` +} + +func (c *C1APISecretsV1PaperSecretServiceGetContentRequest) GetPaperSecretServiceGetContentRequest() *shared.PaperSecretServiceGetContentRequest { + if c == nil { + return nil + } + return c.PaperSecretServiceGetContentRequest +} + +func (c *C1APISecretsV1PaperSecretServiceGetContentRequest) GetVaultID() string { + if c == nil { + return "" + } + return c.VaultID +} + +// #region class-body-c1apisecretsv1papersecretservicegetcontentrequest +// #endregion class-body-c1apisecretsv1papersecretservicegetcontentrequest + +type C1APISecretsV1PaperSecretServiceGetContentResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretServiceGetContentResponse *shared.PaperSecretServiceGetContentResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretServiceGetContentResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretServiceGetContentResponse) GetPaperSecretServiceGetContentResponse() *shared.PaperSecretServiceGetContentResponse { + if c == nil { + return nil + } + return c.PaperSecretServiceGetContentResponse +} + +func (c *C1APISecretsV1PaperSecretServiceGetContentResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretServiceGetContentResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretservicegetcontentresponse +// #endregion class-body-c1apisecretsv1papersecretservicegetcontentresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicerevoke.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicerevoke.go new file mode 100644 index 00000000..d7273591 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicerevoke.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretServiceRevokeRequest struct { + PaperSecretServiceRevokeRequest *shared.PaperSecretServiceRevokeRequest `request:"mediaType=application/json"` + VaultID string `pathParam:"style=simple,explode=false,name=vault_id"` +} + +func (c *C1APISecretsV1PaperSecretServiceRevokeRequest) GetPaperSecretServiceRevokeRequest() *shared.PaperSecretServiceRevokeRequest { + if c == nil { + return nil + } + return c.PaperSecretServiceRevokeRequest +} + +func (c *C1APISecretsV1PaperSecretServiceRevokeRequest) GetVaultID() string { + if c == nil { + return "" + } + return c.VaultID +} + +// #region class-body-c1apisecretsv1papersecretservicerevokerequest +// #endregion class-body-c1apisecretsv1papersecretservicerevokerequest + +type C1APISecretsV1PaperSecretServiceRevokeResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretServiceRevokeResponse *shared.PaperSecretServiceRevokeResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretServiceRevokeResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretServiceRevokeResponse) GetPaperSecretServiceRevokeResponse() *shared.PaperSecretServiceRevokeResponse { + if c == nil { + return nil + } + return c.PaperSecretServiceRevokeResponse +} + +func (c *C1APISecretsV1PaperSecretServiceRevokeResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretServiceRevokeResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretservicerevokeresponse +// #endregion class-body-c1apisecretsv1papersecretservicerevokeresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicesearchauditevents.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicesearchauditevents.go new file mode 100644 index 00000000..9809b694 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicesearchauditevents.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretServiceSearchAuditEventsResponse struct { + // HTTP response content type for this operation + ContentType string + // PaperSecretServiceSearchAuditEventsResponse contains a page of audit events + // for the requested secret. + PaperSecretServiceSearchAuditEventsResponse *shared.PaperSecretServiceSearchAuditEventsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretServiceSearchAuditEventsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretServiceSearchAuditEventsResponse) GetPaperSecretServiceSearchAuditEventsResponse() *shared.PaperSecretServiceSearchAuditEventsResponse { + if c == nil { + return nil + } + return c.PaperSecretServiceSearchAuditEventsResponse +} + +func (c *C1APISecretsV1PaperSecretServiceSearchAuditEventsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretServiceSearchAuditEventsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretservicesearchauditeventsresponse +// #endregion class-body-c1apisecretsv1papersecretservicesearchauditeventsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicesearchmysecrets.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicesearchmysecrets.go new file mode 100644 index 00000000..a2975f18 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicesearchmysecrets.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretServiceSearchMySecretsResponse struct { + // HTTP response content type for this operation + ContentType string + // Search response for user's own secrets + PaperSecretServiceSearchResponse *shared.PaperSecretServiceSearchResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretServiceSearchMySecretsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretServiceSearchMySecretsResponse) GetPaperSecretServiceSearchResponse() *shared.PaperSecretServiceSearchResponse { + if c == nil { + return nil + } + return c.PaperSecretServiceSearchResponse +} + +func (c *C1APISecretsV1PaperSecretServiceSearchMySecretsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretServiceSearchMySecretsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretservicesearchmysecretsresponse +// #endregion class-body-c1apisecretsv1papersecretservicesearchmysecretsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicesettextcontent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicesettextcontent.go new file mode 100644 index 00000000..d6eee30e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisecretsv1papersecretservicesettextcontent.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISecretsV1PaperSecretServiceSetTextContentRequest struct { + PaperSecretServiceSetTextContentRequest *shared.PaperSecretServiceSetTextContentRequest `request:"mediaType=application/json"` + VaultID string `pathParam:"style=simple,explode=false,name=vault_id"` +} + +func (c *C1APISecretsV1PaperSecretServiceSetTextContentRequest) GetPaperSecretServiceSetTextContentRequest() *shared.PaperSecretServiceSetTextContentRequest { + if c == nil { + return nil + } + return c.PaperSecretServiceSetTextContentRequest +} + +func (c *C1APISecretsV1PaperSecretServiceSetTextContentRequest) GetVaultID() string { + if c == nil { + return "" + } + return c.VaultID +} + +// #region class-body-c1apisecretsv1papersecretservicesettextcontentrequest +// #endregion class-body-c1apisecretsv1papersecretservicesettextcontentrequest + +type C1APISecretsV1PaperSecretServiceSetTextContentResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + PaperSecretServiceSetTextContentResponse *shared.PaperSecretServiceSetTextContentResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISecretsV1PaperSecretServiceSetTextContentResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISecretsV1PaperSecretServiceSetTextContentResponse) GetPaperSecretServiceSetTextContentResponse() *shared.PaperSecretServiceSetTextContentResponse { + if c == nil { + return nil + } + return c.PaperSecretServiceSetTextContentResponse +} + +func (c *C1APISecretsV1PaperSecretServiceSetTextContentResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISecretsV1PaperSecretServiceSetTextContentResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisecretsv1papersecretservicesettextcontentresponse +// #endregion class-body-c1apisecretsv1papersecretservicesettextcontentresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceaddbinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceaddbinding.go new file mode 100644 index 00000000..122d9ed3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceaddbinding.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceAddBindingResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceAddBindingResponse *shared.ServicePrincipalServiceAddBindingResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceAddBindingResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceAddBindingResponse) GetServicePrincipalServiceAddBindingResponse() *shared.ServicePrincipalServiceAddBindingResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceAddBindingResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceAddBindingResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceAddBindingResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalserviceaddbindingresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalserviceaddbindingresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicecreate.go new file mode 100644 index 00000000..0cb52d9e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicecreate.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceCreateResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceCreateResponse *shared.ServicePrincipalServiceCreateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceCreateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceCreateResponse) GetServicePrincipalServiceCreateResponse() *shared.ServicePrincipalServiceCreateResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceCreateResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceCreateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceCreateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicecreateresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicecreatecredential.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicecreatecredential.go new file mode 100644 index 00000000..c877e07f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicecreatecredential.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialRequest struct { + ServicePrincipalServiceCreateCredentialRequest *shared.ServicePrincipalServiceCreateCredentialRequest `request:"mediaType=application/json"` + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialRequest) GetServicePrincipalServiceCreateCredentialRequest() *shared.ServicePrincipalServiceCreateCredentialRequest { + if c == nil { + return nil + } + return c.ServicePrincipalServiceCreateCredentialRequest +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicecreatecredentialrequest +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicecreatecredentialrequest + +type C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceCreateCredentialResponse *shared.ServicePrincipalServiceCreateCredentialResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialResponse) GetServicePrincipalServiceCreateCredentialResponse() *shared.ServicePrincipalServiceCreateCredentialResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceCreateCredentialResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicecreatecredentialresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicecreatecredentialresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicedelete.go new file mode 100644 index 00000000..f82e23dc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicedelete.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceDeleteRequest struct { + ServicePrincipalServiceDeleteRequest *shared.ServicePrincipalServiceDeleteRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceDeleteRequest) GetServicePrincipalServiceDeleteRequest() *shared.ServicePrincipalServiceDeleteRequest { + if c == nil { + return nil + } + return c.ServicePrincipalServiceDeleteRequest +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceDeleteRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicedeleterequest +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicedeleterequest + +type C1APIServicePrincipalV1ServicePrincipalServiceDeleteResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceDeleteResponse *shared.ServicePrincipalServiceDeleteResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceDeleteResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceDeleteResponse) GetServicePrincipalServiceDeleteResponse() *shared.ServicePrincipalServiceDeleteResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceDeleteResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceDeleteResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceDeleteResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicedeleteresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicedeletebinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicedeletebinding.go new file mode 100644 index 00000000..15c98405 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicedeletebinding.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceDeleteBindingResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceDeleteBindingResponse *shared.ServicePrincipalServiceDeleteBindingResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceDeleteBindingResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceDeleteBindingResponse) GetServicePrincipalServiceDeleteBindingResponse() *shared.ServicePrincipalServiceDeleteBindingResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceDeleteBindingResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceDeleteBindingResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceDeleteBindingResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicedeletebindingresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicedeletebindingresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceget.go new file mode 100644 index 00000000..1bf692d3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceget.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceGetRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicegetrequest +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicegetrequest + +type C1APIServicePrincipalV1ServicePrincipalServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceGetResponse *shared.ServicePrincipalServiceGetResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetResponse) GetServicePrincipalServiceGetResponse() *shared.ServicePrincipalServiceGetResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceGetResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicegetresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicegetcredential.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicegetcredential.go new file mode 100644 index 00000000..280d801f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicegetcredential.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicegetcredentialrequest +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicegetcredentialrequest + +type C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceGetCredentialResponse *shared.ServicePrincipalServiceGetCredentialResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialResponse) GetServicePrincipalServiceGetCredentialResponse() *shared.ServicePrincipalServiceGetCredentialResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceGetCredentialResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicegetcredentialresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicegetcredentialresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicelist.go new file mode 100644 index 00000000..6b5707db --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicelist.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceListResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceListResponse *shared.ServicePrincipalServiceListResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListResponse) GetServicePrincipalServiceListResponse() *shared.ServicePrincipalServiceListResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceListResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicelistresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicelistbindings.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicelistbindings.go new file mode 100644 index 00000000..caf0915a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicelistbindings.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceListBindingsResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceListBindingsResponse *shared.ServicePrincipalServiceListBindingsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListBindingsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListBindingsResponse) GetServicePrincipalServiceListBindingsResponse() *shared.ServicePrincipalServiceListBindingsResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceListBindingsResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListBindingsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListBindingsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicelistbindingsresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicelistbindingsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicelistcredentials.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicelistcredentials.go new file mode 100644 index 00000000..eda14caf --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicelistcredentials.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceListCredentialsRequest struct { + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListCredentialsRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicelistcredentialsrequest +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicelistcredentialsrequest + +type C1APIServicePrincipalV1ServicePrincipalServiceListCredentialsResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceListCredentialsResponse *shared.ServicePrincipalServiceListCredentialsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListCredentialsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListCredentialsResponse) GetServicePrincipalServiceListCredentialsResponse() *shared.ServicePrincipalServiceListCredentialsResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceListCredentialsResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListCredentialsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceListCredentialsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicelistcredentialsresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicelistcredentialsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicerevokecredential.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicerevokecredential.go new file mode 100644 index 00000000..6d2b79e3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalservicerevokecredential.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialRequest struct { + ServicePrincipalServiceRevokeCredentialRequest *shared.ServicePrincipalServiceRevokeCredentialRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialRequest) GetServicePrincipalServiceRevokeCredentialRequest() *shared.ServicePrincipalServiceRevokeCredentialRequest { + if c == nil { + return nil + } + return c.ServicePrincipalServiceRevokeCredentialRequest +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicerevokecredentialrequest +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicerevokecredentialrequest + +type C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceRevokeCredentialResponse *shared.ServicePrincipalServiceRevokeCredentialResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialResponse) GetServicePrincipalServiceRevokeCredentialResponse() *shared.ServicePrincipalServiceRevokeCredentialResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceRevokeCredentialResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalservicerevokecredentialresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalservicerevokecredentialresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceupdate.go new file mode 100644 index 00000000..82fbb8bf --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceupdate.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceUpdateRequest struct { + ServicePrincipalServiceUpdateRequest *shared.ServicePrincipalServiceUpdateRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateRequest) GetServicePrincipalServiceUpdateRequest() *shared.ServicePrincipalServiceUpdateRequest { + if c == nil { + return nil + } + return c.ServicePrincipalServiceUpdateRequest +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalserviceupdaterequest +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalserviceupdaterequest + +type C1APIServicePrincipalV1ServicePrincipalServiceUpdateResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceUpdateResponse *shared.ServicePrincipalServiceUpdateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateResponse) GetServicePrincipalServiceUpdateResponse() *shared.ServicePrincipalServiceUpdateResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceUpdateResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalserviceupdateresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceupdatecredential.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceupdatecredential.go new file mode 100644 index 00000000..49da7342 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiserviceprincipalv1serviceprincipalserviceupdatecredential.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialRequest struct { + ServicePrincipalServiceUpdateCredentialRequest *shared.ServicePrincipalServiceUpdateCredentialRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialRequest) GetServicePrincipalServiceUpdateCredentialRequest() *shared.ServicePrincipalServiceUpdateCredentialRequest { + if c == nil { + return nil + } + return c.ServicePrincipalServiceUpdateCredentialRequest +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalserviceupdatecredentialrequest +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalserviceupdatecredentialrequest + +type C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + ServicePrincipalServiceUpdateCredentialResponse *shared.ServicePrincipalServiceUpdateCredentialResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialResponse) GetServicePrincipalServiceUpdateCredentialResponse() *shared.ServicePrincipalServiceUpdateCredentialResponse { + if c == nil { + return nil + } + return c.ServicePrincipalServiceUpdateCredentialResponse +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apiserviceprincipalv1serviceprincipalserviceupdatecredentialresponse +// #endregion class-body-c1apiserviceprincipalv1serviceprincipalserviceupdatecredentialresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1awsexternalidsettingsget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1awsexternalidsettingsget.go index ffa66158..1797f2a6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1awsexternalidsettingsget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1awsexternalidsettingsget.go @@ -45,3 +45,6 @@ func (c *C1APISettingsV1AWSExternalIDSettingsGetResponse) GetRawResponse() *http } return c.RawResponse } + +// #region class-body-c1apisettingsv1awsexternalidsettingsgetresponse +// #endregion class-body-c1apisettingsv1awsexternalidsettingsgetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1contactsservicegetcontacts.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1contactsservicegetcontacts.go new file mode 100644 index 00000000..59264af8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1contactsservicegetcontacts.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1ContactsServiceGetContactsResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetContactsResponse *shared.GetContactsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISettingsV1ContactsServiceGetContactsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1ContactsServiceGetContactsResponse) GetGetContactsResponse() *shared.GetContactsResponse { + if c == nil { + return nil + } + return c.GetContactsResponse +} + +func (c *C1APISettingsV1ContactsServiceGetContactsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1ContactsServiceGetContactsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisettingsv1contactsservicegetcontactsresponse +// #endregion class-body-c1apisettingsv1contactsservicegetcontactsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1contactsserviceupdatecontacts.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1contactsserviceupdatecontacts.go new file mode 100644 index 00000000..3b7ff512 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1contactsserviceupdatecontacts.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1ContactsServiceUpdateContactsResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + UpdateContactsResponse *shared.UpdateContactsResponse +} + +func (c *C1APISettingsV1ContactsServiceUpdateContactsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1ContactsServiceUpdateContactsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1ContactsServiceUpdateContactsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APISettingsV1ContactsServiceUpdateContactsResponse) GetUpdateContactsResponse() *shared.UpdateContactsResponse { + if c == nil { + return nil + } + return c.UpdateContactsResponse +} + +// #region class-body-c1apisettingsv1contactsserviceupdatecontactsresponse +// #endregion class-body-c1apisettingsv1contactsserviceupdatecontactsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1onboardingsettingsserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1onboardingsettingsserviceget.go new file mode 100644 index 00000000..89facb73 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1onboardingsettingsserviceget.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1OnboardingSettingsServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetOnboardingSettingsResponse *shared.GetOnboardingSettingsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISettingsV1OnboardingSettingsServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1OnboardingSettingsServiceGetResponse) GetGetOnboardingSettingsResponse() *shared.GetOnboardingSettingsResponse { + if c == nil { + return nil + } + return c.GetOnboardingSettingsResponse +} + +func (c *C1APISettingsV1OnboardingSettingsServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1OnboardingSettingsServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisettingsv1onboardingsettingsservicegetresponse +// #endregion class-body-c1apisettingsv1onboardingsettingsservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1onboardingsettingsserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1onboardingsettingsserviceupdate.go new file mode 100644 index 00000000..72b97229 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1onboardingsettingsserviceupdate.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1OnboardingSettingsServiceUpdateResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + UpdateOnboardingSettingsResponse *shared.UpdateOnboardingSettingsResponse +} + +func (c *C1APISettingsV1OnboardingSettingsServiceUpdateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1OnboardingSettingsServiceUpdateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1OnboardingSettingsServiceUpdateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APISettingsV1OnboardingSettingsServiceUpdateResponse) GetUpdateOnboardingSettingsResponse() *shared.UpdateOnboardingSettingsResponse { + if c == nil { + return nil + } + return c.UpdateOnboardingSettingsResponse +} + +// #region class-body-c1apisettingsv1onboardingsettingsserviceupdateresponse +// #endregion class-body-c1apisettingsv1onboardingsettingsserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgdomainservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgdomainservicelist.go index 206378ff..f851d7cc 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgdomainservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgdomainservicelist.go @@ -26,6 +26,9 @@ func (c *C1APISettingsV1OrgDomainServiceListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apisettingsv1orgdomainservicelistrequest +// #endregion class-body-c1apisettingsv1orgdomainservicelistrequest + type C1APISettingsV1OrgDomainServiceListResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APISettingsV1OrgDomainServiceListResponse) GetRawResponse() *http.Res } return c.RawResponse } + +// #region class-body-c1apisettingsv1orgdomainservicelistresponse +// #endregion class-body-c1apisettingsv1orgdomainservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgdomainserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgdomainserviceupdate.go index 908e46a9..2d878a67 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgdomainserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgdomainserviceupdate.go @@ -45,3 +45,6 @@ func (c *C1APISettingsV1OrgDomainServiceUpdateResponse) GetUpdateOrgDomainRespon } return c.UpdateOrgDomainResponse } + +// #region class-body-c1apisettingsv1orgdomainserviceupdateresponse +// #endregion class-body-c1apisettingsv1orgdomainserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgnotificationsettingsserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgnotificationsettingsserviceget.go new file mode 100644 index 00000000..256165b2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgnotificationsettingsserviceget.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1OrgNotificationSettingsServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetOrgNotificationSettingsResponse *shared.GetOrgNotificationSettingsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISettingsV1OrgNotificationSettingsServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1OrgNotificationSettingsServiceGetResponse) GetGetOrgNotificationSettingsResponse() *shared.GetOrgNotificationSettingsResponse { + if c == nil { + return nil + } + return c.GetOrgNotificationSettingsResponse +} + +func (c *C1APISettingsV1OrgNotificationSettingsServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1OrgNotificationSettingsServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisettingsv1orgnotificationsettingsservicegetresponse +// #endregion class-body-c1apisettingsv1orgnotificationsettingsservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgnotificationsettingsserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgnotificationsettingsserviceupdate.go new file mode 100644 index 00000000..c4a5e89a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1orgnotificationsettingsserviceupdate.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1OrgNotificationSettingsServiceUpdateResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + UpdateOrgNotificationSettingsResponse *shared.UpdateOrgNotificationSettingsResponse +} + +func (c *C1APISettingsV1OrgNotificationSettingsServiceUpdateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1OrgNotificationSettingsServiceUpdateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1OrgNotificationSettingsServiceUpdateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APISettingsV1OrgNotificationSettingsServiceUpdateResponse) GetUpdateOrgNotificationSettingsResponse() *shared.UpdateOrgNotificationSettingsResponse { + if c == nil { + return nil + } + return c.UpdateOrgNotificationSettingsResponse +} + +// #region class-body-c1apisettingsv1orgnotificationsettingsserviceupdateresponse +// #endregion class-body-c1apisettingsv1orgnotificationsettingsserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsserviceget.go index f896bb74..2c4d0309 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsserviceget.go @@ -45,3 +45,6 @@ func (c *C1APISettingsV1SessionSettingsServiceGetResponse) GetRawResponse() *htt } return c.RawResponse } + +// #region class-body-c1apisettingsv1sessionsettingsservicegetresponse +// #endregion class-body-c1apisettingsv1sessionsettingsservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsservicetestsourceip.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsservicetestsourceip.go index 4faa14db..232f6fa1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsservicetestsourceip.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsservicetestsourceip.go @@ -45,3 +45,6 @@ func (c *C1APISettingsV1SessionSettingsServiceTestSourceIPResponse) GetTestSourc } return c.TestSourceIPResponse } + +// #region class-body-c1apisettingsv1sessionsettingsservicetestsourceipresponse +// #endregion class-body-c1apisettingsv1sessionsettingsservicetestsourceipresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsserviceupdate.go index 7515b250..c5e98be3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1sessionsettingsserviceupdate.go @@ -45,3 +45,6 @@ func (c *C1APISettingsV1SessionSettingsServiceUpdateResponse) GetUpdateSessionSe } return c.UpdateSessionSettingsResponse } + +// #region class-body-c1apisettingsv1sessionsettingsserviceupdateresponse +// #endregion class-body-c1apisettingsv1sessionsettingsserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderserviceget.go new file mode 100644 index 00000000..c9d12425 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderserviceget.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1TenantEmailProviderServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetTenantEmailProviderResponse *shared.GetTenantEmailProviderResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISettingsV1TenantEmailProviderServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1TenantEmailProviderServiceGetResponse) GetGetTenantEmailProviderResponse() *shared.GetTenantEmailProviderResponse { + if c == nil { + return nil + } + return c.GetTenantEmailProviderResponse +} + +func (c *C1APISettingsV1TenantEmailProviderServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1TenantEmailProviderServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisettingsv1tenantemailproviderservicegetresponse +// #endregion class-body-c1apisettingsv1tenantemailproviderservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderservicegetemailcapabilities.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderservicegetemailcapabilities.go new file mode 100644 index 00000000..6456fa46 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderservicegetemailcapabilities.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1TenantEmailProviderServiceGetEmailCapabilitiesResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetEmailCapabilitiesResponse *shared.GetEmailCapabilitiesResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISettingsV1TenantEmailProviderServiceGetEmailCapabilitiesResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1TenantEmailProviderServiceGetEmailCapabilitiesResponse) GetGetEmailCapabilitiesResponse() *shared.GetEmailCapabilitiesResponse { + if c == nil { + return nil + } + return c.GetEmailCapabilitiesResponse +} + +func (c *C1APISettingsV1TenantEmailProviderServiceGetEmailCapabilitiesResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1TenantEmailProviderServiceGetEmailCapabilitiesResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisettingsv1tenantemailproviderservicegetemailcapabilitiesresponse +// #endregion class-body-c1apisettingsv1tenantemailproviderservicegetemailcapabilitiesresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderservicesearchauditevents.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderservicesearchauditevents.go new file mode 100644 index 00000000..a357b689 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderservicesearchauditevents.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1TenantEmailProviderServiceSearchAuditEventsResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + SearchEmailAuditEventsResponse *shared.SearchEmailAuditEventsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISettingsV1TenantEmailProviderServiceSearchAuditEventsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1TenantEmailProviderServiceSearchAuditEventsResponse) GetSearchEmailAuditEventsResponse() *shared.SearchEmailAuditEventsResponse { + if c == nil { + return nil + } + return c.SearchEmailAuditEventsResponse +} + +func (c *C1APISettingsV1TenantEmailProviderServiceSearchAuditEventsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1TenantEmailProviderServiceSearchAuditEventsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisettingsv1tenantemailproviderservicesearchauditeventsresponse +// #endregion class-body-c1apisettingsv1tenantemailproviderservicesearchauditeventsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderservicetest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderservicetest.go new file mode 100644 index 00000000..8d62384f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderservicetest.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1TenantEmailProviderServiceTestResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + TestTenantEmailProviderResponse *shared.TestTenantEmailProviderResponse +} + +func (c *C1APISettingsV1TenantEmailProviderServiceTestResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1TenantEmailProviderServiceTestResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1TenantEmailProviderServiceTestResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APISettingsV1TenantEmailProviderServiceTestResponse) GetTestTenantEmailProviderResponse() *shared.TestTenantEmailProviderResponse { + if c == nil { + return nil + } + return c.TestTenantEmailProviderResponse +} + +// #region class-body-c1apisettingsv1tenantemailproviderservicetestresponse +// #endregion class-body-c1apisettingsv1tenantemailproviderservicetestresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderserviceupdate.go new file mode 100644 index 00000000..c29e005d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1tenantemailproviderserviceupdate.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1TenantEmailProviderServiceUpdateResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + UpdateTenantEmailProviderResponse *shared.UpdateTenantEmailProviderResponse +} + +func (c *C1APISettingsV1TenantEmailProviderServiceUpdateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1TenantEmailProviderServiceUpdateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1TenantEmailProviderServiceUpdateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APISettingsV1TenantEmailProviderServiceUpdateResponse) GetUpdateTenantEmailProviderResponse() *shared.UpdateTenantEmailProviderResponse { + if c == nil { + return nil + } + return c.UpdateTenantEmailProviderResponse +} + +// #region class-body-c1apisettingsv1tenantemailproviderserviceupdateresponse +// #endregion class-body-c1apisettingsv1tenantemailproviderserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1usernotificationsettingsserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1usernotificationsettingsserviceget.go new file mode 100644 index 00000000..f48ef0f2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1usernotificationsettingsserviceget.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1UserNotificationSettingsServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // Successful response + GetUserNotificationSettingsResponse *shared.GetUserNotificationSettingsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISettingsV1UserNotificationSettingsServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1UserNotificationSettingsServiceGetResponse) GetGetUserNotificationSettingsResponse() *shared.GetUserNotificationSettingsResponse { + if c == nil { + return nil + } + return c.GetUserNotificationSettingsResponse +} + +func (c *C1APISettingsV1UserNotificationSettingsServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1UserNotificationSettingsServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apisettingsv1usernotificationsettingsservicegetresponse +// #endregion class-body-c1apisettingsv1usernotificationsettingsservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1usernotificationsettingsserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1usernotificationsettingsserviceupdate.go new file mode 100644 index 00000000..298b6307 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisettingsv1usernotificationsettingsserviceupdate.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISettingsV1UserNotificationSettingsServiceUpdateResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + UpdateUserNotificationSettingsResponse *shared.UpdateUserNotificationSettingsResponse +} + +func (c *C1APISettingsV1UserNotificationSettingsServiceUpdateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISettingsV1UserNotificationSettingsServiceUpdateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISettingsV1UserNotificationSettingsServiceUpdateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APISettingsV1UserNotificationSettingsServiceUpdateResponse) GetUpdateUserNotificationSettingsResponse() *shared.UpdateUserNotificationSettingsResponse { + if c == nil { + return nil + } + return c.UpdateUserNotificationSettingsResponse +} + +// #region class-body-c1apisettingsv1usernotificationsettingsserviceupdateresponse +// #endregion class-body-c1apisettingsv1usernotificationsettingsserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceivereventsearchservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceivereventsearchservicesearch.go new file mode 100644 index 00000000..2417c866 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceivereventsearchservicesearch.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISSFReceiverV1SSFReceiverEventSearchServiceSearchResponse struct { + // HTTP response content type for this operation + ContentType string + // SSFReceiverEventSearchServiceSearchResponse contains the matching events and a pagination token. + SSFReceiverEventSearchServiceSearchResponse *shared.SSFReceiverEventSearchServiceSearchResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISSFReceiverV1SSFReceiverEventSearchServiceSearchResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISSFReceiverV1SSFReceiverEventSearchServiceSearchResponse) GetSSFReceiverEventSearchServiceSearchResponse() *shared.SSFReceiverEventSearchServiceSearchResponse { + if c == nil { + return nil + } + return c.SSFReceiverEventSearchServiceSearchResponse +} + +func (c *C1APISSFReceiverV1SSFReceiverEventSearchServiceSearchResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISSFReceiverV1SSFReceiverEventSearchServiceSearchResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apissfreceiverv1ssfreceivereventsearchservicesearchresponse +// #endregion class-body-c1apissfreceiverv1ssfreceivereventsearchservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceivereventservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceivereventservicelist.go new file mode 100644 index 00000000..65e56568 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceivereventservicelist.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISSFReceiverV1SSFReceiverEventServiceListRequest struct { + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` + StreamID string `pathParam:"style=simple,explode=false,name=stream_id"` +} + +func (c *C1APISSFReceiverV1SSFReceiverEventServiceListRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APISSFReceiverV1SSFReceiverEventServiceListRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +func (c *C1APISSFReceiverV1SSFReceiverEventServiceListRequest) GetStreamID() string { + if c == nil { + return "" + } + return c.StreamID +} + +// #region class-body-c1apissfreceiverv1ssfreceivereventservicelistrequest +// #endregion class-body-c1apissfreceiverv1ssfreceivereventservicelistrequest + +type C1APISSFReceiverV1SSFReceiverEventServiceListResponse struct { + // HTTP response content type for this operation + ContentType string + // SSFReceiverEventServiceListResponse contains a page of received SSF events. + SSFReceiverEventServiceListResponse *shared.SSFReceiverEventServiceListResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISSFReceiverV1SSFReceiverEventServiceListResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISSFReceiverV1SSFReceiverEventServiceListResponse) GetSSFReceiverEventServiceListResponse() *shared.SSFReceiverEventServiceListResponse { + if c == nil { + return nil + } + return c.SSFReceiverEventServiceListResponse +} + +func (c *C1APISSFReceiverV1SSFReceiverEventServiceListResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISSFReceiverV1SSFReceiverEventServiceListResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apissfreceiverv1ssfreceivereventservicelistresponse +// #endregion class-body-c1apissfreceiverv1ssfreceivereventservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicecreate.go new file mode 100644 index 00000000..eeb84b09 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicecreate.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISSFReceiverV1SSFReceiverStreamServiceCreateResponse struct { + // HTTP response content type for this operation + ContentType string + // SSFReceiverStreamServiceCreateResponse returns the created stream and the push auth token in plaintext. + SSFReceiverStreamServiceCreateResponse *shared.SSFReceiverStreamServiceCreateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceCreateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceCreateResponse) GetSSFReceiverStreamServiceCreateResponse() *shared.SSFReceiverStreamServiceCreateResponse { + if c == nil { + return nil + } + return c.SSFReceiverStreamServiceCreateResponse +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceCreateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceCreateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicecreateresponse +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicedelete.go new file mode 100644 index 00000000..0270b21f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicedelete.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISSFReceiverV1SSFReceiverStreamServiceDeleteRequest struct { + SSFReceiverStreamServiceDeleteRequest *shared.SSFReceiverStreamServiceDeleteRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceDeleteRequest) GetSSFReceiverStreamServiceDeleteRequest() *shared.SSFReceiverStreamServiceDeleteRequest { + if c == nil { + return nil + } + return c.SSFReceiverStreamServiceDeleteRequest +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceDeleteRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicedeleterequest +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicedeleterequest + +type C1APISSFReceiverV1SSFReceiverStreamServiceDeleteResponse struct { + // HTTP response content type for this operation + ContentType string + // SSFReceiverStreamServiceDeleteResponse is empty on success. + SSFReceiverStreamServiceDeleteResponse *shared.SSFReceiverStreamServiceDeleteResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceDeleteResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceDeleteResponse) GetSSFReceiverStreamServiceDeleteResponse() *shared.SSFReceiverStreamServiceDeleteResponse { + if c == nil { + return nil + } + return c.SSFReceiverStreamServiceDeleteResponse +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceDeleteResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceDeleteResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicedeleteresponse +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamserviceget.go new file mode 100644 index 00000000..20aa061b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamserviceget.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISSFReceiverV1SSFReceiverStreamServiceGetRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceGetRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicegetrequest +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicegetrequest + +type C1APISSFReceiverV1SSFReceiverStreamServiceGetResponse struct { + // HTTP response content type for this operation + ContentType string + // SSFReceiverStreamServiceGetResponse contains the requested SSF receiver stream. + SSFReceiverStreamServiceGetResponse *shared.SSFReceiverStreamServiceGetResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceGetResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceGetResponse) GetSSFReceiverStreamServiceGetResponse() *shared.SSFReceiverStreamServiceGetResponse { + if c == nil { + return nil + } + return c.SSFReceiverStreamServiceGetResponse +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceGetResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceGetResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicegetresponse +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicegetstats.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicegetstats.go new file mode 100644 index 00000000..df1bb6fc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicegetstats.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISSFReceiverV1SSFReceiverStreamServiceGetStatsRequest struct { + StreamID string `pathParam:"style=simple,explode=false,name=stream_id"` +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceGetStatsRequest) GetStreamID() string { + if c == nil { + return "" + } + return c.StreamID +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicegetstatsrequest +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicegetstatsrequest + +type C1APISSFReceiverV1SSFReceiverStreamServiceGetStatsResponse struct { + // HTTP response content type for this operation + ContentType string + // SSFReceiverStreamServiceGetStatsResponse contains the event processing statistics for the stream. + SSFReceiverStreamServiceGetStatsResponse *shared.SSFReceiverStreamServiceGetStatsResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceGetStatsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceGetStatsResponse) GetSSFReceiverStreamServiceGetStatsResponse() *shared.SSFReceiverStreamServiceGetStatsResponse { + if c == nil { + return nil + } + return c.SSFReceiverStreamServiceGetStatsResponse +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceGetStatsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceGetStatsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicegetstatsresponse +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicegetstatsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicelist.go new file mode 100644 index 00000000..be9db28d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicelist.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISSFReceiverV1SSFReceiverStreamServiceListRequest struct { + PageSize *int `queryParam:"style=form,explode=true,name=page_size"` + PageToken *string `queryParam:"style=form,explode=true,name=page_token"` +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceListRequest) GetPageSize() *int { + if c == nil { + return nil + } + return c.PageSize +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceListRequest) GetPageToken() *string { + if c == nil { + return nil + } + return c.PageToken +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicelistrequest +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicelistrequest + +type C1APISSFReceiverV1SSFReceiverStreamServiceListResponse struct { + // HTTP response content type for this operation + ContentType string + // SSFReceiverStreamServiceListResponse contains a page of SSF receiver streams. + SSFReceiverStreamServiceListResponse *shared.SSFReceiverStreamServiceListResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceListResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceListResponse) GetSSFReceiverStreamServiceListResponse() *shared.SSFReceiverStreamServiceListResponse { + if c == nil { + return nil + } + return c.SSFReceiverStreamServiceListResponse +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceListResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceListResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicelistresponse +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicetest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicetest.go new file mode 100644 index 00000000..62d1ca05 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamservicetest.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISSFReceiverV1SSFReceiverStreamServiceTestRequest struct { + SSFReceiverStreamServiceTestRequest *shared.SSFReceiverStreamServiceTestRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceTestRequest) GetSSFReceiverStreamServiceTestRequest() *shared.SSFReceiverStreamServiceTestRequest { + if c == nil { + return nil + } + return c.SSFReceiverStreamServiceTestRequest +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceTestRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicetestrequest +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicetestrequest + +type C1APISSFReceiverV1SSFReceiverStreamServiceTestResponse struct { + // HTTP response content type for this operation + ContentType string + // SSFReceiverStreamServiceTestResponse reports the results of the stream configuration test across JWKS, identity, and action readiness checks. + SSFReceiverStreamServiceTestResponse *shared.SSFReceiverStreamServiceTestResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceTestResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceTestResponse) GetSSFReceiverStreamServiceTestResponse() *shared.SSFReceiverStreamServiceTestResponse { + if c == nil { + return nil + } + return c.SSFReceiverStreamServiceTestResponse +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceTestResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceTestResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamservicetestresponse +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamservicetestresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamserviceupdate.go new file mode 100644 index 00000000..b9820bf7 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apissfreceiverv1ssfreceiverstreamserviceupdate.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APISSFReceiverV1SSFReceiverStreamServiceUpdateRequest struct { + SSFReceiverStreamServiceUpdateRequest *shared.SSFReceiverStreamServiceUpdateRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceUpdateRequest) GetSSFReceiverStreamServiceUpdateRequest() *shared.SSFReceiverStreamServiceUpdateRequest { + if c == nil { + return nil + } + return c.SSFReceiverStreamServiceUpdateRequest +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceUpdateRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamserviceupdaterequest +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamserviceupdaterequest + +type C1APISSFReceiverV1SSFReceiverStreamServiceUpdateResponse struct { + // HTTP response content type for this operation + ContentType string + // SSFReceiverStreamServiceUpdateResponse contains the updated SSF receiver stream. + SSFReceiverStreamServiceUpdateResponse *shared.SSFReceiverStreamServiceUpdateResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceUpdateResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceUpdateResponse) GetSSFReceiverStreamServiceUpdateResponse() *shared.SSFReceiverStreamServiceUpdateResponse { + if c == nil { + return nil + } + return c.SSFReceiverStreamServiceUpdateResponse +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceUpdateResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APISSFReceiverV1SSFReceiverStreamServiceUpdateResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +// #region class-body-c1apissfreceiverv1ssfreceiverstreamserviceupdateresponse +// #endregion class-body-c1apissfreceiverv1ssfreceiverstreamserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicecreate.go index b9132786..19d90abe 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicecreate.go @@ -45,3 +45,6 @@ func (c *C1APIStepupV1StepUpProviderServiceCreateResponse) GetRawResponse() *htt } return c.RawResponse } + +// #region class-body-c1apistepupv1stepupproviderservicecreateresponse +// #endregion class-body-c1apistepupv1stepupproviderservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicedelete.go index dcbdc70b..538a58b0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicedelete.go @@ -26,6 +26,9 @@ func (c *C1APIStepupV1StepUpProviderServiceDeleteRequest) GetID() string { return c.ID } +// #region class-body-c1apistepupv1stepupproviderservicedeleterequest +// #endregion class-body-c1apistepupv1stepupproviderservicedeleterequest + type C1APIStepupV1StepUpProviderServiceDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIStepupV1StepUpProviderServiceDeleteResponse) GetRawResponse() *htt } return c.RawResponse } + +// #region class-body-c1apistepupv1stepupproviderservicedeleteresponse +// #endregion class-body-c1apistepupv1stepupproviderservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceget.go index 2c7792b8..40abbc1c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIStepupV1StepUpProviderServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apistepupv1stepupproviderservicegetrequest +// #endregion class-body-c1apistepupv1stepupproviderservicegetrequest + type C1APIStepupV1StepUpProviderServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIStepupV1StepUpProviderServiceGetResponse) GetRawResponse() *http.R } return c.RawResponse } + +// #region class-body-c1apistepupv1stepupproviderservicegetresponse +// #endregion class-body-c1apistepupv1stepupproviderservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicelist.go index 62251181..669d42b8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicelist.go @@ -45,3 +45,6 @@ func (c *C1APIStepupV1StepUpProviderServiceListResponse) GetRawResponse() *http. } return c.RawResponse } + +// #region class-body-c1apistepupv1stepupproviderservicelistresponse +// #endregion class-body-c1apistepupv1stepupproviderservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicesearch.go index a5b7c9d2..ccde129c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicesearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicesearch.go @@ -45,3 +45,6 @@ func (c *C1APIStepupV1StepUpProviderServiceSearchResponse) GetRawResponse() *htt } return c.RawResponse } + +// #region class-body-c1apistepupv1stepupproviderservicesearchresponse +// #endregion class-body-c1apistepupv1stepupproviderservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicetest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicetest.go index 424b92f9..3496ea3c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicetest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderservicetest.go @@ -26,6 +26,9 @@ func (c *C1APIStepupV1StepUpProviderServiceTestRequest) GetID() string { return c.ID } +// #region class-body-c1apistepupv1stepupproviderservicetestrequest +// #endregion class-body-c1apistepupv1stepupproviderservicetestrequest + type C1APIStepupV1StepUpProviderServiceTestResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIStepupV1StepUpProviderServiceTestResponse) GetTestStepUpProviderRe } return c.TestStepUpProviderResponse } + +// #region class-body-c1apistepupv1stepupproviderservicetestresponse +// #endregion class-body-c1apistepupv1stepupproviderservicetestresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceupdate.go index 4216fa41..fe5ca7f3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceupdate.go @@ -26,6 +26,9 @@ func (c *C1APIStepupV1StepUpProviderServiceUpdateRequest) GetID() string { return c.ID } +// #region class-body-c1apistepupv1stepupproviderserviceupdaterequest +// #endregion class-body-c1apistepupv1stepupproviderserviceupdaterequest + type C1APIStepupV1StepUpProviderServiceUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIStepupV1StepUpProviderServiceUpdateResponse) GetUpdateStepUpProvid } return c.UpdateStepUpProviderResponse } + +// #region class-body-c1apistepupv1stepupproviderserviceupdateresponse +// #endregion class-body-c1apistepupv1stepupproviderserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceupdatesecret.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceupdatesecret.go index 2f5d3bf9..c1e552ce 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceupdatesecret.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepupproviderserviceupdatesecret.go @@ -26,6 +26,9 @@ func (c *C1APIStepupV1StepUpProviderServiceUpdateSecretRequest) GetID() string { return c.ID } +// #region class-body-c1apistepupv1stepupproviderserviceupdatesecretrequest +// #endregion class-body-c1apistepupv1stepupproviderserviceupdatesecretrequest + type C1APIStepupV1StepUpProviderServiceUpdateSecretResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIStepupV1StepUpProviderServiceUpdateSecretResponse) GetUpdateStepUp } return c.UpdateStepUpProviderSecretResponse } + +// #region class-body-c1apistepupv1stepupproviderserviceupdatesecretresponse +// #endregion class-body-c1apistepupv1stepupproviderserviceupdatesecretresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepuptransactionserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepuptransactionserviceget.go index dfffd2da..0e40da98 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepuptransactionserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepuptransactionserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIStepupV1StepUpTransactionServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apistepupv1stepuptransactionservicegetrequest +// #endregion class-body-c1apistepupv1stepuptransactionservicegetrequest + type C1APIStepupV1StepUpTransactionServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIStepupV1StepUpTransactionServiceGetResponse) GetRawResponse() *htt } return c.RawResponse } + +// #region class-body-c1apistepupv1stepuptransactionservicegetresponse +// #endregion class-body-c1apistepupv1stepuptransactionservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepuptransactionservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepuptransactionservicesearch.go index d530f1f6..d9d8e15e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepuptransactionservicesearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apistepupv1stepuptransactionservicesearch.go @@ -45,3 +45,6 @@ func (c *C1APIStepupV1StepUpTransactionServiceSearchResponse) GetRawResponse() * } return c.RawResponse } + +// #region class-body-c1apistepupv1stepuptransactionservicesearchresponse +// #endregion class-body-c1apistepupv1stepuptransactionservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicecreate.go index d002ea6c..fa9a7d36 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicecreate.go @@ -45,3 +45,6 @@ func (c *C1APISystemlogV1ExportServiceCreateResponse) GetRawResponse() *http.Res } return c.RawResponse } + +// #region class-body-c1apisystemlogv1exportservicecreateresponse +// #endregion class-body-c1apisystemlogv1exportservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicedelete.go index 5489c0c9..a69342bd 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicedelete.go @@ -26,6 +26,9 @@ func (c *C1APISystemlogV1ExportServiceDeleteRequest) GetExportID() string { return c.ExportID } +// #region class-body-c1apisystemlogv1exportservicedeleterequest +// #endregion class-body-c1apisystemlogv1exportservicedeleterequest + type C1APISystemlogV1ExportServiceDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APISystemlogV1ExportServiceDeleteResponse) GetRawResponse() *http.Res } return c.RawResponse } + +// #region class-body-c1apisystemlogv1exportservicedeleteresponse +// #endregion class-body-c1apisystemlogv1exportservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportserviceget.go index 1935ad4b..d97327b1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportserviceget.go @@ -18,6 +18,9 @@ func (c *C1APISystemlogV1ExportServiceGetRequest) GetExportID() string { return c.ExportID } +// #region class-body-c1apisystemlogv1exportservicegetrequest +// #endregion class-body-c1apisystemlogv1exportservicegetrequest + type C1APISystemlogV1ExportServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APISystemlogV1ExportServiceGetResponse) GetRawResponse() *http.Respon } return c.RawResponse } + +// #region class-body-c1apisystemlogv1exportservicegetresponse +// #endregion class-body-c1apisystemlogv1exportservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicelist.go index 1e07de9a..7c2860f8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicelist.go @@ -26,6 +26,9 @@ func (c *C1APISystemlogV1ExportServiceListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apisystemlogv1exportservicelistrequest +// #endregion class-body-c1apisystemlogv1exportservicelistrequest + type C1APISystemlogV1ExportServiceListResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APISystemlogV1ExportServiceListResponse) GetRawResponse() *http.Respo } return c.RawResponse } + +// #region class-body-c1apisystemlogv1exportservicelistresponse +// #endregion class-body-c1apisystemlogv1exportservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicelistevents.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicelistevents.go index 6d09333b..405f9586 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicelistevents.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportservicelistevents.go @@ -26,10 +26,13 @@ func (c *C1APISystemlogV1ExportServiceListEventsRequest) GetExportID() string { return c.ExportID } +// #region class-body-c1apisystemlogv1exportservicelisteventsrequest +// #endregion class-body-c1apisystemlogv1exportservicelisteventsrequest + type C1APISystemlogV1ExportServiceListEventsResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // ExportServiceListEventsResponse is the response containing audit events for an export. ExportServiceListEventsResponse *shared.ExportServiceListEventsResponse // HTTP response status code for this operation StatusCode int @@ -64,3 +67,6 @@ func (c *C1APISystemlogV1ExportServiceListEventsResponse) GetRawResponse() *http } return c.RawResponse } + +// #region class-body-c1apisystemlogv1exportservicelisteventsresponse +// #endregion class-body-c1apisystemlogv1exportservicelisteventsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportserviceupdate.go index 5110abaa..e43baa0e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportserviceupdate.go @@ -26,6 +26,9 @@ func (c *C1APISystemlogV1ExportServiceUpdateRequest) GetExportID() string { return c.ExportID } +// #region class-body-c1apisystemlogv1exportserviceupdaterequest +// #endregion class-body-c1apisystemlogv1exportserviceupdaterequest + type C1APISystemlogV1ExportServiceUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APISystemlogV1ExportServiceUpdateResponse) GetRawResponse() *http.Res } return c.RawResponse } + +// #region class-body-c1apisystemlogv1exportserviceupdateresponse +// #endregion class-body-c1apisystemlogv1exportserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportssearchservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportssearchservicesearch.go index 096f43ef..7a92a665 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportssearchservicesearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1exportssearchservicesearch.go @@ -10,7 +10,7 @@ import ( type C1APISystemlogV1ExportsSearchServiceSearchResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // ExportsSearchServiceSearchResponse is the response for searching system log exports. ExportsSearchServiceSearchResponse *shared.ExportsSearchServiceSearchResponse // HTTP response status code for this operation StatusCode int @@ -45,3 +45,6 @@ func (c *C1APISystemlogV1ExportsSearchServiceSearchResponse) GetRawResponse() *h } return c.RawResponse } + +// #region class-body-c1apisystemlogv1exportssearchservicesearchresponse +// #endregion class-body-c1apisystemlogv1exportssearchservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1systemlogservicelistevents.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1systemlogservicelistevents.go index 9282ff9c..d4967563 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1systemlogservicelistevents.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apisystemlogv1systemlogservicelistevents.go @@ -45,3 +45,6 @@ func (c *C1APISystemlogV1SystemLogServiceListEventsResponse) GetSystemLogService } return c.SystemLogServiceListEventsResponse } + +// #region class-body-c1apisystemlogv1systemlogservicelisteventsresponse +// #endregion class-body-c1apisystemlogv1systemlogservicelisteventsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceapprove.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceapprove.go index 028c8e36..232b900d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceapprove.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceapprove.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceApproveRequest) GetTaskID() string { return c.TaskID } +// #region class-body-c1apitaskv1taskactionsserviceapproverequest +// #endregion class-body-c1apitaskv1taskactionsserviceapproverequest + type C1APITaskV1TaskActionsServiceApproveResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceApproveResponse) GetTaskActionsServiceAppr } return c.TaskActionsServiceApproveResponse } + +// #region class-body-c1apitaskv1taskactionsserviceapproveresponse +// #endregion class-body-c1apitaskv1taskactionsserviceapproveresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceapprovewithstepup.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceapprovewithstepup.go index f385e87d..f205303a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceapprovewithstepup.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceapprovewithstepup.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceApproveWithStepUpRequest) GetTaskID() stri return c.TaskID } +// #region class-body-c1apitaskv1taskactionsserviceapprovewithstepuprequest +// #endregion class-body-c1apitaskv1taskactionsserviceapprovewithstepuprequest + type C1APITaskV1TaskActionsServiceApproveWithStepUpResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceApproveWithStepUpResponse) GetTaskActionsS } return c.TaskActionsServiceApproveWithStepUpResponse } + +// #region class-body-c1apitaskv1taskactionsserviceapprovewithstepupresponse +// #endregion class-body-c1apitaskv1taskactionsserviceapprovewithstepupresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceclose.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceclose.go index e889c382..be646aa9 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceclose.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceclose.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceCloseRequest) GetTaskID() string { return c.TaskID } +// #region class-body-c1apitaskv1taskactionsservicecloserequest +// #endregion class-body-c1apitaskv1taskactionsservicecloserequest + type C1APITaskV1TaskActionsServiceCloseResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceCloseResponse) GetTaskActionsServiceCloseR } return c.TaskActionsServiceCloseResponse } + +// #region class-body-c1apitaskv1taskactionsservicecloseresponse +// #endregion class-body-c1apitaskv1taskactionsservicecloseresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicecomment.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicecomment.go index aa0bcd90..8896ae47 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicecomment.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicecomment.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceCommentRequest) GetTaskID() string { return c.TaskID } +// #region class-body-c1apitaskv1taskactionsservicecommentrequest +// #endregion class-body-c1apitaskv1taskactionsservicecommentrequest + type C1APITaskV1TaskActionsServiceCommentResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceCommentResponse) GetTaskActionsServiceComm } return c.TaskActionsServiceCommentResponse } + +// #region class-body-c1apitaskv1taskactionsservicecommentresponse +// #endregion class-body-c1apitaskv1taskactionsservicecommentresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicedeny.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicedeny.go index 465be50b..8da7436f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicedeny.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicedeny.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceDenyRequest) GetTaskID() string { return c.TaskID } +// #region class-body-c1apitaskv1taskactionsservicedenyrequest +// #endregion class-body-c1apitaskv1taskactionsservicedenyrequest + type C1APITaskV1TaskActionsServiceDenyResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceDenyResponse) GetTaskActionsServiceDenyRes } return c.TaskActionsServiceDenyResponse } + +// #region class-body-c1apitaskv1taskactionsservicedenyresponse +// #endregion class-body-c1apitaskv1taskactionsservicedenyresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceescalatetoemergencyaccess.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceescalatetoemergencyaccess.go index 23ae2191..2b7d4cb0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceescalatetoemergencyaccess.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceescalatetoemergencyaccess.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceEscalateToEmergencyAccessRequest) GetTaskI return c.TaskID } +// #region class-body-c1apitaskv1taskactionsserviceescalatetoemergencyaccessrequest +// #endregion class-body-c1apitaskv1taskactionsserviceescalatetoemergencyaccessrequest + type C1APITaskV1TaskActionsServiceEscalateToEmergencyAccessResponse struct { // HTTP response content type for this operation ContentType string @@ -33,7 +36,7 @@ type C1APITaskV1TaskActionsServiceEscalateToEmergencyAccessResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // A generic response for task action endpoints, containing the updated task and the ID of the action that was created. TaskServiceActionResponse *shared.TaskServiceActionResponse } @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceEscalateToEmergencyAccessResponse) GetTask } return c.TaskServiceActionResponse } + +// #region class-body-c1apitaskv1taskactionsserviceescalatetoemergencyaccessresponse +// #endregion class-body-c1apitaskv1taskactionsserviceescalatetoemergencyaccessresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicehardreset.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicehardreset.go index f207a362..3fd0c41c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicehardreset.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicehardreset.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceHardResetRequest) GetTaskID() string { return c.TaskID } +// #region class-body-c1apitaskv1taskactionsservicehardresetrequest +// #endregion class-body-c1apitaskv1taskactionsservicehardresetrequest + type C1APITaskV1TaskActionsServiceHardResetResponse struct { // HTTP response content type for this operation ContentType string @@ -33,7 +36,7 @@ type C1APITaskV1TaskActionsServiceHardResetResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // The TaskActionsServiceHardResetResponse returns the updated task after a hard reset. TaskActionsServiceHardResetResponse *shared.TaskActionsServiceHardResetResponse } @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceHardResetResponse) GetTaskActionsServiceHa } return c.TaskActionsServiceHardResetResponse } + +// #region class-body-c1apitaskv1taskactionsservicehardresetresponse +// #endregion class-body-c1apitaskv1taskactionsservicehardresetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceprocessnow.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceprocessnow.go index 56120b5f..de5f15d2 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceprocessnow.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceprocessnow.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceProcessNowRequest) GetTaskID() string { return c.TaskID } +// #region class-body-c1apitaskv1taskactionsserviceprocessnowrequest +// #endregion class-body-c1apitaskv1taskactionsserviceprocessnowrequest + type C1APITaskV1TaskActionsServiceProcessNowResponse struct { // HTTP response content type for this operation ContentType string @@ -33,7 +36,7 @@ type C1APITaskV1TaskActionsServiceProcessNowResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // The TaskActionsServiceProcessNowResponse returns the task view after triggering immediate processing. TaskActionsServiceProcessNowResponse *shared.TaskActionsServiceProcessNowResponse } @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceProcessNowResponse) GetTaskActionsServiceP } return c.TaskActionsServiceProcessNowResponse } + +// #region class-body-c1apitaskv1taskactionsserviceprocessnowresponse +// #endregion class-body-c1apitaskv1taskactionsserviceprocessnowresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicereassign.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicereassign.go index d859a72f..07b8db18 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicereassign.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicereassign.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceReassignRequest) GetTaskID() string { return c.TaskID } +// #region class-body-c1apitaskv1taskactionsservicereassignrequest +// #endregion class-body-c1apitaskv1taskactionsservicereassignrequest + type C1APITaskV1TaskActionsServiceReassignResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceReassignResponse) GetTaskActionsServiceRea } return c.TaskActionsServiceReassignResponse } + +// #region class-body-c1apitaskv1taskactionsservicereassignresponse +// #endregion class-body-c1apitaskv1taskactionsservicereassignresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicerestart.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicerestart.go index 3fad13c1..fce669a1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicerestart.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsservicerestart.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceRestartRequest) GetTaskID() string { return c.TaskID } +// #region class-body-c1apitaskv1taskactionsservicerestartrequest +// #endregion class-body-c1apitaskv1taskactionsservicerestartrequest + type C1APITaskV1TaskActionsServiceRestartResponse struct { // HTTP response content type for this operation ContentType string @@ -33,7 +36,7 @@ type C1APITaskV1TaskActionsServiceRestartResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // The TaskActionsServiceRestartResponse returns the updated task after restarting. TaskActionsServiceRestartResponse *shared.TaskActionsServiceRestartResponse } @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceRestartResponse) GetTaskActionsServiceRest } return c.TaskActionsServiceRestartResponse } + +// #region class-body-c1apitaskv1taskactionsservicerestartresponse +// #endregion class-body-c1apitaskv1taskactionsservicerestartresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceskipstep.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceskipstep.go index e5e0bb81..f842f37e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceskipstep.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceskipstep.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceSkipStepRequest) GetTaskID() string { return c.TaskID } +// #region class-body-c1apitaskv1taskactionsserviceskipsteprequest +// #endregion class-body-c1apitaskv1taskactionsserviceskipsteprequest + type C1APITaskV1TaskActionsServiceSkipStepResponse struct { // HTTP response content type for this operation ContentType string @@ -33,7 +36,7 @@ type C1APITaskV1TaskActionsServiceSkipStepResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // A generic response for task action endpoints, containing the updated task and the ID of the action that was created. TaskServiceActionResponse *shared.TaskServiceActionResponse } @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceSkipStepResponse) GetTaskServiceActionResp } return c.TaskServiceActionResponse } + +// #region class-body-c1apitaskv1taskactionsserviceskipstepresponse +// #endregion class-body-c1apitaskv1taskactionsserviceskipstepresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceupdategrantduration.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceupdategrantduration.go index 0530db32..d561623e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceupdategrantduration.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceupdategrantduration.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceUpdateGrantDurationRequest) GetTaskID() st return c.TaskID } +// #region class-body-c1apitaskv1taskactionsserviceupdategrantdurationrequest +// #endregion class-body-c1apitaskv1taskactionsserviceupdategrantdurationrequest + type C1APITaskV1TaskActionsServiceUpdateGrantDurationResponse struct { // HTTP response content type for this operation ContentType string @@ -33,7 +36,7 @@ type C1APITaskV1TaskActionsServiceUpdateGrantDurationResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // A generic response for task action endpoints, containing the updated task and the ID of the action that was created. TaskServiceActionResponse *shared.TaskServiceActionResponse } @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceUpdateGrantDurationResponse) GetTaskServic } return c.TaskServiceActionResponse } + +// #region class-body-c1apitaskv1taskactionsserviceupdategrantdurationresponse +// #endregion class-body-c1apitaskv1taskactionsserviceupdategrantdurationresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceupdaterequestdata.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceupdaterequestdata.go index 13032df4..503fa1e4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceupdaterequestdata.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskactionsserviceupdaterequestdata.go @@ -26,6 +26,9 @@ func (c *C1APITaskV1TaskActionsServiceUpdateRequestDataRequest) GetTaskID() stri return c.TaskID } +// #region class-body-c1apitaskv1taskactionsserviceupdaterequestdatarequest +// #endregion class-body-c1apitaskv1taskactionsserviceupdaterequestdatarequest + type C1APITaskV1TaskActionsServiceUpdateRequestDataResponse struct { // HTTP response content type for this operation ContentType string @@ -33,7 +36,7 @@ type C1APITaskV1TaskActionsServiceUpdateRequestDataResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // A generic response for task action endpoints, containing the updated task and the ID of the action that was created. TaskServiceActionResponse *shared.TaskServiceActionResponse } @@ -64,3 +67,6 @@ func (c *C1APITaskV1TaskActionsServiceUpdateRequestDataResponse) GetTaskServiceA } return c.TaskServiceActionResponse } + +// #region class-body-c1apitaskv1taskactionsserviceupdaterequestdataresponse +// #endregion class-body-c1apitaskv1taskactionsserviceupdaterequestdataresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskauditlist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskauditlist.go index db30aaba..0e0d18d8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskauditlist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskauditlist.go @@ -45,3 +45,6 @@ func (c *C1APITaskV1TaskAuditListResponse) GetTaskAuditListResponse() *shared.Ta } return c.TaskAuditListResponse } + +// #region class-body-c1apitaskv1taskauditlistresponse +// #endregion class-body-c1apitaskv1taskauditlistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1tasksearchservicesearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1tasksearchservicesearch.go index 383faa18..5fdfa0ec 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1tasksearchservicesearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1tasksearchservicesearch.go @@ -45,3 +45,6 @@ func (c *C1APITaskV1TaskSearchServiceSearchResponse) GetTaskSearchResponse() *sh } return c.TaskSearchResponse } + +// #region class-body-c1apitaskv1tasksearchservicesearchresponse +// #endregion class-body-c1apitaskv1tasksearchservicesearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreategranttask.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreategranttask.go index d6355b99..5e01d8c0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreategranttask.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreategranttask.go @@ -45,3 +45,6 @@ func (c *C1APITaskV1TaskServiceCreateGrantTaskResponse) GetTaskServiceCreateGran } return c.TaskServiceCreateGrantResponse } + +// #region class-body-c1apitaskv1taskservicecreategranttaskresponse +// #endregion class-body-c1apitaskv1taskservicecreategranttaskresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreateoffboardingtask.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreateoffboardingtask.go index 2dd4580b..58bca3ed 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreateoffboardingtask.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreateoffboardingtask.go @@ -14,7 +14,7 @@ type C1APITaskV1TaskServiceCreateOffboardingTaskResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // The TaskServiceCreateOffboardingResponse returns the created offboarding task with optional expanded related objects. TaskServiceCreateOffboardingResponse *shared.TaskServiceCreateOffboardingResponse } @@ -45,3 +45,6 @@ func (c *C1APITaskV1TaskServiceCreateOffboardingTaskResponse) GetTaskServiceCrea } return c.TaskServiceCreateOffboardingResponse } + +// #region class-body-c1apitaskv1taskservicecreateoffboardingtaskresponse +// #endregion class-body-c1apitaskv1taskservicecreateoffboardingtaskresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreaterevoketask.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreaterevoketask.go index 94c345c9..6aade56c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreaterevoketask.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskservicecreaterevoketask.go @@ -45,3 +45,6 @@ func (c *C1APITaskV1TaskServiceCreateRevokeTaskResponse) GetTaskServiceCreateRev } return c.TaskServiceCreateRevokeResponse } + +// #region class-body-c1apitaskv1taskservicecreaterevoketaskresponse +// #endregion class-body-c1apitaskv1taskservicecreaterevoketaskresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskserviceget.go index 92e36e4e..4cbbd079 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apitaskv1taskserviceget.go @@ -18,6 +18,9 @@ func (c *C1APITaskV1TaskServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apitaskv1taskservicegetrequest +// #endregion class-body-c1apitaskv1taskservicegetrequest + type C1APITaskV1TaskServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APITaskV1TaskServiceGetResponse) GetTaskServiceGetResponse() *shared. } return c.TaskServiceGetResponse } + +// #region class-body-c1apitaskv1taskservicegetresponse +// #endregion class-body-c1apitaskv1taskservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1usersearchsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1usersearchsearch.go index 4d01270d..d4551958 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1usersearchsearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1usersearchsearch.go @@ -47,3 +47,6 @@ func (c *C1APIUserV1UserSearchSearchResponse) GetRawResponse() *http.Response { } return c.RawResponse } + +// #region class-body-c1apiuserv1usersearchsearchresponse +// #endregion class-body-c1apiuserv1usersearchsearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userserviceget.go index 3de1f2d2..e0d2aaa0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIUserV1UserServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apiuserv1userservicegetrequest +// #endregion class-body-c1apiuserv1userservicegetrequest + type C1APIUserV1UserServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIUserV1UserServiceGetResponse) GetUserServiceGetResponse() *shared. } return c.UserServiceGetResponse } + +// #region class-body-c1apiuserv1userservicegetresponse +// #endregion class-body-c1apiuserv1userservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicegetuserprofiletypes.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicegetuserprofiletypes.go index 9e4d2a4e..6b8acf22 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicegetuserprofiletypes.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicegetuserprofiletypes.go @@ -18,10 +18,13 @@ func (c *C1APIUserV1UserServiceGetUserProfileTypesRequest) GetUserID() string { return c.UserID } +// #region class-body-c1apiuserv1userservicegetuserprofiletypesrequest +// #endregion class-body-c1apiuserv1userservicegetuserprofiletypesrequest + type C1APIUserV1UserServiceGetUserProfileTypesResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // GetUserProfileTypesResponse is the response containing the profile types for a user. GetUserProfileTypesResponse *shared.GetUserProfileTypesResponse // HTTP response status code for this operation StatusCode int @@ -56,3 +59,6 @@ func (c *C1APIUserV1UserServiceGetUserProfileTypesResponse) GetRawResponse() *ht } return c.RawResponse } + +// #region class-body-c1apiuserv1userservicegetuserprofiletypesresponse +// #endregion class-body-c1apiuserv1userservicegetuserprofiletypesresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicelist.go index f1875043..ab731752 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicelist.go @@ -26,6 +26,9 @@ func (c *C1APIUserV1UserServiceListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiuserv1userservicelistrequest +// #endregion class-body-c1apiuserv1userservicelistrequest + type C1APIUserV1UserServiceListResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIUserV1UserServiceListResponse) GetUserServiceListResponse() *share } return c.UserServiceListResponse } + +// #region class-body-c1apiuserv1userservicelistresponse +// #endregion class-body-c1apiuserv1userservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicesetexpiringuserdelegationbindingbyadmin.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicesetexpiringuserdelegationbindingbyadmin.go index 290ed124..7cbc16ca 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicesetexpiringuserdelegationbindingbyadmin.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiuserv1userservicesetexpiringuserdelegationbindingbyadmin.go @@ -26,10 +26,13 @@ func (c *C1APIUserV1UserServiceSetExpiringUserDelegationBindingByAdminRequest) G return c.UserID } +// #region class-body-c1apiuserv1userservicesetexpiringuserdelegationbindingbyadminrequest +// #endregion class-body-c1apiuserv1userservicesetexpiringuserdelegationbindingbyadminrequest + type C1APIUserV1UserServiceSetExpiringUserDelegationBindingByAdminResponse struct { // HTTP response content type for this operation ContentType string - // Successful response + // SetExpiringUserDelegationBindingByAdminResponse is the response containing the created or updated delegation binding. SetExpiringUserDelegationBindingByAdminResponse *shared.SetExpiringUserDelegationBindingByAdminResponse // HTTP response status code for this operation StatusCode int @@ -64,3 +67,6 @@ func (c *C1APIUserV1UserServiceSetExpiringUserDelegationBindingByAdminResponse) } return c.RawResponse } + +// #region class-body-c1apiuserv1userservicesetexpiringuserdelegationbindingbyadminresponse +// #endregion class-body-c1apiuserv1userservicesetexpiringuserdelegationbindingbyadminresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultservicecreate.go index 798f0cfb..b94fa315 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultservicecreate.go @@ -14,7 +14,7 @@ type C1APIVaultV1VaultServiceCreateResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // VaultServiceCreateResponse is the response message for creating a new vault. VaultServiceCreateResponse *shared.VaultServiceCreateResponse } @@ -45,3 +45,6 @@ func (c *C1APIVaultV1VaultServiceCreateResponse) GetVaultServiceCreateResponse() } return c.VaultServiceCreateResponse } + +// #region class-body-c1apivaultv1vaultservicecreateresponse +// #endregion class-body-c1apivaultv1vaultservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultservicedelete.go index 8e0b1737..93234bbb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultservicedelete.go @@ -26,6 +26,9 @@ func (c *C1APIVaultV1VaultServiceDeleteRequest) GetID() string { return c.ID } +// #region class-body-c1apivaultv1vaultservicedeleterequest +// #endregion class-body-c1apivaultv1vaultservicedeleterequest + type C1APIVaultV1VaultServiceDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIVaultV1VaultServiceDeleteResponse) GetVaultServiceDeleteResponse() } return c.VaultServiceDeleteResponse } + +// #region class-body-c1apivaultv1vaultservicedeleteresponse +// #endregion class-body-c1apivaultv1vaultservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultserviceget.go index ad2341c6..43720f15 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIVaultV1VaultServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apivaultv1vaultservicegetrequest +// #endregion class-body-c1apivaultv1vaultservicegetrequest + type C1APIVaultV1VaultServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -25,7 +28,7 @@ type C1APIVaultV1VaultServiceGetResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // VaultServiceGetResponse is the response message containing the requested vault. VaultServiceGetResponse *shared.VaultServiceGetResponse } @@ -56,3 +59,6 @@ func (c *C1APIVaultV1VaultServiceGetResponse) GetVaultServiceGetResponse() *shar } return c.VaultServiceGetResponse } + +// #region class-body-c1apivaultv1vaultservicegetresponse +// #endregion class-body-c1apivaultv1vaultservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultserviceupdate.go index 80e1a365..dee5dce2 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apivaultv1vaultserviceupdate.go @@ -26,6 +26,9 @@ func (c *C1APIVaultV1VaultServiceUpdateRequest) GetID() string { return c.ID } +// #region class-body-c1apivaultv1vaultserviceupdaterequest +// #endregion class-body-c1apivaultv1vaultserviceupdaterequest + type C1APIVaultV1VaultServiceUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -33,7 +36,7 @@ type C1APIVaultV1VaultServiceUpdateResponse struct { StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response - // Successful response + // VaultServiceUpdateResponse is the response message containing the updated vault. VaultServiceUpdateResponse *shared.VaultServiceUpdateResponse } @@ -64,3 +67,6 @@ func (c *C1APIVaultV1VaultServiceUpdateResponse) GetVaultServiceUpdateResponse() } return c.VaultServiceUpdateResponse } + +// #region class-body-c1apivaultv1vaultserviceupdateresponse +// #endregion class-body-c1apivaultv1vaultserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhookssearchsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhookssearchsearch.go index 0b953987..b3bb1af3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhookssearchsearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhookssearchsearch.go @@ -47,3 +47,6 @@ func (c *C1APIWebhooksV1WebhooksSearchSearchResponse) GetWebhooksSearchResponse( } return c.WebhooksSearchResponse } + +// #region class-body-c1apiwebhooksv1webhookssearchsearchresponse +// #endregion class-body-c1apiwebhooksv1webhookssearchsearchresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicecreate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicecreate.go index d2dcf760..1fed7103 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicecreate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicecreate.go @@ -45,3 +45,6 @@ func (c *C1APIWebhooksV1WebhooksServiceCreateResponse) GetWebhooksServiceCreateR } return c.WebhooksServiceCreateResponse } + +// #region class-body-c1apiwebhooksv1webhooksservicecreateresponse +// #endregion class-body-c1apiwebhooksv1webhooksservicecreateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicedelete.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicedelete.go index 61ec5a63..191878a2 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicedelete.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicedelete.go @@ -26,6 +26,9 @@ func (c *C1APIWebhooksV1WebhooksServiceDeleteRequest) GetID() string { return c.ID } +// #region class-body-c1apiwebhooksv1webhooksservicedeleterequest +// #endregion class-body-c1apiwebhooksv1webhooksservicedeleterequest + type C1APIWebhooksV1WebhooksServiceDeleteResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIWebhooksV1WebhooksServiceDeleteResponse) GetWebhooksServiceDeleteR } return c.WebhooksServiceDeleteResponse } + +// #region class-body-c1apiwebhooksv1webhooksservicedeleteresponse +// #endregion class-body-c1apiwebhooksv1webhooksservicedeleteresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksserviceget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksserviceget.go index 62fbf438..e715e838 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksserviceget.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksserviceget.go @@ -18,6 +18,9 @@ func (c *C1APIWebhooksV1WebhooksServiceGetRequest) GetID() string { return c.ID } +// #region class-body-c1apiwebhooksv1webhooksservicegetrequest +// #endregion class-body-c1apiwebhooksv1webhooksservicegetrequest + type C1APIWebhooksV1WebhooksServiceGetResponse struct { // HTTP response content type for this operation ContentType string @@ -56,3 +59,6 @@ func (c *C1APIWebhooksV1WebhooksServiceGetResponse) GetWebhooksServiceGetRespons } return c.WebhooksServiceGetResponse } + +// #region class-body-c1apiwebhooksv1webhooksservicegetresponse +// #endregion class-body-c1apiwebhooksv1webhooksservicegetresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicelist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicelist.go index 0ad4a1bc..0858084c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicelist.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicelist.go @@ -26,6 +26,9 @@ func (c *C1APIWebhooksV1WebhooksServiceListRequest) GetPageToken() *string { return c.PageToken } +// #region class-body-c1apiwebhooksv1webhooksservicelistrequest +// #endregion class-body-c1apiwebhooksv1webhooksservicelistrequest + type C1APIWebhooksV1WebhooksServiceListResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIWebhooksV1WebhooksServiceListResponse) GetWebhooksServiceListRespo } return c.WebhooksServiceListResponse } + +// #region class-body-c1apiwebhooksv1webhooksservicelistresponse +// #endregion class-body-c1apiwebhooksv1webhooksservicelistresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicetest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicetest.go index 2cfe6aea..f1be4715 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicetest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksservicetest.go @@ -26,6 +26,9 @@ func (c *C1APIWebhooksV1WebhooksServiceTestRequest) GetID() string { return c.ID } +// #region class-body-c1apiwebhooksv1webhooksservicetestrequest +// #endregion class-body-c1apiwebhooksv1webhooksservicetestrequest + type C1APIWebhooksV1WebhooksServiceTestResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIWebhooksV1WebhooksServiceTestResponse) GetWebhooksServiceTestRespo } return c.WebhooksServiceTestResponse } + +// #region class-body-c1apiwebhooksv1webhooksservicetestresponse +// #endregion class-body-c1apiwebhooksv1webhooksservicetestresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksserviceupdate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksserviceupdate.go index 7c9e61b1..a16d21f8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksserviceupdate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiwebhooksv1webhooksserviceupdate.go @@ -26,6 +26,9 @@ func (c *C1APIWebhooksV1WebhooksServiceUpdateRequest) GetID() string { return c.ID } +// #region class-body-c1apiwebhooksv1webhooksserviceupdaterequest +// #endregion class-body-c1apiwebhooksv1webhooksserviceupdaterequest + type C1APIWebhooksV1WebhooksServiceUpdateResponse struct { // HTTP response content type for this operation ContentType string @@ -64,3 +67,6 @@ func (c *C1APIWebhooksV1WebhooksServiceUpdateResponse) GetWebhooksServiceUpdateR } return c.WebhooksServiceUpdateResponse } + +// #region class-body-c1apiwebhooksv1webhooksserviceupdateresponse +// #endregion class-body-c1apiwebhooksv1webhooksserviceupdateresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicecreateprovider.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicecreateprovider.go new file mode 100644 index 00000000..a7fc8cad --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicecreateprovider.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceCreateProviderResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceCreateProviderResponse *shared.WorkloadFederationServiceCreateProviderResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceCreateProviderResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceCreateProviderResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceCreateProviderResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceCreateProviderResponse) GetWorkloadFederationServiceCreateProviderResponse() *shared.WorkloadFederationServiceCreateProviderResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceCreateProviderResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicecreateproviderresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicecreateproviderresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicecreatetrust.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicecreatetrust.go new file mode 100644 index 00000000..e5325795 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicecreatetrust.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustRequest struct { + WorkloadFederationServiceCreateTrustRequest *shared.WorkloadFederationServiceCreateTrustRequest `request:"mediaType=application/json"` + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustRequest) GetWorkloadFederationServiceCreateTrustRequest() *shared.WorkloadFederationServiceCreateTrustRequest { + if c == nil { + return nil + } + return c.WorkloadFederationServiceCreateTrustRequest +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicecreatetrustrequest +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicecreatetrustrequest + +type C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceCreateTrustResponse *shared.WorkloadFederationServiceCreateTrustResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustResponse) GetWorkloadFederationServiceCreateTrustResponse() *shared.WorkloadFederationServiceCreateTrustResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceCreateTrustResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicecreatetrustresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicecreatetrustresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicedeleteprovider.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicedeleteprovider.go new file mode 100644 index 00000000..fd4ab26b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicedeleteprovider.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderRequest struct { + WorkloadFederationServiceDeleteProviderRequest *shared.WorkloadFederationServiceDeleteProviderRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderRequest) GetWorkloadFederationServiceDeleteProviderRequest() *shared.WorkloadFederationServiceDeleteProviderRequest { + if c == nil { + return nil + } + return c.WorkloadFederationServiceDeleteProviderRequest +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicedeleteproviderrequest +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicedeleteproviderrequest + +type C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceDeleteProviderResponse *shared.WorkloadFederationServiceDeleteProviderResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderResponse) GetWorkloadFederationServiceDeleteProviderResponse() *shared.WorkloadFederationServiceDeleteProviderResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceDeleteProviderResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicedeleteproviderresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicedeleteproviderresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicedeletetrust.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicedeletetrust.go new file mode 100644 index 00000000..aff0f524 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicedeletetrust.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustRequest struct { + WorkloadFederationServiceDeleteTrustRequest *shared.WorkloadFederationServiceDeleteTrustRequest `request:"mediaType=application/json"` + ClientID string `pathParam:"style=simple,explode=false,name=client_id"` + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustRequest) GetWorkloadFederationServiceDeleteTrustRequest() *shared.WorkloadFederationServiceDeleteTrustRequest { + if c == nil { + return nil + } + return c.WorkloadFederationServiceDeleteTrustRequest +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustRequest) GetClientID() string { + if c == nil { + return "" + } + return c.ClientID +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicedeletetrustrequest +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicedeletetrustrequest + +type C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceDeleteTrustResponse *shared.WorkloadFederationServiceDeleteTrustResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustResponse) GetWorkloadFederationServiceDeleteTrustResponse() *shared.WorkloadFederationServiceDeleteTrustResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceDeleteTrustResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicedeletetrustresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicedeletetrustresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicegetprovider.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicegetprovider.go new file mode 100644 index 00000000..efd8bc67 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicegetprovider.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceGetProviderRequest struct { + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetProviderRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicegetproviderrequest +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicegetproviderrequest + +type C1APIWorkloadFederationV1WorkloadFederationServiceGetProviderResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceGetProviderResponse *shared.WorkloadFederationServiceGetProviderResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetProviderResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetProviderResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetProviderResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetProviderResponse) GetWorkloadFederationServiceGetProviderResponse() *shared.WorkloadFederationServiceGetProviderResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceGetProviderResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicegetproviderresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicegetproviderresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicegettrust.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicegettrust.go new file mode 100644 index 00000000..488f148b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicegettrust.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustRequest struct { + ClientID string `pathParam:"style=simple,explode=false,name=client_id"` + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustRequest) GetClientID() string { + if c == nil { + return "" + } + return c.ClientID +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicegettrustrequest +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicegettrustrequest + +type C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceGetTrustResponse *shared.WorkloadFederationServiceGetTrustResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustResponse) GetWorkloadFederationServiceGetTrustResponse() *shared.WorkloadFederationServiceGetTrustResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceGetTrustResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicegettrustresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicegettrustresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicelistproviders.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicelistproviders.go new file mode 100644 index 00000000..0c4e31b0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicelistproviders.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceListProvidersResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceListProvidersResponse *shared.WorkloadFederationServiceListProvidersResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceListProvidersResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceListProvidersResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceListProvidersResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceListProvidersResponse) GetWorkloadFederationServiceListProvidersResponse() *shared.WorkloadFederationServiceListProvidersResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceListProvidersResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicelistprovidersresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicelistprovidersresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicelisttrusts.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicelisttrusts.go new file mode 100644 index 00000000..660abc38 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicelisttrusts.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceListTrustsRequest struct { + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceListTrustsRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicelisttrustsrequest +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicelisttrustsrequest + +type C1APIWorkloadFederationV1WorkloadFederationServiceListTrustsResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceListTrustsResponse *shared.WorkloadFederationServiceListTrustsResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceListTrustsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceListTrustsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceListTrustsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceListTrustsResponse) GetWorkloadFederationServiceListTrustsResponse() *shared.WorkloadFederationServiceListTrustsResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceListTrustsResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicelisttrustsresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicelisttrustsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicesearchtrusts.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicesearchtrusts.go new file mode 100644 index 00000000..70dccb27 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicesearchtrusts.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceSearchTrustsResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceSearchTrustsResponse *shared.WorkloadFederationServiceSearchTrustsResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceSearchTrustsResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceSearchTrustsResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceSearchTrustsResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceSearchTrustsResponse) GetWorkloadFederationServiceSearchTrustsResponse() *shared.WorkloadFederationServiceSearchTrustsResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceSearchTrustsResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicesearchtrustsresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicesearchtrustsresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicetestcel.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicetestcel.go new file mode 100644 index 00000000..89c5708a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicetestcel.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceTestCELResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceTestCELResponse *shared.WorkloadFederationServiceTestCELResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestCELResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestCELResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestCELResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestCELResponse) GetWorkloadFederationServiceTestCELResponse() *shared.WorkloadFederationServiceTestCELResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceTestCELResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicetestcelresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicetestcelresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicetesttoken.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicetesttoken.go new file mode 100644 index 00000000..2e4488f0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationservicetesttoken.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenRequest struct { + WorkloadFederationServiceTestTokenRequest *shared.WorkloadFederationServiceTestTokenRequest `request:"mediaType=application/json"` + ClientID string `pathParam:"style=simple,explode=false,name=client_id"` + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenRequest) GetWorkloadFederationServiceTestTokenRequest() *shared.WorkloadFederationServiceTestTokenRequest { + if c == nil { + return nil + } + return c.WorkloadFederationServiceTestTokenRequest +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenRequest) GetClientID() string { + if c == nil { + return "" + } + return c.ClientID +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicetesttokenrequest +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicetesttokenrequest + +type C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceTestTokenResponse *shared.WorkloadFederationServiceTestTokenResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenResponse) GetWorkloadFederationServiceTestTokenResponse() *shared.WorkloadFederationServiceTestTokenResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceTestTokenResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationservicetesttokenresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationservicetesttokenresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationserviceupdateprovider.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationserviceupdateprovider.go new file mode 100644 index 00000000..80e8c5ce --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationserviceupdateprovider.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderRequest struct { + WorkloadFederationServiceUpdateProviderRequest *shared.WorkloadFederationServiceUpdateProviderRequest `request:"mediaType=application/json"` + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderRequest) GetWorkloadFederationServiceUpdateProviderRequest() *shared.WorkloadFederationServiceUpdateProviderRequest { + if c == nil { + return nil + } + return c.WorkloadFederationServiceUpdateProviderRequest +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderRequest) GetID() string { + if c == nil { + return "" + } + return c.ID +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationserviceupdateproviderrequest +// #endregion class-body-c1apiworkloadfederationv1workloadfederationserviceupdateproviderrequest + +type C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceUpdateProviderResponse *shared.WorkloadFederationServiceUpdateProviderResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderResponse) GetWorkloadFederationServiceUpdateProviderResponse() *shared.WorkloadFederationServiceUpdateProviderResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceUpdateProviderResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationserviceupdateproviderresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationserviceupdateproviderresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationserviceupdatetrust.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationserviceupdatetrust.go new file mode 100644 index 00000000..32f2cefc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/operations/c1apiworkloadfederationv1workloadfederationserviceupdatetrust.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "net/http" +) + +type C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustRequest struct { + WorkloadFederationServiceUpdateTrustRequest *shared.WorkloadFederationServiceUpdateTrustRequest `request:"mediaType=application/json"` + ClientID string `pathParam:"style=simple,explode=false,name=client_id"` + ServicePrincipalID string `pathParam:"style=simple,explode=false,name=service_principal_id"` +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustRequest) GetWorkloadFederationServiceUpdateTrustRequest() *shared.WorkloadFederationServiceUpdateTrustRequest { + if c == nil { + return nil + } + return c.WorkloadFederationServiceUpdateTrustRequest +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustRequest) GetClientID() string { + if c == nil { + return "" + } + return c.ClientID +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustRequest) GetServicePrincipalID() string { + if c == nil { + return "" + } + return c.ServicePrincipalID +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationserviceupdatetrustrequest +// #endregion class-body-c1apiworkloadfederationv1workloadfederationserviceupdatetrustrequest + +type C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Successful response + WorkloadFederationServiceUpdateTrustResponse *shared.WorkloadFederationServiceUpdateTrustResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustResponse) GetWorkloadFederationServiceUpdateTrustResponse() *shared.WorkloadFederationServiceUpdateTrustResponse { + if c == nil { + return nil + } + return c.WorkloadFederationServiceUpdateTrustResponse +} + +// #region class-body-c1apiworkloadfederationv1workloadfederationserviceupdatetrustresponse +// #endregion class-body-c1apiworkloadfederationv1workloadfederationserviceupdatetrustresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiaction.go new file mode 100644 index 00000000..f5099aa5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiaction.go @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// A2UIAction - Action represents what happens when a component is activated (e.g., button click). +// +// This message contains a oneof named action_type. Only a single field of the following list may be set at a time: +// - event +// - functionCall +type A2UIAction struct { + // FunctionCall represents a client-side function invocation. + FunctionCall *FunctionCall `json:"functionCall,omitempty"` + // ServerEvent triggers a server-side action. + ServerEvent *ServerEvent `json:"event,omitempty"` +} + +func (a *A2UIAction) GetFunctionCall() *FunctionCall { + if a == nil { + return nil + } + return a.FunctionCall +} + +func (a *A2UIAction) GetServerEvent() *ServerEvent { + if a == nil { + return nil + } + return a.ServerEvent +} + +// #region class-body-a2uiaction +// #endregion class-body-a2uiaction diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uicomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uicomponent.go new file mode 100644 index 00000000..11da2c37 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uicomponent.go @@ -0,0 +1,287 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// A2UIComponent - typed discriminated union for UI components. +// +// Uses oneof for proper TypeScript discrimination. +// +// This message contains a oneof named component. Only a single field of the following list may be set at a time: +// - text +// - textField +// - checkBox +// - choicePicker +// - dateTimeInput +// - slider +// - progressBar +// - button +// - row +// - column +// - card +// - divider +// - c1StatusIndicator +// - c1CodeBlock +// - c1ResourcePicker +// - c1DurationPicker +// - c1TodoList +// - c1SlackNotifications +// - c1MsTeamsNotifications +// - c1ConnectorSyncProgress +// - c1ConnectorConfigForm +// - c1OnboardingWelcome +// - c1OnboardingPlan +// - c1ConnectorSyncDetail +type A2UIComponent struct { + // ButtonComponent triggers actions. + ButtonComponent *ButtonComponent `json:"button,omitempty"` + // C1CodeBlockComponent displays code with syntax highlighting. + C1CodeBlockComponent *C1CodeBlockComponent `json:"c1CodeBlock,omitempty"` + // C1ConnectorConfigFormComponent renders the shared admin connector-settings form inside an + // A2UI surface. The frontend resolves the catalog, connector, and config schema itself from + // the ids below, keeping the configuration field values out of the agent's data model — the + // agent never receives API keys, passwords, or other secrets entered by the user. + C1ConnectorConfigFormComponent *C1ConnectorConfigFormComponent `json:"c1ConnectorConfigForm,omitempty"` + // C1ConnectorSyncDetailComponent renders the same live card as + // C1ConnectorSyncProgressComponent but pre-expanded with the phase checklist, + // live count tiles, and "What's happening" explainer visible from the first + // paint. Intended for message-body placement — emit one after each + // `submit_app_config` so the transcript carries a clear "this is what just + // happened" receipt for the connector the user just connected. + C1ConnectorSyncDetailComponent *C1ConnectorSyncDetailComponent `json:"c1ConnectorSyncDetail,omitempty"` + // C1ConnectorSyncProgressComponent renders a live connector sync status card. + // Subscribes to WebSocket updates for real-time sync lifecycle status. + C1ConnectorSyncProgressComponent *C1ConnectorSyncProgressComponent `json:"c1ConnectorSyncProgress,omitempty"` + // C1DurationPickerComponent is the access-request duration picker (presets + custom with number/unit). + // Value is duration in seconds bound to the given path. + C1DurationPickerComponent *C1DurationPickerComponent `json:"c1DurationPicker,omitempty"` + // C1MSTeamsNotificationsComponent renders a self-contained Microsoft Teams integration card. + // Fetches status and consent URLs via frontend API calls. + C1MSTeamsNotificationsComponent *C1MSTeamsNotificationsComponent `json:"c1MsTeamsNotifications,omitempty"` + // C1OnboardingPlanComponent renders a personalized onboarding plan with categorized steps. + // The agent dynamically populates categories and steps based on user intent and context. + C1OnboardingPlanComponent *C1OnboardingPlanComponent `json:"c1OnboardingPlan,omitempty"` + // C1OnboardingWelcomeComponent renders the onboarding welcome screen with org context and intent collection. + // Backend pre-populates recommended_catalog_id / recommended_display_name from detected IDP. + // Frontend detects auth backend via introspect for contextual UI text. + C1OnboardingWelcomeComponent *C1OnboardingWelcomeComponent `json:"c1OnboardingWelcome,omitempty"` + // C1ResourcePickerComponent allows selecting C1 resources. + C1ResourcePickerComponent *C1ResourcePickerComponent `json:"c1ResourcePicker,omitempty"` + // C1SlackNotificationsComponent renders a self-contained Slack integration card. + // Fetches status and OAuth URLs via frontend API calls. + C1SlackNotificationsComponent *C1SlackNotificationsComponent `json:"c1SlackNotifications,omitempty"` + // C1StatusIndicatorComponent shows agent progress status. + C1StatusIndicatorComponent *C1StatusIndicatorComponent `json:"c1StatusIndicator,omitempty"` + // C1TodoListComponent renders a phase/step checklist with progress tracking. + C1TodoListComponent *C1TodoListComponent `json:"c1TodoList,omitempty"` + // CardComponent is a container with styling. + CardComponent *CardComponent `json:"card,omitempty"` + // CheckBoxComponent is a boolean checkbox. + CheckBoxComponent *CheckBoxComponent `json:"checkBox,omitempty"` + // ChoicePickerComponent allows selection from predefined choices. + ChoicePickerComponent *ChoicePickerComponent `json:"choicePicker,omitempty"` + // ColumnComponent arranges children vertically. + ColumnComponent *ColumnComponent `json:"column,omitempty"` + // DateTimeInputComponent for date/time selection. + DateTimeInputComponent *DateTimeInputComponent `json:"dateTimeInput,omitempty"` + // DividerComponent is a visual separator. + DividerComponent *DividerComponent `json:"divider,omitempty"` + // ProgressBarComponent shows a read-only progress bar (label, value %, min/max). + ProgressBarComponent *ProgressBarComponent `json:"progressBar,omitempty"` + // RowComponent arranges children horizontally. + RowComponent *RowComponent `json:"row,omitempty"` + // SliderComponent is an interactive numeric range input (e.g. for forms). + SliderComponent *SliderComponent `json:"slider,omitempty"` + // TextComponent displays text content. + TextComponent *TextComponent `json:"text,omitempty"` + // TextFieldComponent is a text input field. + TextFieldComponent *TextFieldComponent `json:"textField,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + // The weight field. + Weight *int `json:"weight,omitempty"` +} + +func (a *A2UIComponent) GetButtonComponent() *ButtonComponent { + if a == nil { + return nil + } + return a.ButtonComponent +} + +func (a *A2UIComponent) GetC1CodeBlockComponent() *C1CodeBlockComponent { + if a == nil { + return nil + } + return a.C1CodeBlockComponent +} + +func (a *A2UIComponent) GetC1ConnectorConfigFormComponent() *C1ConnectorConfigFormComponent { + if a == nil { + return nil + } + return a.C1ConnectorConfigFormComponent +} + +func (a *A2UIComponent) GetC1ConnectorSyncDetailComponent() *C1ConnectorSyncDetailComponent { + if a == nil { + return nil + } + return a.C1ConnectorSyncDetailComponent +} + +func (a *A2UIComponent) GetC1ConnectorSyncProgressComponent() *C1ConnectorSyncProgressComponent { + if a == nil { + return nil + } + return a.C1ConnectorSyncProgressComponent +} + +func (a *A2UIComponent) GetC1DurationPickerComponent() *C1DurationPickerComponent { + if a == nil { + return nil + } + return a.C1DurationPickerComponent +} + +func (a *A2UIComponent) GetC1MSTeamsNotificationsComponent() *C1MSTeamsNotificationsComponent { + if a == nil { + return nil + } + return a.C1MSTeamsNotificationsComponent +} + +func (a *A2UIComponent) GetC1OnboardingPlanComponent() *C1OnboardingPlanComponent { + if a == nil { + return nil + } + return a.C1OnboardingPlanComponent +} + +func (a *A2UIComponent) GetC1OnboardingWelcomeComponent() *C1OnboardingWelcomeComponent { + if a == nil { + return nil + } + return a.C1OnboardingWelcomeComponent +} + +func (a *A2UIComponent) GetC1ResourcePickerComponent() *C1ResourcePickerComponent { + if a == nil { + return nil + } + return a.C1ResourcePickerComponent +} + +func (a *A2UIComponent) GetC1SlackNotificationsComponent() *C1SlackNotificationsComponent { + if a == nil { + return nil + } + return a.C1SlackNotificationsComponent +} + +func (a *A2UIComponent) GetC1StatusIndicatorComponent() *C1StatusIndicatorComponent { + if a == nil { + return nil + } + return a.C1StatusIndicatorComponent +} + +func (a *A2UIComponent) GetC1TodoListComponent() *C1TodoListComponent { + if a == nil { + return nil + } + return a.C1TodoListComponent +} + +func (a *A2UIComponent) GetCardComponent() *CardComponent { + if a == nil { + return nil + } + return a.CardComponent +} + +func (a *A2UIComponent) GetCheckBoxComponent() *CheckBoxComponent { + if a == nil { + return nil + } + return a.CheckBoxComponent +} + +func (a *A2UIComponent) GetChoicePickerComponent() *ChoicePickerComponent { + if a == nil { + return nil + } + return a.ChoicePickerComponent +} + +func (a *A2UIComponent) GetColumnComponent() *ColumnComponent { + if a == nil { + return nil + } + return a.ColumnComponent +} + +func (a *A2UIComponent) GetDateTimeInputComponent() *DateTimeInputComponent { + if a == nil { + return nil + } + return a.DateTimeInputComponent +} + +func (a *A2UIComponent) GetDividerComponent() *DividerComponent { + if a == nil { + return nil + } + return a.DividerComponent +} + +func (a *A2UIComponent) GetProgressBarComponent() *ProgressBarComponent { + if a == nil { + return nil + } + return a.ProgressBarComponent +} + +func (a *A2UIComponent) GetRowComponent() *RowComponent { + if a == nil { + return nil + } + return a.RowComponent +} + +func (a *A2UIComponent) GetSliderComponent() *SliderComponent { + if a == nil { + return nil + } + return a.SliderComponent +} + +func (a *A2UIComponent) GetTextComponent() *TextComponent { + if a == nil { + return nil + } + return a.TextComponent +} + +func (a *A2UIComponent) GetTextFieldComponent() *TextFieldComponent { + if a == nil { + return nil + } + return a.TextFieldComponent +} + +func (a *A2UIComponent) GetID() *string { + if a == nil { + return nil + } + return a.ID +} + +func (a *A2UIComponent) GetWeight() *int { + if a == nil { + return nil + } + return a.Weight +} + +// #region class-body-a2uicomponent +// #endregion class-body-a2uicomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicecreatesurfacefeedbackrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicecreatesurfacefeedbackrequest.go new file mode 100644 index 00000000..88cb86e5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicecreatesurfacefeedbackrequest.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// Sentiment - The sentiment field. +type Sentiment string + +const ( + SentimentA2UISurfaceFeedbackSentimentUnspecified Sentiment = "A2UI_SURFACE_FEEDBACK_SENTIMENT_UNSPECIFIED" + SentimentA2UISurfaceFeedbackSentimentPositive Sentiment = "A2UI_SURFACE_FEEDBACK_SENTIMENT_POSITIVE" + SentimentA2UISurfaceFeedbackSentimentNegative Sentiment = "A2UI_SURFACE_FEEDBACK_SENTIMENT_NEGATIVE" +) + +func (e Sentiment) ToPointer() *Sentiment { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Sentiment) IsExact() bool { + if e != nil { + switch *e { + case "A2UI_SURFACE_FEEDBACK_SENTIMENT_UNSPECIFIED", "A2UI_SURFACE_FEEDBACK_SENTIMENT_POSITIVE", "A2UI_SURFACE_FEEDBACK_SENTIMENT_NEGATIVE": + return true + } + } + return false +} + +// A2UIServiceCreateSurfaceFeedbackRequest creates feedback for a surface. +type A2UIServiceCreateSurfaceFeedbackRequest struct { + // The conversationId field. + ConversationID *string `json:"conversationId,omitempty"` + // The sentiment field. + Sentiment *Sentiment `json:"sentiment,omitempty"` + // The text field. + Text *string `json:"text,omitempty"` +} + +func (a *A2UIServiceCreateSurfaceFeedbackRequest) GetConversationID() *string { + if a == nil { + return nil + } + return a.ConversationID +} + +func (a *A2UIServiceCreateSurfaceFeedbackRequest) GetSentiment() *Sentiment { + if a == nil { + return nil + } + return a.Sentiment +} + +func (a *A2UIServiceCreateSurfaceFeedbackRequest) GetText() *string { + if a == nil { + return nil + } + return a.Text +} + +// #region class-body-a2uiservicecreatesurfacefeedbackrequest +// #endregion class-body-a2uiservicecreatesurfacefeedbackrequest diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicecreatesurfacefeedbackresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicecreatesurfacefeedbackresponse.go new file mode 100644 index 00000000..02ab41c8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicecreatesurfacefeedbackresponse.go @@ -0,0 +1,19 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// A2UIServiceCreateSurfaceFeedbackResponse returns the created feedback. +type A2UIServiceCreateSurfaceFeedbackResponse struct { + // A2UISurfaceFeedback represents user feedback for a surface. + A2UISurfaceFeedback *A2UISurfaceFeedback `json:"feedback,omitempty"` +} + +func (a *A2UIServiceCreateSurfaceFeedbackResponse) GetA2UISurfaceFeedback() *A2UISurfaceFeedback { + if a == nil { + return nil + } + return a.A2UISurfaceFeedback +} + +// #region class-body-a2uiservicecreatesurfacefeedbackresponse +// #endregion class-body-a2uiservicecreatesurfacefeedbackresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicelistsurfacefeedbackresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicelistsurfacefeedbackresponse.go new file mode 100644 index 00000000..6f89073c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicelistsurfacefeedbackresponse.go @@ -0,0 +1,19 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// A2UIServiceListSurfaceFeedbackResponse returns feedback for a surface. +type A2UIServiceListSurfaceFeedbackResponse struct { + // The feedback field. + Feedback []A2UISurfaceFeedback `json:"feedback,omitempty"` +} + +func (a *A2UIServiceListSurfaceFeedbackResponse) GetFeedback() []A2UISurfaceFeedback { + if a == nil { + return nil + } + return a.Feedback +} + +// #region class-body-a2uiservicelistsurfacefeedbackresponse +// #endregion class-body-a2uiservicelistsurfacefeedbackresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicelistsurfacesresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicelistsurfacesresponse.go new file mode 100644 index 00000000..a386ca80 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicelistsurfacesresponse.go @@ -0,0 +1,19 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// A2UIServiceListSurfacesResponse returns active surfaces. +type A2UIServiceListSurfacesResponse struct { + // The surfaces field. + Surfaces []A2UISurface `json:"surfaces,omitempty"` +} + +func (a *A2UIServiceListSurfacesResponse) GetSurfaces() []A2UISurface { + if a == nil { + return nil + } + return a.Surfaces +} + +// #region class-body-a2uiservicelistsurfacesresponse +// #endregion class-body-a2uiservicelistsurfacesresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicesubmitactionrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicesubmitactionrequest.go new file mode 100644 index 00000000..2d3f44ad --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicesubmitactionrequest.go @@ -0,0 +1,79 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// A2UIServiceSubmitActionRequest submits a user action. +type A2UIServiceSubmitActionRequest struct { + // The actionName field. + ActionName *string `json:"actionName,omitempty"` + ClientTimestamp *time.Time `json:"clientTimestamp,omitempty"` + // The context field. + Context map[string]string `json:"context,omitempty"` + // The conversationId field. + ConversationID *string `json:"conversationId,omitempty"` + // The dataModelJson field. + DataModelJSON *string `json:"dataModelJson,omitempty"` + // The sourceComponentId field. + SourceComponentID *string `json:"sourceComponentId,omitempty"` +} + +func (a A2UIServiceSubmitActionRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *A2UIServiceSubmitActionRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *A2UIServiceSubmitActionRequest) GetActionName() *string { + if a == nil { + return nil + } + return a.ActionName +} + +func (a *A2UIServiceSubmitActionRequest) GetClientTimestamp() *time.Time { + if a == nil { + return nil + } + return a.ClientTimestamp +} + +func (a *A2UIServiceSubmitActionRequest) GetContext() map[string]string { + if a == nil { + return nil + } + return a.Context +} + +func (a *A2UIServiceSubmitActionRequest) GetConversationID() *string { + if a == nil { + return nil + } + return a.ConversationID +} + +func (a *A2UIServiceSubmitActionRequest) GetDataModelJSON() *string { + if a == nil { + return nil + } + return a.DataModelJSON +} + +func (a *A2UIServiceSubmitActionRequest) GetSourceComponentID() *string { + if a == nil { + return nil + } + return a.SourceComponentID +} + +// #region class-body-a2uiservicesubmitactionrequest +// #endregion class-body-a2uiservicesubmitactionrequest diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicesubmitactionresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicesubmitactionresponse.go new file mode 100644 index 00000000..0dddeb46 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uiservicesubmitactionresponse.go @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// A2UIServiceSubmitActionResponse returns the result of an action. +type A2UIServiceSubmitActionResponse struct { + // The accepted field. + Accepted *bool `json:"accepted,omitempty"` + // The errorMessage field. + ErrorMessage *string `json:"errorMessage,omitempty"` +} + +func (a *A2UIServiceSubmitActionResponse) GetAccepted() *bool { + if a == nil { + return nil + } + return a.Accepted +} + +func (a *A2UIServiceSubmitActionResponse) GetErrorMessage() *string { + if a == nil { + return nil + } + return a.ErrorMessage +} + +// #region class-body-a2uiservicesubmitactionresponse +// #endregion class-body-a2uiservicesubmitactionresponse diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uisurface.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uisurface.go new file mode 100644 index 00000000..21036be9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uisurface.go @@ -0,0 +1,156 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// State - The state field. +type State string + +const ( + StateSurfaceLifecycleStateUnspecified State = "SURFACE_LIFECYCLE_STATE_UNSPECIFIED" + StateSurfaceLifecycleStateActive State = "SURFACE_LIFECYCLE_STATE_ACTIVE" + StateSurfaceLifecycleStateComplete State = "SURFACE_LIFECYCLE_STATE_COMPLETE" + StateSurfaceLifecycleStateDeleted State = "SURFACE_LIFECYCLE_STATE_DELETED" +) + +func (e State) ToPointer() *State { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *State) IsExact() bool { + if e != nil { + switch *e { + case "SURFACE_LIFECYCLE_STATE_UNSPECIFIED", "SURFACE_LIFECYCLE_STATE_ACTIVE", "SURFACE_LIFECYCLE_STATE_COMPLETE", "SURFACE_LIFECYCLE_STATE_DELETED": + return true + } + } + return false +} + +// A2UISurface represents a rendered UI surface within a conversation. +type A2UISurface struct { + // The catalogId field. + CatalogID *string `json:"catalogId,omitempty"` + // The components field. + Components []A2UIComponent `json:"components,omitempty"` + // The conversationId field. + ConversationID *string `json:"conversationId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The dataModelJson field. + DataModelJSON *string `json:"dataModelJson,omitempty"` + DeletedAt *time.Time `json:"deletedAt,omitempty"` + // The schemaVersion field. + SchemaVersion *int64 `integer:"string" json:"schemaVersion,omitempty"` + // The sendDataModel field. + SendDataModel *bool `json:"sendDataModel,omitempty"` + // The state field. + State *State `json:"state,omitempty"` + // The surfaceId field. + SurfaceID *string `json:"surfaceId,omitempty"` + // The tenantId field. + TenantID *string `json:"tenantId,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (a A2UISurface) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *A2UISurface) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *A2UISurface) GetCatalogID() *string { + if a == nil { + return nil + } + return a.CatalogID +} + +func (a *A2UISurface) GetComponents() []A2UIComponent { + if a == nil { + return nil + } + return a.Components +} + +func (a *A2UISurface) GetConversationID() *string { + if a == nil { + return nil + } + return a.ConversationID +} + +func (a *A2UISurface) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *A2UISurface) GetDataModelJSON() *string { + if a == nil { + return nil + } + return a.DataModelJSON +} + +func (a *A2UISurface) GetDeletedAt() *time.Time { + if a == nil { + return nil + } + return a.DeletedAt +} + +func (a *A2UISurface) GetSchemaVersion() *int64 { + if a == nil { + return nil + } + return a.SchemaVersion +} + +func (a *A2UISurface) GetSendDataModel() *bool { + if a == nil { + return nil + } + return a.SendDataModel +} + +func (a *A2UISurface) GetState() *State { + if a == nil { + return nil + } + return a.State +} + +func (a *A2UISurface) GetSurfaceID() *string { + if a == nil { + return nil + } + return a.SurfaceID +} + +func (a *A2UISurface) GetTenantID() *string { + if a == nil { + return nil + } + return a.TenantID +} + +func (a *A2UISurface) GetUpdatedAt() *time.Time { + if a == nil { + return nil + } + return a.UpdatedAt +} + +// #region class-body-a2uisurface +// #endregion class-body-a2uisurface diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uisurfacefeedback.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uisurfacefeedback.go new file mode 100644 index 00000000..c4563626 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/a2uisurfacefeedback.go @@ -0,0 +1,139 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// A2UISurfaceFeedbackSentiment - The sentiment field. +type A2UISurfaceFeedbackSentiment string + +const ( + A2UISurfaceFeedbackSentimentA2UISurfaceFeedbackSentimentUnspecified A2UISurfaceFeedbackSentiment = "A2UI_SURFACE_FEEDBACK_SENTIMENT_UNSPECIFIED" + A2UISurfaceFeedbackSentimentA2UISurfaceFeedbackSentimentPositive A2UISurfaceFeedbackSentiment = "A2UI_SURFACE_FEEDBACK_SENTIMENT_POSITIVE" + A2UISurfaceFeedbackSentimentA2UISurfaceFeedbackSentimentNegative A2UISurfaceFeedbackSentiment = "A2UI_SURFACE_FEEDBACK_SENTIMENT_NEGATIVE" +) + +func (e A2UISurfaceFeedbackSentiment) ToPointer() *A2UISurfaceFeedbackSentiment { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *A2UISurfaceFeedbackSentiment) IsExact() bool { + if e != nil { + switch *e { + case "A2UI_SURFACE_FEEDBACK_SENTIMENT_UNSPECIFIED", "A2UI_SURFACE_FEEDBACK_SENTIMENT_POSITIVE", "A2UI_SURFACE_FEEDBACK_SENTIMENT_NEGATIVE": + return true + } + } + return false +} + +// A2UISurfaceFeedback represents user feedback for a surface. +type A2UISurfaceFeedback struct { + // The actionName field. + ActionName *string `json:"actionName,omitempty"` + // The componentsSnapshot field. + ComponentsSnapshot *string `json:"componentsSnapshot,omitempty"` + // The conversationId field. + ConversationID *string `json:"conversationId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The dataModelSnapshot field. + DataModelSnapshot *string `json:"dataModelSnapshot,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + // The schemaVersion field. + SchemaVersion *int64 `integer:"string" json:"schemaVersion,omitempty"` + // The sentiment field. + Sentiment *A2UISurfaceFeedbackSentiment `json:"sentiment,omitempty"` + // The surfaceId field. + SurfaceID *string `json:"surfaceId,omitempty"` + // The text field. + Text *string `json:"text,omitempty"` +} + +func (a A2UISurfaceFeedback) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *A2UISurfaceFeedback) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *A2UISurfaceFeedback) GetActionName() *string { + if a == nil { + return nil + } + return a.ActionName +} + +func (a *A2UISurfaceFeedback) GetComponentsSnapshot() *string { + if a == nil { + return nil + } + return a.ComponentsSnapshot +} + +func (a *A2UISurfaceFeedback) GetConversationID() *string { + if a == nil { + return nil + } + return a.ConversationID +} + +func (a *A2UISurfaceFeedback) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *A2UISurfaceFeedback) GetDataModelSnapshot() *string { + if a == nil { + return nil + } + return a.DataModelSnapshot +} + +func (a *A2UISurfaceFeedback) GetID() *string { + if a == nil { + return nil + } + return a.ID +} + +func (a *A2UISurfaceFeedback) GetSchemaVersion() *int64 { + if a == nil { + return nil + } + return a.SchemaVersion +} + +func (a *A2UISurfaceFeedback) GetSentiment() *A2UISurfaceFeedbackSentiment { + if a == nil { + return nil + } + return a.Sentiment +} + +func (a *A2UISurfaceFeedback) GetSurfaceID() *string { + if a == nil { + return nil + } + return a.SurfaceID +} + +func (a *A2UISurfaceFeedback) GetText() *string { + if a == nil { + return nil + } + return a.Text +} + +// #region class-body-a2uisurfacefeedback +// #endregion class-body-a2uisurfacefeedback diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/acceptriskaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/acceptriskaction.go new file mode 100644 index 00000000..83a7f907 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/acceptriskaction.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// AcceptRiskAction parameters for UpdateFindingState. +type AcceptRiskAction struct { + ExpiresAt *time.Time `json:"expiresAt,omitempty"` + // The justification field. + Justification *string `json:"justification,omitempty"` +} + +func (a AcceptRiskAction) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AcceptRiskAction) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *AcceptRiskAction) GetExpiresAt() *time.Time { + if a == nil { + return nil + } + return a.ExpiresAt +} + +func (a *AcceptRiskAction) GetJustification() *string { + if a == nil { + return nil + } + return a.Justification +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessconflictnotificationconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessconflictnotificationconfig.go new file mode 100644 index 00000000..7de8003a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessconflictnotificationconfig.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AccessConflictNotificationConfig - The NotificationConfig message. +type AccessConflictNotificationConfig struct { + // The EmailNotifications message. + EmailNotifications *EmailNotifications `json:"emailNotifications,omitempty"` + // The SlackNotifications message. + SlackNotifications *SlackNotifications `json:"slackNotifications,omitempty"` +} + +func (a *AccessConflictNotificationConfig) GetEmailNotifications() *EmailNotifications { + if a == nil { + return nil + } + return a.EmailNotifications +} + +func (a *AccessConflictNotificationConfig) GetSlackNotifications() *SlackNotifications { + if a == nil { + return nil + } + return a.SlackNotifications +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessprofilematch.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessprofilematch.go new file mode 100644 index 00000000..43f4016a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessprofilematch.go @@ -0,0 +1,77 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// MatchType - The matchType field. +type MatchType string + +const ( + MatchTypeAccessProfileMatchTypeUnspecified MatchType = "ACCESS_PROFILE_MATCH_TYPE_UNSPECIFIED" + MatchTypeAccessProfileMatchTypeExact MatchType = "ACCESS_PROFILE_MATCH_TYPE_EXACT" + MatchTypeAccessProfileMatchTypeSuperset MatchType = "ACCESS_PROFILE_MATCH_TYPE_SUPERSET" + MatchTypeAccessProfileMatchTypePartial MatchType = "ACCESS_PROFILE_MATCH_TYPE_PARTIAL" +) + +func (e MatchType) ToPointer() *MatchType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *MatchType) IsExact() bool { + if e != nil { + switch *e { + case "ACCESS_PROFILE_MATCH_TYPE_UNSPECIFIED", "ACCESS_PROFILE_MATCH_TYPE_EXACT", "ACCESS_PROFILE_MATCH_TYPE_SUPERSET", "ACCESS_PROFILE_MATCH_TYPE_PARTIAL": + return true + } + } + return false +} + +// The AccessProfileMatch message. +type AccessProfileMatch struct { + // The catalogDisplayName field. + CatalogDisplayName *string `json:"catalogDisplayName,omitempty"` + // The catalogId field. + CatalogID *string `json:"catalogId,omitempty"` + // The matchType field. + MatchType *MatchType `json:"matchType,omitempty"` + // The missingEntitlements field. + MissingEntitlements []CohortEntitlement `json:"missingEntitlements,omitempty"` + // The overlapRatio field. + OverlapRatio *float64 `json:"overlapRatio,omitempty"` +} + +func (a *AccessProfileMatch) GetCatalogDisplayName() *string { + if a == nil { + return nil + } + return a.CatalogDisplayName +} + +func (a *AccessProfileMatch) GetCatalogID() *string { + if a == nil { + return nil + } + return a.CatalogID +} + +func (a *AccessProfileMatch) GetMatchType() *MatchType { + if a == nil { + return nil + } + return a.MatchType +} + +func (a *AccessProfileMatch) GetMissingEntitlements() []CohortEntitlement { + if a == nil { + return nil + } + return a.MissingEntitlements +} + +func (a *AccessProfileMatch) GetOverlapRatio() *float64 { + if a == nil { + return nil + } + return a.OverlapRatio +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessprovisionedpreference.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessprovisionedpreference.go new file mode 100644 index 00000000..cab5da57 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessprovisionedpreference.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessProvisionedPreference message. +type AccessProvisionedPreference struct { + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The locked field. + Locked *bool `json:"locked,omitempty"` +} + +func (a *AccessProvisionedPreference) GetEnabled() *bool { + if a == nil { + return nil + } + return a.Enabled +} + +func (a *AccessProvisionedPreference) GetLocked() *bool { + if a == nil { + return nil + } + return a.Locked +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreview.go index 3c58ea6f..89b75a77 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreview.go @@ -7,6 +7,55 @@ import ( "time" ) +// AccuracyIssueAction - The accuracyIssueAction field. +type AccuracyIssueAction string + +const ( + AccuracyIssueActionAccuracyIssueActionUnspecified AccuracyIssueAction = "ACCURACY_ISSUE_ACTION_UNSPECIFIED" + AccuracyIssueActionAccuracyIssueActionContinue AccuracyIssueAction = "ACCURACY_ISSUE_ACTION_CONTINUE" + AccuracyIssueActionAccuracyIssueActionWait AccuracyIssueAction = "ACCURACY_ISSUE_ACTION_WAIT" +) + +func (e AccuracyIssueAction) ToPointer() *AccuracyIssueAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AccuracyIssueAction) IsExact() bool { + if e != nil { + switch *e { + case "ACCURACY_ISSUE_ACTION_UNSPECIFIED", "ACCURACY_ISSUE_ACTION_CONTINUE", "ACCURACY_ISSUE_ACTION_WAIT": + return true + } + } + return false +} + +// AutoCloseDecision - The autoCloseDecision field. +type AutoCloseDecision string + +const ( + AutoCloseDecisionCloseDecisionUnspecified AutoCloseDecision = "CLOSE_DECISION_UNSPECIFIED" + AutoCloseDecisionCloseDecisionRevoked AutoCloseDecision = "CLOSE_DECISION_REVOKED" + AutoCloseDecisionCloseDecisionSkip AutoCloseDecision = "CLOSE_DECISION_SKIP" + AutoCloseDecisionCloseDecisionNoAction AutoCloseDecision = "CLOSE_DECISION_NO_ACTION" +) + +func (e AutoCloseDecision) ToPointer() *AutoCloseDecision { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AutoCloseDecision) IsExact() bool { + if e != nil { + switch *e { + case "CLOSE_DECISION_UNSPECIFIED", "CLOSE_DECISION_REVOKED", "CLOSE_DECISION_SKIP", "CLOSE_DECISION_NO_ACTION": + return true + } + } + return false +} + // DefaultView - the default view that reviewers will see when they complete their access reviews type DefaultView string @@ -15,6 +64,7 @@ const ( DefaultViewAccessReviewViewTypeByApp DefaultView = "ACCESS_REVIEW_VIEW_TYPE_BY_APP" DefaultViewAccessReviewViewTypeByUser DefaultView = "ACCESS_REVIEW_VIEW_TYPE_BY_USER" DefaultViewAccessReviewViewTypeUnstructured DefaultView = "ACCESS_REVIEW_VIEW_TYPE_UNSTRUCTURED" + DefaultViewAccessReviewViewTypeByResource DefaultView = "ACCESS_REVIEW_VIEW_TYPE_BY_RESOURCE" ) func (e DefaultView) ToPointer() *DefaultView { @@ -25,7 +75,32 @@ func (e DefaultView) ToPointer() *DefaultView { func (e *DefaultView) IsExact() bool { if e != nil { switch *e { - case "ACCESS_REVIEW_VIEW_TYPE_UNSPECIFIED", "ACCESS_REVIEW_VIEW_TYPE_BY_APP", "ACCESS_REVIEW_VIEW_TYPE_BY_USER", "ACCESS_REVIEW_VIEW_TYPE_UNSTRUCTURED": + case "ACCESS_REVIEW_VIEW_TYPE_UNSPECIFIED", "ACCESS_REVIEW_VIEW_TYPE_BY_APP", "ACCESS_REVIEW_VIEW_TYPE_BY_USER", "ACCESS_REVIEW_VIEW_TYPE_UNSTRUCTURED", "ACCESS_REVIEW_VIEW_TYPE_BY_RESOURCE": + return true + } + } + return false +} + +// ErrorState - Error state set when a prepare action fails with a recoverable condition. +// +// Cleared when the campaign scope is changed. +type ErrorState string + +const ( + ErrorStateAccessReviewErrorStateUnspecified ErrorState = "ACCESS_REVIEW_ERROR_STATE_UNSPECIFIED" + ErrorStateAccessReviewErrorStateSelectionQuotaExceedError ErrorState = "ACCESS_REVIEW_ERROR_STATE_SELECTION_QUOTA_EXCEED_ERROR" +) + +func (e ErrorState) ToPointer() *ErrorState { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *ErrorState) IsExact() bool { + if e != nil { + switch *e { + case "ACCESS_REVIEW_ERROR_STATE_UNSPECIFIED", "ACCESS_REVIEW_ERROR_STATE_SELECTION_QUOTA_EXCEED_ERROR": return true } } @@ -39,6 +114,8 @@ const ( ScopeTypeAccessReviewScopeTypeUnspecified ScopeType = "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED" ScopeTypeAccessReviewScopeTypeByEntitlements ScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS" ScopeTypeAccessReviewScopeTypeByAccessConflicts ScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS" + ScopeTypeAccessReviewScopeTypeByResource ScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_RESOURCE" + ScopeTypeAccessReviewScopeTypeByInheritance ScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_INHERITANCE" ) func (e ScopeType) ToPointer() *ScopeType { @@ -49,38 +126,38 @@ func (e ScopeType) ToPointer() *ScopeType { func (e *ScopeType) IsExact() bool { if e != nil { switch *e { - case "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED", "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS": + case "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED", "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_RESOURCE", "ACCESS_REVIEW_SCOPE_TYPE_BY_INHERITANCE": return true } } return false } -// State - The state field. -type State string +// AccessReviewState - The current lifecycle state of the campaign (e.g., draft, open, closed). +type AccessReviewState string const ( - StateAccessReviewStateUnspecified State = "ACCESS_REVIEW_STATE_UNSPECIFIED" - StateAccessReviewStateOpen State = "ACCESS_REVIEW_STATE_OPEN" - StateAccessReviewStateClosed State = "ACCESS_REVIEW_STATE_CLOSED" - StateAccessReviewStatePending State = "ACCESS_REVIEW_STATE_PENDING" - StateAccessReviewStateReview State = "ACCESS_REVIEW_STATE_REVIEW" - StateAccessReviewStatePreparing State = "ACCESS_REVIEW_STATE_PREPARING" - StateAccessReviewStateStarting State = "ACCESS_REVIEW_STATE_STARTING" - StateAccessReviewStateDraft State = "ACCESS_REVIEW_STATE_DRAFT" - StateAccessReviewStateDeleting State = "ACCESS_REVIEW_STATE_DELETING" - StateAccessReviewStateDeleted State = "ACCESS_REVIEW_STATE_DELETED" - StateAccessReviewStateResettingPolicies State = "ACCESS_REVIEW_STATE_RESETTING_POLICIES" - StateAccessReviewStateCopyingSetupEntitlements State = "ACCESS_REVIEW_STATE_COPYING_SETUP_ENTITLEMENTS" - StateAccessReviewStateCopyingResourceTypeSelections State = "ACCESS_REVIEW_STATE_COPYING_RESOURCE_TYPE_SELECTIONS" + AccessReviewStateAccessReviewStateUnspecified AccessReviewState = "ACCESS_REVIEW_STATE_UNSPECIFIED" + AccessReviewStateAccessReviewStateOpen AccessReviewState = "ACCESS_REVIEW_STATE_OPEN" + AccessReviewStateAccessReviewStateClosed AccessReviewState = "ACCESS_REVIEW_STATE_CLOSED" + AccessReviewStateAccessReviewStatePending AccessReviewState = "ACCESS_REVIEW_STATE_PENDING" + AccessReviewStateAccessReviewStateReview AccessReviewState = "ACCESS_REVIEW_STATE_REVIEW" + AccessReviewStateAccessReviewStatePreparing AccessReviewState = "ACCESS_REVIEW_STATE_PREPARING" + AccessReviewStateAccessReviewStateStarting AccessReviewState = "ACCESS_REVIEW_STATE_STARTING" + AccessReviewStateAccessReviewStateDraft AccessReviewState = "ACCESS_REVIEW_STATE_DRAFT" + AccessReviewStateAccessReviewStateDeleting AccessReviewState = "ACCESS_REVIEW_STATE_DELETING" + AccessReviewStateAccessReviewStateDeleted AccessReviewState = "ACCESS_REVIEW_STATE_DELETED" + AccessReviewStateAccessReviewStateResettingPolicies AccessReviewState = "ACCESS_REVIEW_STATE_RESETTING_POLICIES" + AccessReviewStateAccessReviewStateCopyingSetupEntitlements AccessReviewState = "ACCESS_REVIEW_STATE_COPYING_SETUP_ENTITLEMENTS" + AccessReviewStateAccessReviewStateCopyingResourceTypeSelections AccessReviewState = "ACCESS_REVIEW_STATE_COPYING_RESOURCE_TYPE_SELECTIONS" ) -func (e State) ToPointer() *State { +func (e AccessReviewState) ToPointer() *AccessReviewState { return &e } // IsExact returns true if the value matches a known enum value, false otherwise. -func (e *State) IsExact() bool { +func (e *AccessReviewState) IsExact() bool { if e != nil { switch *e { case "ACCESS_REVIEW_STATE_UNSPECIFIED", "ACCESS_REVIEW_STATE_OPEN", "ACCESS_REVIEW_STATE_CLOSED", "ACCESS_REVIEW_STATE_PENDING", "ACCESS_REVIEW_STATE_REVIEW", "ACCESS_REVIEW_STATE_PREPARING", "ACCESS_REVIEW_STATE_STARTING", "ACCESS_REVIEW_STATE_DRAFT", "ACCESS_REVIEW_STATE_DELETING", "ACCESS_REVIEW_STATE_DELETED", "ACCESS_REVIEW_STATE_RESETTING_POLICIES", "ACCESS_REVIEW_STATE_COPYING_SETUP_ENTITLEMENTS", "ACCESS_REVIEW_STATE_COPYING_RESOURCE_TYPE_SELECTIONS": @@ -90,13 +167,15 @@ func (e *State) IsExact() bool { return false } -// The AccessReview message. +// AccessReview - An access review campaign (also called a certification campaign) that verifies whether users still need their access entitlements. // // This message contains a oneof named setup_metadata. Only a single field of the following list may be set at a time: // - singleApp // - multiApp // - bindings type AccessReview struct { + // Configuration for which columns are visible in the reviewer task list. + AccessReviewColumnConfig *AccessReviewColumnConfig `json:"columnConfig,omitempty"` // The AccessReviewExclusionScope message. AccessReviewExclusionScope *AccessReviewExclusionScope `json:"exclusionScope,omitempty"` // The AccessReviewInclusionScope message. @@ -134,12 +213,20 @@ type AccessReview struct { // - allAccessConflicts // - specificAccessConflicts // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scopeV2,omitempty"` // The BindingObjectSetup message. BindingObjectSetup *BindingObjectSetup `json:"bindings,omitempty"` + // Campaign health snapshot. Read-only; updated by backend maintenance processors. + CampaignHealthSnapshot *CampaignHealthSnapshot `json:"campaignHealth,omitempty"` + // AI-generated campaign insights (markdown). Read-only; set by backend when campaign is closed. + CampaignInsights *CampaignInsights `json:"campaignInsights,omitempty"` // The MultiAppSetup message. MultiAppSetup *MultiAppSetup `json:"multiApp,omitempty"` - // The NotificationConfig message. + // Controls which email notifications are sent during the access review lifecycle. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` // Signature configuration for access review submissions ReviewSignatureConfig *ReviewSignatureConfig `json:"signatureConfig,omitempty"` @@ -147,42 +234,55 @@ type AccessReview struct { SingleAppSetup *SingleAppSetup `json:"singleApp,omitempty"` // The ID of the template if the campaign was created from one AccessReviewTemplateID *string `json:"accessReviewTemplateId,omitempty"` + // The accuracyIssueAction field. + AccuracyIssueAction *AccuracyIssueAction `json:"accuracyIssueAction,omitempty"` + // Auto-close configuration + // completion_date is used as the scheduled close date + AutoCloseCampaign *bool `json:"autoCloseCampaign,omitempty"` + // The autoCloseDecision field. + AutoCloseDecision *AutoCloseDecision `json:"autoCloseDecision,omitempty"` // The autoGenerateReport field. AutoGenerateReport *bool `json:"autoGenerateReport,omitempty"` - // The autoResolve field. - AutoResolve *bool `json:"autoResolve,omitempty"` + // When true, selections are automatically resolved if the entitlement grant no longer exists. + AutoResolve *bool `json:"autoResolve,omitempty"` + // Auto-start configuration + AutoStartCampaign *bool `json:"autoStartCampaign,omitempty"` ClosedAt *time.Time `json:"closedAt,omitempty"` CompletionDate *time.Time `json:"completionDate,omitempty"` ConnectorSourcesFrozenAt *time.Time `json:"connectorSourcesFrozenAt,omitempty"` CreatedAt *time.Time `json:"createdAt,omitempty"` - // The createdById field. + // The ID of the user who created this campaign. CreatedByID *string `json:"createdById,omitempty"` // the default view that reviewers will see when they complete their access reviews DefaultView *DefaultView `json:"defaultView,omitempty"` - // The description field. + // An optional description providing context about this campaign. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name of this campaign. DisplayName *string `json:"displayName,omitempty"` + // Error state set when a prepare action fails with a recoverable condition. + // Cleared when the campaign scope is changed. + ErrorState *ErrorState `json:"errorState,omitempty"` // this setting is used for access conflict type scope ExemptCertifiedAccessConflicts *bool `json:"exemptCertifiedAccessConflicts,omitempty"` - // The expectedTicketCount field. + // The estimated number of review tasks that will be generated when the campaign starts. ExpectedTicketCount *int `json:"expectedTicketCount,omitempty"` - // The hasAccuracySupport field. + // Whether the connectors in this campaign support accuracy checking. HasAccuracySupport *bool `json:"hasAccuracySupport,omitempty"` - // The id field. + // The unique identifier of this access review campaign. ID *string `json:"id,omitempty"` - // The policyId field. + // The ID of the review policy that governs how review tasks are assigned and resolved. PolicyID *string `json:"policyId,omitempty"` - // The reviewInstructions field. - ReviewInstructions *string `json:"reviewInstructions,omitempty"` + // Optional instructions displayed to reviewers when completing their review tasks. + ReviewInstructions *string `json:"reviewInstructions,omitempty"` + ScheduledStartDate *time.Time `json:"scheduledStartDate,omitempty"` // this sets the scope type for the access review ScopeType *ScopeType `json:"scopeType,omitempty"` - // The scopingVersion field. + // Internal version counter incremented when the campaign scope changes. ScopingVersion *int64 `integer:"string" json:"scopingVersion,omitempty"` StartedAt *time.Time `json:"startedAt,omitempty"` - // The state field. - State *State `json:"state,omitempty"` - UpdatedAt *time.Time `json:"updatedAt,omitempty"` + // The current lifecycle state of the campaign (e.g., draft, open, closed). + State *AccessReviewState `json:"state,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` // Determines the policy applied to the campaign. Default is false, using the campaign policy. // If true, the order of precedence is entitlement → app → campaign policy. UsePolicyOverride *bool `json:"usePolicyOverride,omitempty"` @@ -199,6 +299,13 @@ func (a *AccessReview) UnmarshalJSON(data []byte) error { return nil } +func (a *AccessReview) GetAccessReviewColumnConfig() *AccessReviewColumnConfig { + if a == nil { + return nil + } + return a.AccessReviewColumnConfig +} + func (a *AccessReview) GetAccessReviewExclusionScope() *AccessReviewExclusionScope { if a == nil { return nil @@ -234,6 +341,20 @@ func (a *AccessReview) GetBindingObjectSetup() *BindingObjectSetup { return a.BindingObjectSetup } +func (a *AccessReview) GetCampaignHealthSnapshot() *CampaignHealthSnapshot { + if a == nil { + return nil + } + return a.CampaignHealthSnapshot +} + +func (a *AccessReview) GetCampaignInsights() *CampaignInsights { + if a == nil { + return nil + } + return a.CampaignInsights +} + func (a *AccessReview) GetMultiAppSetup() *MultiAppSetup { if a == nil { return nil @@ -269,6 +390,27 @@ func (a *AccessReview) GetAccessReviewTemplateID() *string { return a.AccessReviewTemplateID } +func (a *AccessReview) GetAccuracyIssueAction() *AccuracyIssueAction { + if a == nil { + return nil + } + return a.AccuracyIssueAction +} + +func (a *AccessReview) GetAutoCloseCampaign() *bool { + if a == nil { + return nil + } + return a.AutoCloseCampaign +} + +func (a *AccessReview) GetAutoCloseDecision() *AutoCloseDecision { + if a == nil { + return nil + } + return a.AutoCloseDecision +} + func (a *AccessReview) GetAutoGenerateReport() *bool { if a == nil { return nil @@ -283,6 +425,13 @@ func (a *AccessReview) GetAutoResolve() *bool { return a.AutoResolve } +func (a *AccessReview) GetAutoStartCampaign() *bool { + if a == nil { + return nil + } + return a.AutoStartCampaign +} + func (a *AccessReview) GetClosedAt() *time.Time { if a == nil { return nil @@ -339,6 +488,13 @@ func (a *AccessReview) GetDisplayName() *string { return a.DisplayName } +func (a *AccessReview) GetErrorState() *ErrorState { + if a == nil { + return nil + } + return a.ErrorState +} + func (a *AccessReview) GetExemptCertifiedAccessConflicts() *bool { if a == nil { return nil @@ -381,6 +537,13 @@ func (a *AccessReview) GetReviewInstructions() *string { return a.ReviewInstructions } +func (a *AccessReview) GetScheduledStartDate() *time.Time { + if a == nil { + return nil + } + return a.ScheduledStartDate +} + func (a *AccessReview) GetScopeType() *ScopeType { if a == nil { return nil @@ -402,7 +565,7 @@ func (a *AccessReview) GetStartedAt() *time.Time { return a.StartedAt } -func (a *AccessReview) GetState() *State { +func (a *AccessReview) GetState() *AccessReviewState { if a == nil { return nil } @@ -423,13 +586,15 @@ func (a *AccessReview) GetUsePolicyOverride() *bool { return a.UsePolicyOverride } -// AccessReviewInput - The AccessReview message. +// AccessReviewInput - An access review campaign (also called a certification campaign) that verifies whether users still need their access entitlements. // // This message contains a oneof named setup_metadata. Only a single field of the following list may be set at a time: // - singleApp // - multiApp // - bindings type AccessReviewInput struct { + // Configuration for which columns are visible in the reviewer task list. + AccessReviewColumnConfig *AccessReviewColumnConfig `json:"columnConfig,omitempty"` // The AccessReviewExclusionScope message. AccessReviewExclusionScope *AccessReviewExclusionScope `json:"exclusionScope,omitempty"` // The AccessReviewInclusionScope message. @@ -467,12 +632,20 @@ type AccessReviewInput struct { // - allAccessConflicts // - specificAccessConflicts // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scopeV2,omitempty"` // The BindingObjectSetup message. BindingObjectSetup *BindingObjectSetup `json:"bindings,omitempty"` + // Campaign health snapshot. Read-only; updated by backend maintenance processors. + CampaignHealthSnapshot *CampaignHealthSnapshot `json:"campaignHealth,omitempty"` + // AI-generated campaign insights (markdown). Read-only; set by backend when campaign is closed. + CampaignInsights *CampaignInsights `json:"campaignInsights,omitempty"` // The MultiAppSetup message. MultiAppSetup *MultiAppSetup `json:"multiApp,omitempty"` - // The NotificationConfig message. + // Controls which email notifications are sent during the access review lifecycle. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` // Signature configuration for access review submissions ReviewSignatureConfig *ReviewSignatureConfig `json:"signatureConfig,omitempty"` @@ -480,40 +653,50 @@ type AccessReviewInput struct { SingleAppSetup *SingleAppSetup `json:"singleApp,omitempty"` // The ID of the template if the campaign was created from one AccessReviewTemplateID *string `json:"accessReviewTemplateId,omitempty"` + // The accuracyIssueAction field. + AccuracyIssueAction *AccuracyIssueAction `json:"accuracyIssueAction,omitempty"` + // Auto-close configuration + // completion_date is used as the scheduled close date + AutoCloseCampaign *bool `json:"autoCloseCampaign,omitempty"` + // The autoCloseDecision field. + AutoCloseDecision *AutoCloseDecision `json:"autoCloseDecision,omitempty"` // The autoGenerateReport field. AutoGenerateReport *bool `json:"autoGenerateReport,omitempty"` - // The autoResolve field. - AutoResolve *bool `json:"autoResolve,omitempty"` + // When true, selections are automatically resolved if the entitlement grant no longer exists. + AutoResolve *bool `json:"autoResolve,omitempty"` + // Auto-start configuration + AutoStartCampaign *bool `json:"autoStartCampaign,omitempty"` ClosedAt *time.Time `json:"closedAt,omitempty"` CompletionDate *time.Time `json:"completionDate,omitempty"` ConnectorSourcesFrozenAt *time.Time `json:"connectorSourcesFrozenAt,omitempty"` - // The createdById field. + // The ID of the user who created this campaign. CreatedByID *string `json:"createdById,omitempty"` // the default view that reviewers will see when they complete their access reviews DefaultView *DefaultView `json:"defaultView,omitempty"` - // The description field. + // An optional description providing context about this campaign. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name of this campaign. DisplayName *string `json:"displayName,omitempty"` // this setting is used for access conflict type scope ExemptCertifiedAccessConflicts *bool `json:"exemptCertifiedAccessConflicts,omitempty"` - // The expectedTicketCount field. + // The estimated number of review tasks that will be generated when the campaign starts. ExpectedTicketCount *int `json:"expectedTicketCount,omitempty"` - // The hasAccuracySupport field. + // Whether the connectors in this campaign support accuracy checking. HasAccuracySupport *bool `json:"hasAccuracySupport,omitempty"` - // The id field. + // The unique identifier of this access review campaign. ID *string `json:"id,omitempty"` - // The policyId field. + // The ID of the review policy that governs how review tasks are assigned and resolved. PolicyID *string `json:"policyId,omitempty"` - // The reviewInstructions field. - ReviewInstructions *string `json:"reviewInstructions,omitempty"` + // Optional instructions displayed to reviewers when completing their review tasks. + ReviewInstructions *string `json:"reviewInstructions,omitempty"` + ScheduledStartDate *time.Time `json:"scheduledStartDate,omitempty"` // this sets the scope type for the access review ScopeType *ScopeType `json:"scopeType,omitempty"` - // The scopingVersion field. + // Internal version counter incremented when the campaign scope changes. ScopingVersion *int64 `integer:"string" json:"scopingVersion,omitempty"` StartedAt *time.Time `json:"startedAt,omitempty"` - // The state field. - State *State `json:"state,omitempty"` + // The current lifecycle state of the campaign (e.g., draft, open, closed). + State *AccessReviewState `json:"state,omitempty"` // Determines the policy applied to the campaign. Default is false, using the campaign policy. // If true, the order of precedence is entitlement → app → campaign policy. UsePolicyOverride *bool `json:"usePolicyOverride,omitempty"` @@ -530,6 +713,13 @@ func (a *AccessReviewInput) UnmarshalJSON(data []byte) error { return nil } +func (a *AccessReviewInput) GetAccessReviewColumnConfig() *AccessReviewColumnConfig { + if a == nil { + return nil + } + return a.AccessReviewColumnConfig +} + func (a *AccessReviewInput) GetAccessReviewExclusionScope() *AccessReviewExclusionScope { if a == nil { return nil @@ -565,6 +755,20 @@ func (a *AccessReviewInput) GetBindingObjectSetup() *BindingObjectSetup { return a.BindingObjectSetup } +func (a *AccessReviewInput) GetCampaignHealthSnapshot() *CampaignHealthSnapshot { + if a == nil { + return nil + } + return a.CampaignHealthSnapshot +} + +func (a *AccessReviewInput) GetCampaignInsights() *CampaignInsights { + if a == nil { + return nil + } + return a.CampaignInsights +} + func (a *AccessReviewInput) GetMultiAppSetup() *MultiAppSetup { if a == nil { return nil @@ -600,6 +804,27 @@ func (a *AccessReviewInput) GetAccessReviewTemplateID() *string { return a.AccessReviewTemplateID } +func (a *AccessReviewInput) GetAccuracyIssueAction() *AccuracyIssueAction { + if a == nil { + return nil + } + return a.AccuracyIssueAction +} + +func (a *AccessReviewInput) GetAutoCloseCampaign() *bool { + if a == nil { + return nil + } + return a.AutoCloseCampaign +} + +func (a *AccessReviewInput) GetAutoCloseDecision() *AutoCloseDecision { + if a == nil { + return nil + } + return a.AutoCloseDecision +} + func (a *AccessReviewInput) GetAutoGenerateReport() *bool { if a == nil { return nil @@ -614,6 +839,13 @@ func (a *AccessReviewInput) GetAutoResolve() *bool { return a.AutoResolve } +func (a *AccessReviewInput) GetAutoStartCampaign() *bool { + if a == nil { + return nil + } + return a.AutoStartCampaign +} + func (a *AccessReviewInput) GetClosedAt() *time.Time { if a == nil { return nil @@ -705,6 +937,13 @@ func (a *AccessReviewInput) GetReviewInstructions() *string { return a.ReviewInstructions } +func (a *AccessReviewInput) GetScheduledStartDate() *time.Time { + if a == nil { + return nil + } + return a.ScheduledStartDate +} + func (a *AccessReviewInput) GetScopeType() *ScopeType { if a == nil { return nil @@ -726,7 +965,7 @@ func (a *AccessReviewInput) GetStartedAt() *time.Time { return a.StartedAt } -func (a *AccessReviewInput) GetState() *State { +func (a *AccessReviewInput) GetState() *AccessReviewState { if a == nil { return nil } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewcolumnconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewcolumnconfig.go new file mode 100644 index 00000000..cb7e70e9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewcolumnconfig.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type Columns string + +const ( + ColumnsAccessReviewTaskColumnUnspecified Columns = "ACCESS_REVIEW_TASK_COLUMN_UNSPECIFIED" + ColumnsAccessReviewTaskColumnViewLink Columns = "ACCESS_REVIEW_TASK_COLUMN_VIEW_LINK" + ColumnsAccessReviewTaskColumnCurrentState Columns = "ACCESS_REVIEW_TASK_COLUMN_CURRENT_STATE" + ColumnsAccessReviewTaskColumnAccount Columns = "ACCESS_REVIEW_TASK_COLUMN_ACCOUNT" + ColumnsAccessReviewTaskColumnAccountOwner Columns = "ACCESS_REVIEW_TASK_COLUMN_ACCOUNT_OWNER" + ColumnsAccessReviewTaskColumnEntitlement Columns = "ACCESS_REVIEW_TASK_COLUMN_ENTITLEMENT" + ColumnsAccessReviewTaskColumnEntitlementDescription Columns = "ACCESS_REVIEW_TASK_COLUMN_ENTITLEMENT_DESCRIPTION" + ColumnsAccessReviewTaskColumnResource Columns = "ACCESS_REVIEW_TASK_COLUMN_RESOURCE" + ColumnsAccessReviewTaskColumnResourceType Columns = "ACCESS_REVIEW_TASK_COLUMN_RESOURCE_TYPE" + ColumnsAccessReviewTaskColumnInsights Columns = "ACCESS_REVIEW_TASK_COLUMN_INSIGHTS" + ColumnsAccessReviewTaskColumnRecommendation Columns = "ACCESS_REVIEW_TASK_COLUMN_RECOMMENDATION" + ColumnsAccessReviewTaskColumnAssignedTo Columns = "ACCESS_REVIEW_TASK_COLUMN_ASSIGNED_TO" + ColumnsAccessReviewTaskColumnStatus Columns = "ACCESS_REVIEW_TASK_COLUMN_STATUS" + ColumnsAccessReviewTaskColumnApp Columns = "ACCESS_REVIEW_TASK_COLUMN_APP" + ColumnsAccessReviewTaskColumnDue Columns = "ACCESS_REVIEW_TASK_COLUMN_DUE" + ColumnsAccessReviewTaskColumnProject Columns = "ACCESS_REVIEW_TASK_COLUMN_PROJECT" + ColumnsAccessReviewTaskColumnCreatedOn Columns = "ACCESS_REVIEW_TASK_COLUMN_CREATED_ON" + ColumnsAccessReviewTaskColumnTaskAge Columns = "ACCESS_REVIEW_TASK_COLUMN_TASK_AGE" + ColumnsAccessReviewTaskColumnResolvedOn Columns = "ACCESS_REVIEW_TASK_COLUMN_RESOLVED_ON" + ColumnsAccessReviewTaskColumnEnrollmentStatus Columns = "ACCESS_REVIEW_TASK_COLUMN_ENROLLMENT_STATUS" + ColumnsAccessReviewTaskColumnInheritedFrom Columns = "ACCESS_REVIEW_TASK_COLUMN_INHERITED_FROM" + ColumnsAccessReviewTaskColumnDepartment Columns = "ACCESS_REVIEW_TASK_COLUMN_DEPARTMENT" + ColumnsAccessReviewTaskColumnJobTitle Columns = "ACCESS_REVIEW_TASK_COLUMN_JOB_TITLE" + ColumnsAccessReviewTaskColumnCreatedBy Columns = "ACCESS_REVIEW_TASK_COLUMN_CREATED_BY" + ColumnsAccessReviewTaskColumnLastLogin Columns = "ACCESS_REVIEW_TASK_COLUMN_LAST_LOGIN" + ColumnsAccessReviewTaskColumnResourceParent Columns = "ACCESS_REVIEW_TASK_COLUMN_RESOURCE_PARENT" + ColumnsAccessReviewTaskColumnResourceChildren Columns = "ACCESS_REVIEW_TASK_COLUMN_RESOURCE_CHILDREN" +) + +func (e Columns) ToPointer() *Columns { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Columns) IsExact() bool { + if e != nil { + switch *e { + case "ACCESS_REVIEW_TASK_COLUMN_UNSPECIFIED", "ACCESS_REVIEW_TASK_COLUMN_VIEW_LINK", "ACCESS_REVIEW_TASK_COLUMN_CURRENT_STATE", "ACCESS_REVIEW_TASK_COLUMN_ACCOUNT", "ACCESS_REVIEW_TASK_COLUMN_ACCOUNT_OWNER", "ACCESS_REVIEW_TASK_COLUMN_ENTITLEMENT", "ACCESS_REVIEW_TASK_COLUMN_ENTITLEMENT_DESCRIPTION", "ACCESS_REVIEW_TASK_COLUMN_RESOURCE", "ACCESS_REVIEW_TASK_COLUMN_RESOURCE_TYPE", "ACCESS_REVIEW_TASK_COLUMN_INSIGHTS", "ACCESS_REVIEW_TASK_COLUMN_RECOMMENDATION", "ACCESS_REVIEW_TASK_COLUMN_ASSIGNED_TO", "ACCESS_REVIEW_TASK_COLUMN_STATUS", "ACCESS_REVIEW_TASK_COLUMN_APP", "ACCESS_REVIEW_TASK_COLUMN_DUE", "ACCESS_REVIEW_TASK_COLUMN_PROJECT", "ACCESS_REVIEW_TASK_COLUMN_CREATED_ON", "ACCESS_REVIEW_TASK_COLUMN_TASK_AGE", "ACCESS_REVIEW_TASK_COLUMN_RESOLVED_ON", "ACCESS_REVIEW_TASK_COLUMN_ENROLLMENT_STATUS", "ACCESS_REVIEW_TASK_COLUMN_INHERITED_FROM", "ACCESS_REVIEW_TASK_COLUMN_DEPARTMENT", "ACCESS_REVIEW_TASK_COLUMN_JOB_TITLE", "ACCESS_REVIEW_TASK_COLUMN_CREATED_BY", "ACCESS_REVIEW_TASK_COLUMN_LAST_LOGIN", "ACCESS_REVIEW_TASK_COLUMN_RESOURCE_PARENT", "ACCESS_REVIEW_TASK_COLUMN_RESOURCE_CHILDREN": + return true + } + } + return false +} + +// AccessReviewColumnConfig - Configuration for which columns are visible in the reviewer task list. +type AccessReviewColumnConfig struct { + // Ordered list of columns visible to reviewers. + // If empty, the default column set for the campaign's default_view is used. + Columns []Columns `json:"columns,omitempty"` +} + +func (a *AccessReviewColumnConfig) GetColumns() []Columns { + if a == nil { + return nil + } + return a.Columns +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewscopev2.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewscopev2.go index 6e9127b3..53eaa185 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewscopev2.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewscopev2.go @@ -28,6 +28,9 @@ package shared // This message contains a oneof named access_conflicts_scope. Only a single field of the following list may be set at a time: // - allAccessConflicts // - specificAccessConflicts +// +// This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: +// - resourceSelection type AccessReviewScopeV2 struct { // The AccountCriteriaScope message. AccountCriteriaScope *AccountCriteriaScope `json:"accountCriteria,omitempty"` @@ -55,6 +58,8 @@ type AccessReviewScopeV2 struct { // - grantsAddedBetween // GrantsByCriteriaScope *GrantsByCriteriaScope `json:"grantsByCriteria,omitempty"` + // The ResourceSelectionScope message. + ResourceSelectionScope *ResourceSelectionScope `json:"resourceSelection,omitempty"` // The ResourceTypeSelectionScope message. ResourceTypeSelectionScope *ResourceTypeSelectionScope `json:"resourceTypeSelections,omitempty"` // The SelectedUsersScope message. @@ -137,6 +142,13 @@ func (a *AccessReviewScopeV2) GetGrantsByCriteriaScope() *GrantsByCriteriaScope return a.GrantsByCriteriaScope } +func (a *AccessReviewScopeV2) GetResourceSelectionScope() *ResourceSelectionScope { + if a == nil { + return nil + } + return a.ResourceSelectionScope +} + func (a *AccessReviewScopeV2) GetResourceTypeSelectionScope() *ResourceTypeSelectionScope { if a == nil { return nil @@ -171,3 +183,6 @@ func (a *AccessReviewScopeV2) GetUserCriteriaScope() *UserCriteriaScope { } return a.UserCriteriaScope } + +// #region class-body-accessreviewscopev2 +// #endregion class-body-accessreviewscopev2 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicecreaterequest.go index 8966ca77..7b60fba3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicecreaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicecreaterequest.go @@ -7,13 +7,15 @@ import ( "time" ) -// AccessReviewServiceCreateRequestScopeType - The scopeType field. +// AccessReviewServiceCreateRequestScopeType - The type of scoping method for the campaign (e.g., by entitlements, by access conflicts, or by resource). type AccessReviewServiceCreateRequestScopeType string const ( AccessReviewServiceCreateRequestScopeTypeAccessReviewScopeTypeUnspecified AccessReviewServiceCreateRequestScopeType = "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED" AccessReviewServiceCreateRequestScopeTypeAccessReviewScopeTypeByEntitlements AccessReviewServiceCreateRequestScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS" AccessReviewServiceCreateRequestScopeTypeAccessReviewScopeTypeByAccessConflicts AccessReviewServiceCreateRequestScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS" + AccessReviewServiceCreateRequestScopeTypeAccessReviewScopeTypeByResource AccessReviewServiceCreateRequestScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_RESOURCE" + AccessReviewServiceCreateRequestScopeTypeAccessReviewScopeTypeByInheritance AccessReviewServiceCreateRequestScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_INHERITANCE" ) func (e AccessReviewServiceCreateRequestScopeType) ToPointer() *AccessReviewServiceCreateRequestScopeType { @@ -24,7 +26,7 @@ func (e AccessReviewServiceCreateRequestScopeType) ToPointer() *AccessReviewServ func (e *AccessReviewServiceCreateRequestScopeType) IsExact() bool { if e != nil { switch *e { - case "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED", "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS": + case "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED", "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_RESOURCE", "ACCESS_REVIEW_SCOPE_TYPE_BY_INHERITANCE": return true } } @@ -35,20 +37,56 @@ func (e *AccessReviewServiceCreateRequestScopeType) IsExact() bool { type AccessReviewServiceCreateRequest struct { // The AccessReviewExpandMask message. AccessReviewExpandMask *AccessReviewExpandMask `json:"expandMask,omitempty"` - // The NotificationConfig message. + // The AccessReviewScopeV2 message. + // + // This message contains a oneof named apps_and_resources_scope. Only a single field of the following list may be set at a time: + // - appAccess + // - specificResources + // - appSelectionCriteria + // - resourceTypeSelections + // + // + // This message contains a oneof named users_scope. Only a single field of the following list may be set at a time: + // - allUsers + // - selectedUsers + // - userCriteria + // - celExpression + // + // + // This message contains a oneof named accounts_scope. Only a single field of the following list may be set at a time: + // - allAccounts + // - accountCriteria + // - accountCelExpression + // + // + // This message contains a oneof named grants_scope. Only a single field of the following list may be set at a time: + // - allGrants + // - grantsByCriteria + // + // + // This message contains a oneof named access_conflicts_scope. Only a single field of the following list may be set at a time: + // - allAccessConflicts + // - specificAccessConflicts + // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // + AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scopeV2,omitempty"` + // Controls which email notifications are sent during the access review lifecycle. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` CompletionDate *time.Time `json:"completionDate,omitempty"` - // The description field. + // An optional description providing context about the campaign. Description *string `json:"description,omitempty"` - // The displayName field. + // The display name for the new campaign. DisplayName *string `json:"displayName,omitempty"` - // The duplicateFrom field. + // The ID of an existing campaign to copy scope and entitlement configuration from. Optional. DuplicateFrom *string `json:"duplicateFrom,omitempty"` - // The ownerIds field. + // The IDs of the users who own and manage this campaign. At least one owner is required. OwnerIds []string `json:"ownerIds,omitempty"` - // The policyId field. + // The ID of the review policy that governs task assignment and resolution. PolicyID *string `json:"policyId,omitempty"` - // The scopeType field. + // The type of scoping method for the campaign (e.g., by entitlements, by access conflicts, or by resource). ScopeType *AccessReviewServiceCreateRequestScopeType `json:"scopeType,omitempty"` } @@ -70,6 +108,13 @@ func (a *AccessReviewServiceCreateRequest) GetAccessReviewExpandMask() *AccessRe return a.AccessReviewExpandMask } +func (a *AccessReviewServiceCreateRequest) GetAccessReviewScopeV2() *AccessReviewScopeV2 { + if a == nil { + return nil + } + return a.AccessReviewScopeV2 +} + func (a *AccessReviewServiceCreateRequest) GetNotificationConfig() *NotificationConfig { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicecreateresponse.go index 63f58d29..8f4bdb49 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicecreateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicecreateresponse.go @@ -42,7 +42,7 @@ func (e *Expanded) GetAdditionalProperties() map[string]any { type AccessReviewServiceCreateResponse struct { // The AccessReviewView message. AccessReviewView *AccessReviewView `json:"accessReview,omitempty"` - // The expanded field. + // Related objects requested via the expand mask. Expanded []Expanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicegetresponse.go index 8002c3a2..4f14390c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicegetresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicegetresponse.go @@ -42,7 +42,7 @@ func (a *AccessReviewServiceGetResponseExpanded) GetAdditionalProperties() map[s type AccessReviewServiceGetResponse struct { // The AccessReviewView message. AccessReviewView *AccessReviewView `json:"accessReview,omitempty"` - // The expanded field. + // Related objects requested via the expand mask. Expanded []AccessReviewServiceGetResponseExpanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicelistresponse.go index abf074e6..ac9939de 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicelistresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewservicelistresponse.go @@ -40,11 +40,11 @@ func (a *AccessReviewServiceListResponseExpanded) GetAdditionalProperties() map[ // The AccessReviewServiceListResponse message. type AccessReviewServiceListResponse struct { - // The expanded field. + // Related objects requested via the expand mask. Expanded []AccessReviewServiceListResponseExpanded `json:"expanded,omitempty"` - // The list field. + // The list of access review campaigns for the current page. List []AccessReviewView `json:"list,omitempty"` - // The nextPageToken field. + // Token to retrieve the next page, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewserviceupdaterequest.go index 2988d54d..6227d196 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewserviceupdaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewserviceupdaterequest.go @@ -4,7 +4,7 @@ package shared // The AccessReviewServiceUpdateRequest message. type AccessReviewServiceUpdateRequest struct { - // The AccessReview message. + // An access review campaign (also called a certification campaign) that verifies whether users still need their access entitlements. // // This message contains a oneof named setup_metadata. Only a single field of the following list may be set at a time: // - singleApp diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewserviceupdateresponse.go index 3371a30f..d1a49f39 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewserviceupdateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewserviceupdateresponse.go @@ -42,7 +42,7 @@ func (a *AccessReviewServiceUpdateResponseExpanded) GetAdditionalProperties() ma type AccessReviewServiceUpdateResponse struct { // The AccessReviewView message. AccessReviewView *AccessReviewView `json:"accessReview,omitempty"` - // The expanded field. + // Related objects requested via the expand mask. Expanded []AccessReviewServiceUpdateResponseExpanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetscopebyresourcetyperequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetscopebyresourcetyperequest.go new file mode 100644 index 00000000..f1a978d9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetscopebyresourcetyperequest.go @@ -0,0 +1,59 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessReviewSetScopeByResourceTypeRequest message. +type AccessReviewSetScopeByResourceTypeRequest struct { + // The AccessReviewScopeV2 message. + // + // This message contains a oneof named apps_and_resources_scope. Only a single field of the following list may be set at a time: + // - appAccess + // - specificResources + // - appSelectionCriteria + // - resourceTypeSelections + // + // + // This message contains a oneof named users_scope. Only a single field of the following list may be set at a time: + // - allUsers + // - selectedUsers + // - userCriteria + // - celExpression + // + // + // This message contains a oneof named accounts_scope. Only a single field of the following list may be set at a time: + // - allAccounts + // - accountCriteria + // - accountCelExpression + // + // + // This message contains a oneof named grants_scope. Only a single field of the following list may be set at a time: + // - allGrants + // - grantsByCriteria + // + // + // This message contains a oneof named access_conflicts_scope. Only a single field of the following list may be set at a time: + // - allAccessConflicts + // - specificAccessConflicts + // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // + AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scopeV2,omitempty"` + // The resource types to include in the campaign scope. Replaces all previously selected resource types. + ResourceTypeSelections []ResourceTypeIDRef `json:"resourceTypeSelections,omitempty"` +} + +func (a *AccessReviewSetScopeByResourceTypeRequest) GetAccessReviewScopeV2() *AccessReviewScopeV2 { + if a == nil { + return nil + } + return a.AccessReviewScopeV2 +} + +func (a *AccessReviewSetScopeByResourceTypeRequest) GetResourceTypeSelections() []ResourceTypeIDRef { + if a == nil { + return nil + } + return a.ResourceTypeSelections +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetscopebyresourcetyperesponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetscopebyresourcetyperesponse.go new file mode 100644 index 00000000..b9e9cdc2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetscopebyresourcetyperesponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessReviewSetScopeByResourceTypeResponse message. +type AccessReviewSetScopeByResourceTypeResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlement.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlement.go new file mode 100644 index 00000000..23b36e2a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlement.go @@ -0,0 +1,119 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// AccessReviewSetupEntitlement - An entitlement that has been selected for inclusion in an access review campaign during setup. +type AccessReviewSetupEntitlement struct { + // The ID of the access review campaign this entitlement belongs to. + AccessReviewID *string `json:"accessReviewId,omitempty"` + // The ID of the entitlement being reviewed. + AppEntitlementID *string `json:"appEntitlementId,omitempty"` + // The ID of the application that owns the entitlement. + AppID *string `json:"appId,omitempty"` + // The ID of the specific resource associated with this entitlement, if applicable. + AppResourceID *string `json:"appResourceId,omitempty"` + // The ID of the resource type associated with this entitlement, if applicable. + AppResourceTypeID *string `json:"appResourceTypeId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // An override policy ID for this specific entitlement. Populated when use_policy_override is enabled on the campaign. + CustomPolicyID *string `json:"customPolicyId,omitempty"` + DeletedAt *time.Time `json:"deletedAt,omitempty"` + // The ID of the review policy applied to this entitlement. Defaults to the campaign policy. + PolicyID *string `json:"policyId,omitempty"` + // The tenant that owns this setup entitlement. + TenantID *string `json:"tenantId,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (a AccessReviewSetupEntitlement) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AccessReviewSetupEntitlement) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *AccessReviewSetupEntitlement) GetAccessReviewID() *string { + if a == nil { + return nil + } + return a.AccessReviewID +} + +func (a *AccessReviewSetupEntitlement) GetAppEntitlementID() *string { + if a == nil { + return nil + } + return a.AppEntitlementID +} + +func (a *AccessReviewSetupEntitlement) GetAppID() *string { + if a == nil { + return nil + } + return a.AppID +} + +func (a *AccessReviewSetupEntitlement) GetAppResourceID() *string { + if a == nil { + return nil + } + return a.AppResourceID +} + +func (a *AccessReviewSetupEntitlement) GetAppResourceTypeID() *string { + if a == nil { + return nil + } + return a.AppResourceTypeID +} + +func (a *AccessReviewSetupEntitlement) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AccessReviewSetupEntitlement) GetCustomPolicyID() *string { + if a == nil { + return nil + } + return a.CustomPolicyID +} + +func (a *AccessReviewSetupEntitlement) GetDeletedAt() *time.Time { + if a == nil { + return nil + } + return a.DeletedAt +} + +func (a *AccessReviewSetupEntitlement) GetPolicyID() *string { + if a == nil { + return nil + } + return a.PolicyID +} + +func (a *AccessReviewSetupEntitlement) GetTenantID() *string { + if a == nil { + return nil + } + return a.TenantID +} + +func (a *AccessReviewSetupEntitlement) GetUpdatedAt() *time.Time { + if a == nil { + return nil + } + return a.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementandscopeservicesetrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementandscopeservicesetrequest.go new file mode 100644 index 00000000..acffb96a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementandscopeservicesetrequest.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessReviewSetupEntitlementAndScopeServiceSetRequest message. +type AccessReviewSetupEntitlementAndScopeServiceSetRequest struct { + // The AccessReviewScopeV2 message. + // + // This message contains a oneof named apps_and_resources_scope. Only a single field of the following list may be set at a time: + // - appAccess + // - specificResources + // - appSelectionCriteria + // - resourceTypeSelections + // + // + // This message contains a oneof named users_scope. Only a single field of the following list may be set at a time: + // - allUsers + // - selectedUsers + // - userCriteria + // - celExpression + // + // + // This message contains a oneof named accounts_scope. Only a single field of the following list may be set at a time: + // - allAccounts + // - accountCriteria + // - accountCelExpression + // + // + // This message contains a oneof named grants_scope. Only a single field of the following list may be set at a time: + // - allGrants + // - grantsByCriteria + // + // + // This message contains a oneof named access_conflicts_scope. Only a single field of the following list may be set at a time: + // - allAccessConflicts + // - specificAccessConflicts + // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // + AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scopeV2,omitempty"` + // The AccessReviewSetupEntitlementExpandMask message. + AccessReviewSetupEntitlementExpandMask *AccessReviewSetupEntitlementExpandMask `json:"expandMask,omitempty"` + // The entitlements to include in the campaign. Replaces all previously selected entitlements. + Entitlements []AccessReviewSetupEntitlementInput `json:"entitlements,omitempty"` +} + +func (a *AccessReviewSetupEntitlementAndScopeServiceSetRequest) GetAccessReviewScopeV2() *AccessReviewScopeV2 { + if a == nil { + return nil + } + return a.AccessReviewScopeV2 +} + +func (a *AccessReviewSetupEntitlementAndScopeServiceSetRequest) GetAccessReviewSetupEntitlementExpandMask() *AccessReviewSetupEntitlementExpandMask { + if a == nil { + return nil + } + return a.AccessReviewSetupEntitlementExpandMask +} + +func (a *AccessReviewSetupEntitlementAndScopeServiceSetRequest) GetEntitlements() []AccessReviewSetupEntitlementInput { + if a == nil { + return nil + } + return a.Entitlements +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementandscopeservicesetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementandscopeservicesetresponse.go new file mode 100644 index 00000000..f8b7ea77 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementandscopeservicesetresponse.go @@ -0,0 +1,104 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + +// AccessReviewSetupEntitlementAndScopeServiceSetResponseExpanded - Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. +type AccessReviewSetupEntitlementAndScopeServiceSetResponseExpanded struct { + // The type of the serialized message. + AtType *string `json:"@type,omitempty"` + AdditionalProperties map[string]any `additionalProperties:"true" json:"-"` +} + +func (a AccessReviewSetupEntitlementAndScopeServiceSetResponseExpanded) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AccessReviewSetupEntitlementAndScopeServiceSetResponseExpanded) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *AccessReviewSetupEntitlementAndScopeServiceSetResponseExpanded) GetAtType() *string { + if a == nil { + return nil + } + return a.AtType +} + +func (a *AccessReviewSetupEntitlementAndScopeServiceSetResponseExpanded) GetAdditionalProperties() map[string]any { + if a == nil { + return nil + } + return a.AdditionalProperties +} + +// The AccessReviewSetupEntitlementAndScopeServiceSetResponse message. +type AccessReviewSetupEntitlementAndScopeServiceSetResponse struct { + // The AccessReviewScopeV2 message. + // + // This message contains a oneof named apps_and_resources_scope. Only a single field of the following list may be set at a time: + // - appAccess + // - specificResources + // - appSelectionCriteria + // - resourceTypeSelections + // + // + // This message contains a oneof named users_scope. Only a single field of the following list may be set at a time: + // - allUsers + // - selectedUsers + // - userCriteria + // - celExpression + // + // + // This message contains a oneof named accounts_scope. Only a single field of the following list may be set at a time: + // - allAccounts + // - accountCriteria + // - accountCelExpression + // + // + // This message contains a oneof named grants_scope. Only a single field of the following list may be set at a time: + // - allGrants + // - grantsByCriteria + // + // + // This message contains a oneof named access_conflicts_scope. Only a single field of the following list may be set at a time: + // - allAccessConflicts + // - specificAccessConflicts + // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // + AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scopeV2,omitempty"` + // Related objects requested via the expand mask. + Expanded []AccessReviewSetupEntitlementAndScopeServiceSetResponseExpanded `json:"expanded,omitempty"` + // The current list of setup entitlements for the campaign. + List []AccessReviewSetupEntitlementView `json:"list,omitempty"` +} + +func (a *AccessReviewSetupEntitlementAndScopeServiceSetResponse) GetAccessReviewScopeV2() *AccessReviewScopeV2 { + if a == nil { + return nil + } + return a.AccessReviewScopeV2 +} + +func (a *AccessReviewSetupEntitlementAndScopeServiceSetResponse) GetExpanded() []AccessReviewSetupEntitlementAndScopeServiceSetResponseExpanded { + if a == nil { + return nil + } + return a.Expanded +} + +func (a *AccessReviewSetupEntitlementAndScopeServiceSetResponse) GetList() []AccessReviewSetupEntitlementView { + if a == nil { + return nil + } + return a.List +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementexpandmask.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementexpandmask.go new file mode 100644 index 00000000..e82eceae --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementexpandmask.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessReviewSetupEntitlementExpandMask message. +type AccessReviewSetupEntitlementExpandMask struct { + // The paths field. + Paths []string `json:"paths,omitempty"` +} + +func (a *AccessReviewSetupEntitlementExpandMask) GetPaths() []string { + if a == nil { + return nil + } + return a.Paths +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementinput.go new file mode 100644 index 00000000..fa369b4f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementinput.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AccessReviewSetupEntitlementInput - Identifies an entitlement to add or remove from a campaign's setup. +type AccessReviewSetupEntitlementInput struct { + // The ID of the entitlement. + AppEntitlementID *string `json:"appEntitlementId,omitempty"` + // The ID of the application that owns the entitlement. + AppID *string `json:"appId,omitempty"` +} + +func (a *AccessReviewSetupEntitlementInput) GetAppEntitlementID() *string { + if a == nil { + return nil + } + return a.AppEntitlementID +} + +func (a *AccessReviewSetupEntitlementInput) GetAppID() *string { + if a == nil { + return nil + } + return a.AppID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementview.go new file mode 100644 index 00000000..52e4b479 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewsetupentitlementview.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessReviewSetupEntitlementView message. +type AccessReviewSetupEntitlementView struct { + // An entitlement that has been selected for inclusion in an access review campaign during setup. + AccessReviewSetupEntitlement *AccessReviewSetupEntitlement `json:"accessReviewEntitlement,omitempty"` + // The appPath field. + AppPath *string `json:"appPath,omitempty"` + // The entitlementPath field. + EntitlementPath *string `json:"entitlementPath,omitempty"` + // The policyPath field. + PolicyPath *string `json:"policyPath,omitempty"` +} + +func (a *AccessReviewSetupEntitlementView) GetAccessReviewSetupEntitlement() *AccessReviewSetupEntitlement { + if a == nil { + return nil + } + return a.AccessReviewSetupEntitlement +} + +func (a *AccessReviewSetupEntitlementView) GetAppPath() *string { + if a == nil { + return nil + } + return a.AppPath +} + +func (a *AccessReviewSetupEntitlementView) GetEntitlementPath() *string { + if a == nil { + return nil + } + return a.EntitlementPath +} + +func (a *AccessReviewSetupEntitlementView) GetPolicyPath() *string { + if a == nil { + return nil + } + return a.PolicyPath +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplate.go index 1120b0e1..ebfc627b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplate.go @@ -7,6 +7,55 @@ import ( "time" ) +// AccessReviewTemplateAccuracyIssueAction - The accuracyIssueAction field. +type AccessReviewTemplateAccuracyIssueAction string + +const ( + AccessReviewTemplateAccuracyIssueActionAccuracyIssueActionUnspecified AccessReviewTemplateAccuracyIssueAction = "ACCURACY_ISSUE_ACTION_UNSPECIFIED" + AccessReviewTemplateAccuracyIssueActionAccuracyIssueActionContinue AccessReviewTemplateAccuracyIssueAction = "ACCURACY_ISSUE_ACTION_CONTINUE" + AccessReviewTemplateAccuracyIssueActionAccuracyIssueActionWait AccessReviewTemplateAccuracyIssueAction = "ACCURACY_ISSUE_ACTION_WAIT" +) + +func (e AccessReviewTemplateAccuracyIssueAction) ToPointer() *AccessReviewTemplateAccuracyIssueAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AccessReviewTemplateAccuracyIssueAction) IsExact() bool { + if e != nil { + switch *e { + case "ACCURACY_ISSUE_ACTION_UNSPECIFIED", "ACCURACY_ISSUE_ACTION_CONTINUE", "ACCURACY_ISSUE_ACTION_WAIT": + return true + } + } + return false +} + +// AccessReviewTemplateAutoCloseDecision - The autoCloseDecision field. +type AccessReviewTemplateAutoCloseDecision string + +const ( + AccessReviewTemplateAutoCloseDecisionCloseDecisionUnspecified AccessReviewTemplateAutoCloseDecision = "CLOSE_DECISION_UNSPECIFIED" + AccessReviewTemplateAutoCloseDecisionCloseDecisionRevoked AccessReviewTemplateAutoCloseDecision = "CLOSE_DECISION_REVOKED" + AccessReviewTemplateAutoCloseDecisionCloseDecisionSkip AccessReviewTemplateAutoCloseDecision = "CLOSE_DECISION_SKIP" + AccessReviewTemplateAutoCloseDecisionCloseDecisionNoAction AccessReviewTemplateAutoCloseDecision = "CLOSE_DECISION_NO_ACTION" +) + +func (e AccessReviewTemplateAutoCloseDecision) ToPointer() *AccessReviewTemplateAutoCloseDecision { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AccessReviewTemplateAutoCloseDecision) IsExact() bool { + if e != nil { + switch *e { + case "CLOSE_DECISION_UNSPECIFIED", "CLOSE_DECISION_REVOKED", "CLOSE_DECISION_SKIP", "CLOSE_DECISION_NO_ACTION": + return true + } + } + return false +} + // AccessReviewTemplateDefaultView - The defaultView field. type AccessReviewTemplateDefaultView string @@ -15,6 +64,7 @@ const ( AccessReviewTemplateDefaultViewAccessReviewViewTypeByApp AccessReviewTemplateDefaultView = "ACCESS_REVIEW_VIEW_TYPE_BY_APP" AccessReviewTemplateDefaultViewAccessReviewViewTypeByUser AccessReviewTemplateDefaultView = "ACCESS_REVIEW_VIEW_TYPE_BY_USER" AccessReviewTemplateDefaultViewAccessReviewViewTypeUnstructured AccessReviewTemplateDefaultView = "ACCESS_REVIEW_VIEW_TYPE_UNSTRUCTURED" + AccessReviewTemplateDefaultViewAccessReviewViewTypeByResource AccessReviewTemplateDefaultView = "ACCESS_REVIEW_VIEW_TYPE_BY_RESOURCE" ) func (e AccessReviewTemplateDefaultView) ToPointer() *AccessReviewTemplateDefaultView { @@ -25,7 +75,7 @@ func (e AccessReviewTemplateDefaultView) ToPointer() *AccessReviewTemplateDefaul func (e *AccessReviewTemplateDefaultView) IsExact() bool { if e != nil { switch *e { - case "ACCESS_REVIEW_VIEW_TYPE_UNSPECIFIED", "ACCESS_REVIEW_VIEW_TYPE_BY_APP", "ACCESS_REVIEW_VIEW_TYPE_BY_USER", "ACCESS_REVIEW_VIEW_TYPE_UNSTRUCTURED": + case "ACCESS_REVIEW_VIEW_TYPE_UNSPECIFIED", "ACCESS_REVIEW_VIEW_TYPE_BY_APP", "ACCESS_REVIEW_VIEW_TYPE_BY_USER", "ACCESS_REVIEW_VIEW_TYPE_UNSTRUCTURED", "ACCESS_REVIEW_VIEW_TYPE_BY_RESOURCE": return true } } @@ -39,6 +89,8 @@ const ( AccessReviewTemplateScopeTypeAccessReviewScopeTypeUnspecified AccessReviewTemplateScopeType = "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED" AccessReviewTemplateScopeTypeAccessReviewScopeTypeByEntitlements AccessReviewTemplateScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS" AccessReviewTemplateScopeTypeAccessReviewScopeTypeByAccessConflicts AccessReviewTemplateScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS" + AccessReviewTemplateScopeTypeAccessReviewScopeTypeByResource AccessReviewTemplateScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_RESOURCE" + AccessReviewTemplateScopeTypeAccessReviewScopeTypeByInheritance AccessReviewTemplateScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_INHERITANCE" ) func (e AccessReviewTemplateScopeType) ToPointer() *AccessReviewTemplateScopeType { @@ -49,18 +101,22 @@ func (e AccessReviewTemplateScopeType) ToPointer() *AccessReviewTemplateScopeTyp func (e *AccessReviewTemplateScopeType) IsExact() bool { if e != nil { switch *e { - case "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED", "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS": + case "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED", "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_RESOURCE", "ACCESS_REVIEW_SCOPE_TYPE_BY_INHERITANCE": return true } } return false } -// The AccessReviewTemplate message. +// AccessReviewTemplate - A reusable template that defines the configuration for creating access review campaigns. +// +// Templates can optionally be scheduled to automatically create campaigns on a recurring basis. // // This message contains a oneof named slack_channel_details. Only a single field of the following list may be set at a time: // - slackChannel type AccessReviewTemplate struct { + // Configuration for which columns are visible in the reviewer task list. + AccessReviewColumnConfig *AccessReviewColumnConfig `json:"columnConfig,omitempty"` // The AccessReviewInclusionScope message. AccessReviewInclusionScope *AccessReviewInclusionScope `json:"inclusionScope,omitempty"` // The AccessReviewScopeV2 message. @@ -94,8 +150,12 @@ type AccessReviewTemplate struct { // - allAccessConflicts // - specificAccessConflicts // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scope,omitempty"` - // The NotificationConfig message. + // Controls which email notifications are sent during the access review lifecycle. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` // The RecurrenceRule message. // @@ -109,26 +169,36 @@ type AccessReviewTemplate struct { // The SlackChannel message. SlackChannel *SlackChannel `json:"slackChannel,omitempty"` AccessReviewDuration *string `json:"accessReviewDuration,omitempty"` + // The accuracyIssueAction field. + AccuracyIssueAction *AccessReviewTemplateAccuracyIssueAction `json:"accuracyIssueAction,omitempty"` + // Auto-close configuration + // start date and access_review_duration will be used to calculate the scheduled close date + AutoCloseCampaign *bool `json:"autoCloseCampaign,omitempty"` + // The autoCloseDecision field. + AutoCloseDecision *AccessReviewTemplateAutoCloseDecision `json:"autoCloseDecision,omitempty"` // auto generate report when campaign is closed - AutoGenerateReport *bool `json:"autoGenerateReport,omitempty"` - CreatedAt *time.Time `json:"createdAt,omitempty"` + AutoGenerateReport *bool `json:"autoGenerateReport,omitempty"` + // Auto-start configuration + // next_scheduled_campaign_at will be used as the scheduled start date + AutoStartCampaign *bool `json:"autoStartCampaign,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` // The defaultView field. DefaultView *AccessReviewTemplateDefaultView `json:"defaultView,omitempty"` DeletedAt *time.Time `json:"deletedAt,omitempty"` - // The description field. + // An optional description providing context about this template. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name of this template. DisplayName *string `json:"displayName,omitempty"` // The exemptCertifiedAccessConflicts field. ExemptCertifiedAccessConflicts *bool `json:"exemptCertifiedAccessConflicts,omitempty"` - // The id field. + // The unique identifier of this template. ID *string `json:"id,omitempty"` - // The isCampaignScheduleEnabled field. + // Whether automatic campaign creation on the recurrence schedule is enabled. IsCampaignScheduleEnabled *bool `json:"isCampaignScheduleEnabled,omitempty"` NextScheduledCampaignAt *time.Time `json:"nextScheduledCampaignAt,omitempty"` - // The occurrences field. + // The number of campaigns that have been created from this template. Occurrences *int `json:"occurrences,omitempty"` - // The policyId field. + // The ID of the default review policy applied to campaigns created from this template. PolicyID *string `json:"policyId,omitempty"` // The reviewInstructions field. ReviewInstructions *string `json:"reviewInstructions,omitempty"` @@ -150,6 +220,13 @@ func (a *AccessReviewTemplate) UnmarshalJSON(data []byte) error { return nil } +func (a *AccessReviewTemplate) GetAccessReviewColumnConfig() *AccessReviewColumnConfig { + if a == nil { + return nil + } + return a.AccessReviewColumnConfig +} + func (a *AccessReviewTemplate) GetAccessReviewInclusionScope() *AccessReviewInclusionScope { if a == nil { return nil @@ -199,6 +276,27 @@ func (a *AccessReviewTemplate) GetAccessReviewDuration() *string { return a.AccessReviewDuration } +func (a *AccessReviewTemplate) GetAccuracyIssueAction() *AccessReviewTemplateAccuracyIssueAction { + if a == nil { + return nil + } + return a.AccuracyIssueAction +} + +func (a *AccessReviewTemplate) GetAutoCloseCampaign() *bool { + if a == nil { + return nil + } + return a.AutoCloseCampaign +} + +func (a *AccessReviewTemplate) GetAutoCloseDecision() *AccessReviewTemplateAutoCloseDecision { + if a == nil { + return nil + } + return a.AutoCloseDecision +} + func (a *AccessReviewTemplate) GetAutoGenerateReport() *bool { if a == nil { return nil @@ -206,6 +304,13 @@ func (a *AccessReviewTemplate) GetAutoGenerateReport() *bool { return a.AutoGenerateReport } +func (a *AccessReviewTemplate) GetAutoStartCampaign() *bool { + if a == nil { + return nil + } + return a.AutoStartCampaign +} + func (a *AccessReviewTemplate) GetCreatedAt() *time.Time { if a == nil { return nil @@ -311,11 +416,15 @@ func (a *AccessReviewTemplate) GetUsePolicyOverride() *bool { return a.UsePolicyOverride } -// AccessReviewTemplateInput - The AccessReviewTemplate message. +// AccessReviewTemplateInput - A reusable template that defines the configuration for creating access review campaigns. +// +// Templates can optionally be scheduled to automatically create campaigns on a recurring basis. // // This message contains a oneof named slack_channel_details. Only a single field of the following list may be set at a time: // - slackChannel type AccessReviewTemplateInput struct { + // Configuration for which columns are visible in the reviewer task list. + AccessReviewColumnConfig *AccessReviewColumnConfig `json:"columnConfig,omitempty"` // The AccessReviewInclusionScope message. AccessReviewInclusionScope *AccessReviewInclusionScope `json:"inclusionScope,omitempty"` // The AccessReviewScopeV2 message. @@ -349,8 +458,12 @@ type AccessReviewTemplateInput struct { // - allAccessConflicts // - specificAccessConflicts // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scope,omitempty"` - // The NotificationConfig message. + // Controls which email notifications are sent during the access review lifecycle. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` // The RecurrenceRule message. // @@ -364,24 +477,34 @@ type AccessReviewTemplateInput struct { // The SlackChannel message. SlackChannel *SlackChannel `json:"slackChannel,omitempty"` AccessReviewDuration *string `json:"accessReviewDuration,omitempty"` + // The accuracyIssueAction field. + AccuracyIssueAction *AccessReviewTemplateAccuracyIssueAction `json:"accuracyIssueAction,omitempty"` + // Auto-close configuration + // start date and access_review_duration will be used to calculate the scheduled close date + AutoCloseCampaign *bool `json:"autoCloseCampaign,omitempty"` + // The autoCloseDecision field. + AutoCloseDecision *AccessReviewTemplateAutoCloseDecision `json:"autoCloseDecision,omitempty"` // auto generate report when campaign is closed AutoGenerateReport *bool `json:"autoGenerateReport,omitempty"` + // Auto-start configuration + // next_scheduled_campaign_at will be used as the scheduled start date + AutoStartCampaign *bool `json:"autoStartCampaign,omitempty"` // The defaultView field. DefaultView *AccessReviewTemplateDefaultView `json:"defaultView,omitempty"` - // The description field. + // An optional description providing context about this template. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name of this template. DisplayName *string `json:"displayName,omitempty"` // The exemptCertifiedAccessConflicts field. ExemptCertifiedAccessConflicts *bool `json:"exemptCertifiedAccessConflicts,omitempty"` - // The id field. + // The unique identifier of this template. ID *string `json:"id,omitempty"` - // The isCampaignScheduleEnabled field. + // Whether automatic campaign creation on the recurrence schedule is enabled. IsCampaignScheduleEnabled *bool `json:"isCampaignScheduleEnabled,omitempty"` NextScheduledCampaignAt *time.Time `json:"nextScheduledCampaignAt,omitempty"` - // The occurrences field. + // The number of campaigns that have been created from this template. Occurrences *int `json:"occurrences,omitempty"` - // The policyId field. + // The ID of the default review policy applied to campaigns created from this template. PolicyID *string `json:"policyId,omitempty"` // The reviewInstructions field. ReviewInstructions *string `json:"reviewInstructions,omitempty"` @@ -402,6 +525,13 @@ func (a *AccessReviewTemplateInput) UnmarshalJSON(data []byte) error { return nil } +func (a *AccessReviewTemplateInput) GetAccessReviewColumnConfig() *AccessReviewColumnConfig { + if a == nil { + return nil + } + return a.AccessReviewColumnConfig +} + func (a *AccessReviewTemplateInput) GetAccessReviewInclusionScope() *AccessReviewInclusionScope { if a == nil { return nil @@ -451,6 +581,27 @@ func (a *AccessReviewTemplateInput) GetAccessReviewDuration() *string { return a.AccessReviewDuration } +func (a *AccessReviewTemplateInput) GetAccuracyIssueAction() *AccessReviewTemplateAccuracyIssueAction { + if a == nil { + return nil + } + return a.AccuracyIssueAction +} + +func (a *AccessReviewTemplateInput) GetAutoCloseCampaign() *bool { + if a == nil { + return nil + } + return a.AutoCloseCampaign +} + +func (a *AccessReviewTemplateInput) GetAutoCloseDecision() *AccessReviewTemplateAutoCloseDecision { + if a == nil { + return nil + } + return a.AutoCloseDecision +} + func (a *AccessReviewTemplateInput) GetAutoGenerateReport() *bool { if a == nil { return nil @@ -458,6 +609,13 @@ func (a *AccessReviewTemplateInput) GetAutoGenerateReport() *bool { return a.AutoGenerateReport } +func (a *AccessReviewTemplateInput) GetAutoStartCampaign() *bool { + if a == nil { + return nil + } + return a.AutoStartCampaign +} + func (a *AccessReviewTemplateInput) GetDefaultView() *AccessReviewTemplateDefaultView { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicecreaterequest.go index 1e3d3180..beab981a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicecreaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicecreaterequest.go @@ -2,6 +2,81 @@ package shared +// AccessReviewTemplateServiceCreateRequestAccuracyIssueAction - The accuracyIssueAction field. +type AccessReviewTemplateServiceCreateRequestAccuracyIssueAction string + +const ( + AccessReviewTemplateServiceCreateRequestAccuracyIssueActionAccuracyIssueActionUnspecified AccessReviewTemplateServiceCreateRequestAccuracyIssueAction = "ACCURACY_ISSUE_ACTION_UNSPECIFIED" + AccessReviewTemplateServiceCreateRequestAccuracyIssueActionAccuracyIssueActionContinue AccessReviewTemplateServiceCreateRequestAccuracyIssueAction = "ACCURACY_ISSUE_ACTION_CONTINUE" + AccessReviewTemplateServiceCreateRequestAccuracyIssueActionAccuracyIssueActionWait AccessReviewTemplateServiceCreateRequestAccuracyIssueAction = "ACCURACY_ISSUE_ACTION_WAIT" +) + +func (e AccessReviewTemplateServiceCreateRequestAccuracyIssueAction) ToPointer() *AccessReviewTemplateServiceCreateRequestAccuracyIssueAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AccessReviewTemplateServiceCreateRequestAccuracyIssueAction) IsExact() bool { + if e != nil { + switch *e { + case "ACCURACY_ISSUE_ACTION_UNSPECIFIED", "ACCURACY_ISSUE_ACTION_CONTINUE", "ACCURACY_ISSUE_ACTION_WAIT": + return true + } + } + return false +} + +// AccessReviewTemplateServiceCreateRequestAutoCloseDecision - The autoCloseDecision field. +type AccessReviewTemplateServiceCreateRequestAutoCloseDecision string + +const ( + AccessReviewTemplateServiceCreateRequestAutoCloseDecisionCloseDecisionUnspecified AccessReviewTemplateServiceCreateRequestAutoCloseDecision = "CLOSE_DECISION_UNSPECIFIED" + AccessReviewTemplateServiceCreateRequestAutoCloseDecisionCloseDecisionRevoked AccessReviewTemplateServiceCreateRequestAutoCloseDecision = "CLOSE_DECISION_REVOKED" + AccessReviewTemplateServiceCreateRequestAutoCloseDecisionCloseDecisionSkip AccessReviewTemplateServiceCreateRequestAutoCloseDecision = "CLOSE_DECISION_SKIP" + AccessReviewTemplateServiceCreateRequestAutoCloseDecisionCloseDecisionNoAction AccessReviewTemplateServiceCreateRequestAutoCloseDecision = "CLOSE_DECISION_NO_ACTION" +) + +func (e AccessReviewTemplateServiceCreateRequestAutoCloseDecision) ToPointer() *AccessReviewTemplateServiceCreateRequestAutoCloseDecision { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AccessReviewTemplateServiceCreateRequestAutoCloseDecision) IsExact() bool { + if e != nil { + switch *e { + case "CLOSE_DECISION_UNSPECIFIED", "CLOSE_DECISION_REVOKED", "CLOSE_DECISION_SKIP", "CLOSE_DECISION_NO_ACTION": + return true + } + } + return false +} + +// AccessReviewTemplateServiceCreateRequestDefaultView - The defaultView field. +type AccessReviewTemplateServiceCreateRequestDefaultView string + +const ( + AccessReviewTemplateServiceCreateRequestDefaultViewAccessReviewViewTypeUnspecified AccessReviewTemplateServiceCreateRequestDefaultView = "ACCESS_REVIEW_VIEW_TYPE_UNSPECIFIED" + AccessReviewTemplateServiceCreateRequestDefaultViewAccessReviewViewTypeByApp AccessReviewTemplateServiceCreateRequestDefaultView = "ACCESS_REVIEW_VIEW_TYPE_BY_APP" + AccessReviewTemplateServiceCreateRequestDefaultViewAccessReviewViewTypeByUser AccessReviewTemplateServiceCreateRequestDefaultView = "ACCESS_REVIEW_VIEW_TYPE_BY_USER" + AccessReviewTemplateServiceCreateRequestDefaultViewAccessReviewViewTypeUnstructured AccessReviewTemplateServiceCreateRequestDefaultView = "ACCESS_REVIEW_VIEW_TYPE_UNSTRUCTURED" + AccessReviewTemplateServiceCreateRequestDefaultViewAccessReviewViewTypeByResource AccessReviewTemplateServiceCreateRequestDefaultView = "ACCESS_REVIEW_VIEW_TYPE_BY_RESOURCE" +) + +func (e AccessReviewTemplateServiceCreateRequestDefaultView) ToPointer() *AccessReviewTemplateServiceCreateRequestDefaultView { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AccessReviewTemplateServiceCreateRequestDefaultView) IsExact() bool { + if e != nil { + switch *e { + case "ACCESS_REVIEW_VIEW_TYPE_UNSPECIFIED", "ACCESS_REVIEW_VIEW_TYPE_BY_APP", "ACCESS_REVIEW_VIEW_TYPE_BY_USER", "ACCESS_REVIEW_VIEW_TYPE_UNSTRUCTURED", "ACCESS_REVIEW_VIEW_TYPE_BY_RESOURCE": + return true + } + } + return false +} + // AccessReviewTemplateServiceCreateRequestScopeType - The scopeType field. type AccessReviewTemplateServiceCreateRequestScopeType string @@ -9,6 +84,8 @@ const ( AccessReviewTemplateServiceCreateRequestScopeTypeAccessReviewScopeTypeUnspecified AccessReviewTemplateServiceCreateRequestScopeType = "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED" AccessReviewTemplateServiceCreateRequestScopeTypeAccessReviewScopeTypeByEntitlements AccessReviewTemplateServiceCreateRequestScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS" AccessReviewTemplateServiceCreateRequestScopeTypeAccessReviewScopeTypeByAccessConflicts AccessReviewTemplateServiceCreateRequestScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS" + AccessReviewTemplateServiceCreateRequestScopeTypeAccessReviewScopeTypeByResource AccessReviewTemplateServiceCreateRequestScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_RESOURCE" + AccessReviewTemplateServiceCreateRequestScopeTypeAccessReviewScopeTypeByInheritance AccessReviewTemplateServiceCreateRequestScopeType = "ACCESS_REVIEW_SCOPE_TYPE_BY_INHERITANCE" ) func (e AccessReviewTemplateServiceCreateRequestScopeType) ToPointer() *AccessReviewTemplateServiceCreateRequestScopeType { @@ -19,7 +96,7 @@ func (e AccessReviewTemplateServiceCreateRequestScopeType) ToPointer() *AccessRe func (e *AccessReviewTemplateServiceCreateRequestScopeType) IsExact() bool { if e != nil { switch *e { - case "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED", "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS": + case "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED", "ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS", "ACCESS_REVIEW_SCOPE_TYPE_BY_RESOURCE", "ACCESS_REVIEW_SCOPE_TYPE_BY_INHERITANCE": return true } } @@ -28,19 +105,100 @@ func (e *AccessReviewTemplateServiceCreateRequestScopeType) IsExact() bool { // The AccessReviewTemplateServiceCreateRequest message. type AccessReviewTemplateServiceCreateRequest struct { - // The NotificationConfig message. - NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` - AccessReviewDuration *string `json:"accessReviewDuration,omitempty"` - // The description field. + // Configuration for which columns are visible in the reviewer task list. + AccessReviewColumnConfig *AccessReviewColumnConfig `json:"columnConfig,omitempty"` + // The AccessReviewScopeV2 message. + // + // This message contains a oneof named apps_and_resources_scope. Only a single field of the following list may be set at a time: + // - appAccess + // - specificResources + // - appSelectionCriteria + // - resourceTypeSelections + // + // + // This message contains a oneof named users_scope. Only a single field of the following list may be set at a time: + // - allUsers + // - selectedUsers + // - userCriteria + // - celExpression + // + // + // This message contains a oneof named accounts_scope. Only a single field of the following list may be set at a time: + // - allAccounts + // - accountCriteria + // - accountCelExpression + // + // + // This message contains a oneof named grants_scope. Only a single field of the following list may be set at a time: + // - allGrants + // - grantsByCriteria + // + // + // This message contains a oneof named access_conflicts_scope. Only a single field of the following list may be set at a time: + // - allAccessConflicts + // - specificAccessConflicts + // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // + AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scope,omitempty"` + // Controls which email notifications are sent during the access review lifecycle. + NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` + // The RecurrenceRule message. + // + // This message contains a oneof named end_condition. Only a single field of the following list may be set at a time: + // - endDate + // - occurrences + // + RecurrenceRule *RecurrenceRule `json:"recurrenceRule,omitempty"` + // Signature configuration for access review submissions + ReviewSignatureConfig *ReviewSignatureConfig `json:"signatureConfig,omitempty"` + AccessReviewDuration *string `json:"accessReviewDuration,omitempty"` + // The accuracyIssueAction field. + AccuracyIssueAction *AccessReviewTemplateServiceCreateRequestAccuracyIssueAction `json:"accuracyIssueAction,omitempty"` + // The autoCloseCampaign field. + AutoCloseCampaign *bool `json:"autoCloseCampaign,omitempty"` + // The autoCloseDecision field. + AutoCloseDecision *AccessReviewTemplateServiceCreateRequestAutoCloseDecision `json:"autoCloseDecision,omitempty"` + // auto generate report when campaign is closed + AutoGenerateReport *bool `json:"autoGenerateReport,omitempty"` + // The autoStartCampaign field. + AutoStartCampaign *bool `json:"autoStartCampaign,omitempty"` + // The defaultView field. + DefaultView *AccessReviewTemplateServiceCreateRequestDefaultView `json:"defaultView,omitempty"` + // An optional description providing context about the template. Description *string `json:"description,omitempty"` - // The displayName field. + // The display name for the new template. DisplayName *string `json:"displayName,omitempty"` - // The ownerIds field. + // The exemptCertifiedAccessConflicts field. + ExemptCertifiedAccessConflicts *bool `json:"exemptCertifiedAccessConflicts,omitempty"` + // The isCampaignScheduleEnabled field. + IsCampaignScheduleEnabled *bool `json:"isCampaignScheduleEnabled,omitempty"` + // The IDs of the users who own this template. At least one owner is required. OwnerIds []string `json:"ownerIds,omitempty"` - // The policyId field. + // The ID of the default review policy for campaigns created from this template. PolicyID *string `json:"policyId,omitempty"` + // The reviewInstructions field. + ReviewInstructions *string `json:"reviewInstructions,omitempty"` // The scopeType field. ScopeType *AccessReviewTemplateServiceCreateRequestScopeType `json:"scopeType,omitempty"` + // The usePolicyOverride field. + UsePolicyOverride *bool `json:"usePolicyOverride,omitempty"` +} + +func (a *AccessReviewTemplateServiceCreateRequest) GetAccessReviewColumnConfig() *AccessReviewColumnConfig { + if a == nil { + return nil + } + return a.AccessReviewColumnConfig +} + +func (a *AccessReviewTemplateServiceCreateRequest) GetAccessReviewScopeV2() *AccessReviewScopeV2 { + if a == nil { + return nil + } + return a.AccessReviewScopeV2 } func (a *AccessReviewTemplateServiceCreateRequest) GetNotificationConfig() *NotificationConfig { @@ -50,6 +208,20 @@ func (a *AccessReviewTemplateServiceCreateRequest) GetNotificationConfig() *Noti return a.NotificationConfig } +func (a *AccessReviewTemplateServiceCreateRequest) GetRecurrenceRule() *RecurrenceRule { + if a == nil { + return nil + } + return a.RecurrenceRule +} + +func (a *AccessReviewTemplateServiceCreateRequest) GetReviewSignatureConfig() *ReviewSignatureConfig { + if a == nil { + return nil + } + return a.ReviewSignatureConfig +} + func (a *AccessReviewTemplateServiceCreateRequest) GetAccessReviewDuration() *string { if a == nil { return nil @@ -57,6 +229,48 @@ func (a *AccessReviewTemplateServiceCreateRequest) GetAccessReviewDuration() *st return a.AccessReviewDuration } +func (a *AccessReviewTemplateServiceCreateRequest) GetAccuracyIssueAction() *AccessReviewTemplateServiceCreateRequestAccuracyIssueAction { + if a == nil { + return nil + } + return a.AccuracyIssueAction +} + +func (a *AccessReviewTemplateServiceCreateRequest) GetAutoCloseCampaign() *bool { + if a == nil { + return nil + } + return a.AutoCloseCampaign +} + +func (a *AccessReviewTemplateServiceCreateRequest) GetAutoCloseDecision() *AccessReviewTemplateServiceCreateRequestAutoCloseDecision { + if a == nil { + return nil + } + return a.AutoCloseDecision +} + +func (a *AccessReviewTemplateServiceCreateRequest) GetAutoGenerateReport() *bool { + if a == nil { + return nil + } + return a.AutoGenerateReport +} + +func (a *AccessReviewTemplateServiceCreateRequest) GetAutoStartCampaign() *bool { + if a == nil { + return nil + } + return a.AutoStartCampaign +} + +func (a *AccessReviewTemplateServiceCreateRequest) GetDefaultView() *AccessReviewTemplateServiceCreateRequestDefaultView { + if a == nil { + return nil + } + return a.DefaultView +} + func (a *AccessReviewTemplateServiceCreateRequest) GetDescription() *string { if a == nil { return nil @@ -71,6 +285,20 @@ func (a *AccessReviewTemplateServiceCreateRequest) GetDisplayName() *string { return a.DisplayName } +func (a *AccessReviewTemplateServiceCreateRequest) GetExemptCertifiedAccessConflicts() *bool { + if a == nil { + return nil + } + return a.ExemptCertifiedAccessConflicts +} + +func (a *AccessReviewTemplateServiceCreateRequest) GetIsCampaignScheduleEnabled() *bool { + if a == nil { + return nil + } + return a.IsCampaignScheduleEnabled +} + func (a *AccessReviewTemplateServiceCreateRequest) GetOwnerIds() []string { if a == nil { return nil @@ -85,9 +313,23 @@ func (a *AccessReviewTemplateServiceCreateRequest) GetPolicyID() *string { return a.PolicyID } +func (a *AccessReviewTemplateServiceCreateRequest) GetReviewInstructions() *string { + if a == nil { + return nil + } + return a.ReviewInstructions +} + func (a *AccessReviewTemplateServiceCreateRequest) GetScopeType() *AccessReviewTemplateServiceCreateRequestScopeType { if a == nil { return nil } return a.ScopeType } + +func (a *AccessReviewTemplateServiceCreateRequest) GetUsePolicyOverride() *bool { + if a == nil { + return nil + } + return a.UsePolicyOverride +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicecreateresponse.go index 9b26f5b4..d02c8b10 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicecreateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicecreateresponse.go @@ -4,7 +4,8 @@ package shared // The AccessReviewTemplateServiceCreateResponse message. type AccessReviewTemplateServiceCreateResponse struct { - // The AccessReviewTemplate message. + // A reusable template that defines the configuration for creating access review campaigns. + // Templates can optionally be scheduled to automatically create campaigns on a recurring basis. // // This message contains a oneof named slack_channel_details. Only a single field of the following list may be set at a time: // - slackChannel diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicegetresponse.go index f194c6c9..ce4a4025 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicegetresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateservicegetresponse.go @@ -4,7 +4,8 @@ package shared // The AccessReviewTemplateServiceGetResponse message. type AccessReviewTemplateServiceGetResponse struct { - // The AccessReviewTemplate message. + // A reusable template that defines the configuration for creating access review campaigns. + // Templates can optionally be scheduled to automatically create campaigns on a recurring basis. // // This message contains a oneof named slack_channel_details. Only a single field of the following list may be set at a time: // - slackChannel diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateserviceupdaterequest.go index 1cae09ca..d06c905e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateserviceupdaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateserviceupdaterequest.go @@ -4,7 +4,8 @@ package shared // The AccessReviewTemplateServiceUpdateRequest message. type AccessReviewTemplateServiceUpdateRequest struct { - // The AccessReviewTemplate message. + // A reusable template that defines the configuration for creating access review campaigns. + // Templates can optionally be scheduled to automatically create campaigns on a recurring basis. // // This message contains a oneof named slack_channel_details. Only a single field of the following list may be set at a time: // - slackChannel diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateserviceupdateresponse.go index b61bee09..b91c4489 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateserviceupdateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplateserviceupdateresponse.go @@ -4,7 +4,8 @@ package shared // The AccessReviewTemplateServiceUpdateResponse message. type AccessReviewTemplateServiceUpdateResponse struct { - // The AccessReviewTemplate message. + // A reusable template that defines the configuration for creating access review campaigns. + // Templates can optionally be scheduled to automatically create campaigns on a recurring basis. // // This message contains a oneof named slack_channel_details. Only a single field of the following list may be set at a time: // - slackChannel diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetscopebyresourcetyperequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetscopebyresourcetyperequest.go new file mode 100644 index 00000000..1500592f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetscopebyresourcetyperequest.go @@ -0,0 +1,59 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessReviewTemplateSetScopeByResourceTypeRequest message. +type AccessReviewTemplateSetScopeByResourceTypeRequest struct { + // The AccessReviewScopeV2 message. + // + // This message contains a oneof named apps_and_resources_scope. Only a single field of the following list may be set at a time: + // - appAccess + // - specificResources + // - appSelectionCriteria + // - resourceTypeSelections + // + // + // This message contains a oneof named users_scope. Only a single field of the following list may be set at a time: + // - allUsers + // - selectedUsers + // - userCriteria + // - celExpression + // + // + // This message contains a oneof named accounts_scope. Only a single field of the following list may be set at a time: + // - allAccounts + // - accountCriteria + // - accountCelExpression + // + // + // This message contains a oneof named grants_scope. Only a single field of the following list may be set at a time: + // - allGrants + // - grantsByCriteria + // + // + // This message contains a oneof named access_conflicts_scope. Only a single field of the following list may be set at a time: + // - allAccessConflicts + // - specificAccessConflicts + // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // + AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scope,omitempty"` + // The resource types to include in the template scope. Replaces all previously selected resource types. + ResourceTypeSelections []ResourceTypeIDRef `json:"resourceTypeSelections,omitempty"` +} + +func (a *AccessReviewTemplateSetScopeByResourceTypeRequest) GetAccessReviewScopeV2() *AccessReviewScopeV2 { + if a == nil { + return nil + } + return a.AccessReviewScopeV2 +} + +func (a *AccessReviewTemplateSetScopeByResourceTypeRequest) GetResourceTypeSelections() []ResourceTypeIDRef { + if a == nil { + return nil + } + return a.ResourceTypeSelections +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetscopebyresourcetyperesponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetscopebyresourcetyperesponse.go new file mode 100644 index 00000000..3dccb507 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetscopebyresourcetyperesponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessReviewTemplateSetScopeByResourceTypeResponse message. +type AccessReviewTemplateSetScopeByResourceTypeResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlement.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlement.go new file mode 100644 index 00000000..15b76569 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlement.go @@ -0,0 +1,119 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// AccessReviewTemplateSetupEntitlement - An entitlement that has been selected for inclusion in an access review template's scope. +type AccessReviewTemplateSetupEntitlement struct { + // The ID of the access review template this entitlement belongs to. + AccessReviewTemplateID *string `json:"accessReviewTemplateId,omitempty"` + // The ID of the entitlement to be reviewed. + AppEntitlementID *string `json:"appEntitlementId,omitempty"` + // The ID of the application that owns the entitlement. + AppID *string `json:"appId,omitempty"` + // The ID of the specific resource associated with this entitlement, if applicable. + AppResourceID *string `json:"appResourceId,omitempty"` + // The ID of the resource type associated with this entitlement, if applicable. + AppResourceTypeID *string `json:"appResourceTypeId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // An override policy ID for this specific entitlement. Populated when use_policy_override is enabled on the template. + CustomPolicyID *string `json:"customPolicyId,omitempty"` + DeletedAt *time.Time `json:"deletedAt,omitempty"` + // The ID of the review policy applied to this entitlement. Defaults to the template policy. + PolicyID *string `json:"policyId,omitempty"` + // The tenant that owns this setup entitlement. + TenantID *string `json:"tenantId,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (a AccessReviewTemplateSetupEntitlement) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AccessReviewTemplateSetupEntitlement) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *AccessReviewTemplateSetupEntitlement) GetAccessReviewTemplateID() *string { + if a == nil { + return nil + } + return a.AccessReviewTemplateID +} + +func (a *AccessReviewTemplateSetupEntitlement) GetAppEntitlementID() *string { + if a == nil { + return nil + } + return a.AppEntitlementID +} + +func (a *AccessReviewTemplateSetupEntitlement) GetAppID() *string { + if a == nil { + return nil + } + return a.AppID +} + +func (a *AccessReviewTemplateSetupEntitlement) GetAppResourceID() *string { + if a == nil { + return nil + } + return a.AppResourceID +} + +func (a *AccessReviewTemplateSetupEntitlement) GetAppResourceTypeID() *string { + if a == nil { + return nil + } + return a.AppResourceTypeID +} + +func (a *AccessReviewTemplateSetupEntitlement) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AccessReviewTemplateSetupEntitlement) GetCustomPolicyID() *string { + if a == nil { + return nil + } + return a.CustomPolicyID +} + +func (a *AccessReviewTemplateSetupEntitlement) GetDeletedAt() *time.Time { + if a == nil { + return nil + } + return a.DeletedAt +} + +func (a *AccessReviewTemplateSetupEntitlement) GetPolicyID() *string { + if a == nil { + return nil + } + return a.PolicyID +} + +func (a *AccessReviewTemplateSetupEntitlement) GetTenantID() *string { + if a == nil { + return nil + } + return a.TenantID +} + +func (a *AccessReviewTemplateSetupEntitlement) GetUpdatedAt() *time.Time { + if a == nil { + return nil + } + return a.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementexpandmask.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementexpandmask.go new file mode 100644 index 00000000..bf1bde2d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementexpandmask.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessReviewTemplateSetupEntitlementExpandMask message. +type AccessReviewTemplateSetupEntitlementExpandMask struct { + // The paths field. + Paths []string `json:"paths,omitempty"` +} + +func (a *AccessReviewTemplateSetupEntitlementExpandMask) GetPaths() []string { + if a == nil { + return nil + } + return a.Paths +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementinput.go new file mode 100644 index 00000000..2232c776 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementinput.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AccessReviewTemplateSetupEntitlementInput - Identifies an entitlement to add or remove from a template's setup. +type AccessReviewTemplateSetupEntitlementInput struct { + // The ID of the entitlement. + AppEntitlementID *string `json:"appEntitlementId,omitempty"` + // The ID of the application that owns the entitlement. + AppID *string `json:"appId,omitempty"` +} + +func (a *AccessReviewTemplateSetupEntitlementInput) GetAppEntitlementID() *string { + if a == nil { + return nil + } + return a.AppEntitlementID +} + +func (a *AccessReviewTemplateSetupEntitlementInput) GetAppID() *string { + if a == nil { + return nil + } + return a.AppID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementservicesetrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementservicesetrequest.go new file mode 100644 index 00000000..61011191 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementservicesetrequest.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessReviewTemplateSetupEntitlementServiceSetRequest message. +type AccessReviewTemplateSetupEntitlementServiceSetRequest struct { + // The AccessReviewScopeV2 message. + // + // This message contains a oneof named apps_and_resources_scope. Only a single field of the following list may be set at a time: + // - appAccess + // - specificResources + // - appSelectionCriteria + // - resourceTypeSelections + // + // + // This message contains a oneof named users_scope. Only a single field of the following list may be set at a time: + // - allUsers + // - selectedUsers + // - userCriteria + // - celExpression + // + // + // This message contains a oneof named accounts_scope. Only a single field of the following list may be set at a time: + // - allAccounts + // - accountCriteria + // - accountCelExpression + // + // + // This message contains a oneof named grants_scope. Only a single field of the following list may be set at a time: + // - allGrants + // - grantsByCriteria + // + // + // This message contains a oneof named access_conflicts_scope. Only a single field of the following list may be set at a time: + // - allAccessConflicts + // - specificAccessConflicts + // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // + AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scope,omitempty"` + // The AccessReviewTemplateSetupEntitlementExpandMask message. + AccessReviewTemplateSetupEntitlementExpandMask *AccessReviewTemplateSetupEntitlementExpandMask `json:"expandMask,omitempty"` + // The entitlements to include in the template. Replaces all previously selected entitlements. + Entitlements []AccessReviewTemplateSetupEntitlementInput `json:"entitlements,omitempty"` +} + +func (a *AccessReviewTemplateSetupEntitlementServiceSetRequest) GetAccessReviewScopeV2() *AccessReviewScopeV2 { + if a == nil { + return nil + } + return a.AccessReviewScopeV2 +} + +func (a *AccessReviewTemplateSetupEntitlementServiceSetRequest) GetAccessReviewTemplateSetupEntitlementExpandMask() *AccessReviewTemplateSetupEntitlementExpandMask { + if a == nil { + return nil + } + return a.AccessReviewTemplateSetupEntitlementExpandMask +} + +func (a *AccessReviewTemplateSetupEntitlementServiceSetRequest) GetEntitlements() []AccessReviewTemplateSetupEntitlementInput { + if a == nil { + return nil + } + return a.Entitlements +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementservicesetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementservicesetresponse.go new file mode 100644 index 00000000..9508ea93 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementservicesetresponse.go @@ -0,0 +1,104 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + +// AccessReviewTemplateSetupEntitlementServiceSetResponseExpanded - Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. +type AccessReviewTemplateSetupEntitlementServiceSetResponseExpanded struct { + // The type of the serialized message. + AtType *string `json:"@type,omitempty"` + AdditionalProperties map[string]any `additionalProperties:"true" json:"-"` +} + +func (a AccessReviewTemplateSetupEntitlementServiceSetResponseExpanded) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AccessReviewTemplateSetupEntitlementServiceSetResponseExpanded) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *AccessReviewTemplateSetupEntitlementServiceSetResponseExpanded) GetAtType() *string { + if a == nil { + return nil + } + return a.AtType +} + +func (a *AccessReviewTemplateSetupEntitlementServiceSetResponseExpanded) GetAdditionalProperties() map[string]any { + if a == nil { + return nil + } + return a.AdditionalProperties +} + +// The AccessReviewTemplateSetupEntitlementServiceSetResponse message. +type AccessReviewTemplateSetupEntitlementServiceSetResponse struct { + // The AccessReviewScopeV2 message. + // + // This message contains a oneof named apps_and_resources_scope. Only a single field of the following list may be set at a time: + // - appAccess + // - specificResources + // - appSelectionCriteria + // - resourceTypeSelections + // + // + // This message contains a oneof named users_scope. Only a single field of the following list may be set at a time: + // - allUsers + // - selectedUsers + // - userCriteria + // - celExpression + // + // + // This message contains a oneof named accounts_scope. Only a single field of the following list may be set at a time: + // - allAccounts + // - accountCriteria + // - accountCelExpression + // + // + // This message contains a oneof named grants_scope. Only a single field of the following list may be set at a time: + // - allGrants + // - grantsByCriteria + // + // + // This message contains a oneof named access_conflicts_scope. Only a single field of the following list may be set at a time: + // - allAccessConflicts + // - specificAccessConflicts + // + // + // This message contains a oneof named resource_scope. Only a single field of the following list may be set at a time: + // - resourceSelection + // + AccessReviewScopeV2 *AccessReviewScopeV2 `json:"scope,omitempty"` + // Related objects requested via the expand mask. + Expanded []AccessReviewTemplateSetupEntitlementServiceSetResponseExpanded `json:"expanded,omitempty"` + // The current list of setup entitlements for the template. + List []AccessReviewTemplateSetupEntitlementView `json:"list,omitempty"` +} + +func (a *AccessReviewTemplateSetupEntitlementServiceSetResponse) GetAccessReviewScopeV2() *AccessReviewScopeV2 { + if a == nil { + return nil + } + return a.AccessReviewScopeV2 +} + +func (a *AccessReviewTemplateSetupEntitlementServiceSetResponse) GetExpanded() []AccessReviewTemplateSetupEntitlementServiceSetResponseExpanded { + if a == nil { + return nil + } + return a.Expanded +} + +func (a *AccessReviewTemplateSetupEntitlementServiceSetResponse) GetList() []AccessReviewTemplateSetupEntitlementView { + if a == nil { + return nil + } + return a.List +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementview.go new file mode 100644 index 00000000..0a3d783f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewtemplatesetupentitlementview.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AccessReviewTemplateSetupEntitlementView message. +type AccessReviewTemplateSetupEntitlementView struct { + // An entitlement that has been selected for inclusion in an access review template's scope. + AccessReviewTemplateSetupEntitlement *AccessReviewTemplateSetupEntitlement `json:"accessReviewTemplateEntitlement,omitempty"` + // The appPath field. + AppPath *string `json:"appPath,omitempty"` + // The entitlementPath field. + EntitlementPath *string `json:"entitlementPath,omitempty"` + // The policyPath field. + PolicyPath *string `json:"policyPath,omitempty"` +} + +func (a *AccessReviewTemplateSetupEntitlementView) GetAccessReviewTemplateSetupEntitlement() *AccessReviewTemplateSetupEntitlement { + if a == nil { + return nil + } + return a.AccessReviewTemplateSetupEntitlement +} + +func (a *AccessReviewTemplateSetupEntitlementView) GetAppPath() *string { + if a == nil { + return nil + } + return a.AppPath +} + +func (a *AccessReviewTemplateSetupEntitlementView) GetEntitlementPath() *string { + if a == nil { + return nil + } + return a.EntitlementPath +} + +func (a *AccessReviewTemplateSetupEntitlementView) GetPolicyPath() *string { + if a == nil { + return nil + } + return a.PolicyPath +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewview.go index 0a33112b..f8bbef87 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/accessreviewview.go @@ -4,7 +4,7 @@ package shared // The AccessReviewView message. type AccessReviewView struct { - // The AccessReview message. + // An access review campaign (also called a certification campaign) that verifies whether users still need their access entitlements. // // This message contains a oneof named setup_metadata. Only a single field of the following list may be set at a time: // - singleApp diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/action.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/action.go index 1997916b..d50c1101 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/action.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/action.go @@ -6,9 +6,16 @@ package shared // // This message contains a oneof named target. Only a single field of the following list may be set at a time: // - automation +// - batonResourceAction +// - clientIdApproval type Action struct { - // The ActionTargetAutomation message. + // ActionTargetAutomation targets automation templates for policy actions. ActionTargetAutomation *ActionTargetAutomation `json:"automation,omitempty"` + // ActionTargetResource targets resource actions for policy actions. + ActionTargetBatonResourceAction *ActionTargetBatonResourceAction `json:"batonResourceAction,omitempty"` + // ActionTargetClientIdApproval targets administrator review of an external + // OAuth client registration (CIMD or DCR) for policy actions. + ActionTargetClientIDApproval *ActionTargetClientIDApproval `json:"clientIdApproval,omitempty"` } func (a *Action) GetActionTargetAutomation() *ActionTargetAutomation { @@ -17,3 +24,17 @@ func (a *Action) GetActionTargetAutomation() *ActionTargetAutomation { } return a.ActionTargetAutomation } + +func (a *Action) GetActionTargetBatonResourceAction() *ActionTargetBatonResourceAction { + if a == nil { + return nil + } + return a.ActionTargetBatonResourceAction +} + +func (a *Action) GetActionTargetClientIDApproval() *ActionTargetClientIDApproval { + if a == nil { + return nil + } + return a.ActionTargetClientIDApproval +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actioninstance.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actioninstance.go index f5edcf4c..b7922d74 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actioninstance.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actioninstance.go @@ -32,6 +32,8 @@ func (e *ActionInstanceState) IsExact() bool { // // This message contains a oneof named target_instance. Only a single field of the following list may be set at a time: // - automation +// - batonResourceActionInstance +// - clientIdApprovalInstance // // This message contains a oneof named outcome. Only a single field of the following list may be set at a time: // - success @@ -43,6 +45,8 @@ type ActionInstance struct { // // This message contains a oneof named target. Only a single field of the following list may be set at a time: // - automation + // - batonResourceAction + // - clientIdApproval // Action *Action `json:"action,omitempty"` // The ActionOutcomeCancelled message. @@ -55,6 +59,11 @@ type ActionInstance struct { ActionOutcomeSuccess *ActionOutcomeSuccess `json:"success,omitempty"` // The ActionTargetAutomationInstance message. ActionTargetAutomationInstance *ActionTargetAutomationInstance `json:"automation,omitempty"` + // The ActionTargetBatonResourceActionInstance message. + ActionTargetBatonResourceActionInstance *ActionTargetBatonResourceActionInstance `json:"batonResourceActionInstance,omitempty"` + // ActionTargetClientIdApprovalInstance carries the registration key of the + // external OAuth client that is being reviewed. + ActionTargetClientIDApprovalInstance *ActionTargetClientIDApprovalInstance `json:"clientIdApprovalInstance,omitempty"` // The current state of the action execution. State *ActionInstanceState `json:"state,omitempty"` } @@ -101,6 +110,20 @@ func (a *ActionInstance) GetActionTargetAutomationInstance() *ActionTargetAutoma return a.ActionTargetAutomationInstance } +func (a *ActionInstance) GetActionTargetBatonResourceActionInstance() *ActionTargetBatonResourceActionInstance { + if a == nil { + return nil + } + return a.ActionTargetBatonResourceActionInstance +} + +func (a *ActionInstance) GetActionTargetClientIDApprovalInstance() *ActionTargetClientIDApprovalInstance { + if a == nil { + return nil + } + return a.ActionTargetClientIDApprovalInstance +} + func (a *ActionInstance) GetState() *ActionInstanceState { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetautomation.go index 03174d83..0477f956 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetautomation.go @@ -2,7 +2,7 @@ package shared -// The ActionTargetAutomation message. +// ActionTargetAutomation targets automation templates for policy actions. type ActionTargetAutomation struct { // The automationTemplateId field. AutomationTemplateID *string `json:"automationTemplateId,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetbatonresourceaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetbatonresourceaction.go new file mode 100644 index 00000000..b9a6c591 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetbatonresourceaction.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ActionTargetBatonResourceAction - ActionTargetResource targets resource actions for policy actions. +type ActionTargetBatonResourceAction struct { + // The batonResourceActionId field. + BatonResourceActionID *string `json:"batonResourceActionId,omitempty"` +} + +func (a *ActionTargetBatonResourceAction) GetBatonResourceActionID() *string { + if a == nil { + return nil + } + return a.BatonResourceActionID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetbatonresourceactioninstance.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetbatonresourceactioninstance.go new file mode 100644 index 00000000..180ff483 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetbatonresourceactioninstance.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ActionTargetBatonResourceActionInstance message. +type ActionTargetBatonResourceActionInstance struct { + // The batonActionInvocationId field. + BatonActionInvocationID *string `json:"batonActionInvocationId,omitempty"` +} + +func (a *ActionTargetBatonResourceActionInstance) GetBatonActionInvocationID() *string { + if a == nil { + return nil + } + return a.BatonActionInvocationID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetclientidapproval.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetclientidapproval.go new file mode 100644 index 00000000..340f2ac2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetclientidapproval.go @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ActionTargetClientIDApproval - ActionTargetClientIdApproval targets administrator review of an external +// +// OAuth client registration (CIMD or DCR) for policy actions. +type ActionTargetClientIDApproval struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetclientidapprovalinstance.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetclientidapprovalinstance.go new file mode 100644 index 00000000..abd931fc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/actiontargetclientidapprovalinstance.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ActionTargetClientIDApprovalInstance - ActionTargetClientIdApprovalInstance carries the registration key of the +// +// external OAuth client that is being reviewed. +type ActionTargetClientIDApprovalInstance struct { + // The clientIdUrl field. + ClientIDURL *string `json:"clientIdUrl,omitempty"` +} + +func (a *ActionTargetClientIDApprovalInstance) GetClientIDURL() *string { + if a == nil { + return nil + } + return a.ClientIDURL +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addappresourceownerrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addappresourceownerrequest.go index dafdf582..7c1ce24d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addappresourceownerrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addappresourceownerrequest.go @@ -2,9 +2,9 @@ package shared -// The AddAppResourceOwnerRequest message. +// AddAppResourceOwnerRequest - The request message for adding an owner to an app resource. type AddAppResourceOwnerRequest struct { - // The userId field. + // The C1 user ID to add as an owner. UserID *string `json:"userId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addappresourceownerresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addappresourceownerresponse.go index 8986cfdc..c11ff393 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addappresourceownerresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addappresourceownerresponse.go @@ -2,6 +2,6 @@ package shared -// The AddAppResourceOwnerResponse message. +// AddAppResourceOwnerResponse - The empty response message for adding an owner to an app resource. type AddAppResourceOwnerResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addautomationexclusionrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addautomationexclusionrequest.go index 700a459d..caa8c3af 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addautomationexclusionrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addautomationexclusionrequest.go @@ -4,7 +4,7 @@ package shared // The AddAutomationExclusionRequest message. type AddAutomationExclusionRequest struct { - // The userIds field. + // The IDs of users to add to the automation exclusion list. UserIds []string `json:"userIds,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addmanuallymanagedusersrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addmanuallymanagedusersrequest.go index 95bba9f1..1f5fb5af 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addmanuallymanagedusersrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/addmanuallymanagedusersrequest.go @@ -4,7 +4,7 @@ package shared // The AddManuallyManagedUsersRequest message. type AddManuallyManagedUsersRequest struct { - // The userIds field. + // The IDs of users to add as manually managed members. UserIds []string `json:"userIds,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/andcheck.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/andcheck.go new file mode 100644 index 00000000..dfa3200a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/andcheck.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AndCheck requires all checks to pass. +type AndCheck struct { + // The checks field. + Checks []ValidationCheck `json:"checks,omitempty"` +} + +func (a *AndCheck) GetChecks() []ValidationCheck { + if a == nil { + return nil + } + return a.Checks +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/app.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/app.go index 67926bf5..d17958bc 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/app.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/app.go @@ -7,6 +7,33 @@ import ( "time" ) +// AccessModel - How this app models access. Derived during uplift from the app's resource type traits. +// +// Sparse ACL feature. +type AccessModel string + +const ( + AccessModelAppAccessModelUnspecified AccessModel = "APP_ACCESS_MODEL_UNSPECIFIED" + AccessModelAppAccessModelClassic AccessModel = "APP_ACCESS_MODEL_CLASSIC" + AccessModelAppAccessModelHybrid AccessModel = "APP_ACCESS_MODEL_HYBRID" + AccessModelAppAccessModelSparse AccessModel = "APP_ACCESS_MODEL_SPARSE" +) + +func (e AccessModel) ToPointer() *AccessModel { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AccessModel) IsExact() bool { + if e != nil { + switch *e { + case "APP_ACCESS_MODEL_UNSPECIFIED", "APP_ACCESS_MODEL_CLASSIC", "APP_ACCESS_MODEL_HYBRID", "APP_ACCESS_MODEL_SPARSE": + return true + } + } + return false +} + // IdentityMatching - The identityMatching field. type IdentityMatching string @@ -14,6 +41,7 @@ const ( IdentityMatchingAppUserIdentityMatchingUnspecified IdentityMatching = "APP_USER_IDENTITY_MATCHING_UNSPECIFIED" IdentityMatchingAppUserIdentityMatchingStrict IdentityMatching = "APP_USER_IDENTITY_MATCHING_STRICT" IdentityMatchingAppUserIdentityMatchingDisplayName IdentityMatching = "APP_USER_IDENTITY_MATCHING_DISPLAY_NAME" + IdentityMatchingAppUserIdentityMatchingCustom IdentityMatching = "APP_USER_IDENTITY_MATCHING_CUSTOM" ) func (e IdentityMatching) ToPointer() *IdentityMatching { @@ -24,7 +52,7 @@ func (e IdentityMatching) ToPointer() *IdentityMatching { func (e *IdentityMatching) IsExact() bool { if e != nil { switch *e { - case "APP_USER_IDENTITY_MATCHING_UNSPECIFIED", "APP_USER_IDENTITY_MATCHING_STRICT", "APP_USER_IDENTITY_MATCHING_DISPLAY_NAME": + case "APP_USER_IDENTITY_MATCHING_UNSPECIFIED", "APP_USER_IDENTITY_MATCHING_STRICT", "APP_USER_IDENTITY_MATCHING_DISPLAY_NAME", "APP_USER_IDENTITY_MATCHING_CUSTOM": return true } } @@ -33,6 +61,11 @@ func (e *IdentityMatching) IsExact() bool { // The App object provides all of the details for an app, as well as some configuration. type App struct { + // AppUserMapper configures custom account mapping for uplift. + AppUserMapper *AppUserMapper `json:"appUserMapper,omitempty"` + // How this app models access. Derived during uplift from the app's resource type traits. + // Sparse ACL feature. + AccessModel *AccessModel `json:"accessModel,omitempty"` // The ID of the Account named by AccountName. AppAccountID *string `json:"appAccountId,omitempty"` // The AccountName of the app. For example, AWS is AccountID, Github is Org Name, and Okta is Okta Subdomain. @@ -51,7 +84,9 @@ type App struct { Description *string `json:"description,omitempty"` // The app's display name. DisplayName *string `json:"displayName,omitempty"` - FieldMask *string `json:"fieldMask,omitempty"` + // When enabled, resource ownership is sourced from the connector. + EnableConnectorSourcedOwnership *bool `json:"enableConnectorSourcedOwnership,omitempty"` + FieldMask *string `json:"fieldMask,omitempty"` // The ID of the Grant Policy associated with this App. GrantPolicyID *string `json:"grantPolicyId,omitempty"` // The URL of an icon to display for the app. @@ -92,6 +127,20 @@ func (a *App) UnmarshalJSON(data []byte) error { return nil } +func (a *App) GetAppUserMapper() *AppUserMapper { + if a == nil { + return nil + } + return a.AppUserMapper +} + +func (a *App) GetAccessModel() *AccessModel { + if a == nil { + return nil + } + return a.AccessModel +} + func (a *App) GetAppAccountID() *string { if a == nil { return nil @@ -162,6 +211,13 @@ func (a *App) GetDisplayName() *string { return a.DisplayName } +func (a *App) GetEnableConnectorSourcedOwnership() *bool { + if a == nil { + return nil + } + return a.EnableConnectorSourcedOwnership +} + func (a *App) GetFieldMask() *string { if a == nil { return nil @@ -269,6 +325,11 @@ func (a *App) GetUserCount() *int64 { // AppInput - The App object provides all of the details for an app, as well as some configuration. type AppInput struct { + // AppUserMapper configures custom account mapping for uplift. + AppUserMapper *AppUserMapper `json:"appUserMapper,omitempty"` + // How this app models access. Derived during uplift from the app's resource type traits. + // Sparse ACL feature. + AccessModel *AccessModel `json:"accessModel,omitempty"` // The ID of the Certify Policy associated with this App. CertifyPolicyID *string `json:"certifyPolicyId,omitempty"` // The connectorVersion field. @@ -279,6 +340,8 @@ type AppInput struct { Description *string `json:"description,omitempty"` // The app's display name. DisplayName *string `json:"displayName,omitempty"` + // When enabled, resource ownership is sourced from the connector. + EnableConnectorSourcedOwnership *bool `json:"enableConnectorSourcedOwnership,omitempty"` // The ID of the Grant Policy associated with this App. GrantPolicyID *string `json:"grantPolicyId,omitempty"` // The URL of an icon to display for the app. @@ -297,6 +360,20 @@ type AppInput struct { StrictAccessEntitlementProvisioning *bool `json:"strictAccessEntitlementProvisioning,omitempty"` } +func (a *AppInput) GetAppUserMapper() *AppUserMapper { + if a == nil { + return nil + } + return a.AppUserMapper +} + +func (a *AppInput) GetAccessModel() *AccessModel { + if a == nil { + return nil + } + return a.AccessModel +} + func (a *AppInput) GetCertifyPolicyID() *string { if a == nil { return nil @@ -332,6 +409,13 @@ func (a *AppInput) GetDisplayName() *string { return a.DisplayName } +func (a *AppInput) GetEnableConnectorSourcedOwnership() *bool { + if a == nil { + return nil + } + return a.EnableConnectorSourcedOwnership +} + func (a *AppInput) GetGrantPolicyID() *string { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appaccessrequestdefaults.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appaccessrequestdefaults.go index 536fd0f0..21d78d2c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appaccessrequestdefaults.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appaccessrequestdefaults.go @@ -51,8 +51,10 @@ type AppAccessRequestDefaults struct { EmergencyGrantEnabled *bool `json:"emergencyGrantEnabled,omitempty"` // The policy id for the emergency grant policy. EmergencyGrantPolicyID *string `json:"emergencyGrantPolicyId,omitempty"` - // The requestPolicyId field. + // The ID of the request policy to apply to entitlements matching this rule. RequestPolicyID *string `json:"requestPolicyId,omitempty"` + // The ID of the request schema to apply to entitlements matching this rule. + RequestSchemaID *string `json:"requestSchemaId,omitempty"` // The app resource type ids for which the app access request defaults are applied. ResourceTypeIds []string `json:"resourceTypeIds,omitempty"` // The last applied state of the app access request defaults. @@ -115,6 +117,13 @@ func (a *AppAccessRequestDefaults) GetRequestPolicyID() *string { return a.RequestPolicyID } +func (a *AppAccessRequestDefaults) GetRequestSchemaID() *string { + if a == nil { + return nil + } + return a.RequestSchemaID +} + func (a *AppAccessRequestDefaults) GetResourceTypeIds() []string { if a == nil { return nil @@ -145,8 +154,10 @@ type AppAccessRequestDefaults1 struct { EmergencyGrantEnabled *bool `json:"emergencyGrantEnabled,omitempty"` // The policy id for the emergency grant policy. EmergencyGrantPolicyID *string `json:"emergencyGrantPolicyId,omitempty"` - // The requestPolicyId field. + // The ID of the request policy to apply to entitlements matching this rule. RequestPolicyID *string `json:"requestPolicyId,omitempty"` + // The ID of the request schema to apply to entitlements matching this rule. + RequestSchemaID *string `json:"requestSchemaId,omitempty"` // The app resource type ids for which the app access request defaults are applied. ResourceTypeIds []string `json:"resourceTypeIds,omitempty"` // The last applied state of the app access request defaults. @@ -202,6 +213,13 @@ func (a *AppAccessRequestDefaults1) GetRequestPolicyID() *string { return a.RequestPolicyID } +func (a *AppAccessRequestDefaults1) GetRequestSchemaID() *string { + if a == nil { + return nil + } + return a.RequestSchemaID +} + func (a *AppAccessRequestDefaults1) GetResourceTypeIds() []string { if a == nil { return nil @@ -215,3 +233,6 @@ func (a *AppAccessRequestDefaults1) GetState() *AppAccessRequestDefaultsState { } return a.State } + +// #region class-body-appaccessrequestdefaults1 +// #endregion class-body-appaccessrequestdefaults1 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlement.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlement.go index e4178be2..fe4597f8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlement.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlement.go @@ -10,13 +10,14 @@ import ( type AppEntitlementDurationUnset struct { } -// Purpose - The purpose field. +// Purpose - The purpose of this entitlement (e.g., assignment, permission, ownership). type Purpose string const ( PurposeAppEntitlementPurposeValueUnspecified Purpose = "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED" PurposeAppEntitlementPurposeValueAssignment Purpose = "APP_ENTITLEMENT_PURPOSE_VALUE_ASSIGNMENT" PurposeAppEntitlementPurposeValuePermission Purpose = "APP_ENTITLEMENT_PURPOSE_VALUE_PERMISSION" + PurposeAppEntitlementPurposeValueOwnership Purpose = "APP_ENTITLEMENT_PURPOSE_VALUE_OWNERSHIP" ) func (e Purpose) ToPointer() *Purpose { @@ -27,7 +28,7 @@ func (e Purpose) ToPointer() *Purpose { func (e *Purpose) IsExact() bool { if e != nil { switch *e { - case "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED", "APP_ENTITLEMENT_PURPOSE_VALUE_ASSIGNMENT", "APP_ENTITLEMENT_PURPOSE_VALUE_PERMISSION": + case "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED", "APP_ENTITLEMENT_PURPOSE_VALUE_ASSIGNMENT", "APP_ENTITLEMENT_PURPOSE_VALUE_PERMISSION", "APP_ENTITLEMENT_PURPOSE_VALUE_OWNERSHIP": return true } } @@ -92,6 +93,9 @@ type AppEntitlement struct { EmergencyGrantEnabled *bool `json:"emergencyGrantEnabled,omitempty"` // The ID of the policy that will be used for emergency access grant tasks. EmergencyGrantPolicyID *string `json:"emergencyGrantPolicyId,omitempty"` + // The upstream product's native external ID for this entitlement (e.g. an Okta group ID). + // Populated from the connector's external ID during sync. + ExternalID *string `json:"externalId,omitempty"` // The amount of grants open for this entitlement GrantCount *int64 `integer:"string" json:"grantCount,omitempty"` // The ID of the policy that will be used for grant tickets related to the app entitlement. @@ -102,17 +106,17 @@ type AppEntitlement struct { IsAutomationEnabled *bool `json:"isAutomationEnabled,omitempty"` // Flag to indicate if the app entitlement is manually managed. IsManuallyManaged *bool `json:"isManuallyManaged,omitempty"` - // The matchBatonId field. + // An identifier used to match this entitlement to a connector-synced entitlement during sync. MatchBatonID *string `json:"matchBatonId,omitempty"` // Flag to indicate if the app-level access request settings have been overridden for the entitlement OverrideAccessRequestsDefaults *bool `json:"overrideAccessRequestsDefaults,omitempty"` - // The purpose field. + // The purpose of this entitlement (e.g., assignment, permission, ownership). Purpose *Purpose `json:"purpose,omitempty"` // The ID of the request schema associated with this app entitlement. RequestSchemaID *string `json:"requestSchemaId,omitempty"` // The ID of the policy that will be used for revoke tickets related to the app entitlement RevokePolicyID *string `json:"revokePolicyId,omitempty"` - // The riskLevelValueId field. + // The ID of the risk level assigned to this entitlement. RiskLevelValueID *string `json:"riskLevelValueId,omitempty"` // The slug is displayed as an oval next to the name in the frontend of C1, it tells you what permission the entitlement grants. See https://www.conductorone.com/docs/product/admin/entitlements/ Slug *string `json:"slug,omitempty"` @@ -254,6 +258,13 @@ func (a *AppEntitlement) GetEmergencyGrantPolicyID() *string { return a.EmergencyGrantPolicyID } +func (a *AppEntitlement) GetExternalID() *string { + if a == nil { + return nil + } + return a.ExternalID +} + func (a *AppEntitlement) GetGrantCount() *int64 { if a == nil { return nil @@ -426,17 +437,17 @@ type AppEntitlementInput struct { GrantPolicyID *string `json:"grantPolicyId,omitempty"` // Flag to indicate if the app entitlement is manually managed. IsManuallyManaged *bool `json:"isManuallyManaged,omitempty"` - // The matchBatonId field. + // An identifier used to match this entitlement to a connector-synced entitlement during sync. MatchBatonID *string `json:"matchBatonId,omitempty"` // Flag to indicate if the app-level access request settings have been overridden for the entitlement OverrideAccessRequestsDefaults *bool `json:"overrideAccessRequestsDefaults,omitempty"` - // The purpose field. + // The purpose of this entitlement (e.g., assignment, permission, ownership). Purpose *Purpose `json:"purpose,omitempty"` // The ID of the request schema associated with this app entitlement. RequestSchemaID *string `json:"requestSchemaId,omitempty"` // The ID of the policy that will be used for revoke tickets related to the app entitlement RevokePolicyID *string `json:"revokePolicyId,omitempty"` - // The riskLevelValueId field. + // The ID of the risk level assigned to this entitlement. RiskLevelValueID *string `json:"riskLevelValueId,omitempty"` // The slug is displayed as an oval next to the name in the frontend of C1, it tells you what permission the entitlement grants. See https://www.conductorone.com/docs/product/admin/entitlements/ Slug *string `json:"slug,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementautomation.go index e818308c..33e33339 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementautomation.go @@ -34,8 +34,11 @@ type AppEntitlementAutomation struct { // The description of the app entitlement. Description *string `json:"description,omitempty"` // The display name of the app entitlement. - DisplayName *string `json:"displayName,omitempty"` - UpdatedAt *time.Time `json:"updatedAt,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + // When set, this automation is managed by an access profile's bundle automation. + // Read-only. Not settable via this API. + ManagedByRequestCatalogID *string `json:"managedByRequestCatalogId,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` } func (a AppEntitlementAutomation) MarshalJSON() ([]byte, error) { @@ -126,6 +129,13 @@ func (a *AppEntitlementAutomation) GetDisplayName() *string { return a.DisplayName } +func (a *AppEntitlementAutomation) GetManagedByRequestCatalogID() *string { + if a == nil { + return nil + } + return a.ManagedByRequestCatalogID +} + func (a *AppEntitlementAutomation) GetUpdatedAt() *time.Time { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementmonitorbinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementmonitorbinding.go index 8ff2d3f3..5b781412 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementmonitorbinding.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementmonitorbinding.go @@ -7,7 +7,7 @@ import ( "time" ) -// EntitlementGroup - The entitlementGroup field. +// EntitlementGroup - Which side of the conflict monitor (A or B) this entitlement is assigned to. type EntitlementGroup string const ( @@ -31,17 +31,17 @@ func (e *EntitlementGroup) IsExact() bool { return false } -// The AppEntitlementMonitorBinding message. +// AppEntitlementMonitorBinding - Represents the association of an app entitlement with one side (A or B) of a conflict monitor. type AppEntitlementMonitorBinding struct { - // The appEntitlementId field. + // The unique identifier of the bound app entitlement. AppEntitlementID *string `json:"appEntitlementId,omitempty"` - // The appId field. + // The unique identifier of the application containing the entitlement. AppID *string `json:"appId,omitempty"` CreatedAt *time.Time `json:"createdAt,omitempty"` DeletedAt *time.Time `json:"deletedAt,omitempty"` - // The entitlementGroup field. + // Which side of the conflict monitor (A or B) this entitlement is assigned to. EntitlementGroup *EntitlementGroup `json:"entitlementGroup,omitempty"` - // The monitorId field. + // The unique identifier of the conflict monitor this binding belongs to. MonitorID *string `json:"monitorId,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementownerentitlement.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementownerentitlement.go new file mode 100644 index 00000000..f11da9d8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementownerentitlement.go @@ -0,0 +1,54 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// AppEntitlementOwnerEntitlement represents an entitlement ownership source for an app entitlement. +type AppEntitlementOwnerEntitlement struct { + // The app entitlement represents one permission in a downstream App (SAAS) that can be granted. For example, GitHub Read vs GitHub Write. + // + // This message contains a oneof named max_grant_duration. Only a single field of the following list may be set at a time: + // - durationUnset + // - durationGrant + // + AppEntitlement *AppEntitlement `json:"appEntitlement,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The roleSlug field. + RoleSlug *string `json:"roleSlug,omitempty"` +} + +func (a AppEntitlementOwnerEntitlement) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AppEntitlementOwnerEntitlement) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *AppEntitlementOwnerEntitlement) GetAppEntitlement() *AppEntitlement { + if a == nil { + return nil + } + return a.AppEntitlement +} + +func (a *AppEntitlementOwnerEntitlement) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AppEntitlementOwnerEntitlement) GetRoleSlug() *string { + if a == nil { + return nil + } + return a.RoleSlug +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementowneruser.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementowneruser.go new file mode 100644 index 00000000..7e52d447 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementowneruser.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// AppEntitlementOwnerUser represents a user ownership source for an app entitlement. +type AppEntitlementOwnerUser struct { + // The User object provides all of the details for an user, as well as some configuration. + User *User `json:"user,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The roleSlug field. + RoleSlug *string `json:"roleSlug,omitempty"` +} + +func (a AppEntitlementOwnerUser) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AppEntitlementOwnerUser) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *AppEntitlementOwnerUser) GetUser() *User { + if a == nil { + return nil + } + return a.User +} + +func (a *AppEntitlementOwnerUser) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AppEntitlementOwnerUser) GetRoleSlug() *string { + if a == nil { + return nil + } + return a.RoleSlug +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementproxy.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementproxy.go index 35f54e4b..297b6b61 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementproxy.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementproxy.go @@ -7,28 +7,22 @@ import ( "time" ) -// The AppEntitlementProxy message. -// -// This message contains a oneof named _implicit. Only a single field of the following list may be set at a time: -// - implicit +// AppEntitlementProxy - An entitlement proxy binding that defines a hierarchical relationship between two entitlements. type AppEntitlementProxy struct { CreatedAt *time.Time `json:"createdAt,omitempty"` DeletedAt *time.Time `json:"deletedAt,omitempty"` DisabledAt *time.Time `json:"disabledAt,omitempty"` - // The dstAppEntitlementId field. + // The ID of the destination (child) entitlement. DstAppEntitlementID *string `json:"dstAppEntitlementId,omitempty"` - // The dstAppId field. + // The ID of the app that owns the destination entitlement. DstAppID *string `json:"dstAppId,omitempty"` - // If true, the binding doesn't not exist yet and is from the list of the entitlements from the parent app. - // typically the IdP that handles provisioning for the app instead of C1s connector. - // This field is part of the `_implicit` oneof. - // See the documentation for `c1.api.app.v1.AppEntitlementProxy` for more details. + // If true, the binding does not exist yet and is inferred from the entitlements of the parent app. Implicit *bool `json:"implicit,omitempty"` - // The srcAppEntitlementId field. + // The ID of the source (parent) entitlement. SrcAppEntitlementID *string `json:"srcAppEntitlementId,omitempty"` - // The srcAppId field. + // The ID of the app that owns the source entitlement. SrcAppID *string `json:"srcAppId,omitempty"` - // The systemBuiltin field. + // If true, this binding was created by the system and cannot be removed by the user. SystemBuiltin *bool `json:"systemBuiltin,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementproxyview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementproxyview.go index 713992d3..791b65ae 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementproxyview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementproxyview.go @@ -4,11 +4,7 @@ package shared // The AppEntitlementProxyView message. type AppEntitlementProxyView struct { - // The AppEntitlementProxy message. - // - // This message contains a oneof named _implicit. Only a single field of the following list may be set at a time: - // - implicit - // + // An entitlement proxy binding that defines a hierarchical relationship between two entitlements. AppEntitlementProxy *AppEntitlementProxy `json:"appProxyEntitlement,omitempty"` // The dstAppEntitlementPath field. DstAppEntitlementPath *string `json:"dstAppEntitlementPath,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementsearchservicesearchgrantsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementsearchservicesearchgrantsrequest.go index 737e9643..f3817aed 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementsearchservicesearchgrantsrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementsearchservicesearchgrantsrequest.go @@ -2,6 +2,30 @@ package shared +type AppEntitlementSearchServiceSearchGrantsRequestPurpose string + +const ( + AppEntitlementSearchServiceSearchGrantsRequestPurposeAppEntitlementPurposeValueUnspecified AppEntitlementSearchServiceSearchGrantsRequestPurpose = "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED" + AppEntitlementSearchServiceSearchGrantsRequestPurposeAppEntitlementPurposeValueAssignment AppEntitlementSearchServiceSearchGrantsRequestPurpose = "APP_ENTITLEMENT_PURPOSE_VALUE_ASSIGNMENT" + AppEntitlementSearchServiceSearchGrantsRequestPurposeAppEntitlementPurposeValuePermission AppEntitlementSearchServiceSearchGrantsRequestPurpose = "APP_ENTITLEMENT_PURPOSE_VALUE_PERMISSION" + AppEntitlementSearchServiceSearchGrantsRequestPurposeAppEntitlementPurposeValueOwnership AppEntitlementSearchServiceSearchGrantsRequestPurpose = "APP_ENTITLEMENT_PURPOSE_VALUE_OWNERSHIP" +) + +func (e AppEntitlementSearchServiceSearchGrantsRequestPurpose) ToPointer() *AppEntitlementSearchServiceSearchGrantsRequestPurpose { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AppEntitlementSearchServiceSearchGrantsRequestPurpose) IsExact() bool { + if e != nil { + switch *e { + case "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED", "APP_ENTITLEMENT_PURPOSE_VALUE_ASSIGNMENT", "APP_ENTITLEMENT_PURPOSE_VALUE_PERMISSION", "APP_ENTITLEMENT_PURPOSE_VALUE_OWNERSHIP": + return true + } + } + return false +} + // The AppEntitlementSearchServiceSearchGrantsRequest message. type AppEntitlementSearchServiceSearchGrantsRequest struct { // The app entitlement expand mask allows the user to get additional information when getting responses containing app entitlement views. @@ -12,10 +36,14 @@ type AppEntitlementSearchServiceSearchGrantsRequest struct { AppUserIds []string `json:"appUserIds,omitempty"` // Search for grants of an entitlement EntitlementRefs []AppEntitlementRef `json:"entitlementRefs,omitempty"` + // Filter for entitlements whose slug is in this list (e.g. "enrollment" for access profiles) + EntitlementSlugs []string `json:"entitlementSlugs,omitempty"` // The pageSize where 0 <= pageSize <= 100. Values < 10 will be set to 10. A value of 0 returns the default page size (currently 25) PageSize *int `json:"pageSize,omitempty"` // The pageToken field. PageToken *string `json:"pageToken,omitempty"` + // Filter for entitlements with these purposes (e.g., ASSIGNMENT for membership entitlements) + Purpose []AppEntitlementSearchServiceSearchGrantsRequestPurpose `json:"purpose,omitempty"` // Search for grants within a resource. ResourceIds []string `json:"resourceIds,omitempty"` // Search grants for given resource types. @@ -52,6 +80,13 @@ func (a *AppEntitlementSearchServiceSearchGrantsRequest) GetEntitlementRefs() [] return a.EntitlementRefs } +func (a *AppEntitlementSearchServiceSearchGrantsRequest) GetEntitlementSlugs() []string { + if a == nil { + return nil + } + return a.EntitlementSlugs +} + func (a *AppEntitlementSearchServiceSearchGrantsRequest) GetPageSize() *int { if a == nil { return nil @@ -66,6 +101,13 @@ func (a *AppEntitlementSearchServiceSearchGrantsRequest) GetPageToken() *string return a.PageToken } +func (a *AppEntitlementSearchServiceSearchGrantsRequest) GetPurpose() []AppEntitlementSearchServiceSearchGrantsRequestPurpose { + if a == nil { + return nil + } + return a.Purpose +} + func (a *AppEntitlementSearchServiceSearchGrantsRequest) GetResourceIds() []string { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementsearchservicesearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementsearchservicesearchrequest.go index 5afebe91..2cb4694f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementsearchservicesearchrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementsearchservicesearchrequest.go @@ -39,27 +39,27 @@ type AppEntitlementSearchServiceSearchRequest struct { AppIds []string `json:"appIds,omitempty"` // Search for app entitlements that are granted to any of these app user ids. AppUserIds []string `json:"appUserIds,omitempty"` - // Search for app entitlements that are part of these compliace frameworks. + // Search for app entitlements that are part of these compliance frameworks. ComplianceFrameworkIds []string `json:"complianceFrameworkIds,omitempty"` - // The displayName field. + // Filter results to entitlements with this exact display name. DisplayName *string `json:"displayName,omitempty"` // Exclude app entitlements from the results that are in these app IDs. ExcludeAppIds []string `json:"excludeAppIds,omitempty"` - // Exclude app entitlements from the results that these app users have granted. + // Exclude entitlements from results that are granted to any of these app users. ExcludeAppUserIds []string `json:"excludeAppUserIds,omitempty"` - // The excludeImmutable field. + // If true, exclude immutable entitlements (e.g., system-managed entitlements that cannot be modified). ExcludeImmutable *bool `json:"excludeImmutable,omitempty"` - // The excludeResourceTypeIds field. + // Exclude entitlements with any of these resource type IDs from results. ExcludeResourceTypeIds []string `json:"excludeResourceTypeIds,omitempty"` - // The excludedEntitlementRefs field. + // Exclude these specific entitlements from results. ExcludedEntitlementRefs []AppEntitlementRef `json:"excludedEntitlementRefs,omitempty"` // Include deleted app entitlements, this includes app entitlements that have a deleted parent object (app, app resource, app resource type) IncludeDeleted *bool `json:"includeDeleted,omitempty"` - // The isAutomated field. + // If true, restrict results to entitlements that have an automation rule configured. IsAutomated *bool `json:"isAutomated,omitempty"` - // The membershipType field. + // Filter results to entitlements where the user has any of these membership types (e.g., member, owner, admin). MembershipType []MembershipType `json:"membershipType,omitempty"` - // Restrict results to only those who have expiring app entitlement user bindings. + // If true, restrict results to entitlements that have at least one expiring grant. OnlyGetExpiring *bool `json:"onlyGetExpiring,omitempty"` // The pageSize where 0 <= pageSize <= 100. Values < 10 will be set to 10. A value of 0 returns the default page size (currently 25) PageSize *int `json:"pageSize,omitempty"` @@ -69,17 +69,17 @@ type AppEntitlementSearchServiceSearchRequest struct { PolicyRefs []PolicyRef `json:"policyRefs,omitempty"` // Query the app entitlements with a fuzzy search on display name and description. Query *string `json:"query,omitempty"` - // The refs field. + // Filter results to only these specific entitlements. Refs []AppEntitlementRef `json:"refs,omitempty"` // Search for app entitlements that belongs to these resources. ResourceIds []string `json:"resourceIds,omitempty"` - // The resourceTraitIds field. + // Filter results to entitlements whose resource types have any of these trait IDs. ResourceTraitIds []string `json:"resourceTraitIds,omitempty"` // Search for app entitlements that are for items with resources types that have matching names. Example names are "group", "role", and "app". ResourceTypeIds []string `json:"resourceTypeIds,omitempty"` // Search for app entitlements with these risk levels. RiskLevelIds []string `json:"riskLevelIds,omitempty"` - // The sourceConnectorId field. + // Filter results to entitlements synced from this connector. SourceConnectorID *string `json:"sourceConnectorId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementuserview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementuserview.go index facc9e9f..24bcdcaa 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementuserview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementuserview.go @@ -15,6 +15,8 @@ type AppEntitlementUserView struct { AppEntitlementUserBindingDeprovisionAt *time.Time `json:"appEntitlementUserBindingDeprovisionAt,omitempty"` // List of sources for the grant, ie. groups, roles, etc. GrantSources []AppEntitlementRef `json:"grantSources,omitempty"` + // The originating ticket ID for the grant (e.g. from a request ticket). + OriginatingTicketID *string `json:"originatingTicketId,omitempty"` } func (a AppEntitlementUserView) MarshalJSON() ([]byte, error) { @@ -55,3 +57,10 @@ func (a *AppEntitlementUserView) GetGrantSources() []AppEntitlementRef { } return a.GrantSources } + +func (a *AppEntitlementUserView) GetOriginatingTicketID() *string { + if a == nil { + return nil + } + return a.OriginatingTicketID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementview.go index ad472e5c..aae0f041 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementview.go @@ -4,6 +4,8 @@ package shared // AppEntitlementView - The app entitlement view contains the serialized app entitlement and paths to objects referenced by the app entitlement. type AppEntitlementView struct { + // The ActorObjectPermissions message. + ActorObjectPermissions *ActorObjectPermissions `json:"objectPermissions,omitempty"` // The app entitlement represents one permission in a downstream App (SAAS) that can be granted. For example, GitHub Read vs GitHub Write. // // This message contains a oneof named max_grant_duration. Only a single field of the following list may be set at a time: @@ -19,6 +21,13 @@ type AppEntitlementView struct { AppResourceTypePath *string `json:"appResourceTypePath,omitempty"` } +func (a *AppEntitlementView) GetActorObjectPermissions() *ActorObjectPermissions { + if a == nil { + return nil + } + return a.ActorObjectPermissions +} + func (a *AppEntitlementView) GetAppEntitlement() *AppEntitlement { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementwithexpired.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementwithexpired.go index 5505e582..3986fed3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementwithexpired.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appentitlementwithexpired.go @@ -7,23 +7,23 @@ import ( "time" ) -// The AppEntitlementWithExpired message. +// AppEntitlementWithExpired - A grant with its expiry and discovery timestamps, along with the associated app user and ConductorOne user. type AppEntitlementWithExpired struct { // Application User that represents an account in the application. AppUser *AppUser `json:"appUser,omitempty"` // The User object provides all of the details for an user, as well as some configuration. User *User `json:"user,omitempty"` - // The appEntitlementId field. + // The ID of the app entitlement. AppEntitlementID *string `json:"appEntitlementId,omitempty"` - // The appId field. + // The ID of the app that contains the entitlement. AppID *string `json:"appId,omitempty"` - // The appUserId field. + // The ID of the app user who holds the grant. AppUserID *string `json:"appUserId,omitempty"` Discovered *time.Time `json:"discovered,omitempty"` Expired *time.Time `json:"expired,omitempty"` - // The grantReasons field. + // The reasons this grant was given (e.g., access request, automation). GrantReasons []GrantReason `json:"grantReasons,omitempty"` - // The grantSources field. + // Entitlements that are the source of this grant (e.g., a group membership that implies a role). GrantSources []AppEntitlementRef `json:"grantSources,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appownerentitlement.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appownerentitlement.go new file mode 100644 index 00000000..266b6c36 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appownerentitlement.go @@ -0,0 +1,63 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// AppOwnerEntitlement represents an entitlement ownership source for an app. +type AppOwnerEntitlement struct { + // The app entitlement represents one permission in a downstream App (SAAS) that can be granted. For example, GitHub Read vs GitHub Write. + // + // This message contains a oneof named max_grant_duration. Only a single field of the following list may be set at a time: + // - durationUnset + // - durationGrant + // + AppEntitlement *AppEntitlement `json:"appEntitlement,omitempty"` + // The appId field. + AppID *string `json:"appId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The roleSlug field. + RoleSlug *string `json:"roleSlug,omitempty"` +} + +func (a AppOwnerEntitlement) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AppOwnerEntitlement) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *AppOwnerEntitlement) GetAppEntitlement() *AppEntitlement { + if a == nil { + return nil + } + return a.AppEntitlement +} + +func (a *AppOwnerEntitlement) GetAppID() *string { + if a == nil { + return nil + } + return a.AppID +} + +func (a *AppOwnerEntitlement) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AppOwnerEntitlement) GetRoleSlug() *string { + if a == nil { + return nil + } + return a.RoleSlug +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appownerprovisioner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appownerprovisioner.go new file mode 100644 index 00000000..1f5b515a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appownerprovisioner.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AppOwnerProvisioner resolves to app owners. +type AppOwnerProvisioner struct { + // Whether the provisioner can reassign the task. + AllowReassignment *bool `json:"allowReassignment,omitempty"` + // Fallback user IDs if no app owners are found. + FallbackUserIds []string `json:"fallbackUserIds,omitempty"` +} + +func (a *AppOwnerProvisioner) GetAllowReassignment() *bool { + if a == nil { + return nil + } + return a.AllowReassignment +} + +func (a *AppOwnerProvisioner) GetFallbackUserIds() []string { + if a == nil { + return nil + } + return a.FallbackUserIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appowneruser.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appowneruser.go new file mode 100644 index 00000000..9a85e85a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appowneruser.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// AppOwnerUser represents a user ownership source for an app. +type AppOwnerUser struct { + // The User object provides all of the details for an user, as well as some configuration. + User *User `json:"user,omitempty"` + // The appId field. + AppID *string `json:"appId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The roleSlug field. + RoleSlug *string `json:"roleSlug,omitempty"` +} + +func (a AppOwnerUser) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AppOwnerUser) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *AppOwnerUser) GetUser() *User { + if a == nil { + return nil + } + return a.User +} + +func (a *AppOwnerUser) GetAppID() *string { + if a == nil { + return nil + } + return a.AppID +} + +func (a *AppOwnerUser) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AppOwnerUser) GetRoleSlug() *string { + if a == nil { + return nil + } + return a.RoleSlug +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresource.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresource.go index 91f0f6f3..75041c37 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresource.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresource.go @@ -14,6 +14,9 @@ import ( type AppResource struct { // The SecretTrait message. SecretTrait *SecretTrait `json:"secretTrait,omitempty"` + // The access config ID for this resource. May be empty. + // Must be one of the builtin access config IDs or empty. + AccessConfigID *string `json:"accessConfigId,omitempty"` // The app that this resource belongs to. AppID *string `json:"appId,omitempty"` // The resource type that this resource is. @@ -26,6 +29,9 @@ type AppResource struct { Description *string `json:"description,omitempty"` // The display name for this resource. DisplayName *string `json:"displayName,omitempty"` + // The upstream product's native external ID for this resource (e.g. an Okta group ID). + // Populated from the connector's external ID during sync. + ExternalID *string `json:"externalId,omitempty"` // The number of grants to this resource. GrantCount *int64 `integer:"string" json:"grantCount,omitempty"` // The id of the resource. @@ -35,8 +41,9 @@ type AppResource struct { // The parent resource id, if this resource is a child of another resource. ParentAppResourceID *string `json:"parentAppResourceId,omitempty"` // The parent resource type id, if this resource is a child of another resource. - ParentAppResourceTypeID *string `json:"parentAppResourceTypeId,omitempty"` - UpdatedAt *time.Time `json:"updatedAt,omitempty"` + ParentAppResourceTypeID *string `json:"parentAppResourceTypeId,omitempty"` + Profile map[string]any `json:"profile,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` } func (a AppResource) MarshalJSON() ([]byte, error) { @@ -57,6 +64,13 @@ func (a *AppResource) GetSecretTrait() *SecretTrait { return a.SecretTrait } +func (a *AppResource) GetAccessConfigID() *string { + if a == nil { + return nil + } + return a.AccessConfigID +} + func (a *AppResource) GetAppID() *string { if a == nil { return nil @@ -106,6 +120,13 @@ func (a *AppResource) GetDisplayName() *string { return a.DisplayName } +func (a *AppResource) GetExternalID() *string { + if a == nil { + return nil + } + return a.ExternalID +} + func (a *AppResource) GetGrantCount() *int64 { if a == nil { return nil @@ -141,6 +162,13 @@ func (a *AppResource) GetParentAppResourceTypeID() *string { return a.ParentAppResourceTypeID } +func (a *AppResource) GetProfile() map[string]any { + if a == nil { + return nil + } + return a.Profile +} + func (a *AppResource) GetUpdatedAt() *time.Time { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceinput.go index e691db70..efdb3631 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceinput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceinput.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // AppResourceInput - The app resource message is a single resource that can have entitlements. // // This message contains a oneof named metadata. Only a single field of the following list may be set at a time: @@ -9,6 +13,9 @@ package shared type AppResourceInput struct { // The SecretTrait message. SecretTrait *SecretTrait `json:"secretTrait,omitempty"` + // The access config ID for this resource. May be empty. + // Must be one of the builtin access config IDs or empty. + AccessConfigID *string `json:"accessConfigId,omitempty"` // The app that this resource belongs to. AppID *string `json:"appId,omitempty"` // The resource type that this resource is. @@ -31,6 +38,17 @@ type AppResourceInput struct { ParentAppResourceTypeID *string `json:"parentAppResourceTypeId,omitempty"` } +func (a AppResourceInput) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AppResourceInput) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + func (a *AppResourceInput) GetSecretTrait() *SecretTrait { if a == nil { return nil @@ -38,6 +56,13 @@ func (a *AppResourceInput) GetSecretTrait() *SecretTrait { return a.SecretTrait } +func (a *AppResourceInput) GetAccessConfigID() *string { + if a == nil { + return nil + } + return a.AccessConfigID +} + func (a *AppResourceInput) GetAppID() *string { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceref.go index 80ef7b0a..fe838951 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceref.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceref.go @@ -2,13 +2,13 @@ package shared -// The AppResourceRef message. +// AppResourceRef - A reference to a specific app resource by its composite key. type AppResourceRef struct { - // The appId field. + // The ID of the app that owns the resource. AppID *string `json:"appId,omitempty"` - // The appResourceTypeId field. + // The ID of the resource type that classifies this resource. AppResourceTypeID *string `json:"appResourceTypeId,omitempty"` - // The id field. + // The unique ID of the app resource. ID *string `json:"id,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceserviceupdaterequest.go index 4b9727c8..35d3ba04 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceserviceupdaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceserviceupdaterequest.go @@ -2,7 +2,7 @@ package shared -// The AppResourceServiceUpdateRequest message. +// AppResourceServiceUpdateRequest - The request message for updating an app resource. type AppResourceServiceUpdateRequest struct { // The app resource message is a single resource that can have entitlements. // diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceserviceupdateresponse.go index e6229b88..b039605b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceserviceupdateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceserviceupdateresponse.go @@ -38,11 +38,11 @@ func (a *AppResourceServiceUpdateResponseExpanded) GetAdditionalProperties() map return a.AdditionalProperties } -// The AppResourceServiceUpdateResponse message. +// AppResourceServiceUpdateResponse - The response message for updating an app resource. type AppResourceServiceUpdateResponse struct { // The app resource view returns an app resource with paths for items in the expand mask filled in when this response is returned and a request expand mask has "*" or "app_id" or "resource_type_id". AppResourceView *AppResourceView `json:"appResourceView,omitempty"` - // The expanded field. + // List of serialized related objects. Expanded []AppResourceServiceUpdateResponseExpanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceview.go index bfa63dd9..34f9965f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appresourceview.go @@ -4,6 +4,8 @@ package shared // AppResourceView - The app resource view returns an app resource with paths for items in the expand mask filled in when this response is returned and a request expand mask has "*" or "app_id" or "resource_type_id". type AppResourceView struct { + // The ActorObjectPermissions message. + ActorObjectPermissions *ActorObjectPermissions `json:"objectPermissions,omitempty"` // The app resource message is a single resource that can have entitlements. // // This message contains a oneof named metadata. Only a single field of the following list may be set at a time: @@ -20,6 +22,13 @@ type AppResourceView struct { ResourceTypePath *string `json:"resourceTypePath,omitempty"` } +func (a *AppResourceView) GetActorObjectPermissions() *ActorObjectPermissions { + if a == nil { + return nil + } + return a.ActorObjectPermissions +} + func (a *AppResourceView) GetAppResource() *AppResource { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/approvalneededpreference.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/approvalneededpreference.go new file mode 100644 index 00000000..e2dd9478 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/approvalneededpreference.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ApprovalNeededPreference message. +type ApprovalNeededPreference struct { + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The locked field. + Locked *bool `json:"locked,omitempty"` +} + +func (a *ApprovalNeededPreference) GetEnabled() *bool { + if a == nil { + return nil + } + return a.Enabled +} + +func (a *ApprovalNeededPreference) GetLocked() *bool { + if a == nil { + return nil + } + return a.Locked +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appselectioncriteriascope.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appselectioncriteriascope.go index fcfe8478..f2825356 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appselectioncriteriascope.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appselectioncriteriascope.go @@ -4,4 +4,22 @@ package shared // The AppSelectionCriteriaScope message. type AppSelectionCriteriaScope struct { + // The complianceFrameworkAttributeValueIds field. + ComplianceFrameworkAttributeValueIds []string `json:"complianceFrameworkAttributeValueIds,omitempty"` + // The riskLevelAttributeValueIds field. + RiskLevelAttributeValueIds []string `json:"riskLevelAttributeValueIds,omitempty"` +} + +func (a *AppSelectionCriteriaScope) GetComplianceFrameworkAttributeValueIds() []string { + if a == nil { + return nil + } + return a.ComplianceFrameworkAttributeValueIds +} + +func (a *AppSelectionCriteriaScope) GetRiskLevelAttributeValueIds() []string { + if a == nil { + return nil + } + return a.RiskLevelAttributeValueIds } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusermapper.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusermapper.go new file mode 100644 index 00000000..56f74e4d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusermapper.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AppUserMapper configures custom account mapping for uplift. +type AppUserMapper struct { + // Ordered list of match cases. Each case defines a pair of CEL key extractors. + MappingCases []AppUserMapperMatchCase `json:"mappingCases,omitempty"` +} + +func (a *AppUserMapper) GetMappingCases() []AppUserMapperMatchCase { + if a == nil { + return nil + } + return a.MappingCases +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusermappermatchcase.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusermappermatchcase.go new file mode 100644 index 00000000..e4413a42 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusermappermatchcase.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AppUserMapperMatchCase defines a single matching rule for uplift account mapping. +type AppUserMapperMatchCase struct { + // CEL expression evaluated against an AppUser to produce match key(s). + AppUserKeyCel *string `json:"appUserKeyCel,omitempty"` + // CEL expression evaluated against a User to produce match key(s). + UserKeyCel *string `json:"userKeyCel,omitempty"` +} + +func (a *AppUserMapperMatchCase) GetAppUserKeyCel() *string { + if a == nil { + return nil + } + return a.AppUserKeyCel +} + +func (a *AppUserMapperMatchCase) GetUserKeyCel() *string { + if a == nil { + return nil + } + return a.UserKeyCel +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appuserservicelistcredentialsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appuserservicelistcredentialsresponse.go index 436f21fa..aabf2443 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appuserservicelistcredentialsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appuserservicelistcredentialsresponse.go @@ -2,11 +2,11 @@ package shared -// The AppUserServiceListCredentialsResponse message. +// AppUserServiceListCredentialsResponse - The response message for listing credentials of an app user. type AppUserServiceListCredentialsResponse struct { - // The list field. + // The list of credential results. List []AppUserCredential `json:"list,omitempty"` - // The nextPageToken field. + // The token for fetching the next page of results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appuserservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appuserservicelistresponse.go index 74bfd20f..a92bce06 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appuserservicelistresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appuserservicelistresponse.go @@ -38,13 +38,13 @@ func (a *AppUserServiceListResponseExpanded) GetAdditionalProperties() map[strin return a.AdditionalProperties } -// The AppUserServiceListResponse message. +// AppUserServiceListResponse - The response message for listing app users. type AppUserServiceListResponse struct { - // The expanded field. + // List of serialized related objects. Expanded []AppUserServiceListResponseExpanded `json:"expanded,omitempty"` - // The list field. + // The list of app user results. List []AppUserView `json:"list,omitempty"` - // The nextPageToken field. + // The token for fetching the next page of results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusersforuserservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusersforuserservicelistresponse.go index 8f2574d4..815aab6b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusersforuserservicelistresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusersforuserservicelistresponse.go @@ -38,13 +38,13 @@ func (a *AppUsersForUserServiceListResponseExpanded) GetAdditionalProperties() m return a.AdditionalProperties } -// The AppUsersForUserServiceListResponse message. +// AppUsersForUserServiceListResponse - The response message for listing app users correlated to a specific C1 user. type AppUsersForUserServiceListResponse struct { - // The expanded field. + // List of serialized related objects. Expanded []AppUsersForUserServiceListResponseExpanded `json:"expanded,omitempty"` - // The list field. + // The list of app user results. List []AppUserView `json:"list,omitempty"` - // The nextPageToken field. + // The token for fetching the next page of results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusertarget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusertarget.go new file mode 100644 index 00000000..30472cbb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/appusertarget.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AppUserTarget message. +type AppUserTarget struct { + // The appId field. + AppID *string `json:"appId,omitempty"` + // The appUserId field. + AppUserID *string `json:"appUserId,omitempty"` +} + +func (a *AppUserTarget) GetAppID() *string { + if a == nil { + return nil + } + return a.AppID +} + +func (a *AppUserTarget) GetAppUserID() *string { + if a == nil { + return nil + } + return a.AppUserID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/attributefacet.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/attributefacet.go new file mode 100644 index 00000000..febcf480 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/attributefacet.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AttributeFacet represents a filterable user profile attribute with its available values. +type AttributeFacet struct { + // The attribute field. + Attribute *string `json:"attribute,omitempty"` + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + // The values field. + Values []RoleMiningAttributeValue `json:"values,omitempty"` +} + +func (a *AttributeFacet) GetAttribute() *string { + if a == nil { + return nil + } + return a.Attribute +} + +func (a *AttributeFacet) GetDisplayName() *string { + if a == nil { + return nil + } + return a.DisplayName +} + +func (a *AttributeFacet) GetValues() []RoleMiningAttributeValue { + if a == nil { + return nil + } + return a.Values +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigc1local.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigc1local.go new file mode 100644 index 00000000..c5890c2f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigc1local.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type DelegatedVerifiers string + +const ( + DelegatedVerifiersDelegatedVerifierTypeUnspecified DelegatedVerifiers = "DELEGATED_VERIFIER_TYPE_UNSPECIFIED" + DelegatedVerifiersDelegatedVerifierTypeGoogle DelegatedVerifiers = "DELEGATED_VERIFIER_TYPE_GOOGLE" + DelegatedVerifiersDelegatedVerifierTypeMicrosoft DelegatedVerifiers = "DELEGATED_VERIFIER_TYPE_MICROSOFT" + DelegatedVerifiersDelegatedVerifierTypeGithub DelegatedVerifiers = "DELEGATED_VERIFIER_TYPE_GITHUB" +) + +func (e DelegatedVerifiers) ToPointer() *DelegatedVerifiers { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *DelegatedVerifiers) IsExact() bool { + if e != nil { + switch *e { + case "DELEGATED_VERIFIER_TYPE_UNSPECIFIED", "DELEGATED_VERIFIER_TYPE_GOOGLE", "DELEGATED_VERIFIER_TYPE_MICROSOFT", "DELEGATED_VERIFIER_TYPE_GITHUB": + return true + } + } + return false +} + +// The AuthConfigC1Local message. +type AuthConfigC1Local struct { + // The delegatedVerifiers field. + DelegatedVerifiers []DelegatedVerifiers `json:"delegatedVerifiers,omitempty"` +} + +func (a *AuthConfigC1Local) GetDelegatedVerifiers() []DelegatedVerifiers { + if a == nil { + return nil + } + return a.DelegatedVerifiers +} + +// #region class-body-authconfigc1local +// #endregion class-body-authconfigc1local diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfiggoogle.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfiggoogle.go new file mode 100644 index 00000000..ae932d49 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfiggoogle.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AuthConfigGoogle message. +type AuthConfigGoogle struct { + // The hostedDomains field. + HostedDomains []string `json:"hostedDomains,omitempty"` +} + +func (a *AuthConfigGoogle) GetHostedDomains() []string { + if a == nil { + return nil + } + return a.HostedDomains +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigjumpcloud.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigjumpcloud.go new file mode 100644 index 00000000..253e4611 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigjumpcloud.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AuthConfigJumpCloud message. +type AuthConfigJumpCloud struct { + // The oidcClientId field. + OidcClientID *string `json:"oidcClientId,omitempty"` + // Write-only. Never returned in get/list. + OidcClientSecret *string `json:"oidcClientSecret,omitempty"` +} + +func (a *AuthConfigJumpCloud) GetOidcClientID() *string { + if a == nil { + return nil + } + return a.OidcClientID +} + +func (a *AuthConfigJumpCloud) GetOidcClientSecret() *string { + if a == nil { + return nil + } + return a.OidcClientSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigmicrosoft.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigmicrosoft.go new file mode 100644 index 00000000..a8b69a7d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigmicrosoft.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AuthConfigMicrosoft message. +type AuthConfigMicrosoft struct { + // The tenantIds field. + TenantIds []string `json:"tenantIds,omitempty"` +} + +func (a *AuthConfigMicrosoft) GetTenantIds() []string { + if a == nil { + return nil + } + return a.TenantIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigoidc.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigoidc.go new file mode 100644 index 00000000..e409ba0d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigoidc.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AuthConfigOIDC message. +type AuthConfigOIDC struct { + // The exactMatchClaims field. + ExactMatchClaims map[string]string `json:"exactMatchClaims,omitempty"` + // The issuerId field. + IssuerID *string `json:"issuerId,omitempty"` + // The oidcClientId field. + OidcClientID *string `json:"oidcClientId,omitempty"` + // The oidcClientSecret field. + OidcClientSecret *string `json:"oidcClientSecret,omitempty"` + // The scopes field. + Scopes []string `json:"scopes,omitempty"` +} + +func (a *AuthConfigOIDC) GetExactMatchClaims() map[string]string { + if a == nil { + return nil + } + return a.ExactMatchClaims +} + +func (a *AuthConfigOIDC) GetIssuerID() *string { + if a == nil { + return nil + } + return a.IssuerID +} + +func (a *AuthConfigOIDC) GetOidcClientID() *string { + if a == nil { + return nil + } + return a.OidcClientID +} + +func (a *AuthConfigOIDC) GetOidcClientSecret() *string { + if a == nil { + return nil + } + return a.OidcClientSecret +} + +func (a *AuthConfigOIDC) GetScopes() []string { + if a == nil { + return nil + } + return a.Scopes +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigokta.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigokta.go new file mode 100644 index 00000000..1eacb676 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigokta.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AuthConfigOkta message. +type AuthConfigOkta struct { + // The domain field. + Domain *string `json:"domain,omitempty"` + // The oidcClientId field. + OidcClientID *string `json:"oidcClientId,omitempty"` + // Write-only. Never returned in get/list. + OidcClientSecret *string `json:"oidcClientSecret,omitempty"` +} + +func (a *AuthConfigOkta) GetDomain() *string { + if a == nil { + return nil + } + return a.Domain +} + +func (a *AuthConfigOkta) GetOidcClientID() *string { + if a == nil { + return nil + } + return a.OidcClientID +} + +func (a *AuthConfigOkta) GetOidcClientSecret() *string { + if a == nil { + return nil + } + return a.OidcClientSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigonelogin.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigonelogin.go new file mode 100644 index 00000000..6db847af --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigonelogin.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AuthConfigOneLogin message. +type AuthConfigOneLogin struct { + // The domain field. + Domain *string `json:"domain,omitempty"` + // The oidcClientId field. + OidcClientID *string `json:"oidcClientId,omitempty"` + // The oidcClientSecret field. + OidcClientSecret *string `json:"oidcClientSecret,omitempty"` +} + +func (a *AuthConfigOneLogin) GetDomain() *string { + if a == nil { + return nil + } + return a.Domain +} + +func (a *AuthConfigOneLogin) GetOidcClientID() *string { + if a == nil { + return nil + } + return a.OidcClientID +} + +func (a *AuthConfigOneLogin) GetOidcClientSecret() *string { + if a == nil { + return nil + } + return a.OidcClientSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigpingone.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigpingone.go new file mode 100644 index 00000000..4b0db152 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/authconfigpingone.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The AuthConfigPingOne message. +type AuthConfigPingOne struct { + // The environmentId field. + EnvironmentID *string `json:"environmentId,omitempty"` + // The oidcClientId field. + OidcClientID *string `json:"oidcClientId,omitempty"` + // The oidcClientSecret field. + OidcClientSecret *string `json:"oidcClientSecret,omitempty"` +} + +func (a *AuthConfigPingOne) GetEnvironmentID() *string { + if a == nil { + return nil + } + return a.EnvironmentID +} + +func (a *AuthConfigPingOne) GetOidcClientID() *string { + if a == nil { + return nil + } + return a.OidcClientID +} + +func (a *AuthConfigPingOne) GetOidcClientSecret() *string { + if a == nil { + return nil + } + return a.OidcClientSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automation.go index 22549ccf..0cb0fe63 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automation.go @@ -7,6 +7,32 @@ import ( "time" ) +// CircuitBreakerPeriod - The circuitBreakerPeriod field. +type CircuitBreakerPeriod string + +const ( + CircuitBreakerPeriodCircuitBreakerPeriodUnspecified CircuitBreakerPeriod = "CIRCUIT_BREAKER_PERIOD_UNSPECIFIED" + CircuitBreakerPeriodCircuitBreakerPeriodHour CircuitBreakerPeriod = "CIRCUIT_BREAKER_PERIOD_HOUR" + CircuitBreakerPeriodCircuitBreakerPeriodDay CircuitBreakerPeriod = "CIRCUIT_BREAKER_PERIOD_DAY" + CircuitBreakerPeriodCircuitBreakerPeriodWeek CircuitBreakerPeriod = "CIRCUIT_BREAKER_PERIOD_WEEK" + CircuitBreakerPeriodCircuitBreakerPeriodMonth CircuitBreakerPeriod = "CIRCUIT_BREAKER_PERIOD_MONTH" +) + +func (e CircuitBreakerPeriod) ToPointer() *CircuitBreakerPeriod { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *CircuitBreakerPeriod) IsExact() bool { + if e != nil { + switch *e { + case "CIRCUIT_BREAKER_PERIOD_UNSPECIFIED", "CIRCUIT_BREAKER_PERIOD_HOUR", "CIRCUIT_BREAKER_PERIOD_DAY", "CIRCUIT_BREAKER_PERIOD_WEEK", "CIRCUIT_BREAKER_PERIOD_MONTH": + return true + } + } + return false +} + // PrimaryTriggerType - The primaryTriggerType field. type PrimaryTriggerType string @@ -24,6 +50,7 @@ const ( PrimaryTriggerTypeTriggerTypeForm PrimaryTriggerType = "TRIGGER_TYPE_FORM" PrimaryTriggerTypeTriggerTypeScheduleAppUser PrimaryTriggerType = "TRIGGER_TYPE_SCHEDULE_APP_USER" PrimaryTriggerTypeTriggerTypeAccessConflict PrimaryTriggerType = "TRIGGER_TYPE_ACCESS_CONFLICT" + PrimaryTriggerTypeTriggerTypeScheduleNoUser PrimaryTriggerType = "TRIGGER_TYPE_SCHEDULE_NO_USER" ) func (e PrimaryTriggerType) ToPointer() *PrimaryTriggerType { @@ -34,7 +61,7 @@ func (e PrimaryTriggerType) ToPointer() *PrimaryTriggerType { func (e *PrimaryTriggerType) IsExact() bool { if e != nil { switch *e { - case "TRIGGER_TYPE_UNSPECIFIED", "TRIGGER_TYPE_USER_PROFILE_CHANGE", "TRIGGER_TYPE_APP_USER_CREATE", "TRIGGER_TYPE_APP_USER_UPDATE", "TRIGGER_TYPE_UNUSED_ACCESS", "TRIGGER_TYPE_USER_CREATED", "TRIGGER_TYPE_GRANT_FOUND", "TRIGGER_TYPE_GRANT_DELETED", "TRIGGER_TYPE_WEBHOOK", "TRIGGER_TYPE_SCHEDULE", "TRIGGER_TYPE_FORM", "TRIGGER_TYPE_SCHEDULE_APP_USER", "TRIGGER_TYPE_ACCESS_CONFLICT": + case "TRIGGER_TYPE_UNSPECIFIED", "TRIGGER_TYPE_USER_PROFILE_CHANGE", "TRIGGER_TYPE_APP_USER_CREATE", "TRIGGER_TYPE_APP_USER_UPDATE", "TRIGGER_TYPE_UNUSED_ACCESS", "TRIGGER_TYPE_USER_CREATED", "TRIGGER_TYPE_GRANT_FOUND", "TRIGGER_TYPE_GRANT_DELETED", "TRIGGER_TYPE_WEBHOOK", "TRIGGER_TYPE_SCHEDULE", "TRIGGER_TYPE_FORM", "TRIGGER_TYPE_SCHEDULE_APP_USER", "TRIGGER_TYPE_ACCESS_CONFLICT", "TRIGGER_TYPE_SCHEDULE_NO_USER": return true } } @@ -48,13 +75,21 @@ func (e *PrimaryTriggerType) IsExact() bool { type Automation struct { // The AutomationContext message. AutomationContext *AutomationContext `json:"context,omitempty"` - // The DisabledReasonCircuitBreaker message. + // DisabledReasonCircuitBreaker carries the trip context when an automation + // has been auto-disabled by its rate cap. Returned on the parent Automation + // when read; not directly settable. DisabledReasonCircuitBreaker *DisabledReasonCircuitBreaker `json:"circuitBreaker,omitempty"` // the app id this workflow_template belongs to AppID *string `json:"appId,omitempty"` // The automationSteps field. AutomationSteps []AutomationStep `json:"automationSteps,omitempty"` - CreatedAt *time.Time `json:"createdAt,omitempty"` + // Circuit breaker rate cap: disable this automation if it executes more + // than circuit_breaker_max times in the trailing circuit_breaker_period. + // 0 = circuit breaker off (default). + CircuitBreakerMax *int64 `json:"circuitBreakerMax,omitempty"` + // The circuitBreakerPeriod field. + CircuitBreakerPeriod *CircuitBreakerPeriod `json:"circuitBreakerPeriod,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` // The currentVersion field. CurrentVersion *int64 `integer:"string" json:"currentVersion,omitempty"` // The description field. @@ -117,6 +152,20 @@ func (a *Automation) GetAutomationSteps() []AutomationStep { return a.AutomationSteps } +func (a *Automation) GetCircuitBreakerMax() *int64 { + if a == nil { + return nil + } + return a.CircuitBreakerMax +} + +func (a *Automation) GetCircuitBreakerPeriod() *CircuitBreakerPeriod { + if a == nil { + return nil + } + return a.CircuitBreakerPeriod +} + func (a *Automation) GetCreatedAt() *time.Time { if a == nil { return nil @@ -208,13 +257,21 @@ func (a *Automation) GetTriggers() []AutomationTrigger { type AutomationInput struct { // The AutomationContext message. AutomationContext *AutomationContext `json:"context,omitempty"` - // The DisabledReasonCircuitBreaker message. + // DisabledReasonCircuitBreaker carries the trip context when an automation + // has been auto-disabled by its rate cap. Returned on the parent Automation + // when read; not directly settable. DisabledReasonCircuitBreaker *DisabledReasonCircuitBreaker `json:"circuitBreaker,omitempty"` // the app id this workflow_template belongs to AppID *string `json:"appId,omitempty"` // The automationSteps field. AutomationSteps []AutomationStep `json:"automationSteps,omitempty"` - CreatedAt *time.Time `json:"createdAt,omitempty"` + // Circuit breaker rate cap: disable this automation if it executes more + // than circuit_breaker_max times in the trailing circuit_breaker_period. + // 0 = circuit breaker off (default). + CircuitBreakerMax *int64 `json:"circuitBreakerMax,omitempty"` + // The circuitBreakerPeriod field. + CircuitBreakerPeriod *CircuitBreakerPeriod `json:"circuitBreakerPeriod,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` // The currentVersion field. CurrentVersion *int64 `integer:"string" json:"currentVersion,omitempty"` // The description field. @@ -275,6 +332,20 @@ func (a *AutomationInput) GetAutomationSteps() []AutomationStep { return a.AutomationSteps } +func (a *AutomationInput) GetCircuitBreakerMax() *int64 { + if a == nil { + return nil + } + return a.CircuitBreakerMax +} + +func (a *AutomationInput) GetCircuitBreakerPeriod() *CircuitBreakerPeriod { + if a == nil { + return nil + } + return a.CircuitBreakerPeriod +} + func (a *AutomationInput) GetCreatedAt() *time.Time { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationexecutionref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationexecutionref.go index 7feab2dd..711f2ce5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationexecutionref.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationexecutionref.go @@ -2,12 +2,27 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // The AutomationExecutionRef message. type AutomationExecutionRef struct { // The id field. ID *int64 `integer:"string" json:"id,omitempty"` } +func (a AutomationExecutionRef) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AutomationExecutionRef) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + func (a *AutomationExecutionRef) GetID() *int64 { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationscreateautomationrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationscreateautomationrequest.go new file mode 100644 index 00000000..cf97f997 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationscreateautomationrequest.go @@ -0,0 +1,141 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AutomationsCreateAutomationRequestCircuitBreakerPeriod - The circuitBreakerPeriod field. +type AutomationsCreateAutomationRequestCircuitBreakerPeriod string + +const ( + AutomationsCreateAutomationRequestCircuitBreakerPeriodCircuitBreakerPeriodUnspecified AutomationsCreateAutomationRequestCircuitBreakerPeriod = "CIRCUIT_BREAKER_PERIOD_UNSPECIFIED" + AutomationsCreateAutomationRequestCircuitBreakerPeriodCircuitBreakerPeriodHour AutomationsCreateAutomationRequestCircuitBreakerPeriod = "CIRCUIT_BREAKER_PERIOD_HOUR" + AutomationsCreateAutomationRequestCircuitBreakerPeriodCircuitBreakerPeriodDay AutomationsCreateAutomationRequestCircuitBreakerPeriod = "CIRCUIT_BREAKER_PERIOD_DAY" + AutomationsCreateAutomationRequestCircuitBreakerPeriodCircuitBreakerPeriodWeek AutomationsCreateAutomationRequestCircuitBreakerPeriod = "CIRCUIT_BREAKER_PERIOD_WEEK" + AutomationsCreateAutomationRequestCircuitBreakerPeriodCircuitBreakerPeriodMonth AutomationsCreateAutomationRequestCircuitBreakerPeriod = "CIRCUIT_BREAKER_PERIOD_MONTH" +) + +func (e AutomationsCreateAutomationRequestCircuitBreakerPeriod) ToPointer() *AutomationsCreateAutomationRequestCircuitBreakerPeriod { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AutomationsCreateAutomationRequestCircuitBreakerPeriod) IsExact() bool { + if e != nil { + switch *e { + case "CIRCUIT_BREAKER_PERIOD_UNSPECIFIED", "CIRCUIT_BREAKER_PERIOD_HOUR", "CIRCUIT_BREAKER_PERIOD_DAY", "CIRCUIT_BREAKER_PERIOD_WEEK", "CIRCUIT_BREAKER_PERIOD_MONTH": + return true + } + } + return false +} + +// AutomationsCreateAutomationRequest - The CreateAutomationRequest message. +type AutomationsCreateAutomationRequest struct { + // The AutomationContext message. + AutomationContext *AutomationContext `json:"context,omitempty"` + // the app id this workflow_template belongs to + AppID *string `json:"appId,omitempty"` + // Ordered list of steps that the automation executes. + AutomationSteps []AutomationStep `json:"automationSteps,omitempty"` + // Circuit breaker rate cap. See Automation.circuit_breaker_max for semantics. + CircuitBreakerMax *int64 `json:"circuitBreakerMax,omitempty"` + // The circuitBreakerPeriod field. + CircuitBreakerPeriod *AutomationsCreateAutomationRequestCircuitBreakerPeriod `json:"circuitBreakerPeriod,omitempty"` + // Optional description explaining the automation's purpose. + Description *string `json:"description,omitempty"` + // Human-readable name for the automation. + DisplayName *string `json:"displayName,omitempty"` + // Steps saved as a draft that have not yet been published. + DraftAutomationSteps []AutomationStep `json:"draftAutomationSteps,omitempty"` + // Triggers saved as a draft that have not yet been published. + DraftTriggers []AutomationTrigger `json:"draftTriggers,omitempty"` + // Whether the automation is active and eligible for execution. + Enabled *bool `json:"enabled,omitempty"` + // Whether this automation is in draft mode. Draft automations are not eligible for trigger-based execution. + IsDraft *bool `json:"isDraft,omitempty"` + // Triggers that determine when the automation runs. + Triggers []AutomationTrigger `json:"triggers,omitempty"` +} + +func (a *AutomationsCreateAutomationRequest) GetAutomationContext() *AutomationContext { + if a == nil { + return nil + } + return a.AutomationContext +} + +func (a *AutomationsCreateAutomationRequest) GetAppID() *string { + if a == nil { + return nil + } + return a.AppID +} + +func (a *AutomationsCreateAutomationRequest) GetAutomationSteps() []AutomationStep { + if a == nil { + return nil + } + return a.AutomationSteps +} + +func (a *AutomationsCreateAutomationRequest) GetCircuitBreakerMax() *int64 { + if a == nil { + return nil + } + return a.CircuitBreakerMax +} + +func (a *AutomationsCreateAutomationRequest) GetCircuitBreakerPeriod() *AutomationsCreateAutomationRequestCircuitBreakerPeriod { + if a == nil { + return nil + } + return a.CircuitBreakerPeriod +} + +func (a *AutomationsCreateAutomationRequest) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} + +func (a *AutomationsCreateAutomationRequest) GetDisplayName() *string { + if a == nil { + return nil + } + return a.DisplayName +} + +func (a *AutomationsCreateAutomationRequest) GetDraftAutomationSteps() []AutomationStep { + if a == nil { + return nil + } + return a.DraftAutomationSteps +} + +func (a *AutomationsCreateAutomationRequest) GetDraftTriggers() []AutomationTrigger { + if a == nil { + return nil + } + return a.DraftTriggers +} + +func (a *AutomationsCreateAutomationRequest) GetEnabled() *bool { + if a == nil { + return nil + } + return a.Enabled +} + +func (a *AutomationsCreateAutomationRequest) GetIsDraft() *bool { + if a == nil { + return nil + } + return a.IsDraft +} + +func (a *AutomationsCreateAutomationRequest) GetTriggers() []AutomationTrigger { + if a == nil { + return nil + } + return a.Triggers +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationscreateautomationresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationscreateautomationresponse.go new file mode 100644 index 00000000..65d54d40 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationscreateautomationresponse.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AutomationsCreateAutomationResponse - The CreateAutomationResponse message. +type AutomationsCreateAutomationResponse struct { + // The Automation message. + // + // This message contains a oneof named disabled_reason. Only a single field of the following list may be set at a time: + // - circuitBreaker + // + Automation *Automation `json:"automation,omitempty"` + // One-time absolute webhook URL for capability URL authentication, shown once at creation time. + // Contains the full URL including the embedded token (e.g. https://tenant.conductorone.com/api/v1/webhooks/incoming/{id}/t/{token}). + // Populated only when the webhook trigger uses capability URL authentication. + WebhookCapabilityURL *string `json:"webhookCapabilityUrl,omitempty"` + // One-time HMAC shared secret, shown once at creation time. + // Populated only when the webhook trigger uses HMAC authentication. + WebhookHmacSecret *string `json:"webhookHmacSecret,omitempty"` +} + +func (a *AutomationsCreateAutomationResponse) GetAutomation() *Automation { + if a == nil { + return nil + } + return a.Automation +} + +func (a *AutomationsCreateAutomationResponse) GetWebhookCapabilityURL() *string { + if a == nil { + return nil + } + return a.WebhookCapabilityURL +} + +func (a *AutomationsCreateAutomationResponse) GetWebhookHmacSecret() *string { + if a == nil { + return nil + } + return a.WebhookHmacSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationsdeleteautomationrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationsdeleteautomationrequest.go new file mode 100644 index 00000000..cb1076f9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationsdeleteautomationrequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AutomationsDeleteAutomationRequest - The DeleteAutomationRequest message. +type AutomationsDeleteAutomationRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationsdeleteautomationresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationsdeleteautomationresponse.go new file mode 100644 index 00000000..d1bc75be --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationsdeleteautomationresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AutomationsDeleteAutomationResponse - The DeleteAutomationResponse message. +type AutomationsDeleteAutomationResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationstep.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationstep.go index f17f53fc..64240d4b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationstep.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationstep.go @@ -24,6 +24,8 @@ package shared // - accountLifecycleAction // - generatePassword // - evaluateExpressions +// - setCredential +// - storeCredential type AutomationStep struct { // The AccountLifecycleAction message. // @@ -78,6 +80,19 @@ type AutomationStep struct { // The GeneratePassword message. GeneratePassword *GeneratePassword `json:"generatePassword,omitempty"` // The GrantEntitlements message. + // + // This message contains a oneof named inclusion. Only a single field of the following list may be set at a time: + // - inclusionList + // - inclusionCriteria + // - inclusionListCel + // + // + // This message contains a oneof named exclusion. Only a single field of the following list may be set at a time: + // - exclusionNone + // - exclusionList + // - exclusionCriteria + // - exclusionListCel + // GrantEntitlements *GrantEntitlements `json:"grantEntitlements,omitempty"` // RemoveFromDelegation: find all users that have the target user as their delegated user, and modify the delegation. // @@ -95,13 +110,26 @@ type AutomationStep struct { RunAutomation *RunAutomation `json:"runAutomation,omitempty"` // The SendEmail message. SendEmail *SendEmail `json:"sendEmail,omitempty"` - // The SendSlackMessage message. + // SendSlackMessage posts to a channel or DMs one or more users. Delivery mode is + // inferred from which fields are populated: DM if any user field is set + // (use_subject_user, user_ids_cel, user_refs), otherwise channel. Priority for DM + // recipient resolution: use_subject_user > user_ids_cel > user_refs. // // This message contains a oneof named channel. Only a single field of the following list may be set at a time: // - channelName // - channelNameCel // SendSlackMessage *SendSlackMessage `json:"sendSlackMessage,omitempty"` + // SetCredential submits a RotateCredentials baton task to the target connector, + // re-encrypting the given password CEL expression with the connector's public JWK. + // + // This message contains a oneof named connector_identifier. Only a single field of the following list may be set at a time: + // - connectorRef + // + SetCredential *SetCredential `json:"setCredential,omitempty"` + // StoreCredential stores a credential from GeneratePassword in a vault. + // Supports Paper Vault (SSO/email) and App Vault (entitlement-bound). + StoreCredential *StoreCredential `json:"storeCredential,omitempty"` // The TaskAction message. // // This message contains a oneof named action. Only a single field of the following list may be set at a time: @@ -238,6 +266,20 @@ func (a *AutomationStep) GetSendSlackMessage() *SendSlackMessage { return a.SendSlackMessage } +func (a *AutomationStep) GetSetCredential() *SetCredential { + if a == nil { + return nil + } + return a.SetCredential +} + +func (a *AutomationStep) GetStoreCredential() *StoreCredential { + if a == nil { + return nil + } + return a.StoreCredential +} + func (a *AutomationStep) GetTaskAction() *TaskAction { if a == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationtrigger.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationtrigger.go index 359abda3..a689c028 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationtrigger.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/automationtrigger.go @@ -5,7 +5,6 @@ package shared // AutomationTrigger - Automation Triggers // // This message contains a oneof named kind. Only a single field of the following list may be set at a time: -// - manual // - userProfileChange // - appUserCreated // - appUserUpdated @@ -15,9 +14,9 @@ package shared // - grantDeleted // - webhook // - schedule -// - form // - scheduleAppUser // - accessConflict +// - scheduleNoUser type AutomationTrigger struct { // The AccessConflictTrigger message. // @@ -40,18 +39,17 @@ type AutomationTrigger struct { // - appIdCel // AppUserUpdatedTrigger *AppUserUpdatedTrigger `json:"appUserUpdated,omitempty"` - // The FormTrigger message. - FormTrigger *FormTrigger `json:"form,omitempty"` // The GrantDeletedTrigger message. GrantDeletedTrigger *GrantDeletedTrigger `json:"grantDeleted,omitempty"` // The GrantFoundTrigger message. GrantFoundTrigger *GrantFoundTrigger `json:"grantFound,omitempty"` - // The ManualAutomationTrigger message. - ManualAutomationTrigger *ManualAutomationTrigger `json:"manual,omitempty"` // The ScheduleTrigger message. ScheduleTrigger *ScheduleTrigger `json:"schedule,omitempty"` // The ScheduleTriggerAppUser message. ScheduleTriggerAppUser *ScheduleTriggerAppUser `json:"scheduleAppUser,omitempty"` + // ScheduleTriggerNoUser fires on a cron schedule with no subject user (e.g. reports, syncs, orchestration). + // Minimum cron interval is enforced at 1 hour in validation. + ScheduleTriggerNoUser *ScheduleTriggerNoUser `json:"scheduleNoUser,omitempty"` // The UsageBasedRevocationTrigger message. // // This message contains a oneof named cold_start_schedule. Only a single field of the following list may be set at a time: @@ -68,6 +66,7 @@ type AutomationTrigger struct { // This message contains a oneof named auth_config. Only a single field of the following list may be set at a time: // - jwt // - hmac + // - capabilityUrl // WebhookAutomationTrigger *WebhookAutomationTrigger `json:"webhook,omitempty"` } @@ -93,13 +92,6 @@ func (a *AutomationTrigger) GetAppUserUpdatedTrigger() *AppUserUpdatedTrigger { return a.AppUserUpdatedTrigger } -func (a *AutomationTrigger) GetFormTrigger() *FormTrigger { - if a == nil { - return nil - } - return a.FormTrigger -} - func (a *AutomationTrigger) GetGrantDeletedTrigger() *GrantDeletedTrigger { if a == nil { return nil @@ -114,25 +106,25 @@ func (a *AutomationTrigger) GetGrantFoundTrigger() *GrantFoundTrigger { return a.GrantFoundTrigger } -func (a *AutomationTrigger) GetManualAutomationTrigger() *ManualAutomationTrigger { +func (a *AutomationTrigger) GetScheduleTrigger() *ScheduleTrigger { if a == nil { return nil } - return a.ManualAutomationTrigger + return a.ScheduleTrigger } -func (a *AutomationTrigger) GetScheduleTrigger() *ScheduleTrigger { +func (a *AutomationTrigger) GetScheduleTriggerAppUser() *ScheduleTriggerAppUser { if a == nil { return nil } - return a.ScheduleTrigger + return a.ScheduleTriggerAppUser } -func (a *AutomationTrigger) GetScheduleTriggerAppUser() *ScheduleTriggerAppUser { +func (a *AutomationTrigger) GetScheduleTriggerNoUser() *ScheduleTriggerNoUser { if a == nil { return nil } - return a.ScheduleTriggerAppUser + return a.ScheduleTriggerNoUser } func (a *AutomationTrigger) GetUsageBasedRevocationTrigger() *UsageBasedRevocationTrigger { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/awsexternalid.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/awsexternalid.go index 37cc5c2e..23214225 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/awsexternalid.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/awsexternalid.go @@ -2,9 +2,9 @@ package shared -// The AWSExternalID message. +// AWSExternalID contains the tenant's external ID for AWS IAM role trust policies. type AWSExternalID struct { - // The externalId field. + // The external ID value to include in the AWS IAM role trust policy condition. ExternalID *string `json:"externalId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/awssesproviderconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/awssesproviderconfig.go new file mode 100644 index 00000000..79f0e2ba --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/awssesproviderconfig.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AWSSESProviderConfig configures sending via a customer's AWS SES account. +type AWSSESProviderConfig struct { + // Optional SES configuration set name for tracking/metrics. + ConfigurationSetName *string `json:"configurationSetName,omitempty"` + // AWS region where SES identities are verified (e.g., "us-east-1"). + Region *string `json:"region,omitempty"` + // IAM role ARN for sts:AssumeRole. The trust policy should require the + // tenant's AWS External ID (GET /api/v1/settings/aws-external-id). + RoleArn *string `json:"roleArn,omitempty"` +} + +func (a *AWSSESProviderConfig) GetConfigurationSetName() *string { + if a == nil { + return nil + } + return a.ConfigurationSetName +} + +func (a *AWSSESProviderConfig) GetRegion() *string { + if a == nil { + return nil + } + return a.Region +} + +func (a *AWSSESProviderConfig) GetRoleArn() *string { + if a == nil { + return nil + } + return a.RoleArn +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/boolfield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/boolfield.go index 9767ec41..999bffd8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/boolfield.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/boolfield.go @@ -7,9 +7,6 @@ package shared // This message contains a oneof named view. Only a single field of the following list may be set at a time: // - checkboxField // - toggleField -// -// This message contains a oneof named _rules. Only a single field of the following list may be set at a time: -// - rules type BoolField struct { // BoolRules describes the constraints applied to `bool` values BoolRules *BoolRules `json:"rules,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/builtinpattern.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/builtinpattern.go new file mode 100644 index 00000000..9feb1b02 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/builtinpattern.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// BuiltInPattern references a ConductorOne-maintained DLP pattern. +// +// The specific pattern and its configuration are encoded as a oneof. +// +// This message contains a oneof named config. Only a single field of the following list may be set at a time: +// - piiRedaction +// - creditCardBlocking +// - queryScopeLimit +// - writeAuthorization +// - sensitiveFileGuard +type BuiltInPattern struct { + // CreditCardBlockingConfig denies any tool call whose output contains a + // Luhn-valid credit card number. No configuration fields today; the + // presence of the oneof arm is the whole configuration. + CreditCardBlockingConfig *CreditCardBlockingConfig `json:"creditCardBlocking,omitempty"` + // PIIRedactionConfig configures post-tool-use redaction of sensitive fields. + PIIRedactionConfig *PIIRedactionConfig `json:"piiRedaction,omitempty"` + // QueryScopeLimitConfig caps numeric fields (e.g. limit, page_size) in tool + // input so callers cannot request unbounded data. + QueryScopeLimitConfig *QueryScopeLimitConfig `json:"queryScopeLimit,omitempty"` + // SensitiveFileGuardConfig blocks tool calls that reference sensitive file + // paths or directories. + SensitiveFileGuardConfig *SensitiveFileGuardConfig `json:"sensitiveFileGuard,omitempty"` + // WriteAuthorizationConfig blocks tool calls whose ToolClassification is in + // blocked_classifications, optionally permitting them within business hours. + WriteAuthorizationConfig *WriteAuthorizationConfig `json:"writeAuthorization,omitempty"` +} + +func (b *BuiltInPattern) GetCreditCardBlockingConfig() *CreditCardBlockingConfig { + if b == nil { + return nil + } + return b.CreditCardBlockingConfig +} + +func (b *BuiltInPattern) GetPIIRedactionConfig() *PIIRedactionConfig { + if b == nil { + return nil + } + return b.PIIRedactionConfig +} + +func (b *BuiltInPattern) GetQueryScopeLimitConfig() *QueryScopeLimitConfig { + if b == nil { + return nil + } + return b.QueryScopeLimitConfig +} + +func (b *BuiltInPattern) GetSensitiveFileGuardConfig() *SensitiveFileGuardConfig { + if b == nil { + return nil + } + return b.SensitiveFileGuardConfig +} + +func (b *BuiltInPattern) GetWriteAuthorizationConfig() *WriteAuthorizationConfig { + if b == nil { + return nil + } + return b.WriteAuthorizationConfig +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkacceptriskaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkacceptriskaction.go new file mode 100644 index 00000000..f434058f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkacceptriskaction.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// The BulkAcceptRiskAction message. +type BulkAcceptRiskAction struct { + ExpiresAt *time.Time `json:"expiresAt,omitempty"` + // The justification field. + Justification *string `json:"justification,omitempty"` +} + +func (b BulkAcceptRiskAction) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(b, "", false) +} + +func (b *BulkAcceptRiskAction) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &b, "", false, nil); err != nil { + return err + } + return nil +} + +func (b *BulkAcceptRiskAction) GetExpiresAt() *time.Time { + if b == nil { + return nil + } + return b.ExpiresAt +} + +func (b *BulkAcceptRiskAction) GetJustification() *string { + if b == nil { + return nil + } + return b.Justification +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkassignowneraction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkassignowneraction.go new file mode 100644 index 00000000..70e1c3c0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkassignowneraction.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The BulkAssignOwnerAction message. +type BulkAssignOwnerAction struct { + // The FindingOwnerRef message. + // + // This message contains a oneof named owner. Only a single field of the following list may be set at a time: + // - identityUserId + // - appOwnerAppId + // - managerOfUserId + // - userSetId + // + FindingOwnerRef *FindingOwnerRef `json:"owner,omitempty"` +} + +func (b *BulkAssignOwnerAction) GetFindingOwnerRef() *FindingOwnerRef { + if b == nil { + return nil + } + return b.FindingOwnerRef +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkcreatefindingtasksrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkcreatefindingtasksrequest.go new file mode 100644 index 00000000..f3171c9e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkcreatefindingtasksrequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The BulkCreateFindingTasksRequest message. +type BulkCreateFindingTasksRequest struct { + // The FindingSearchRequest message. + FindingSearchRequest *FindingSearchRequest `json:"searchRequest,omitempty"` + // Optional policy ID to use for the created tasks. Defaults to the app's grant policy. + PolicyID *string `json:"policyId,omitempty"` + // Individual finding references to create tasks for (by-ID mode). + Refs []FindingRef `json:"refs,omitempty"` +} + +func (b *BulkCreateFindingTasksRequest) GetFindingSearchRequest() *FindingSearchRequest { + if b == nil { + return nil + } + return b.FindingSearchRequest +} + +func (b *BulkCreateFindingTasksRequest) GetPolicyID() *string { + if b == nil { + return nil + } + return b.PolicyID +} + +func (b *BulkCreateFindingTasksRequest) GetRefs() []FindingRef { + if b == nil { + return nil + } + return b.Refs +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkcreatefindingtasksresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkcreatefindingtasksresponse.go new file mode 100644 index 00000000..93b4d236 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkcreatefindingtasksresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The BulkCreateFindingTasksResponse message. +type BulkCreateFindingTasksResponse struct { + // The ID of the asynchronous bulk action, which can be used to track progress. + BulkActionID *string `json:"bulkActionId,omitempty"` +} + +func (b *BulkCreateFindingTasksResponse) GetBulkActionID() *string { + if b == nil { + return nil + } + return b.BulkActionID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manualautomationtrigger.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkreopenaction.go similarity index 53% rename from vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manualautomationtrigger.go rename to vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkreopenaction.go index 6be028ee..74e726ff 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manualautomationtrigger.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkreopenaction.go @@ -2,6 +2,6 @@ package shared -// The ManualAutomationTrigger message. -type ManualAutomationTrigger struct { +// The BulkReopenAction message. +type BulkReopenAction struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulksnoozeaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulksnoozeaction.go new file mode 100644 index 00000000..020db126 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulksnoozeaction.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// The BulkSnoozeAction message. +type BulkSnoozeAction struct { + // The reason field. + Reason *string `json:"reason,omitempty"` + SnoozeUntil *time.Time `json:"snoozeUntil,omitempty"` +} + +func (b BulkSnoozeAction) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(b, "", false) +} + +func (b *BulkSnoozeAction) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &b, "", false, nil); err != nil { + return err + } + return nil +} + +func (b *BulkSnoozeAction) GetReason() *string { + if b == nil { + return nil + } + return b.Reason +} + +func (b *BulkSnoozeAction) GetSnoozeUntil() *time.Time { + if b == nil { + return nil + } + return b.SnoozeUntil +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulksuppressaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulksuppressaction.go new file mode 100644 index 00000000..dbc32615 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulksuppressaction.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The BulkSuppressAction message. +type BulkSuppressAction struct { + // The reason field. + Reason *string `json:"reason,omitempty"` +} + +func (b *BulkSuppressAction) GetReason() *string { + if b == nil { + return nil + } + return b.Reason +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkunsuppressaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkunsuppressaction.go new file mode 100644 index 00000000..bb74577d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkunsuppressaction.go @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The BulkUnsuppressAction message. +// +// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. +type BulkUnsuppressAction struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkupdatefindingstaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkupdatefindingstaterequest.go new file mode 100644 index 00000000..5a77fc84 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkupdatefindingstaterequest.go @@ -0,0 +1,89 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The BulkUpdateFindingStateRequest message. +// +// This message contains a oneof named action. Only a single field of the following list may be set at a time: +// - snooze +// - suppress +// - acceptRisk +// - unsuppress +// - assignOwner +// - reopen +type BulkUpdateFindingStateRequest struct { + // The BulkAcceptRiskAction message. + BulkAcceptRiskAction *BulkAcceptRiskAction `json:"acceptRisk,omitempty"` + // The BulkAssignOwnerAction message. + BulkAssignOwnerAction *BulkAssignOwnerAction `json:"assignOwner,omitempty"` + // The BulkReopenAction message. + BulkReopenAction *BulkReopenAction `json:"reopen,omitempty"` + // The BulkSnoozeAction message. + BulkSnoozeAction *BulkSnoozeAction `json:"snooze,omitempty"` + // The BulkSuppressAction message. + BulkSuppressAction *BulkSuppressAction `json:"suppress,omitempty"` + // The BulkUnsuppressAction message. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + BulkUnsuppressAction *BulkUnsuppressAction `json:"unsuppress,omitempty"` + // The FindingSearchRequest message. + FindingSearchRequest *FindingSearchRequest `json:"searchRequest,omitempty"` + // By-ID mode: specify individual finding refs. + Refs []FindingRef `json:"refs,omitempty"` +} + +func (b *BulkUpdateFindingStateRequest) GetBulkAcceptRiskAction() *BulkAcceptRiskAction { + if b == nil { + return nil + } + return b.BulkAcceptRiskAction +} + +func (b *BulkUpdateFindingStateRequest) GetBulkAssignOwnerAction() *BulkAssignOwnerAction { + if b == nil { + return nil + } + return b.BulkAssignOwnerAction +} + +func (b *BulkUpdateFindingStateRequest) GetBulkReopenAction() *BulkReopenAction { + if b == nil { + return nil + } + return b.BulkReopenAction +} + +func (b *BulkUpdateFindingStateRequest) GetBulkSnoozeAction() *BulkSnoozeAction { + if b == nil { + return nil + } + return b.BulkSnoozeAction +} + +func (b *BulkUpdateFindingStateRequest) GetBulkSuppressAction() *BulkSuppressAction { + if b == nil { + return nil + } + return b.BulkSuppressAction +} + +func (b *BulkUpdateFindingStateRequest) GetBulkUnsuppressAction() *BulkUnsuppressAction { + if b == nil { + return nil + } + return b.BulkUnsuppressAction +} + +func (b *BulkUpdateFindingStateRequest) GetFindingSearchRequest() *FindingSearchRequest { + if b == nil { + return nil + } + return b.FindingSearchRequest +} + +func (b *BulkUpdateFindingStateRequest) GetRefs() []FindingRef { + if b == nil { + return nil + } + return b.Refs +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkupdatefindingstateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkupdatefindingstateresponse.go new file mode 100644 index 00000000..507bd85f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bulkupdatefindingstateresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The BulkUpdateFindingStateResponse message. +type BulkUpdateFindingStateResponse struct { + // The ID of the asynchronous bulk action, which can be used to track progress. + BulkActionID *string `json:"bulkActionId,omitempty"` +} + +func (b *BulkUpdateFindingStateResponse) GetBulkActionID() *string { + if b == nil { + return nil + } + return b.BulkActionID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomation.go index dcb900f7..f56e7150 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomation.go @@ -11,11 +11,14 @@ import ( // // This message contains a oneof named conditions. Only a single field of the following list may be set at a time: // - entitlements +// - cel type BundleAutomation struct { // The BundleAutomationCircuitBreaker message. BundleAutomationCircuitBreaker *BundleAutomationCircuitBreaker `json:"circuitBreaker,omitempty"` // The BundleAutomationLastRunState message. BundleAutomationLastRunState *BundleAutomationLastRunState `json:"state,omitempty"` + // The BundleAutomationRuleCEL message. + BundleAutomationRuleCEL *BundleAutomationRuleCEL `json:"cel,omitempty"` // The BundleAutomationRuleEntitlement message. BundleAutomationRuleEntitlement *BundleAutomationRuleEntitlement `json:"entitlements,omitempty"` // The createTasks field. @@ -58,6 +61,13 @@ func (b *BundleAutomation) GetBundleAutomationLastRunState() *BundleAutomationLa return b.BundleAutomationLastRunState } +func (b *BundleAutomation) GetBundleAutomationRuleCEL() *BundleAutomationRuleCEL { + if b == nil { + return nil + } + return b.BundleAutomationRuleCEL +} + func (b *BundleAutomation) GetBundleAutomationRuleEntitlement() *BundleAutomationRuleEntitlement { if b == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationcelevaluationstate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationcelevaluationstate.go new file mode 100644 index 00000000..8991a6c7 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationcelevaluationstate.go @@ -0,0 +1,84 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// BundleAutomationCelEvaluationStateStatus - The status field. +type BundleAutomationCelEvaluationStateStatus string + +const ( + BundleAutomationCelEvaluationStateStatusBundleAutomationRunStatusUnspecified BundleAutomationCelEvaluationStateStatus = "BUNDLE_AUTOMATION_RUN_STATUS_UNSPECIFIED" + BundleAutomationCelEvaluationStateStatusBundleAutomationRunStatusSuccess BundleAutomationCelEvaluationStateStatus = "BUNDLE_AUTOMATION_RUN_STATUS_SUCCESS" + BundleAutomationCelEvaluationStateStatusBundleAutomationRunStatusFailure BundleAutomationCelEvaluationStateStatus = "BUNDLE_AUTOMATION_RUN_STATUS_FAILURE" + BundleAutomationCelEvaluationStateStatusBundleAutomationRunStatusInProgress BundleAutomationCelEvaluationStateStatus = "BUNDLE_AUTOMATION_RUN_STATUS_IN_PROGRESS" + BundleAutomationCelEvaluationStateStatusBundleAutomationRunStatusWaitingForApproval BundleAutomationCelEvaluationStateStatus = "BUNDLE_AUTOMATION_RUN_STATUS_WAITING_FOR_APPROVAL" +) + +func (e BundleAutomationCelEvaluationStateStatus) ToPointer() *BundleAutomationCelEvaluationStateStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *BundleAutomationCelEvaluationStateStatus) IsExact() bool { + if e != nil { + switch *e { + case "BUNDLE_AUTOMATION_RUN_STATUS_UNSPECIFIED", "BUNDLE_AUTOMATION_RUN_STATUS_SUCCESS", "BUNDLE_AUTOMATION_RUN_STATUS_FAILURE", "BUNDLE_AUTOMATION_RUN_STATUS_IN_PROGRESS", "BUNDLE_AUTOMATION_RUN_STATUS_WAITING_FOR_APPROVAL": + return true + } + } + return false +} + +// The BundleAutomationCelEvaluationState message. +type BundleAutomationCelEvaluationState struct { + // The errorMessage field. + ErrorMessage *string `json:"errorMessage,omitempty"` + LastEvaluatedAt *time.Time `json:"lastEvaluatedAt,omitempty"` + // The matchedUsers field. + MatchedUsers *int64 `integer:"string" json:"matchedUsers,omitempty"` + // The status field. + Status *BundleAutomationCelEvaluationStateStatus `json:"status,omitempty"` +} + +func (b BundleAutomationCelEvaluationState) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(b, "", false) +} + +func (b *BundleAutomationCelEvaluationState) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &b, "", false, nil); err != nil { + return err + } + return nil +} + +func (b *BundleAutomationCelEvaluationState) GetErrorMessage() *string { + if b == nil { + return nil + } + return b.ErrorMessage +} + +func (b *BundleAutomationCelEvaluationState) GetLastEvaluatedAt() *time.Time { + if b == nil { + return nil + } + return b.LastEvaluatedAt +} + +func (b *BundleAutomationCelEvaluationState) GetMatchedUsers() *int64 { + if b == nil { + return nil + } + return b.MatchedUsers +} + +func (b *BundleAutomationCelEvaluationState) GetStatus() *BundleAutomationCelEvaluationStateStatus { + if b == nil { + return nil + } + return b.Status +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationcircuitbreaker.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationcircuitbreaker.go index 0fcfbfcd..a890e4c6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationcircuitbreaker.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationcircuitbreaker.go @@ -11,9 +11,10 @@ import ( type BundleAutomationCircuitBreakerState string const ( - BundleAutomationCircuitBreakerStateCircuitBreakerStateUnspecified BundleAutomationCircuitBreakerState = "CIRCUIT_BREAKER_STATE_UNSPECIFIED" - BundleAutomationCircuitBreakerStateCircuitBreakerStateTriggered BundleAutomationCircuitBreakerState = "CIRCUIT_BREAKER_STATE_TRIGGERED" - BundleAutomationCircuitBreakerStateCircuitBreakerStateBypass BundleAutomationCircuitBreakerState = "CIRCUIT_BREAKER_STATE_BYPASS" + BundleAutomationCircuitBreakerStateCircuitBreakerStateUnspecified BundleAutomationCircuitBreakerState = "CIRCUIT_BREAKER_STATE_UNSPECIFIED" + BundleAutomationCircuitBreakerStateCircuitBreakerStateTriggered BundleAutomationCircuitBreakerState = "CIRCUIT_BREAKER_STATE_TRIGGERED" + BundleAutomationCircuitBreakerStateCircuitBreakerStateBypass BundleAutomationCircuitBreakerState = "CIRCUIT_BREAKER_STATE_BYPASS" + BundleAutomationCircuitBreakerStateCircuitBreakerStateSupportDisabled BundleAutomationCircuitBreakerState = "CIRCUIT_BREAKER_STATE_SUPPORT_DISABLED" ) func (e BundleAutomationCircuitBreakerState) ToPointer() *BundleAutomationCircuitBreakerState { @@ -24,7 +25,7 @@ func (e BundleAutomationCircuitBreakerState) ToPointer() *BundleAutomationCircui func (e *BundleAutomationCircuitBreakerState) IsExact() bool { if e != nil { switch *e { - case "CIRCUIT_BREAKER_STATE_UNSPECIFIED", "CIRCUIT_BREAKER_STATE_TRIGGERED", "CIRCUIT_BREAKER_STATE_BYPASS": + case "CIRCUIT_BREAKER_STATE_UNSPECIFIED", "CIRCUIT_BREAKER_STATE_TRIGGERED", "CIRCUIT_BREAKER_STATE_BYPASS", "CIRCUIT_BREAKER_STATE_SUPPORT_DISABLED": return true } } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationlastrunstate.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationlastrunstate.go index a8eb3b2a..58bde777 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationlastrunstate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationlastrunstate.go @@ -35,6 +35,8 @@ func (e *BundleAutomationLastRunStateStatus) IsExact() bool { // The BundleAutomationLastRunState message. type BundleAutomationLastRunState struct { + // The BundleAutomationCelEvaluationState message. + BundleAutomationCelEvaluationState *BundleAutomationCelEvaluationState `json:"celEvaluation,omitempty"` // The errorMessage field. ErrorMessage *string `json:"errorMessage,omitempty"` LastRunAt *time.Time `json:"lastRunAt,omitempty"` @@ -53,6 +55,13 @@ func (b *BundleAutomationLastRunState) UnmarshalJSON(data []byte) error { return nil } +func (b *BundleAutomationLastRunState) GetBundleAutomationCelEvaluationState() *BundleAutomationCelEvaluationState { + if b == nil { + return nil + } + return b.BundleAutomationCelEvaluationState +} + func (b *BundleAutomationLastRunState) GetErrorMessage() *string { if b == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationrulecel.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationrulecel.go new file mode 100644 index 00000000..5e261b6c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/bundleautomationrulecel.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The BundleAutomationRuleCEL message. +type BundleAutomationRuleCEL struct { + // The expression field. + Expression *string `json:"expression,omitempty"` +} + +func (b *BundleAutomationRuleCEL) GetExpression() *string { + if b == nil { + return nil + } + return b.Expression +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/businesshours.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/businesshours.go new file mode 100644 index 00000000..26030701 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/businesshours.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// BusinessHours defines a weekly time window in a specific timezone. +type BusinessHours struct { + // 0=Sun, 1=Mon, ..., 6=Sat. + Days []int `json:"days,omitempty"` + // "HH:MM" in 24-hour format. + End *string `json:"end,omitempty"` + // "HH:MM" in 24-hour format. + Start *string `json:"start,omitempty"` + // The timezone field. + Timezone *string `json:"timezone,omitempty"` +} + +func (b *BusinessHours) GetDays() []int { + if b == nil { + return nil + } + return b.Days +} + +func (b *BusinessHours) GetEnd() *string { + if b == nil { + return nil + } + return b.End +} + +func (b *BusinessHours) GetStart() *string { + if b == nil { + return nil + } + return b.Start +} + +func (b *BusinessHours) GetTimezone() *string { + if b == nil { + return nil + } + return b.Timezone +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/buttoncomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/buttoncomponent.go new file mode 100644 index 00000000..4cc2a184 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/buttoncomponent.go @@ -0,0 +1,94 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// Variant - The variant field. +type Variant string + +const ( + VariantButtonVariantUnspecified Variant = "BUTTON_VARIANT_UNSPECIFIED" + VariantButtonVariantPrimary Variant = "BUTTON_VARIANT_PRIMARY" + VariantButtonVariantSecondary Variant = "BUTTON_VARIANT_SECONDARY" + VariantButtonVariantText Variant = "BUTTON_VARIANT_TEXT" +) + +func (e Variant) ToPointer() *Variant { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Variant) IsExact() bool { + if e != nil { + switch *e { + case "BUTTON_VARIANT_UNSPECIFIED", "BUTTON_VARIANT_PRIMARY", "BUTTON_VARIANT_SECONDARY", "BUTTON_VARIANT_TEXT": + return true + } + } + return false +} + +// ButtonComponent triggers actions. +type ButtonComponent struct { + // Action represents what happens when a component is activated (e.g., button click). + // + // This message contains a oneof named action_type. Only a single field of the following list may be set at a time: + // - event + // - functionCall + // + A2UIAction *A2UIAction `json:"action,omitempty"` + // DynamicBool can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicBool *DynamicBool `json:"disabled,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"label,omitempty"` + // The checks field. + Checks []ValidationCheck `json:"checks,omitempty"` + // The variant field. + Variant *Variant `json:"variant,omitempty"` +} + +func (b *ButtonComponent) GetA2UIAction() *A2UIAction { + if b == nil { + return nil + } + return b.A2UIAction +} + +func (b *ButtonComponent) GetDynamicBool() *DynamicBool { + if b == nil { + return nil + } + return b.DynamicBool +} + +func (b *ButtonComponent) GetDynamicString() *DynamicString { + if b == nil { + return nil + } + return b.DynamicString +} + +func (b *ButtonComponent) GetChecks() []ValidationCheck { + if b == nil { + return nil + } + return b.Checks +} + +func (b *ButtonComponent) GetVariant() *Variant { + if b == nil { + return nil + } + return b.Variant +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1builtinproviderconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1builtinproviderconfig.go new file mode 100644 index 00000000..77ea2c0f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1builtinproviderconfig.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1BuiltInProviderConfig selects the ConductorOne built-in email provider. +// +// Emails are sent from no-reply@conductorone.com via the platform SendGrid account. +// Only supports sending to C1 users — external email addresses are not supported. +// No configuration fields required. +type C1BuiltInProviderConfig struct { +} + +// #region class-body-c1builtinproviderconfig +// #endregion class-body-c1builtinproviderconfig diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1codeblockcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1codeblockcomponent.go new file mode 100644 index 00000000..e1e8c10b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1codeblockcomponent.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1CodeBlockComponent displays code with syntax highlighting. +type C1CodeBlockComponent struct { + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"code,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString1 *DynamicString `json:"language,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString2 *DynamicString `json:"title,omitempty"` + // The copyable field. + Copyable *bool `json:"copyable,omitempty"` +} + +func (c *C1CodeBlockComponent) GetDynamicString() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString +} + +func (c *C1CodeBlockComponent) GetDynamicString1() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString1 +} + +func (c *C1CodeBlockComponent) GetDynamicString2() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString2 +} + +func (c *C1CodeBlockComponent) GetCopyable() *bool { + if c == nil { + return nil + } + return c.Copyable +} + +// #region class-body-c1codeblockcomponent +// #endregion class-body-c1codeblockcomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1connectorconfigformcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1connectorconfigformcomponent.go new file mode 100644 index 00000000..849078ff --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1connectorconfigformcomponent.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1ConnectorConfigFormComponent renders the shared admin connector-settings form inside an +// +// A2UI surface. The frontend resolves the catalog, connector, and config schema itself from +// the ids below, keeping the configuration field values out of the agent's data model — the +// agent never receives API keys, passwords, or other secrets entered by the user. +type C1ConnectorConfigFormComponent struct { + // The appId field. + AppID *string `json:"appId,omitempty"` + // The connectorId field. + ConnectorID *string `json:"connectorId,omitempty"` + // The skipActionName field. + SkipActionName *string `json:"skipActionName,omitempty"` + // The submitActionName field. + SubmitActionName *string `json:"submitActionName,omitempty"` +} + +func (c *C1ConnectorConfigFormComponent) GetAppID() *string { + if c == nil { + return nil + } + return c.AppID +} + +func (c *C1ConnectorConfigFormComponent) GetConnectorID() *string { + if c == nil { + return nil + } + return c.ConnectorID +} + +func (c *C1ConnectorConfigFormComponent) GetSkipActionName() *string { + if c == nil { + return nil + } + return c.SkipActionName +} + +func (c *C1ConnectorConfigFormComponent) GetSubmitActionName() *string { + if c == nil { + return nil + } + return c.SubmitActionName +} + +// #region class-body-c1connectorconfigformcomponent +// #endregion class-body-c1connectorconfigformcomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1connectorsyncdetailcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1connectorsyncdetailcomponent.go new file mode 100644 index 00000000..3fdc0d88 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1connectorsyncdetailcomponent.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1ConnectorSyncDetailComponent renders the same live card as +// +// C1ConnectorSyncProgressComponent but pre-expanded with the phase checklist, +// live count tiles, and "What's happening" explainer visible from the first +// paint. Intended for message-body placement — emit one after each +// `submit_app_config` so the transcript carries a clear "this is what just +// happened" receipt for the connector the user just connected. +type C1ConnectorSyncDetailComponent struct { + // The appId field. + AppID *string `json:"appId,omitempty"` + // The connectorId field. + ConnectorID *string `json:"connectorId,omitempty"` + // The title field. + Title *string `json:"title,omitempty"` +} + +func (c *C1ConnectorSyncDetailComponent) GetAppID() *string { + if c == nil { + return nil + } + return c.AppID +} + +func (c *C1ConnectorSyncDetailComponent) GetConnectorID() *string { + if c == nil { + return nil + } + return c.ConnectorID +} + +func (c *C1ConnectorSyncDetailComponent) GetTitle() *string { + if c == nil { + return nil + } + return c.Title +} + +// #region class-body-c1connectorsyncdetailcomponent +// #endregion class-body-c1connectorsyncdetailcomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1connectorsyncprogresscomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1connectorsyncprogresscomponent.go new file mode 100644 index 00000000..c875f60b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1connectorsyncprogresscomponent.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1ConnectorSyncProgressComponent renders a live connector sync status card. +// +// Subscribes to WebSocket updates for real-time sync lifecycle status. +type C1ConnectorSyncProgressComponent struct { + // The appId field. + AppID *string `json:"appId,omitempty"` + // The connectorId field. + ConnectorID *string `json:"connectorId,omitempty"` + // The title field. + Title *string `json:"title,omitempty"` +} + +func (c *C1ConnectorSyncProgressComponent) GetAppID() *string { + if c == nil { + return nil + } + return c.AppID +} + +func (c *C1ConnectorSyncProgressComponent) GetConnectorID() *string { + if c == nil { + return nil + } + return c.ConnectorID +} + +func (c *C1ConnectorSyncProgressComponent) GetTitle() *string { + if c == nil { + return nil + } + return c.Title +} + +// #region class-body-c1connectorsyncprogresscomponent +// #endregion class-body-c1connectorsyncprogresscomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1durationpickercomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1durationpickercomponent.go new file mode 100644 index 00000000..4541aebe --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1durationpickercomponent.go @@ -0,0 +1,57 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1DurationPickerComponent is the access-request duration picker (presets + custom with number/unit). +// +// Value is duration in seconds bound to the given path. +type C1DurationPickerComponent struct { + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber *DynamicNumber `json:"maxDurationSeconds,omitempty"` + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber1 *DynamicNumber `json:"value,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"label,omitempty"` +} + +func (c *C1DurationPickerComponent) GetDynamicNumber() *DynamicNumber { + if c == nil { + return nil + } + return c.DynamicNumber +} + +func (c *C1DurationPickerComponent) GetDynamicNumber1() *DynamicNumber { + if c == nil { + return nil + } + return c.DynamicNumber1 +} + +func (c *C1DurationPickerComponent) GetDynamicString() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString +} + +// #region class-body-c1durationpickercomponent +// #endregion class-body-c1durationpickercomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1msteamsnotificationscomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1msteamsnotificationscomponent.go new file mode 100644 index 00000000..4992d8c6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1msteamsnotificationscomponent.go @@ -0,0 +1,12 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1MSTeamsNotificationsComponent renders a self-contained Microsoft Teams integration card. +// +// Fetches status and consent URLs via frontend API calls. +type C1MSTeamsNotificationsComponent struct { +} + +// #region class-body-c1msteamsnotificationscomponent +// #endregion class-body-c1msteamsnotificationscomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingplancategory.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingplancategory.go new file mode 100644 index 00000000..4982c199 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingplancategory.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1OnboardingPlanCategory groups related plan steps under a section heading. +type C1OnboardingPlanCategory struct { + // The id field. + ID *string `json:"id,omitempty"` + // The steps field. + Steps []C1OnboardingPlanStep `json:"steps,omitempty"` + // The title field. + Title *string `json:"title,omitempty"` +} + +func (c *C1OnboardingPlanCategory) GetID() *string { + if c == nil { + return nil + } + return c.ID +} + +func (c *C1OnboardingPlanCategory) GetSteps() []C1OnboardingPlanStep { + if c == nil { + return nil + } + return c.Steps +} + +func (c *C1OnboardingPlanCategory) GetTitle() *string { + if c == nil { + return nil + } + return c.Title +} + +// #region class-body-c1onboardingplancategory +// #endregion class-body-c1onboardingplancategory diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingplancomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingplancomponent.go new file mode 100644 index 00000000..9ac39dc4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingplancomponent.go @@ -0,0 +1,21 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1OnboardingPlanComponent renders a personalized onboarding plan with categorized steps. +// +// The agent dynamically populates categories and steps based on user intent and context. +type C1OnboardingPlanComponent struct { + // The categories field. + Categories []C1OnboardingPlanCategory `json:"categories,omitempty"` +} + +func (c *C1OnboardingPlanComponent) GetCategories() []C1OnboardingPlanCategory { + if c == nil { + return nil + } + return c.Categories +} + +// #region class-body-c1onboardingplancomponent +// #endregion class-body-c1onboardingplancomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingplanstep.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingplanstep.go new file mode 100644 index 00000000..573ead5e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingplanstep.go @@ -0,0 +1,46 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1OnboardingPlanStep is a single actionable item in the onboarding plan. +type C1OnboardingPlanStep struct { + // The agentAssisted field. + AgentAssisted *bool `json:"agentAssisted,omitempty"` + // The description field. + Description *string `json:"description,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + // The title field. + Title *string `json:"title,omitempty"` +} + +func (c *C1OnboardingPlanStep) GetAgentAssisted() *bool { + if c == nil { + return nil + } + return c.AgentAssisted +} + +func (c *C1OnboardingPlanStep) GetDescription() *string { + if c == nil { + return nil + } + return c.Description +} + +func (c *C1OnboardingPlanStep) GetID() *string { + if c == nil { + return nil + } + return c.ID +} + +func (c *C1OnboardingPlanStep) GetTitle() *string { + if c == nil { + return nil + } + return c.Title +} + +// #region class-body-c1onboardingplanstep +// #endregion class-body-c1onboardingplanstep diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingwelcomecomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingwelcomecomponent.go new file mode 100644 index 00000000..f7290954 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1onboardingwelcomecomponent.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1OnboardingWelcomeComponent renders the onboarding welcome screen with org context and intent collection. +// +// Backend pre-populates recommended_catalog_id / recommended_display_name from detected IDP. +// Frontend detects auth backend via introspect for contextual UI text. +type C1OnboardingWelcomeComponent struct { + // The recommendedCatalogId field. + RecommendedCatalogID *string `json:"recommendedCatalogId,omitempty"` + // The recommendedDisplayName field. + RecommendedDisplayName *string `json:"recommendedDisplayName,omitempty"` +} + +func (c *C1OnboardingWelcomeComponent) GetRecommendedCatalogID() *string { + if c == nil { + return nil + } + return c.RecommendedCatalogID +} + +func (c *C1OnboardingWelcomeComponent) GetRecommendedDisplayName() *string { + if c == nil { + return nil + } + return c.RecommendedDisplayName +} + +// #region class-body-c1onboardingwelcomecomponent +// #endregion class-body-c1onboardingwelcomecomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1resourcepickercomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1resourcepickercomponent.go new file mode 100644 index 00000000..68deb405 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1resourcepickercomponent.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1ResourcePickerComponent allows selecting C1 resources. +type C1ResourcePickerComponent struct { + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"label,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString1 *DynamicString `json:"value,omitempty"` + // The multiSelect field. + MultiSelect *bool `json:"multiSelect,omitempty"` + // The resourceType field. + ResourceType *string `json:"resourceType,omitempty"` +} + +func (c *C1ResourcePickerComponent) GetDynamicString() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString +} + +func (c *C1ResourcePickerComponent) GetDynamicString1() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString1 +} + +func (c *C1ResourcePickerComponent) GetMultiSelect() *bool { + if c == nil { + return nil + } + return c.MultiSelect +} + +func (c *C1ResourcePickerComponent) GetResourceType() *string { + if c == nil { + return nil + } + return c.ResourceType +} + +// #region class-body-c1resourcepickercomponent +// #endregion class-body-c1resourcepickercomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1slacknotificationscomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1slacknotificationscomponent.go new file mode 100644 index 00000000..43334688 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1slacknotificationscomponent.go @@ -0,0 +1,12 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1SlackNotificationsComponent renders a self-contained Slack integration card. +// +// Fetches status and OAuth URLs via frontend API calls. +type C1SlackNotificationsComponent struct { +} + +// #region class-body-c1slacknotificationscomponent +// #endregion class-body-c1slacknotificationscomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1statusindicatorcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1statusindicatorcomponent.go new file mode 100644 index 00000000..fbf108a9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1statusindicatorcomponent.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1StatusIndicatorComponent shows agent progress status. +type C1StatusIndicatorComponent struct { + // DynamicBool can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicBool *DynamicBool `json:"showSpinner,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"message,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString1 *DynamicString `json:"status,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString2 *DynamicString `json:"toolName,omitempty"` +} + +func (c *C1StatusIndicatorComponent) GetDynamicBool() *DynamicBool { + if c == nil { + return nil + } + return c.DynamicBool +} + +func (c *C1StatusIndicatorComponent) GetDynamicString() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString +} + +func (c *C1StatusIndicatorComponent) GetDynamicString1() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString1 +} + +func (c *C1StatusIndicatorComponent) GetDynamicString2() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString2 +} + +// #region class-body-c1statusindicatorcomponent +// #endregion class-body-c1statusindicatorcomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1todoitem.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1todoitem.go new file mode 100644 index 00000000..762d8956 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1todoitem.go @@ -0,0 +1,91 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The C1TodoItem message. +type C1TodoItem struct { + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"description,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString1 *DynamicString `json:"label,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString2 *DynamicString `json:"trailingActionLabel,omitempty"` + // ServerEvent triggers a server-side action. + ServerEvent *ServerEvent `json:"trailingAction,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + // The section field. + Section *string `json:"section,omitempty"` + // The status field. + Status *string `json:"status,omitempty"` +} + +func (c *C1TodoItem) GetDynamicString() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString +} + +func (c *C1TodoItem) GetDynamicString1() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString1 +} + +func (c *C1TodoItem) GetDynamicString2() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString2 +} + +func (c *C1TodoItem) GetServerEvent() *ServerEvent { + if c == nil { + return nil + } + return c.ServerEvent +} + +func (c *C1TodoItem) GetID() *string { + if c == nil { + return nil + } + return c.ID +} + +func (c *C1TodoItem) GetSection() *string { + if c == nil { + return nil + } + return c.Section +} + +func (c *C1TodoItem) GetStatus() *string { + if c == nil { + return nil + } + return c.Status +} + +// #region class-body-c1todoitem +// #endregion class-body-c1todoitem diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1todolistcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1todolistcomponent.go new file mode 100644 index 00000000..f9238252 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1todolistcomponent.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1TodoListComponent renders a phase/step checklist with progress tracking. +type C1TodoListComponent struct { + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"title,omitempty"` + // The items field. + Items []C1TodoItem `json:"items,omitempty"` +} + +func (c *C1TodoListComponent) GetDynamicString() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString +} + +func (c *C1TodoListComponent) GetItems() []C1TodoItem { + if c == nil { + return nil + } + return c.Items +} + +// #region class-body-c1todolistcomponent +// #endregion class-body-c1todolistcomponent diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1userfilter.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1userfilter.go new file mode 100644 index 00000000..d3868856 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/c1userfilter.go @@ -0,0 +1,12 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// C1UserFilter is used to configure a picker for selecting ConductorOne users. +// +// This is distinct from AppUserFilter which selects accounts within a connected app. +type C1UserFilter struct { +} + +// #region class-body-c1userfilter +// #endregion class-body-c1userfilter diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/campaignhealthsnapshot.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/campaignhealthsnapshot.go new file mode 100644 index 00000000..9193ce01 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/campaignhealthsnapshot.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// CampaignHealthSnapshot - Campaign health snapshot. Read-only; updated by backend maintenance processors. +type CampaignHealthSnapshot struct { + CheckedAt *time.Time `json:"checkedAt,omitempty"` + // Number of pending actions locked by terminal (dead) submissions. + PhantomLockedCount *int `json:"phantomLockedCount,omitempty"` +} + +func (c CampaignHealthSnapshot) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *CampaignHealthSnapshot) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { + return err + } + return nil +} + +func (c *CampaignHealthSnapshot) GetCheckedAt() *time.Time { + if c == nil { + return nil + } + return c.CheckedAt +} + +func (c *CampaignHealthSnapshot) GetPhantomLockedCount() *int { + if c == nil { + return nil + } + return c.PhantomLockedCount +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/campaigninsights.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/campaigninsights.go new file mode 100644 index 00000000..938b672a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/campaigninsights.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// CampaignInsights - AI-generated campaign insights (markdown). Read-only; set by backend when campaign is closed. +type CampaignInsights struct { + // The markdown field. + Markdown *string `json:"markdown,omitempty"` +} + +func (c *CampaignInsights) GetMarkdown() *string { + if c == nil { + return nil + } + return c.Markdown +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cardcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cardcomponent.go new file mode 100644 index 00000000..b56dc803 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cardcomponent.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// CardComponent is a container with styling. +type CardComponent struct { + // ChildList contains references to child component IDs. + ChildList *ChildList `json:"children,omitempty"` +} + +func (c *CardComponent) GetChildList() *ChildList { + if c == nil { + return nil + } + return c.ChildList +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/channelsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/channelsettings.go new file mode 100644 index 00000000..c862c6ff --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/channelsettings.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ChannelSettings groups notification preferences for all supported channels. +type ChannelSettings struct { + // The EmailChannelSettings message. + EmailChannelSettings *EmailChannelSettings `json:"email,omitempty"` + // The MSTeamsChannelSettings message. + MSTeamsChannelSettings *MSTeamsChannelSettings `json:"teams,omitempty"` + // The SlackChannelSettings message. + SlackChannelSettings *SlackChannelSettings `json:"slack,omitempty"` +} + +func (c *ChannelSettings) GetEmailChannelSettings() *EmailChannelSettings { + if c == nil { + return nil + } + return c.EmailChannelSettings +} + +func (c *ChannelSettings) GetMSTeamsChannelSettings() *MSTeamsChannelSettings { + if c == nil { + return nil + } + return c.MSTeamsChannelSettings +} + +func (c *ChannelSettings) GetSlackChannelSettings() *SlackChannelSettings { + if c == nil { + return nil + } + return c.SlackChannelSettings +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/checkboxcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/checkboxcomponent.go new file mode 100644 index 00000000..7490f972 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/checkboxcomponent.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// CheckBoxComponent is a boolean checkbox. +type CheckBoxComponent struct { + // DynamicBool can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicBool *DynamicBool `json:"value,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"label,omitempty"` +} + +func (c *CheckBoxComponent) GetDynamicBool() *DynamicBool { + if c == nil { + return nil + } + return c.DynamicBool +} + +func (c *CheckBoxComponent) GetDynamicString() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/childlist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/childlist.go new file mode 100644 index 00000000..e0516053 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/childlist.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ChildList contains references to child component IDs. +type ChildList struct { + // The ids field. + Ids []string `json:"ids,omitempty"` +} + +func (c *ChildList) GetIds() []string { + if c == nil { + return nil + } + return c.Ids +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/choice.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/choice.go new file mode 100644 index 00000000..5d1ed1a1 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/choice.go @@ -0,0 +1,46 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// Choice represents a single option in a choice picker. +type Choice struct { + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"description,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString1 *DynamicString `json:"label,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` +} + +func (c *Choice) GetDynamicString() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString +} + +func (c *Choice) GetDynamicString1() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString1 +} + +func (c *Choice) GetID() *string { + if c == nil { + return nil + } + return c.ID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/choicepickercomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/choicepickercomponent.go new file mode 100644 index 00000000..732ff0bd --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/choicepickercomponent.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ChoicePickerComponent allows selection from predefined choices. +type ChoicePickerComponent struct { + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"label,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString1 *DynamicString `json:"value,omitempty"` + // The choices field. + Choices []Choice `json:"choices,omitempty"` + // The multiSelect field. + MultiSelect *bool `json:"multiSelect,omitempty"` + // The required field. + Required *bool `json:"required,omitempty"` +} + +func (c *ChoicePickerComponent) GetDynamicString() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString +} + +func (c *ChoicePickerComponent) GetDynamicString1() *DynamicString { + if c == nil { + return nil + } + return c.DynamicString1 +} + +func (c *ChoicePickerComponent) GetChoices() []Choice { + if c == nil { + return nil + } + return c.Choices +} + +func (c *ChoicePickerComponent) GetMultiSelect() *bool { + if c == nil { + return nil + } + return c.MultiSelect +} + +func (c *ChoicePickerComponent) GetRequired() *bool { + if c == nil { + return nil + } + return c.Required +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cidrrestriction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cidrrestriction.go index 0b317882..65cd9fa1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cidrrestriction.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cidrrestriction.go @@ -2,11 +2,12 @@ package shared -// The CIDRRestriction message. +// CIDRRestriction defines an IP-based access restriction with an enable toggle and a list of allowed CIDRs. type CIDRRestriction struct { - // The enabled field. + // Whether this CIDR restriction is enforced. Enabled *bool `json:"enabled,omitempty"` - // The sourceCidr field. + // The list of CIDR ranges that are allowed when the restriction is enabled. + // Accepts IPv4 (e.g. 10.0.0.0/24) or IPv6 (e.g. 2001:db8::/32) CIDRs. SourceCidr []string `json:"sourceCidr,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/clearautomationcircuitbreakerrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/clearautomationcircuitbreakerrequest.go new file mode 100644 index 00000000..a9cbd0ae --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/clearautomationcircuitbreakerrequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ClearAutomationCircuitBreakerRequest message. +type ClearAutomationCircuitBreakerRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/clearautomationcircuitbreakerresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/clearautomationcircuitbreakerresponse.go new file mode 100644 index 00000000..4c6f832b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/clearautomationcircuitbreakerresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ClearAutomationCircuitBreakerResponse message. +type ClearAutomationCircuitBreakerResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cohortentitlement.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cohortentitlement.go new file mode 100644 index 00000000..8e20297f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cohortentitlement.go @@ -0,0 +1,79 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CohortEntitlement message. +type CohortEntitlement struct { + // The appDisplayName field. + AppDisplayName *string `json:"appDisplayName,omitempty"` + // The appId field. + AppID *string `json:"appId,omitempty"` + // The appResourceDisplayName field. + AppResourceDisplayName *string `json:"appResourceDisplayName,omitempty"` + // The appResourceTypeDisplayName field. + AppResourceTypeDisplayName *string `json:"appResourceTypeDisplayName,omitempty"` + // The coverage field. + Coverage *float64 `json:"coverage,omitempty"` + // The entitlementDisplayName field. + EntitlementDisplayName *string `json:"entitlementDisplayName,omitempty"` + // The entitlementId field. + EntitlementID *string `json:"entitlementId,omitempty"` + // The grantedCount field. + GrantedCount *int `json:"grantedCount,omitempty"` +} + +func (c *CohortEntitlement) GetAppDisplayName() *string { + if c == nil { + return nil + } + return c.AppDisplayName +} + +func (c *CohortEntitlement) GetAppID() *string { + if c == nil { + return nil + } + return c.AppID +} + +func (c *CohortEntitlement) GetAppResourceDisplayName() *string { + if c == nil { + return nil + } + return c.AppResourceDisplayName +} + +func (c *CohortEntitlement) GetAppResourceTypeDisplayName() *string { + if c == nil { + return nil + } + return c.AppResourceTypeDisplayName +} + +func (c *CohortEntitlement) GetCoverage() *float64 { + if c == nil { + return nil + } + return c.Coverage +} + +func (c *CohortEntitlement) GetEntitlementDisplayName() *string { + if c == nil { + return nil + } + return c.EntitlementDisplayName +} + +func (c *CohortEntitlement) GetEntitlementID() *string { + if c == nil { + return nil + } + return c.EntitlementID +} + +func (c *CohortEntitlement) GetGrantedCount() *int { + if c == nil { + return nil + } + return c.GrantedCount +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cohorthintinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cohorthintinput.go new file mode 100644 index 00000000..91a255fe --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cohorthintinput.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CohortHintInput message. +type CohortHintInput struct { + // The user attribute name to use for cohort grouping (e.g., "department", "job_title"). + Attribute *string `json:"attribute,omitempty"` + // Relative priority of this hint. Higher values cause the analysis to weight this attribute more heavily. + Priority *int `json:"priority,omitempty"` + // Specific attribute values to focus on. If empty, all values for the attribute are considered. + Values []string `json:"values,omitempty"` +} + +func (c *CohortHintInput) GetAttribute() *string { + if c == nil { + return nil + } + return c.Attribute +} + +func (c *CohortHintInput) GetPriority() *int { + if c == nil { + return nil + } + return c.Priority +} + +func (c *CohortHintInput) GetValues() []string { + if c == nil { + return nil + } + return c.Values +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cohorthintview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cohorthintview.go new file mode 100644 index 00000000..9028e4f5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/cohorthintview.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CohortHintView message. +type CohortHintView struct { + // The user attribute name used for cohort grouping. + Attribute *string `json:"attribute,omitempty"` + // Relative priority of this hint. + Priority *int `json:"priority,omitempty"` + // The specific attribute values targeted by this hint. + Values []string `json:"values,omitempty"` +} + +func (c *CohortHintView) GetAttribute() *string { + if c == nil { + return nil + } + return c.Attribute +} + +func (c *CohortHintView) GetPriority() *int { + if c == nil { + return nil + } + return c.Priority +} + +func (c *CohortHintView) GetValues() []string { + if c == nil { + return nil + } + return c.Values +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/columncomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/columncomponent.go new file mode 100644 index 00000000..1c088c01 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/columncomponent.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ColumnComponent arranges children vertically. +type ColumnComponent struct { + // ChildList contains references to child component IDs. + ChildList *ChildList `json:"children,omitempty"` + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber *DynamicNumber `json:"gap,omitempty"` + // The alignment field. + Alignment *string `json:"alignment,omitempty"` + // The distribution field. + Distribution *string `json:"distribution,omitempty"` +} + +func (c *ColumnComponent) GetChildList() *ChildList { + if c == nil { + return nil + } + return c.ChildList +} + +func (c *ColumnComponent) GetDynamicNumber() *DynamicNumber { + if c == nil { + return nil + } + return c.DynamicNumber +} + +func (c *ColumnComponent) GetAlignment() *string { + if c == nil { + return nil + } + return c.Alignment +} + +func (c *ColumnComponent) GetDistribution() *string { + if c == nil { + return nil + } + return c.Distribution +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/commentonrequestpreference.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/commentonrequestpreference.go new file mode 100644 index 00000000..06c3c27b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/commentonrequestpreference.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CommentOnRequestPreference message. +type CommentOnRequestPreference struct { + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The locked field. + Locked *bool `json:"locked,omitempty"` +} + +func (c *CommentOnRequestPreference) GetEnabled() *bool { + if c == nil { + return nil + } + return c.Enabled +} + +func (c *CommentOnRequestPreference) GetLocked() *bool { + if c == nil { + return nil + } + return c.Locked +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/completionpreference.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/completionpreference.go new file mode 100644 index 00000000..2c50154f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/completionpreference.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CompletionPreference message. +type CompletionPreference struct { + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The locked field. + Locked *bool `json:"locked,omitempty"` +} + +func (c *CompletionPreference) GetEnabled() *bool { + if c == nil { + return nil + } + return c.Enabled +} + +func (c *CompletionPreference) GetLocked() *bool { + if c == nil { + return nil + } + return c.Locked +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/confirmsyncvalidrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/confirmsyncvalidrequest.go index f0d9d81f..c6e665f5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/confirmsyncvalidrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/confirmsyncvalidrequest.go @@ -2,6 +2,6 @@ package shared -// The ConfirmSyncValidRequest message. +// The ConfirmSyncValidRequest message contains the fields required to confirm a sync as valid. type ConfirmSyncValidRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/confirmsyncvalidresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/confirmsyncvalidresponse.go index 7f1decc8..27ce2159 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/confirmsyncvalidresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/confirmsyncvalidresponse.go @@ -2,6 +2,6 @@ package shared -// The ConfirmSyncValidResponse message. +// ConfirmSyncValidResponse - Empty response body. Status code indicates success. type ConfirmSyncValidResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitor.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitor.go index 0980b61c..de09ec27 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitor.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitor.go @@ -7,23 +7,25 @@ import ( "time" ) -// The ConflictMonitor message. +// ConflictMonitor - A conflict monitor defines a Separation of Duty rule between two entitlement sets. +// +// It detects when any user holds entitlements from both set A and set B simultaneously. type ConflictMonitor struct { // The NotificationConfig message. - NotificationConfig *NotificationConfig1 `json:"notificationConfig,omitempty"` - CreatedAt *time.Time `json:"createdAt,omitempty"` - DeletedAt *time.Time `json:"deletedAt,omitempty"` - // The description field. + AccessConflictNotificationConfig *AccessConflictNotificationConfig `json:"notificationConfig,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + DeletedAt *time.Time `json:"deletedAt,omitempty"` + // A description explaining the purpose of this Separation of Duty rule. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name of the conflict monitor. DisplayName *string `json:"displayName,omitempty"` - // The enabled field. + // Whether the conflict monitor is actively scanning for violations. Enabled *bool `json:"enabled,omitempty"` - // The entitlementSetAId field. + // The identifier of entitlement set A in the conflict rule. EntitlementSetAID *string `json:"entitlementSetAId,omitempty"` - // The entitlementSetBId field. + // The identifier of entitlement set B in the conflict rule. EntitlementSetBID *string `json:"entitlementSetBId,omitempty"` - // The id field. + // The unique identifier of this conflict monitor. ID *string `json:"id,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` } @@ -39,11 +41,11 @@ func (c *ConflictMonitor) UnmarshalJSON(data []byte) error { return nil } -func (c *ConflictMonitor) GetNotificationConfig() *NotificationConfig1 { +func (c *ConflictMonitor) GetAccessConflictNotificationConfig() *AccessConflictNotificationConfig { if c == nil { return nil } - return c.NotificationConfig + return c.AccessConflictNotificationConfig } func (c *ConflictMonitor) GetCreatedAt() *time.Time { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitorcreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitorcreaterequest.go index 5a4f17f6..d3c42b45 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitorcreaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitorcreaterequest.go @@ -2,21 +2,21 @@ package shared -// The ConflictMonitorCreateRequest message. +// ConflictMonitorCreateRequest - The request message for creating a new conflict monitor. type ConflictMonitorCreateRequest struct { // The NotificationConfig message. - NotificationConfig *NotificationConfig1 `json:"notificationConfig,omitempty"` - // The description field. + AccessConflictNotificationConfig *AccessConflictNotificationConfig `json:"notificationConfig,omitempty"` + // An optional description explaining the purpose of this Separation of Duty rule. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name for the conflict monitor. DisplayName string `json:"displayName"` } -func (c *ConflictMonitorCreateRequest) GetNotificationConfig() *NotificationConfig1 { +func (c *ConflictMonitorCreateRequest) GetAccessConflictNotificationConfig() *AccessConflictNotificationConfig { if c == nil { return nil } - return c.NotificationConfig + return c.AccessConflictNotificationConfig } func (c *ConflictMonitorCreateRequest) GetDescription() *string { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitordeleterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitordeleterequest.go index bdf0652b..b9e2470d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitordeleterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitordeleterequest.go @@ -2,6 +2,6 @@ package shared -// The ConflictMonitorDeleteRequest message. +// ConflictMonitorDeleteRequest - The request message for deleting a conflict monitor. type ConflictMonitorDeleteRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitordeleteresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitordeleteresponse.go index 0d61232f..84ea65ad 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitordeleteresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitordeleteresponse.go @@ -2,6 +2,6 @@ package shared -// The ConflictMonitorDeleteResponse message. +// ConflictMonitorDeleteResponse - The response message for deleting a conflict monitor. type ConflictMonitorDeleteResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitorupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitorupdaterequest.go index b6c09506..97384128 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitorupdaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/conflictmonitorupdaterequest.go @@ -2,21 +2,21 @@ package shared -// The ConflictMonitorUpdateRequest message. +// ConflictMonitorUpdateRequest - The request message for updating an existing conflict monitor. type ConflictMonitorUpdateRequest struct { // The NotificationConfig message. - NotificationConfig *NotificationConfig1 `json:"notificationConfig,omitempty"` - // The description field. + AccessConflictNotificationConfig *AccessConflictNotificationConfig `json:"notificationConfig,omitempty"` + // The updated description for the conflict monitor. Description *string `json:"description,omitempty"` - // The displayName field. + // The updated human-readable name for the conflict monitor. DisplayName *string `json:"displayName,omitempty"` } -func (c *ConflictMonitorUpdateRequest) GetNotificationConfig() *NotificationConfig1 { +func (c *ConflictMonitorUpdateRequest) GetAccessConflictNotificationConfig() *AccessConflictNotificationConfig { if c == nil { return nil } - return c.NotificationConfig + return c.AccessConflictNotificationConfig } func (c *ConflictMonitorUpdateRequest) GetDescription() *string { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connector.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connector.go index b06586db..81b9a312 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connector.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connector.go @@ -43,6 +43,8 @@ func (c *Config) GetAdditionalProperties() map[string]any { type Connector struct { // The status field on the connector is used to track the status of the connectors sync, and when syncing last started, completed, or caused the connector to update. ConnectorStatus *ConnectorStatus `json:"status,omitempty"` + // The ConnectorSyncCronSchedule message. + ConnectorSyncCronSchedule *ConnectorSyncCronSchedule `json:"connectorSyncCronSchedule,omitempty"` // OAuth2AuthorizedAs tracks the user that OAuthed with the connector. OAuth2AuthorizedAs *OAuth2AuthorizedAs `json:"oauthAuthorizedAs,omitempty"` // The SyncConfig message. @@ -54,9 +56,12 @@ type Connector struct { // The catalogId describes which catalog entry this connector is an instance of. For example, every Okta connector will have the same catalogId indicating it is an Okta connector. CatalogID *string `json:"catalogId,omitempty"` // Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. - Config *Config `json:"config,omitempty"` - CreatedAt *time.Time `json:"createdAt,omitempty"` - DeletedAt *time.Time `json:"deletedAt,omitempty"` + Config *Config `json:"config,omitempty"` + ConfigUpdatedAt *time.Time `json:"configUpdatedAt,omitempty"` + // The connectorApiVersion field. + ConnectorAPIVersion *int64 `json:"connectorApiVersion,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + DeletedAt *time.Time `json:"deletedAt,omitempty"` // The description of the connector. Description *string `json:"description,omitempty"` // The disableCheckBadSync field. @@ -67,6 +72,8 @@ type Connector struct { DownloadURL *string `json:"downloadUrl,omitempty"` // The id of the connector. ID *string `json:"id,omitempty"` + // Number of sync workers to use for parallel sync, when the PARALLEL_SYNC feature is enabled. Zero disables parallel sync. Optional on write: omit the field in UpdateAdvancedConfig to leave the stored value unchanged. The public API allows setting up to 4. + ParallelSyncWorkerCount *int `json:"parallelSyncWorkerCount,omitempty"` // List of profile attributes to sync, when set only these attributes will be synced ProfileAllowList []string `json:"profileAllowList,omitempty"` // List of profile attributes to ignore (not sync), when set other attributes will be synced, but these will not. @@ -99,6 +106,13 @@ func (c *Connector) GetConnectorStatus() *ConnectorStatus { return c.ConnectorStatus } +func (c *Connector) GetConnectorSyncCronSchedule() *ConnectorSyncCronSchedule { + if c == nil { + return nil + } + return c.ConnectorSyncCronSchedule +} + func (c *Connector) GetOAuth2AuthorizedAs() *OAuth2AuthorizedAs { if c == nil { return nil @@ -141,6 +155,20 @@ func (c *Connector) GetConfig() *Config { return c.Config } +func (c *Connector) GetConfigUpdatedAt() *time.Time { + if c == nil { + return nil + } + return c.ConfigUpdatedAt +} + +func (c *Connector) GetConnectorAPIVersion() *int64 { + if c == nil { + return nil + } + return c.ConnectorAPIVersion +} + func (c *Connector) GetCreatedAt() *time.Time { if c == nil { return nil @@ -190,6 +218,13 @@ func (c *Connector) GetID() *string { return c.ID } +func (c *Connector) GetParallelSyncWorkerCount() *int { + if c == nil { + return nil + } + return c.ParallelSyncWorkerCount +} + func (c *Connector) GetProfileAllowList() []string { if c == nil { return nil @@ -243,6 +278,8 @@ func (c *Connector) GetUserIds() []string { type ConnectorInput struct { // The status field on the connector is used to track the status of the connectors sync, and when syncing last started, completed, or caused the connector to update. ConnectorStatus *ConnectorStatus `json:"status,omitempty"` + // The ConnectorSyncCronSchedule message. + ConnectorSyncCronSchedule *ConnectorSyncCronSchedule `json:"connectorSyncCronSchedule,omitempty"` // OAuth2AuthorizedAs tracks the user that OAuthed with the connector. OAuth2AuthorizedAs *OAuth2AuthorizedAsInput `json:"oauthAuthorizedAs,omitempty"` // The SyncConfig message. @@ -263,6 +300,8 @@ type ConnectorInput struct { DisplayName *string `json:"displayName,omitempty"` // The id of the connector. ID *string `json:"id,omitempty"` + // Number of sync workers to use for parallel sync, when the PARALLEL_SYNC feature is enabled. Zero disables parallel sync. Optional on write: omit the field in UpdateAdvancedConfig to leave the stored value unchanged. The public API allows setting up to 4. + ParallelSyncWorkerCount *int `json:"parallelSyncWorkerCount,omitempty"` // List of profile attributes to sync, when set only these attributes will be synced ProfileAllowList []string `json:"profileAllowList,omitempty"` // List of profile attributes to ignore (not sync), when set other attributes will be synced, but these will not. @@ -282,6 +321,13 @@ func (c *ConnectorInput) GetConnectorStatus() *ConnectorStatus { return c.ConnectorStatus } +func (c *ConnectorInput) GetConnectorSyncCronSchedule() *ConnectorSyncCronSchedule { + if c == nil { + return nil + } + return c.ConnectorSyncCronSchedule +} + func (c *ConnectorInput) GetOAuth2AuthorizedAs() *OAuth2AuthorizedAsInput { if c == nil { return nil @@ -352,6 +398,13 @@ func (c *ConnectorInput) GetID() *string { return c.ID } +func (c *ConnectorInput) GetParallelSyncWorkerCount() *int { + if c == nil { + return nil + } + return c.ParallelSyncWorkerCount +} + func (c *ConnectorInput) GetProfileAllowList() []string { if c == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectoractionref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectoractionref.go new file mode 100644 index 00000000..a514e301 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectoractionref.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// Operation - Which connector RPC this dispatches to. +type Operation string + +const ( + OperationOperationUnspecified Operation = "OPERATION_UNSPECIFIED" + OperationOperationGrant Operation = "OPERATION_GRANT" +) + +func (e Operation) ToPointer() *Operation { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Operation) IsExact() bool { + if e != nil { + switch *e { + case "OPERATION_UNSPECIFIED", "OPERATION_GRANT": + return true + } + } + return false +} + +// ConnectorActionRef describes dispatch through a connector's built-in +// +// GrantManagerService Grant / Revoke RPC — i.e. the default connector +// operation, used for synthesized tickets like scope-role requests. +type ConnectorActionRef struct { + // The app whose connector handles the operation. + AppID *string `json:"appId,omitempty"` + // The connector that will execute the Grant / Revoke. + ConnectorID *string `json:"connectorId,omitempty"` + // Which connector RPC this dispatches to. + Operation *Operation `json:"operation,omitempty"` +} + +func (c *ConnectorActionRef) GetAppID() *string { + if c == nil { + return nil + } + return c.AppID +} + +func (c *ConnectorActionRef) GetConnectorID() *string { + if c == nil { + return nil + } + return c.ConnectorID +} + +func (c *ConnectorActionRef) GetOperation() *Operation { + if c == nil { + return nil + } + return c.Operation +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectoractionrefinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectoractionrefinput.go new file mode 100644 index 00000000..cc8f04ce --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectoractionrefinput.go @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ConnectorActionRefInput - ConnectorActionRef describes dispatch through a connector's built-in +// +// GrantManagerService Grant / Revoke RPC — i.e. the default connector +// operation, used for synthesized tickets like scope-role requests. +type ConnectorActionRefInput struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcatalogserviceconfigurationschemarequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcatalogserviceconfigurationschemarequest.go index 7afd1760..2e9e942d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcatalogserviceconfigurationschemarequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcatalogserviceconfigurationschemarequest.go @@ -2,13 +2,13 @@ package shared -// The ConnectorCatalogServiceConfigurationSchemaRequest message. +// ConnectorCatalogServiceConfigurationSchemaRequest is the request for retrieving a connector's configuration schema. type ConnectorCatalogServiceConfigurationSchemaRequest struct { - // The appId field. + // The ID of the app associated with the connector. Optional. AppID *string `json:"appId,omitempty"` - // The catalogId field. + // The catalog entry ID identifying the connector type. CatalogID *string `json:"catalogId,omitempty"` - // The connectorId field. + // The ID of an existing connector to retrieve its current configuration schema. Optional. ConnectorID *string `json:"connectorId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcatalogserviceconfigurationschemaresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcatalogserviceconfigurationschemaresponse.go index 69e8fce3..8e86a51c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcatalogserviceconfigurationschemaresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcatalogserviceconfigurationschemaresponse.go @@ -2,12 +2,12 @@ package shared -// The ConnectorCatalogServiceConfigurationSchemaResponse message. +// ConnectorCatalogServiceConfigurationSchemaResponse is the response containing the connector's configuration schema. type ConnectorCatalogServiceConfigurationSchemaResponse struct { // The ConfigSchema message. ConfigSchema *ConfigSchema `json:"schema,omitempty"` // A form is a collection of fields to be filled out by a user - Form *FormInput `json:"formSchema,omitempty"` + RequestSchemaForm *RequestSchemaForm `json:"formSchema,omitempty"` } func (c *ConnectorCatalogServiceConfigurationSchemaResponse) GetConfigSchema() *ConfigSchema { @@ -17,9 +17,9 @@ func (c *ConnectorCatalogServiceConfigurationSchemaResponse) GetConfigSchema() * return c.ConfigSchema } -func (c *ConnectorCatalogServiceConfigurationSchemaResponse) GetForm() *FormInput { +func (c *ConnectorCatalogServiceConfigurationSchemaResponse) GetRequestSchemaForm() *RequestSchemaForm { if c == nil { return nil } - return c.Form + return c.RequestSchemaForm } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/checkboxfield1.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcheckboxfield.go similarity index 58% rename from vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/checkboxfield1.go rename to vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcheckboxfield.go index cab9c9f1..4ef9484e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/checkboxfield1.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcheckboxfield.go @@ -2,13 +2,13 @@ package shared -// CheckboxField1 - The CheckboxField message. -type CheckboxField1 struct { +// ConnectorCheckboxField - The CheckboxField message. +type ConnectorCheckboxField struct { // The checked field. Checked *bool `json:"checked,omitempty"` } -func (c *CheckboxField1) GetChecked() *bool { +func (c *ConnectorCheckboxField) GetChecked() *bool { if c == nil { return nil } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcreateaccount.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcreateaccount.go index cc11b1db..286dca82 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcreateaccount.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorcreateaccount.go @@ -12,6 +12,9 @@ type ConnectorCreateAccount struct { ConnectorRef *ConnectorRef `json:"connectorRef,omitempty"` // The UserProperties message. UserProperties *UserProperties `json:"userProperties,omitempty"` + // CEL expression referencing a GeneratePassword step output (e.g. "genStep.password"). + // When set, the resolved password is encrypted for the connector and sent as CredentialOptions.EncryptedPassword. + PasswordCel *string `json:"passwordCel,omitempty"` // The userIdCel field. // This field is part of the `create_account_arguments` oneof. // See the documentation for `c1.api.automations.v1.ConnectorCreateAccount` for more details. @@ -32,6 +35,13 @@ func (c *ConnectorCreateAccount) GetUserProperties() *UserProperties { return c.UserProperties } +func (c *ConnectorCreateAccount) GetPasswordCel() *string { + if c == nil { + return nil + } + return c.PasswordCel +} + func (c *ConnectorCreateAccount) GetUserIDCel() *string { if c == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorissuespreference.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorissuespreference.go new file mode 100644 index 00000000..754a24e5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorissuespreference.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ConnectorIssuesPreference message. +type ConnectorIssuesPreference struct { + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The locked field. + Locked *bool `json:"locked,omitempty"` +} + +func (c *ConnectorIssuesPreference) GetEnabled() *bool { + if c == nil { + return nil + } + return c.Enabled +} + +func (c *ConnectorIssuesPreference) GetLocked() *bool { + if c == nil { + return nil + } + return c.Locked +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorownerentitlement.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorownerentitlement.go new file mode 100644 index 00000000..6eb26ca5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorownerentitlement.go @@ -0,0 +1,54 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// ConnectorOwnerEntitlement represents an entitlement ownership source for a connector. +type ConnectorOwnerEntitlement struct { + // The app entitlement represents one permission in a downstream App (SAAS) that can be granted. For example, GitHub Read vs GitHub Write. + // + // This message contains a oneof named max_grant_duration. Only a single field of the following list may be set at a time: + // - durationUnset + // - durationGrant + // + AppEntitlement *AppEntitlement `json:"appEntitlement,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The roleSlug field. + RoleSlug *string `json:"roleSlug,omitempty"` +} + +func (c ConnectorOwnerEntitlement) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *ConnectorOwnerEntitlement) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { + return err + } + return nil +} + +func (c *ConnectorOwnerEntitlement) GetAppEntitlement() *AppEntitlement { + if c == nil { + return nil + } + return c.AppEntitlement +} + +func (c *ConnectorOwnerEntitlement) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt +} + +func (c *ConnectorOwnerEntitlement) GetRoleSlug() *string { + if c == nil { + return nil + } + return c.RoleSlug +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorowneruser.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorowneruser.go new file mode 100644 index 00000000..bde527cf --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorowneruser.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// ConnectorOwnerUser represents a user ownership source for a connector. +type ConnectorOwnerUser struct { + // The User object provides all of the details for an user, as well as some configuration. + User *User `json:"user,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The roleSlug field. + RoleSlug *string `json:"roleSlug,omitempty"` +} + +func (c ConnectorOwnerUser) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *ConnectorOwnerUser) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { + return err + } + return nil +} + +func (c *ConnectorOwnerUser) GetUser() *User { + if c == nil { + return nil + } + return c.User +} + +func (c *ConnectorOwnerUser) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt +} + +func (c *ConnectorOwnerUser) GetRoleSlug() *string { + if c == nil { + return nil + } + return c.RoleSlug +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorschedulecron.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorschedulecron.go index c1011141..7349e459 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorschedulecron.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorschedulecron.go @@ -2,11 +2,11 @@ package shared -// The ConnectorScheduleCron message. +// ConnectorScheduleCron - A cron-based schedule definition for connector syncs. type ConnectorScheduleCron struct { - // The cronSpec field. + // The cron expression defining the sync schedule. CronSpec *string `json:"cronSpec,omitempty"` - // The timezone field. + // The IANA timezone name for the cron schedule (e.g., "America/Los_Angeles"). Timezone *string `json:"timezone,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorselectfield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorselectfield.go new file mode 100644 index 00000000..783c42b7 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorselectfield.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ConnectorSelectField - The SelectField message. +type ConnectorSelectField struct { + // list of items that are selected from + Items []Item `json:"items,omitempty"` +} + +func (c *ConnectorSelectField) GetItems() []Item { + if c == nil { + return nil + } + return c.Items +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorservicecreatedelegatedrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorservicecreatedelegatedrequest.go index f65f3922..de8e9b4d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorservicecreatedelegatedrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorservicecreatedelegatedrequest.go @@ -8,6 +8,8 @@ type ConnectorServiceCreateDelegatedRequest struct { AppManagedStateBindingRef *AppManagedStateBindingRef `json:"appManagedStateBindingRef,omitempty"` // The ConnectorExpandMask is used to expand related objects on a connector. ConnectorExpandMask *ConnectorExpandMask `json:"expandMask,omitempty"` + // Sets entitlement owners on the app. + AppEntitlementOwnerRefs []AppEntitlementRef `json:"appEntitlementOwnerRefs,omitempty"` // The catalogId describes which catalog entry this connector is an instance of. For example, every Okta connector will have the same catalogId indicating it is an Okta connector. CatalogID *string `json:"catalogId,omitempty"` // The description of the connector. @@ -32,6 +34,13 @@ func (c *ConnectorServiceCreateDelegatedRequest) GetConnectorExpandMask() *Conne return c.ConnectorExpandMask } +func (c *ConnectorServiceCreateDelegatedRequest) GetAppEntitlementOwnerRefs() []AppEntitlementRef { + if c == nil { + return nil + } + return c.AppEntitlementOwnerRefs +} + func (c *ConnectorServiceCreateDelegatedRequest) GetCatalogID() *string { if c == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorsynccronschedule.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorsynccronschedule.go new file mode 100644 index 00000000..051e3404 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectorsynccronschedule.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// The ConnectorSyncCronSchedule message. +type ConnectorSyncCronSchedule struct { + // The cronSpec field. + CronSpec *string `json:"cronSpec,omitempty"` + Start *time.Time `json:"start,omitempty"` + // The timezone field. + Timezone *string `json:"timezone,omitempty"` +} + +func (c ConnectorSyncCronSchedule) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *ConnectorSyncCronSchedule) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { + return err + } + return nil +} + +func (c *ConnectorSyncCronSchedule) GetCronSpec() *string { + if c == nil { + return nil + } + return c.CronSpec +} + +func (c *ConnectorSyncCronSchedule) GetStart() *time.Time { + if c == nil { + return nil + } + return c.Start +} + +func (c *ConnectorSyncCronSchedule) GetTimezone() *string { + if c == nil { + return nil + } + return c.Timezone +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectortextfield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectortextfield.go new file mode 100644 index 00000000..cab4b706 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/connectortextfield.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ConnectorTextField - The TextField message. +type ConnectorTextField struct { + // StringRules describe the constraints applied to `string` values + // + // This message contains a oneof named well_known. Only a single field of the following list may be set at a time: + // - email + // - hostname + // - ip + // - ipv4 + // - ipv6 + // - uri + // - uriRef + // - address + // - uuid + // - wellKnownRegex + // + StringRules *StringRules `json:"valueValidator,omitempty"` + // The secret field. + Secret *bool `json:"secret,omitempty"` +} + +func (c *ConnectorTextField) GetStringRules() *StringRules { + if c == nil { + return nil + } + return c.StringRules +} + +func (c *ConnectorTextField) GetSecret() *bool { + if c == nil { + return nil + } + return c.Secret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/contacts.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/contacts.go new file mode 100644 index 00000000..b3cea21a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/contacts.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// Contacts represents the contact configuration for an organization. +type Contacts struct { + // Email addresses of billing contacts for this organization. + BillingEmails []string `json:"billingEmails,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Email addresses of operations contacts for this organization. + OperationsEmails []string `json:"operationsEmails,omitempty"` + // Email addresses of security contacts for this organization. + SecurityEmails []string `json:"securityEmails,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (c Contacts) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *Contacts) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { + return err + } + return nil +} + +func (c *Contacts) GetBillingEmails() []string { + if c == nil { + return nil + } + return c.BillingEmails +} + +func (c *Contacts) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt +} + +func (c *Contacts) GetOperationsEmails() []string { + if c == nil { + return nil + } + return c.OperationsEmails +} + +func (c *Contacts) GetSecurityEmails() []string { + if c == nil { + return nil + } + return c.SecurityEmails +} + +func (c *Contacts) GetUpdatedAt() *time.Time { + if c == nil { + return nil + } + return c.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/contactsinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/contactsinput.go new file mode 100644 index 00000000..a7c0a974 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/contactsinput.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ContactsInput - Contacts represents the contact configuration for an organization. +type ContactsInput struct { + // Email addresses of billing contacts for this organization. + BillingEmails []string `json:"billingEmails,omitempty"` + // Email addresses of operations contacts for this organization. + OperationsEmails []string `json:"operationsEmails,omitempty"` + // Email addresses of security contacts for this organization. + SecurityEmails []string `json:"securityEmails,omitempty"` +} + +func (c *ContactsInput) GetBillingEmails() []string { + if c == nil { + return nil + } + return c.BillingEmails +} + +func (c *ContactsInput) GetOperationsEmails() []string { + if c == nil { + return nil + } + return c.OperationsEmails +} + +func (c *ContactsInput) GetSecurityEmails() []string { + if c == nil { + return nil + } + return c.SecurityEmails +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createaccessprofilefromcohortrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createaccessprofilefromcohortrequest.go new file mode 100644 index 00000000..18a82f59 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createaccessprofilefromcohortrequest.go @@ -0,0 +1,71 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CreateAccessProfileFromCohortRequest message. +type CreateAccessProfileFromCohortRequest struct { + // If true, the automation will create JIT tasks for access changes. + // If false, users are synced to membership without creating tasks. + CreateTasks *bool `json:"createTasks,omitempty"` + // Description for the access profile. + Description *string `json:"description,omitempty"` + // Display name for the access profile. + DisplayName *string `json:"displayName,omitempty"` + // If true, enable the dynamic membership automation immediately. + EnableAutomation *bool `json:"enableAutomation,omitempty"` + // Entitlements to add to the access profile. + Entitlements []CohortEntitlement `json:"entitlements,omitempty"` + // Profile filters defining the cohort for dynamic membership. + ProfileFilters []ProfileFilter `json:"profileFilters,omitempty"` + // Optional suggestion ID to mark as accepted after creating the profile. + SuggestionID *string `json:"suggestionId,omitempty"` +} + +func (c *CreateAccessProfileFromCohortRequest) GetCreateTasks() *bool { + if c == nil { + return nil + } + return c.CreateTasks +} + +func (c *CreateAccessProfileFromCohortRequest) GetDescription() *string { + if c == nil { + return nil + } + return c.Description +} + +func (c *CreateAccessProfileFromCohortRequest) GetDisplayName() *string { + if c == nil { + return nil + } + return c.DisplayName +} + +func (c *CreateAccessProfileFromCohortRequest) GetEnableAutomation() *bool { + if c == nil { + return nil + } + return c.EnableAutomation +} + +func (c *CreateAccessProfileFromCohortRequest) GetEntitlements() []CohortEntitlement { + if c == nil { + return nil + } + return c.Entitlements +} + +func (c *CreateAccessProfileFromCohortRequest) GetProfileFilters() []ProfileFilter { + if c == nil { + return nil + } + return c.ProfileFilters +} + +func (c *CreateAccessProfileFromCohortRequest) GetSuggestionID() *string { + if c == nil { + return nil + } + return c.SuggestionID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createaccessprofilefromcohortresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createaccessprofilefromcohortresponse.go new file mode 100644 index 00000000..2633aa85 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createaccessprofilefromcohortresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CreateAccessProfileFromCohortResponse message. +type CreateAccessProfileFromCohortResponse struct { + // The ID of the created access profile. + AccessProfileID *string `json:"accessProfileId,omitempty"` + // The CEL expression generated for dynamic membership. + CelExpression *string `json:"celExpression,omitempty"` +} + +func (c *CreateAccessProfileFromCohortResponse) GetAccessProfileID() *string { + if c == nil { + return nil + } + return c.AccessProfileID +} + +func (c *CreateAccessProfileFromCohortResponse) GetCelExpression() *string { + if c == nil { + return nil + } + return c.CelExpression +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementmonitorbindingrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementmonitorbindingrequest.go index e60f629f..bef61b90 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementmonitorbindingrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementmonitorbindingrequest.go @@ -2,7 +2,7 @@ package shared -// CreateAppEntitlementMonitorBindingRequestEntitlementGroup - The entitlementGroup field. +// CreateAppEntitlementMonitorBindingRequestEntitlementGroup - Which side of the conflict monitor (A or B) to place this entitlement in. type CreateAppEntitlementMonitorBindingRequestEntitlementGroup string const ( @@ -26,15 +26,15 @@ func (e *CreateAppEntitlementMonitorBindingRequestEntitlementGroup) IsExact() bo return false } -// The CreateAppEntitlementMonitorBindingRequest message. +// CreateAppEntitlementMonitorBindingRequest - The request message for creating a new app entitlement monitor binding. type CreateAppEntitlementMonitorBindingRequest struct { - // The appEntitlementId field. + // The unique identifier of the app entitlement to bind. AppEntitlementID *string `json:"appEntitlementId,omitempty"` - // The appId field. + // The unique identifier of the application containing the entitlement. AppID *string `json:"appId,omitempty"` - // The entitlementGroup field. + // Which side of the conflict monitor (A or B) to place this entitlement in. EntitlementGroup *CreateAppEntitlementMonitorBindingRequestEntitlementGroup `json:"entitlementGroup,omitempty"` - // The monitorId field. + // The unique identifier of the conflict monitor to bind the entitlement to. MonitorID *string `json:"monitorId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementproxyrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementproxyrequest.go index 3b345245..189bf5fb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementproxyrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementproxyrequest.go @@ -2,7 +2,7 @@ package shared -// The CreateAppEntitlementProxyRequest message. +// CreateAppEntitlementProxyRequest - The request message for creating an entitlement proxy binding. type CreateAppEntitlementProxyRequest struct { // The AppEntitlementProxyExpandMask message. AppEntitlementProxyExpandMask *AppEntitlementProxyExpandMask `json:"expandMask,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementproxyresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementproxyresponse.go index 041f7802..d581c72d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementproxyresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementproxyresponse.go @@ -38,11 +38,11 @@ func (c *CreateAppEntitlementProxyResponseExpanded) GetAdditionalProperties() ma return c.AdditionalProperties } -// The CreateAppEntitlementProxyResponse message. +// CreateAppEntitlementProxyResponse - The response message for creating an entitlement proxy binding. type CreateAppEntitlementProxyResponse struct { // The AppEntitlementProxyView message. AppEntitlementProxyView *AppEntitlementProxyView `json:"appProxyEntitlementView,omitempty"` - // The expanded field. + // List of serialized related objects. Expanded []CreateAppEntitlementProxyResponseExpanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementrequest.go index 7937b85e..1beca3c8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createappentitlementrequest.go @@ -5,13 +5,14 @@ package shared type CreateAppEntitlementRequestDurationUnset struct { } -// CreateAppEntitlementRequestPurpose - The purpose field. +// CreateAppEntitlementRequestPurpose - The purpose of the entitlement (e.g., assignment, permission, ownership). type CreateAppEntitlementRequestPurpose string const ( CreateAppEntitlementRequestPurposeAppEntitlementPurposeValueUnspecified CreateAppEntitlementRequestPurpose = "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED" CreateAppEntitlementRequestPurposeAppEntitlementPurposeValueAssignment CreateAppEntitlementRequestPurpose = "APP_ENTITLEMENT_PURPOSE_VALUE_ASSIGNMENT" CreateAppEntitlementRequestPurposeAppEntitlementPurposeValuePermission CreateAppEntitlementRequestPurpose = "APP_ENTITLEMENT_PURPOSE_VALUE_PERMISSION" + CreateAppEntitlementRequestPurposeAppEntitlementPurposeValueOwnership CreateAppEntitlementRequestPurpose = "APP_ENTITLEMENT_PURPOSE_VALUE_OWNERSHIP" ) func (e CreateAppEntitlementRequestPurpose) ToPointer() *CreateAppEntitlementRequestPurpose { @@ -22,7 +23,7 @@ func (e CreateAppEntitlementRequestPurpose) ToPointer() *CreateAppEntitlementReq func (e *CreateAppEntitlementRequestPurpose) IsExact() bool { if e != nil { switch *e { - case "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED", "APP_ENTITLEMENT_PURPOSE_VALUE_ASSIGNMENT", "APP_ENTITLEMENT_PURPOSE_VALUE_PERMISSION": + case "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED", "APP_ENTITLEMENT_PURPOSE_VALUE_ASSIGNMENT", "APP_ENTITLEMENT_PURPOSE_VALUE_PERMISSION", "APP_ENTITLEMENT_PURPOSE_VALUE_OWNERSHIP": return true } } @@ -50,41 +51,41 @@ type CreateAppEntitlementRequest struct { // - action // ProvisionPolicy *ProvisionPolicyInput `json:"provisionPolicy,omitempty"` - // The alias field. + // A unique alias for the entitlement, used for programmatic lookups and Cone. Alias *string `json:"alias,omitempty"` - // The appEntitlementOwnerIds field. + // The IDs of users to set as owners of this entitlement. AppEntitlementOwnerIds []string `json:"appEntitlementOwnerIds,omitempty"` - // The appResourceId field. + // The ID of the resource that this entitlement belongs to. AppResourceID *string `json:"appResourceId,omitempty"` - // The appResourceTypeId field. + // The ID of the resource type that this entitlement belongs to. AppResourceTypeID *string `json:"appResourceTypeId,omitempty"` - // The certifyPolicyId field. + // The ID of the policy to use for certification tasks. CertifyPolicyID *string `json:"certifyPolicyId,omitempty"` - // The complianceFrameworkValueIds field. + // The IDs of compliance frameworks to associate with this entitlement (e.g., SOX, HIPAA). ComplianceFrameworkValueIds []string `json:"complianceFrameworkValueIds,omitempty"` - // The description field. + // The description of the new entitlement. Description *string `json:"description,omitempty"` - // The displayName field. + // The display name of the new entitlement. DisplayName string `json:"displayName"` DurationGrant *string `json:"durationGrant,omitempty"` DurationUnset *CreateAppEntitlementRequestDurationUnset `json:"durationUnset,omitempty"` - // The emergencyGrantEnabled field. + // Whether emergency grant requests are enabled for this entitlement. EmergencyGrantEnabled *bool `json:"emergencyGrantEnabled,omitempty"` - // The emergencyGrantPolicyId field. + // The ID of the policy to use for emergency grant tasks. Required if emergency_grant_enabled is true. EmergencyGrantPolicyID *string `json:"emergencyGrantPolicyId,omitempty"` - // The grantPolicyId field. + // The ID of the policy to use for grant request tasks. GrantPolicyID *string `json:"grantPolicyId,omitempty"` // If supplied, it's implied that the entitlement is created before sync and needs to be merged with connector entitlement. MatchBatonID *string `json:"matchBatonId,omitempty"` - // The overrideAccessRequestsDefaults field. + // Whether to override the app-level access request defaults for this entitlement. OverrideAccessRequestsDefaults *bool `json:"overrideAccessRequestsDefaults,omitempty"` - // The purpose field. + // The purpose of the entitlement (e.g., assignment, permission, ownership). Purpose *CreateAppEntitlementRequestPurpose `json:"purpose,omitempty"` - // The revokePolicyId field. + // The ID of the policy to use for revoke request tasks. RevokePolicyID *string `json:"revokePolicyId,omitempty"` - // The riskLevelValueId field. + // The ID of the risk level to assign to this entitlement. RiskLevelValueID *string `json:"riskLevelValueId,omitempty"` - // The slug field. + // A short label describing the permission the entitlement grants (e.g., "Admin", "Read"). Slug *string `json:"slug,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createapprequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createapprequest.go index 747dcfd8..384e58cc 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createapprequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createapprequest.go @@ -9,6 +9,7 @@ const ( CreateAppRequestIdentityMatchingAppUserIdentityMatchingUnspecified CreateAppRequestIdentityMatching = "APP_USER_IDENTITY_MATCHING_UNSPECIFIED" CreateAppRequestIdentityMatchingAppUserIdentityMatchingStrict CreateAppRequestIdentityMatching = "APP_USER_IDENTITY_MATCHING_STRICT" CreateAppRequestIdentityMatchingAppUserIdentityMatchingDisplayName CreateAppRequestIdentityMatching = "APP_USER_IDENTITY_MATCHING_DISPLAY_NAME" + CreateAppRequestIdentityMatchingAppUserIdentityMatchingCustom CreateAppRequestIdentityMatching = "APP_USER_IDENTITY_MATCHING_CUSTOM" ) func (e CreateAppRequestIdentityMatching) ToPointer() *CreateAppRequestIdentityMatching { @@ -19,7 +20,7 @@ func (e CreateAppRequestIdentityMatching) ToPointer() *CreateAppRequestIdentityM func (e *CreateAppRequestIdentityMatching) IsExact() bool { if e != nil { switch *e { - case "APP_USER_IDENTITY_MATCHING_UNSPECIFIED", "APP_USER_IDENTITY_MATCHING_STRICT", "APP_USER_IDENTITY_MATCHING_DISPLAY_NAME": + case "APP_USER_IDENTITY_MATCHING_UNSPECIFIED", "APP_USER_IDENTITY_MATCHING_STRICT", "APP_USER_IDENTITY_MATCHING_DISPLAY_NAME", "APP_USER_IDENTITY_MATCHING_CUSTOM": return true } } @@ -28,6 +29,8 @@ func (e *CreateAppRequestIdentityMatching) IsExact() bool { // The CreateAppRequest message is used to create a new app. type CreateAppRequest struct { + // Sets entitlement owners on the app. + AppEntitlementOwnerRefs []AppEntitlementRef `json:"appEntitlementOwnerRefs,omitempty"` // Creates the app with this certify policy. CertifyPolicyID *string `json:"certifyPolicyId,omitempty"` // Creates the app with this description. @@ -42,7 +45,7 @@ type CreateAppRequest struct { Instructions *string `json:"instructions,omitempty"` // Creates the app with this monthly cost per seat. MonthlyCostUsd *int `json:"monthlyCostUsd,omitempty"` - // Creates the app with this array of owners. + // Creates the app with this array of user owners. Owners []string `json:"owners,omitempty"` // Creates the app with this revoke policy. RevokePolicyID *string `json:"revokePolicyId,omitempty"` @@ -50,6 +53,13 @@ type CreateAppRequest struct { StrictAccessEntitlementProvisioning *bool `json:"strictAccessEntitlementProvisioning,omitempty"` } +func (c *CreateAppRequest) GetAppEntitlementOwnerRefs() []AppEntitlementRef { + if c == nil { + return nil + } + return c.AppEntitlementOwnerRefs +} + func (c *CreateAppRequest) GetCertifyPolicyID() *string { if c == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createautomationrequestinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createautomationrequestinput.go deleted file mode 100644 index 41b73cf7..00000000 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createautomationrequestinput.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -// CreateAutomationRequestInput - The CreateAutomationRequest message. -type CreateAutomationRequestInput struct { - // The AutomationContext message. - AutomationContext *AutomationContext `json:"context,omitempty"` - // the app id this workflow_template belongs to - AppID *string `json:"appId,omitempty"` - // The automationSteps field. - AutomationSteps []AutomationStep `json:"automationSteps,omitempty"` - // The description field. - Description *string `json:"description,omitempty"` - // The displayName field. - DisplayName *string `json:"displayName,omitempty"` - // The draftAutomationSteps field. - DraftAutomationSteps []AutomationStep `json:"draftAutomationSteps,omitempty"` - // The draftTriggers field. - DraftTriggers []AutomationTrigger `json:"draftTriggers,omitempty"` - // The enabled field. - Enabled *bool `json:"enabled,omitempty"` - // The isDraft field. - IsDraft *bool `json:"isDraft,omitempty"` - // The triggers field. - Triggers []AutomationTrigger `json:"triggers,omitempty"` -} - -func (c *CreateAutomationRequestInput) GetAutomationContext() *AutomationContext { - if c == nil { - return nil - } - return c.AutomationContext -} - -func (c *CreateAutomationRequestInput) GetAppID() *string { - if c == nil { - return nil - } - return c.AppID -} - -func (c *CreateAutomationRequestInput) GetAutomationSteps() []AutomationStep { - if c == nil { - return nil - } - return c.AutomationSteps -} - -func (c *CreateAutomationRequestInput) GetDescription() *string { - if c == nil { - return nil - } - return c.Description -} - -func (c *CreateAutomationRequestInput) GetDisplayName() *string { - if c == nil { - return nil - } - return c.DisplayName -} - -func (c *CreateAutomationRequestInput) GetDraftAutomationSteps() []AutomationStep { - if c == nil { - return nil - } - return c.DraftAutomationSteps -} - -func (c *CreateAutomationRequestInput) GetDraftTriggers() []AutomationTrigger { - if c == nil { - return nil - } - return c.DraftTriggers -} - -func (c *CreateAutomationRequestInput) GetEnabled() *bool { - if c == nil { - return nil - } - return c.Enabled -} - -func (c *CreateAutomationRequestInput) GetIsDraft() *bool { - if c == nil { - return nil - } - return c.IsDraft -} - -func (c *CreateAutomationRequestInput) GetTriggers() []AutomationTrigger { - if c == nil { - return nil - } - return c.Triggers -} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createautomationresponseinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createautomationresponseinput.go deleted file mode 100644 index 4e424518..00000000 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createautomationresponseinput.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -// CreateAutomationResponseInput - The CreateAutomationResponse message. -type CreateAutomationResponseInput struct { - // The Automation message. - // - // This message contains a oneof named disabled_reason. Only a single field of the following list may be set at a time: - // - circuitBreaker - // - Automation *Automation `json:"automation,omitempty"` - // If we create a new trigger with an HMAC secret we return the HMAC on this field - WebhookHmacSecret *string `json:"webhookHmacSecret,omitempty"` -} - -func (c *CreateAutomationResponseInput) GetAutomation() *Automation { - if c == nil { - return nil - } - return c.Automation -} - -func (c *CreateAutomationResponseInput) GetWebhookHmacSecret() *string { - if c == nil { - return nil - } - return c.WebhookHmacSecret -} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createbundleautomationrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createbundleautomationrequest.go index c311ba1b..eed31edc 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createbundleautomationrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createbundleautomationrequest.go @@ -2,21 +2,31 @@ package shared -// The CreateBundleAutomationRequest message. +// CreateBundleAutomationRequest - The request message for creating a new bundle automation rule on a catalog. // // This message contains a oneof named conditions. Only a single field of the following list may be set at a time: // - entitlements +// - cel type CreateBundleAutomationRequest struct { + // The BundleAutomationRuleCEL message. + BundleAutomationRuleCEL *BundleAutomationRuleCEL `json:"cel,omitempty"` // The BundleAutomationRuleEntitlement message. BundleAutomationRuleEntitlement *BundleAutomationRuleEntitlement `json:"entitlements,omitempty"` - // The createTasks field. + // Whether to create access request tasks for matched users instead of granting directly. CreateTasks *bool `json:"createTasks,omitempty"` - // The disableCircuitBreaker field. + // Whether to disable the circuit breaker that pauses the automation when excessive membership changes are detected. DisableCircuitBreaker *bool `json:"disableCircuitBreaker,omitempty"` - // The enabled field. + // Whether the automation should actively run on its schedule. Enabled *bool `json:"enabled,omitempty"` } +func (c *CreateBundleAutomationRequest) GetBundleAutomationRuleCEL() *BundleAutomationRuleCEL { + if c == nil { + return nil + } + return c.BundleAutomationRuleCEL +} + func (c *CreateBundleAutomationRequest) GetBundleAutomationRuleEntitlement() *BundleAutomationRuleEntitlement { if c == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createentitlementownerrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createentitlementownerrequest.go new file mode 100644 index 00000000..d7d9452b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createentitlementownerrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// CreateEntitlementOwnerRequest is the request for creating an entitlement ownership source. +type CreateEntitlementOwnerRequest struct { + // The AppEntitlementRef message. + AppEntitlementRef *AppEntitlementRef `json:"appEntitlementRef,omitempty"` +} + +func (c *CreateEntitlementOwnerRequest) GetAppEntitlementRef() *AppEntitlementRef { + if c == nil { + return nil + } + return c.AppEntitlementRef +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createentitlementownerresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createentitlementownerresponse.go new file mode 100644 index 00000000..12c71532 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createentitlementownerresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// CreateEntitlementOwnerResponse is the response for creating an entitlement ownership source. +type CreateEntitlementOwnerResponse struct { + // AppOwnerEntitlement represents an entitlement ownership source for an app. + AppOwnerEntitlement *AppOwnerEntitlement `json:"appOwnerEntitlement,omitempty"` +} + +func (c *CreateEntitlementOwnerResponse) GetAppOwnerEntitlement() *AppOwnerEntitlement { + if c == nil { + return nil + } + return c.AppOwnerEntitlement +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingroutingrulerequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingroutingrulerequest.go new file mode 100644 index 00000000..1f89d54a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingroutingrulerequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CreateFindingRoutingRuleRequest message. +type CreateFindingRoutingRuleRequest struct { + // The FindingRoutingRule message. + FindingRoutingRule *FindingRoutingRule `json:"routingRule,omitempty"` +} + +func (c *CreateFindingRoutingRuleRequest) GetFindingRoutingRule() *FindingRoutingRule { + if c == nil { + return nil + } + return c.FindingRoutingRule +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingroutingruleresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingroutingruleresponse.go new file mode 100644 index 00000000..c347763e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingroutingruleresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CreateFindingRoutingRuleResponse message. +type CreateFindingRoutingRuleResponse struct { + // The FindingRoutingRule message. + FindingRoutingRule *FindingRoutingRule `json:"routingRule,omitempty"` +} + +func (c *CreateFindingRoutingRuleResponse) GetFindingRoutingRule() *FindingRoutingRule { + if c == nil { + return nil + } + return c.FindingRoutingRule +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingtaskrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingtaskrequest.go new file mode 100644 index 00000000..5dcb6b98 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingtaskrequest.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CreateFindingTaskRequest message. +type CreateFindingTaskRequest struct { + // Optional policy ID. Defaults to the app's grant policy or the built-in + // "Finding Review" policy. + PolicyID *string `json:"policyId,omitempty"` +} + +func (c *CreateFindingTaskRequest) GetPolicyID() *string { + if c == nil { + return nil + } + return c.PolicyID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingtaskresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingtaskresponse.go new file mode 100644 index 00000000..e5ee6bf4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createfindingtaskresponse.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CreateFindingTaskResponse message. +type CreateFindingTaskResponse struct { + // The Finding message. + // + // This message contains a oneof named finding_type. Only a single field of the following list may be set at a time: + // - similarUsernameMatch + // - serviceAccountMisclassification + // + // + // This message contains a oneof named target. Only a single field of the following list may be set at a time: + // - identityUserTarget + // - appUserTarget + // + // + // This message contains a oneof named evidence. Only a single field of the following list may be set at a time: + // - similarUsernameMatchEvidence + // - serviceAccountMisclassificationEvidence + // + Finding *Finding `json:"finding,omitempty"` + // The ID of the created task. + TaskID *string `json:"taskId,omitempty"` +} + +func (c *CreateFindingTaskResponse) GetFinding() *Finding { + if c == nil { + return nil + } + return c.Finding +} + +func (c *CreateFindingTaskResponse) GetTaskID() *string { + if c == nil { + return nil + } + return c.TaskID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedappresourcerequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedappresourcerequest.go index f3beaa4d..96599bcb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedappresourcerequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedappresourcerequest.go @@ -2,15 +2,15 @@ package shared -// The CreateManuallyManagedAppResourceRequest message. +// CreateManuallyManagedAppResourceRequest - The request message for creating a manually managed app resource. type CreateManuallyManagedAppResourceRequest struct { - // The description field. + // An optional description for the new resource. Description *string `json:"description,omitempty"` - // The displayName field. + // The display name for the new resource. DisplayName string `json:"displayName"` // If supplied, it's implied that the resource is created before sync and needs to be merged with connector resource. MatchBatonID *string `json:"matchBatonId,omitempty"` - // The resourceOwnerUserIds field. + // C1 user IDs to assign as owners of this resource. ResourceOwnerUserIds []string `json:"resourceOwnerUserIds,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedappresourceresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedappresourceresponse.go index a1838fa2..fee8e979 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedappresourceresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedappresourceresponse.go @@ -2,7 +2,7 @@ package shared -// The CreateManuallyManagedAppResourceResponse message. +// CreateManuallyManagedAppResourceResponse - The response message for creating a manually managed app resource. type CreateManuallyManagedAppResourceResponse struct { // The app resource message is a single resource that can have entitlements. // diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedresourcetyperequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedresourcetyperequest.go index d3cd28f9..55c6edc3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedresourcetyperequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedresourcetyperequest.go @@ -2,7 +2,7 @@ package shared -// ResourceType - The resourceType field. +// ResourceType - The category of the resource type (e.g., ROLE, GROUP, LICENSE). type ResourceType string const ( @@ -31,11 +31,11 @@ func (e *ResourceType) IsExact() bool { return false } -// The CreateManuallyManagedResourceTypeRequest message. +// CreateManuallyManagedResourceTypeRequest - The request message for creating a manually managed resource type. type CreateManuallyManagedResourceTypeRequest struct { - // The displayName field. + // The display name for the new resource type. DisplayName string `json:"displayName"` - // The resourceType field. + // The category of the resource type (e.g., ROLE, GROUP, LICENSE). ResourceType ResourceType `json:"resourceType"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedresourcetyperesponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedresourcetyperesponse.go index b0db119d..4ed006bf 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedresourcetyperesponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createmanuallymanagedresourcetyperesponse.go @@ -38,11 +38,11 @@ func (c *CreateManuallyManagedResourceTypeResponseExpanded) GetAdditionalPropert return c.AdditionalProperties } -// The CreateManuallyManagedResourceTypeResponse message. +// CreateManuallyManagedResourceTypeResponse - The response message for creating a manually managed resource type. type CreateManuallyManagedResourceTypeResponse struct { // The AppResourceType is referenced by an app entitlement defining its resource types. Commonly things like Group or Role. AppResourceType *AppResourceType `json:"appResourceType,omitempty"` - // The expanded field. + // List of serialized related objects. Expanded []CreateManuallyManagedResourceTypeResponseExpanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createpolicyrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createpolicyrequest.go index 5fc73db3..cd385bcb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createpolicyrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createpolicyrequest.go @@ -2,7 +2,7 @@ package shared -// PolicyType - The enum of the policy type. +// PolicyType - The type of policy to create (grant, revoke, or certify). type PolicyType string const ( @@ -35,17 +35,19 @@ type CreatePolicyRequest struct { Description *string `json:"description,omitempty"` // The display name of the new policy. DisplayName string `json:"displayName"` - // The map of policy type to policy steps. The key is the stringified version of the enum. See other policies for examples. + // Step sequences for this policy. The map must include a baseline entry keyed + // by the lowercased policy type (e.g., "grant"). Additional entries with + // opaque keys can be added for conditional routing via the rules array. PolicySteps map[string]PolicyStepsInput `json:"policySteps,omitempty"` - // The enum of the policy type. + // The type of policy to create (grant, revoke, or certify). PolicyType *PolicyType `json:"policyType,omitempty"` - // Actions to occur after a policy finishes. As of now this is only valid on a certify policy to remediate a denied certification immediately. + // Ordered actions to execute after the policy completes processing. PostActions []PolicyPostActions `json:"postActions,omitempty"` - // Deprecated. Use setting in policy step instead + // This field is no longer used. Configure delegate reassignment in the policy step instead. // // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. ReassignTasksToDelegates *bool `json:"reassignTasksToDelegates,omitempty"` - // The rules field. + // Conditional routing rules. See the Policy message for details on evaluation order. Rules []Rule `json:"rules,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createpolicyresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createpolicyresponse.go index 7ce77eba..f6b4b078 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createpolicyresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createpolicyresponse.go @@ -4,7 +4,10 @@ package shared // The CreatePolicyResponse message contains the created policy object. type CreatePolicyResponse struct { - // A policy describes the behavior of the ConductorOne system when processing a task. You can describe the type, approvers, fallback behavior, and escalation processes. + // A policy defines a workflow (sequence of steps) that runs when processing + // access requests, reviews, or revocations. Policies support conditional + // routing: different conditions can trigger different step sequences, with a + // baseline fallback. Policy *Policy `json:"policy,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createrevoketasksv2.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createrevoketasksv2.go index a07b768c..38bc1d9c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createrevoketasksv2.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createrevoketasksv2.go @@ -125,3 +125,6 @@ func (c *CreateRevokeTasksV2) GetUserIDCel() *string { } return c.UserIDCel } + +// #region class-body-createrevoketasksv2 +// #endregion class-body-createrevoketasksv2 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createstepupproviderrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createstepupproviderrequest.go index fac91293..a1388f92 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createstepupproviderrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createstepupproviderrequest.go @@ -8,7 +8,7 @@ package shared // - oauth2 // - microsoft type CreateStepUpProviderRequest struct { - // StepUpMicrosoftSettings represents a Microsoft Entra Provider using Conditional Access Policies to enforce step-up authentication. + // StepUpMicrosoftSettings configures a Microsoft Entra step-up provider using Conditional Access. StepUpMicrosoftSettings *StepUpMicrosoftSettings `json:"microsoft,omitempty"` // StepUpOAuth2Settings repersents an OAuth2 provider that supports RFC 9470 // @@ -20,13 +20,13 @@ type CreateStepUpProviderRequest struct { // - "phr" (okta) // - "phrh" (okta) StepUpOAuth2Settings *StepUpOAuth2Settings `json:"oauth2,omitempty"` - // The clientId field. + // The OAuth2 client ID used to authenticate with the step-up provider. ClientID *string `json:"clientId,omitempty"` - // The clientSecret field. + // The OAuth2 client secret. Write-only; never returned in responses. ClientSecret *string `json:"clientSecret,omitempty"` - // The displayName field. + // The human-readable name for the new step-up provider. DisplayName *string `json:"displayName,omitempty"` - // The issuerUrl field. + // The OIDC issuer URL for the step-up provider. IssuerURL *string `json:"issuerUrl,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createstepupproviderresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createstepupproviderresponse.go index c7054bce..cd2f6391 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createstepupproviderresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createstepupproviderresponse.go @@ -4,7 +4,7 @@ package shared // The CreateStepUpProviderResponse message. type CreateStepUpProviderResponse struct { - // The StepUpProvider message. + // StepUpProvider represents a configured step-up authentication integration (e.g., Duo, custom OIDC). // // This message contains a oneof named settings. Only a single field of the following list may be set at a time: // - oauth2 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createtaskaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createtaskaction.go new file mode 100644 index 00000000..3c63d7cf --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createtaskaction.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The CreateTaskAction message. +type CreateTaskAction struct { + // The policyId field. + PolicyID *string `json:"policyId,omitempty"` +} + +func (c *CreateTaskAction) GetPolicyID() *string { + if c == nil { + return nil + } + return c.PolicyID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createuserownerrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createuserownerrequest.go new file mode 100644 index 00000000..446d0a9a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createuserownerrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// CreateUserOwnerRequest is the request for creating a user ownership source. +type CreateUserOwnerRequest struct { + // A reference to a user. + UserRef *UserRef `json:"userRef,omitempty"` +} + +func (c *CreateUserOwnerRequest) GetUserRef() *UserRef { + if c == nil { + return nil + } + return c.UserRef +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createuserownerresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createuserownerresponse.go new file mode 100644 index 00000000..180a2be9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/createuserownerresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// CreateUserOwnerResponse is the response for creating a user ownership source. +type CreateUserOwnerResponse struct { + // AppOwnerUser represents a user ownership source for an app. + AppOwnerUser *AppOwnerUser `json:"appOwnerUser,omitempty"` +} + +func (c *CreateUserOwnerResponse) GetAppOwnerUser() *AppOwnerUser { + if c == nil { + return nil + } + return c.AppOwnerUser +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/creditcardblockingconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/creditcardblockingconfig.go new file mode 100644 index 00000000..a53314f6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/creditcardblockingconfig.go @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// CreditCardBlockingConfig denies any tool call whose output contains a +// +// Luhn-valid credit card number. No configuration fields today; the +// presence of the oneof arm is the whole configuration. +type CreditCardBlockingConfig struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/datetimeinputcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/datetimeinputcomponent.go new file mode 100644 index 00000000..6e1923e1 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/datetimeinputcomponent.go @@ -0,0 +1,101 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// InputType - The inputType field. +type InputType string + +const ( + InputTypeDateTimeInputTypeUnspecified InputType = "DATE_TIME_INPUT_TYPE_UNSPECIFIED" + InputTypeDateTimeInputTypeDate InputType = "DATE_TIME_INPUT_TYPE_DATE" + InputTypeDateTimeInputTypeTime InputType = "DATE_TIME_INPUT_TYPE_TIME" + InputTypeDateTimeInputTypeDateTime InputType = "DATE_TIME_INPUT_TYPE_DATE_TIME" +) + +func (e InputType) ToPointer() *InputType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *InputType) IsExact() bool { + if e != nil { + switch *e { + case "DATE_TIME_INPUT_TYPE_UNSPECIFIED", "DATE_TIME_INPUT_TYPE_DATE", "DATE_TIME_INPUT_TYPE_TIME", "DATE_TIME_INPUT_TYPE_DATE_TIME": + return true + } + } + return false +} + +// DateTimeInputComponent for date/time selection. +type DateTimeInputComponent struct { + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"label,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString1 *DynamicString `json:"max,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString2 *DynamicString `json:"min,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString3 *DynamicString `json:"value,omitempty"` + // The inputType field. + InputType *InputType `json:"inputType,omitempty"` +} + +func (d *DateTimeInputComponent) GetDynamicString() *DynamicString { + if d == nil { + return nil + } + return d.DynamicString +} + +func (d *DateTimeInputComponent) GetDynamicString1() *DynamicString { + if d == nil { + return nil + } + return d.DynamicString1 +} + +func (d *DateTimeInputComponent) GetDynamicString2() *DynamicString { + if d == nil { + return nil + } + return d.DynamicString2 +} + +func (d *DateTimeInputComponent) GetDynamicString3() *DynamicString { + if d == nil { + return nil + } + return d.DynamicString3 +} + +func (d *DateTimeInputComponent) GetInputType() *InputType { + if d == nil { + return nil + } + return d.InputType +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementmonitorbindingrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementmonitorbindingrequest.go index 59fd32c1..6bc3780c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementmonitorbindingrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementmonitorbindingrequest.go @@ -2,7 +2,7 @@ package shared -// DeleteAppEntitlementMonitorBindingRequestEntitlementGroup - The entitlementGroup field. +// DeleteAppEntitlementMonitorBindingRequestEntitlementGroup - Which side of the conflict monitor (A or B) the binding belongs to. type DeleteAppEntitlementMonitorBindingRequestEntitlementGroup string const ( @@ -26,15 +26,15 @@ func (e *DeleteAppEntitlementMonitorBindingRequestEntitlementGroup) IsExact() bo return false } -// The DeleteAppEntitlementMonitorBindingRequest message. +// DeleteAppEntitlementMonitorBindingRequest - The request message for deleting an app entitlement monitor binding. type DeleteAppEntitlementMonitorBindingRequest struct { - // The appEntitlementId field. + // The unique identifier of the app entitlement to unbind. AppEntitlementID *string `json:"appEntitlementId,omitempty"` - // The appId field. + // The unique identifier of the application containing the entitlement. AppID *string `json:"appId,omitempty"` - // The entitlementGroup field. + // Which side of the conflict monitor (A or B) the binding belongs to. EntitlementGroup *DeleteAppEntitlementMonitorBindingRequestEntitlementGroup `json:"entitlementGroup,omitempty"` - // The monitorId field. + // The unique identifier of the conflict monitor. MonitorID *string `json:"monitorId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementmonitorbindingresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementmonitorbindingresponse.go index e41c8231..dfa9b45f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementmonitorbindingresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementmonitorbindingresponse.go @@ -2,6 +2,6 @@ package shared -// The DeleteAppEntitlementMonitorBindingResponse message. +// DeleteAppEntitlementMonitorBindingResponse - The response message for deleting an app entitlement monitor binding. type DeleteAppEntitlementMonitorBindingResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementproxyrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementproxyrequest.go index 1d62fc5f..cb51834c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementproxyrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementproxyrequest.go @@ -2,6 +2,6 @@ package shared -// The DeleteAppEntitlementProxyRequest message. +// DeleteAppEntitlementProxyRequest - The request message for deleting an entitlement proxy binding. type DeleteAppEntitlementProxyRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementproxyresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementproxyresponse.go index 7b9900ce..d06e7d22 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementproxyresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteappentitlementproxyresponse.go @@ -2,6 +2,6 @@ package shared -// The DeleteAppEntitlementProxyResponse message. +// DeleteAppEntitlementProxyResponse - The empty response message for deleting an entitlement proxy binding. type DeleteAppEntitlementProxyResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletebundleautomationrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletebundleautomationrequest.go index 2eed3665..821075da 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletebundleautomationrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletebundleautomationrequest.go @@ -2,6 +2,6 @@ package shared -// The DeleteBundleAutomationRequest message. +// DeleteBundleAutomationRequest - The request message for deleting a bundle automation from a catalog. type DeleteBundleAutomationRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletebundleautomationresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletebundleautomationresponse.go index 258f7e29..0e6f23fa 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletebundleautomationresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletebundleautomationresponse.go @@ -2,6 +2,6 @@ package shared -// The DeleteBundleAutomationResponse message. +// DeleteBundleAutomationResponse - The response message for deleting a bundle automation. type DeleteBundleAutomationResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteentitlementownerrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteentitlementownerrequest.go new file mode 100644 index 00000000..521c509b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteentitlementownerrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DeleteEntitlementOwnerRequest is the request for deleting an entitlement ownership source. +type DeleteEntitlementOwnerRequest struct { + // The AppEntitlementRef message. + AppEntitlementRef *AppEntitlementRef `json:"appEntitlementRef,omitempty"` +} + +func (d *DeleteEntitlementOwnerRequest) GetAppEntitlementRef() *AppEntitlementRef { + if d == nil { + return nil + } + return d.AppEntitlementRef +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteentitlementownerresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteentitlementownerresponse.go new file mode 100644 index 00000000..38c538d9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteentitlementownerresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DeleteEntitlementOwnerResponse is the empty response for deleting an entitlement ownership source. +type DeleteEntitlementOwnerResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletefindingroutingrulerequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletefindingroutingrulerequest.go new file mode 100644 index 00000000..089c1b70 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletefindingroutingrulerequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The DeleteFindingRoutingRuleRequest message. +type DeleteFindingRoutingRuleRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletefindingroutingruleresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletefindingroutingruleresponse.go new file mode 100644 index 00000000..b926f0a8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletefindingroutingruleresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The DeleteFindingRoutingRuleResponse message. +type DeleteFindingRoutingRuleResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedappresourcerequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedappresourcerequest.go index 3ba03dd7..19d3e6f3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedappresourcerequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedappresourcerequest.go @@ -2,6 +2,6 @@ package shared -// The DeleteManuallyManagedAppResourceRequest message. +// DeleteManuallyManagedAppResourceRequest - The request message for deleting a manually managed app resource. type DeleteManuallyManagedAppResourceRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedappresourceresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedappresourceresponse.go index 38fffc96..86aa59f3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedappresourceresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedappresourceresponse.go @@ -2,6 +2,6 @@ package shared -// The DeleteManuallyManagedAppResourceResponse message. +// DeleteManuallyManagedAppResourceResponse - The empty response message for deleting a manually managed app resource. type DeleteManuallyManagedAppResourceResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedresourcetyperequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedresourcetyperequest.go index d6c93f53..a0fa3f94 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedresourcetyperequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedresourcetyperequest.go @@ -2,6 +2,6 @@ package shared -// The DeleteManuallyManagedResourceTypeRequest message. +// DeleteManuallyManagedResourceTypeRequest - The request message for deleting a manually managed resource type. type DeleteManuallyManagedResourceTypeRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedresourcetyperesponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedresourcetyperesponse.go index 5266a0b7..3c43cdaa 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedresourcetyperesponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deletemanuallymanagedresourcetyperesponse.go @@ -2,6 +2,6 @@ package shared -// The DeleteManuallyManagedResourceTypeResponse message. +// DeleteManuallyManagedResourceTypeResponse - The empty response message for deleting a manually managed resource type. type DeleteManuallyManagedResourceTypeResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteuserownerrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteuserownerrequest.go new file mode 100644 index 00000000..a8c1cb97 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteuserownerrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DeleteUserOwnerRequest is the request for deleting a user ownership source. +type DeleteUserOwnerRequest struct { + // A reference to a user. + UserRef *UserRef `json:"userRef,omitempty"` +} + +func (d *DeleteUserOwnerRequest) GetUserRef() *UserRef { + if d == nil { + return nil + } + return d.UserRef +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteuserownerresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteuserownerresponse.go new file mode 100644 index 00000000..77a4facd --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/deleteuserownerresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DeleteUserOwnerResponse is the empty response for deleting a user ownership source. +type DeleteUserOwnerResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dependenton.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dependenton.go new file mode 100644 index 00000000..3c2bf17e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dependenton.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DependentOn means the fields in field_names are only valid if all fields +// +// in dependency_field_names are also present +type DependentOn struct { + // The fields that must be present for the primary field_names to be valid + DependencyFieldNames []string `json:"dependencyFieldNames,omitempty"` +} + +func (d *DependentOn) GetDependencyFieldNames() []string { + if d == nil { + return nil + } + return d.DependencyFieldNames +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/digestpreference.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/digestpreference.go new file mode 100644 index 00000000..089a2289 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/digestpreference.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DayOfWeek - The day of the week to send weekly digests. +type DayOfWeek string + +const ( + DayOfWeekWeekdayUnspecified DayOfWeek = "WEEKDAY_UNSPECIFIED" + DayOfWeekWeekdayMonday DayOfWeek = "WEEKDAY_MONDAY" + DayOfWeekWeekdayTuesday DayOfWeek = "WEEKDAY_TUESDAY" + DayOfWeekWeekdayWednesday DayOfWeek = "WEEKDAY_WEDNESDAY" + DayOfWeekWeekdayThursday DayOfWeek = "WEEKDAY_THURSDAY" + DayOfWeekWeekdayFriday DayOfWeek = "WEEKDAY_FRIDAY" + DayOfWeekWeekdaySaturday DayOfWeek = "WEEKDAY_SATURDAY" + DayOfWeekWeekdaySunday DayOfWeek = "WEEKDAY_SUNDAY" +) + +func (e DayOfWeek) ToPointer() *DayOfWeek { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *DayOfWeek) IsExact() bool { + if e != nil { + switch *e { + case "WEEKDAY_UNSPECIFIED", "WEEKDAY_MONDAY", "WEEKDAY_TUESDAY", "WEEKDAY_WEDNESDAY", "WEEKDAY_THURSDAY", "WEEKDAY_FRIDAY", "WEEKDAY_SATURDAY", "WEEKDAY_SUNDAY": + return true + } + } + return false +} + +// Frequency - How often digest notifications are sent. +type Frequency string + +const ( + FrequencyDigestFrequencyUnspecified Frequency = "DIGEST_FREQUENCY_UNSPECIFIED" + FrequencyDigestFrequencyDaily Frequency = "DIGEST_FREQUENCY_DAILY" + FrequencyDigestFrequencyWeekly Frequency = "DIGEST_FREQUENCY_WEEKLY" +) + +func (e Frequency) ToPointer() *Frequency { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Frequency) IsExact() bool { + if e != nil { + switch *e { + case "DIGEST_FREQUENCY_UNSPECIFIED", "DIGEST_FREQUENCY_DAILY", "DIGEST_FREQUENCY_WEEKLY": + return true + } + } + return false +} + +// DigestPreference controls whether summary digest notifications are sent and how often. +type DigestPreference struct { + // The day of the week to send weekly digests. + DayOfWeek *DayOfWeek `json:"dayOfWeek,omitempty"` + // Whether digest notifications are enabled. + Enabled *bool `json:"enabled,omitempty"` + // How often digest notifications are sent. + Frequency *Frequency `json:"frequency,omitempty"` + // Whether this preference is locked by org-level settings, preventing users from overriding it. + Locked *bool `json:"locked,omitempty"` +} + +func (d *DigestPreference) GetDayOfWeek() *DayOfWeek { + if d == nil { + return nil + } + return d.DayOfWeek +} + +func (d *DigestPreference) GetEnabled() *bool { + if d == nil { + return nil + } + return d.Enabled +} + +func (d *DigestPreference) GetFrequency() *Frequency { + if d == nil { + return nil + } + return d.Frequency +} + +func (d *DigestPreference) GetLocked() *bool { + if d == nil { + return nil + } + return d.Locked +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directory.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directory.go index c2e0288c..ae3cae64 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directory.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directory.go @@ -17,6 +17,8 @@ type Directory struct { DirectoryAccountFilterAll *DirectoryAccountFilterAll `json:"all,omitempty"` // The DirectoryAccountFilterCel message. DirectoryAccountFilterCel *DirectoryAccountFilterCel `json:"celExpression,omitempty"` + // DirectoryMergeConfig configures how AppUsers from this directory are matched to C1 Users. + DirectoryMergeConfig *DirectoryMergeConfig `json:"mergeConfig,omitempty"` // The ID of the app associated with the directory. AppID *string `json:"appId,omitempty"` CreatedAt *time.Time `json:"createdAt,omitempty"` @@ -49,6 +51,13 @@ func (d *Directory) GetDirectoryAccountFilterCel() *DirectoryAccountFilterCel { return d.DirectoryAccountFilterCel } +func (d *Directory) GetDirectoryMergeConfig() *DirectoryMergeConfig { + if d == nil { + return nil + } + return d.DirectoryMergeConfig +} + func (d *Directory) GetAppID() *string { if d == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directorymergeconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directorymergeconfig.go new file mode 100644 index 00000000..c3d58c1f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directorymergeconfig.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DirectoryMergeConfig configures how AppUsers from this directory are matched to C1 Users. +type DirectoryMergeConfig struct { + // Ordered list of match cases evaluated in sequence. First match wins. + MatchCases []DirectoryMergeMatchCase `json:"matchCases,omitempty"` +} + +func (d *DirectoryMergeConfig) GetMatchCases() []DirectoryMergeMatchCase { + if d == nil { + return nil + } + return d.MatchCases +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directorymergematchcase.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directorymergematchcase.go new file mode 100644 index 00000000..e0e6f62f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directorymergematchcase.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DirectoryMergeMatchCase defines a pair of CEL key extractors for matching. +type DirectoryMergeMatchCase struct { + // CEL expression evaluated against an AppUser to produce match key(s). + AppUserKeyCel *string `json:"appUserKeyCel,omitempty"` + // CEL expression evaluated against a User to produce match key(s). + UserKeyCel *string `json:"userKeyCel,omitempty"` +} + +func (d *DirectoryMergeMatchCase) GetAppUserKeyCel() *string { + if d == nil { + return nil + } + return d.AppUserKeyCel +} + +func (d *DirectoryMergeMatchCase) GetUserKeyCel() *string { + if d == nil { + return nil + } + return d.UserKeyCel +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directoryservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directoryservicecreaterequest.go index cdee3063..1071a0a5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directoryservicecreaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directoryservicecreaterequest.go @@ -14,6 +14,8 @@ type DirectoryServiceCreateRequest struct { DirectoryAccountFilterCel *DirectoryAccountFilterCel `json:"celExpression,omitempty"` // The fields to be included in the directory response. DirectoryExpandMask *DirectoryExpandMask `json:"expandMask,omitempty"` + // DirectoryMergeConfig configures how AppUsers from this directory are matched to C1 Users. + DirectoryMergeConfig *DirectoryMergeConfig `json:"mergeConfig,omitempty"` // The AppID to make into a directory, providing identities and more for the C1 app. AppID *string `json:"appId,omitempty"` } @@ -39,6 +41,13 @@ func (d *DirectoryServiceCreateRequest) GetDirectoryExpandMask() *DirectoryExpan return d.DirectoryExpandMask } +func (d *DirectoryServiceCreateRequest) GetDirectoryMergeConfig() *DirectoryMergeConfig { + if d == nil { + return nil + } + return d.DirectoryMergeConfig +} + func (d *DirectoryServiceCreateRequest) GetAppID() *string { if d == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directoryserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directoryserviceupdaterequest.go index 05ca3036..725e8cd0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directoryserviceupdaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/directoryserviceupdaterequest.go @@ -14,6 +14,8 @@ type DirectoryServiceUpdateRequest struct { DirectoryAccountFilterCel *DirectoryAccountFilterCel `json:"celExpression,omitempty"` // The fields to be included in the directory response. DirectoryExpandMask *DirectoryExpandMask `json:"expandMask,omitempty"` + // DirectoryMergeConfig configures how AppUsers from this directory are matched to C1 Users. + DirectoryMergeConfig *DirectoryMergeConfig `json:"mergeConfig,omitempty"` } func (d *DirectoryServiceUpdateRequest) GetDirectoryAccountFilterAll() *DirectoryAccountFilterAll { @@ -36,3 +38,10 @@ func (d *DirectoryServiceUpdateRequest) GetDirectoryExpandMask() *DirectoryExpan } return d.DirectoryExpandMask } + +func (d *DirectoryServiceUpdateRequest) GetDirectoryMergeConfig() *DirectoryMergeConfig { + if d == nil { + return nil + } + return d.DirectoryMergeConfig +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/disabledreasoncircuitbreaker.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/disabledreasoncircuitbreaker.go index edd675b0..f115282a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/disabledreasoncircuitbreaker.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/disabledreasoncircuitbreaker.go @@ -2,6 +2,86 @@ package shared -// The DisabledReasonCircuitBreaker message. +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// Period - Snapshot of the period at trip time. +type Period string + +const ( + PeriodCircuitBreakerPeriodUnspecified Period = "CIRCUIT_BREAKER_PERIOD_UNSPECIFIED" + PeriodCircuitBreakerPeriodHour Period = "CIRCUIT_BREAKER_PERIOD_HOUR" + PeriodCircuitBreakerPeriodDay Period = "CIRCUIT_BREAKER_PERIOD_DAY" + PeriodCircuitBreakerPeriodWeek Period = "CIRCUIT_BREAKER_PERIOD_WEEK" + PeriodCircuitBreakerPeriodMonth Period = "CIRCUIT_BREAKER_PERIOD_MONTH" +) + +func (e Period) ToPointer() *Period { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Period) IsExact() bool { + if e != nil { + switch *e { + case "CIRCUIT_BREAKER_PERIOD_UNSPECIFIED", "CIRCUIT_BREAKER_PERIOD_HOUR", "CIRCUIT_BREAKER_PERIOD_DAY", "CIRCUIT_BREAKER_PERIOD_WEEK", "CIRCUIT_BREAKER_PERIOD_MONTH": + return true + } + } + return false +} + +// DisabledReasonCircuitBreaker carries the trip context when an automation +// +// has been auto-disabled by its rate cap. Returned on the parent Automation +// when read; not directly settable. type DisabledReasonCircuitBreaker struct { + // Observed execution count in the period at trip time. + ObservedCount *int64 `json:"observedCount,omitempty"` + // Snapshot of the period at trip time. + Period *Period `json:"period,omitempty"` + // Snapshot of the threshold at trip time. + Threshold *int64 `json:"threshold,omitempty"` + TrippedAt *time.Time `json:"trippedAt,omitempty"` +} + +func (d DisabledReasonCircuitBreaker) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(d, "", false) +} + +func (d *DisabledReasonCircuitBreaker) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil { + return err + } + return nil +} + +func (d *DisabledReasonCircuitBreaker) GetObservedCount() *int64 { + if d == nil { + return nil + } + return d.ObservedCount +} + +func (d *DisabledReasonCircuitBreaker) GetPeriod() *Period { + if d == nil { + return nil + } + return d.Period +} + +func (d *DisabledReasonCircuitBreaker) GetThreshold() *int64 { + if d == nil { + return nil + } + return d.Threshold +} + +func (d *DisabledReasonCircuitBreaker) GetTrippedAt() *time.Time { + if d == nil { + return nil + } + return d.TrippedAt } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dividercomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dividercomponent.go new file mode 100644 index 00000000..c3fa5ea3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dividercomponent.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DividerComponent is a visual separator. +type DividerComponent struct { + // The orientation field. + Orientation *string `json:"orientation,omitempty"` +} + +func (d *DividerComponent) GetOrientation() *string { + if d == nil { + return nil + } + return d.Orientation +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dynamicbool.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dynamicbool.go new file mode 100644 index 00000000..caf85005 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dynamicbool.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DynamicBool can be a literal value, a JSON pointer path, or a function call. +// +// This message contains a oneof named value. Only a single field of the following list may be set at a time: +// - literal +// - path +// - call +type DynamicBool struct { + // FunctionCall represents a client-side function invocation. + FunctionCall *FunctionCall `json:"call,omitempty"` + // The literal field. + // This field is part of the `value` oneof. + // See the documentation for `c1.api.a2ui.v1.DynamicBool` for more details. + Literal *bool `json:"literal,omitempty"` + // The path field. + // This field is part of the `value` oneof. + // See the documentation for `c1.api.a2ui.v1.DynamicBool` for more details. + Path *string `json:"path,omitempty"` +} + +func (d *DynamicBool) GetFunctionCall() *FunctionCall { + if d == nil { + return nil + } + return d.FunctionCall +} + +func (d *DynamicBool) GetLiteral() *bool { + if d == nil { + return nil + } + return d.Literal +} + +func (d *DynamicBool) GetPath() *string { + if d == nil { + return nil + } + return d.Path +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dynamicnumber.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dynamicnumber.go new file mode 100644 index 00000000..6f08c80b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dynamicnumber.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DynamicNumber can be a literal value, a JSON pointer path, or a function call. +// +// This message contains a oneof named value. Only a single field of the following list may be set at a time: +// - literal +// - path +// - call +type DynamicNumber struct { + // FunctionCall represents a client-side function invocation. + FunctionCall *FunctionCall `json:"call,omitempty"` + // The literal field. + // This field is part of the `value` oneof. + // See the documentation for `c1.api.a2ui.v1.DynamicNumber` for more details. + Literal *float64 `json:"literal,omitempty"` + // The path field. + // This field is part of the `value` oneof. + // See the documentation for `c1.api.a2ui.v1.DynamicNumber` for more details. + Path *string `json:"path,omitempty"` +} + +func (d *DynamicNumber) GetFunctionCall() *FunctionCall { + if d == nil { + return nil + } + return d.FunctionCall +} + +func (d *DynamicNumber) GetLiteral() *float64 { + if d == nil { + return nil + } + return d.Literal +} + +func (d *DynamicNumber) GetPath() *string { + if d == nil { + return nil + } + return d.Path +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dynamicstring.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dynamicstring.go new file mode 100644 index 00000000..1b8d35f4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/dynamicstring.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// DynamicString can be a literal value, a JSON pointer path, or a function call. +// +// This message contains a oneof named value. Only a single field of the following list may be set at a time: +// - literal +// - path +// - call +type DynamicString struct { + // FunctionCall represents a client-side function invocation. + FunctionCall *FunctionCall `json:"call,omitempty"` + // The literal field. + // This field is part of the `value` oneof. + // See the documentation for `c1.api.a2ui.v1.DynamicString` for more details. + Literal *string `json:"literal,omitempty"` + // The path field. + // This field is part of the `value` oneof. + // See the documentation for `c1.api.a2ui.v1.DynamicString` for more details. + Path *string `json:"path,omitempty"` +} + +func (d *DynamicString) GetFunctionCall() *FunctionCall { + if d == nil { + return nil + } + return d.FunctionCall +} + +func (d *DynamicString) GetLiteral() *string { + if d == nil { + return nil + } + return d.Literal +} + +func (d *DynamicString) GetPath() *string { + if d == nil { + return nil + } + return d.Path +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/editorvalidaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/editorvalidaterequest.go index 95a306b3..aef30f24 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/editorvalidaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/editorvalidaterequest.go @@ -2,9 +2,9 @@ package shared -// The EditorValidateRequest message. +// The EditorValidateRequest message contains the configuration text to validate. type EditorValidateRequest struct { - // The text field. + // The configuration text to validate. Text *string `json:"text,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/editorvalidateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/editorvalidateresponse.go index b572db60..5e98cdaa 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/editorvalidateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/editorvalidateresponse.go @@ -2,9 +2,9 @@ package shared -// The EditorValidateResponse message. +// The EditorValidateResponse message contains validation results. type EditorValidateResponse struct { - // The markers field. + // The list of diagnostic markers found during validation. Markers []EditorMarker `json:"markers,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/emailchannelsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/emailchannelsettings.go new file mode 100644 index 00000000..18d99e00 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/emailchannelsettings.go @@ -0,0 +1,106 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The EmailChannelSettings message. +type EmailChannelSettings struct { + // The AccessProvisionedPreference message. + AccessProvisionedPreference *AccessProvisionedPreference `json:"accessProvisioned,omitempty"` + // The ApprovalNeededPreference message. + ApprovalNeededPreference *ApprovalNeededPreference `json:"approvalNeeded,omitempty"` + // The CommentOnRequestPreference message. + CommentOnRequestPreference *CommentOnRequestPreference `json:"commentOnRequest,omitempty"` + // The CompletionPreference message. + CompletionPreference *CompletionPreference `json:"completion,omitempty"` + // The ConnectorIssuesPreference message. + ConnectorIssuesPreference *ConnectorIssuesPreference `json:"connectorIssues,omitempty"` + // DigestPreference controls whether summary digest notifications are sent and how often. + DigestPreference *DigestPreference `json:"digest,omitempty"` + // The ExpiringAccessPreference message. + ExpiringAccessPreference *ExpiringAccessPreference `json:"expiringAccess,omitempty"` + // The ProvisioningRequestPreference message. + ProvisioningRequestPreference *ProvisioningRequestPreference `json:"provisioningRequest,omitempty"` + // The ReviewsPreference message. + ReviewsPreference *ReviewsPreference `json:"reviews,omitempty"` + // The TaskRemindersPreference message. + TaskRemindersPreference *TaskRemindersPreference `json:"taskReminders,omitempty"` + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` +} + +func (e *EmailChannelSettings) GetAccessProvisionedPreference() *AccessProvisionedPreference { + if e == nil { + return nil + } + return e.AccessProvisionedPreference +} + +func (e *EmailChannelSettings) GetApprovalNeededPreference() *ApprovalNeededPreference { + if e == nil { + return nil + } + return e.ApprovalNeededPreference +} + +func (e *EmailChannelSettings) GetCommentOnRequestPreference() *CommentOnRequestPreference { + if e == nil { + return nil + } + return e.CommentOnRequestPreference +} + +func (e *EmailChannelSettings) GetCompletionPreference() *CompletionPreference { + if e == nil { + return nil + } + return e.CompletionPreference +} + +func (e *EmailChannelSettings) GetConnectorIssuesPreference() *ConnectorIssuesPreference { + if e == nil { + return nil + } + return e.ConnectorIssuesPreference +} + +func (e *EmailChannelSettings) GetDigestPreference() *DigestPreference { + if e == nil { + return nil + } + return e.DigestPreference +} + +func (e *EmailChannelSettings) GetExpiringAccessPreference() *ExpiringAccessPreference { + if e == nil { + return nil + } + return e.ExpiringAccessPreference +} + +func (e *EmailChannelSettings) GetProvisioningRequestPreference() *ProvisioningRequestPreference { + if e == nil { + return nil + } + return e.ProvisioningRequestPreference +} + +func (e *EmailChannelSettings) GetReviewsPreference() *ReviewsPreference { + if e == nil { + return nil + } + return e.ReviewsPreference +} + +func (e *EmailChannelSettings) GetTaskRemindersPreference() *TaskRemindersPreference { + if e == nil { + return nil + } + return e.TaskRemindersPreference +} + +func (e *EmailChannelSettings) GetEnabled() *bool { + if e == nil { + return nil + } + return e.Enabled +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/entitlementcluster.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/entitlementcluster.go new file mode 100644 index 00000000..afcf797b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/entitlementcluster.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The EntitlementCluster message. +type EntitlementCluster struct { + // The avgCoverage field. + AvgCoverage *float64 `json:"avgCoverage,omitempty"` + // The avgSimilarity field. + AvgSimilarity *float64 `json:"avgSimilarity,omitempty"` + // The entitlements field. + Entitlements []CohortEntitlement `json:"entitlements,omitempty"` + // The userCount field. + UserCount *int `json:"userCount,omitempty"` +} + +func (e *EntitlementCluster) GetAvgCoverage() *float64 { + if e == nil { + return nil + } + return e.AvgCoverage +} + +func (e *EntitlementCluster) GetAvgSimilarity() *float64 { + if e == nil { + return nil + } + return e.AvgSimilarity +} + +func (e *EntitlementCluster) GetEntitlements() []CohortEntitlement { + if e == nil { + return nil + } + return e.Entitlements +} + +func (e *EntitlementCluster) GetUserCount() *int { + if e == nil { + return nil + } + return e.UserCount +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/entitlementfilter.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/entitlementfilter.go deleted file mode 100644 index c9a6c8a7..00000000 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/entitlementfilter.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -// The EntitlementFilter message. -type EntitlementFilter struct { - // The appEntitlementRefs field. - AppEntitlementRefs []AppEntitlementRef `json:"appEntitlementRefs,omitempty"` - // The appEntitlementRefsCel field. - AppEntitlementRefsCel *string `json:"appEntitlementRefsCel,omitempty"` - // The appId field. - AppID *string `json:"appId,omitempty"` -} - -func (e *EntitlementFilter) GetAppEntitlementRefs() []AppEntitlementRef { - if e == nil { - return nil - } - return e.AppEntitlementRefs -} - -func (e *EntitlementFilter) GetAppEntitlementRefsCel() *string { - if e == nil { - return nil - } - return e.AppEntitlementRefsCel -} - -func (e *EntitlementFilter) GetAppID() *string { - if e == nil { - return nil - } - return e.AppID -} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/entitlementownerprovisioner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/entitlementownerprovisioner.go new file mode 100644 index 00000000..1424eb60 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/entitlementownerprovisioner.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// EntitlementOwnerProvisioner resolves to entitlement owners. +type EntitlementOwnerProvisioner struct { + // Whether the provisioner can reassign the task. + AllowReassignment *bool `json:"allowReassignment,omitempty"` + // Fallback user IDs if no entitlement owners are found. + FallbackUserIds []string `json:"fallbackUserIds,omitempty"` +} + +func (e *EntitlementOwnerProvisioner) GetAllowReassignment() *bool { + if e == nil { + return nil + } + return e.AllowReassignment +} + +func (e *EntitlementOwnerProvisioner) GetFallbackUserIds() []string { + if e == nil { + return nil + } + return e.FallbackUserIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalation.go index eec0ab04..2f387993 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalation.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalation.go @@ -2,7 +2,9 @@ package shared -import "github.com/conductorone/conductorone-sdk-go/pkg/utils" +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) // The Escalation message. // @@ -31,7 +33,7 @@ func (e Escalation) MarshalJSON() ([]byte, error) { } func (e *Escalation) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, e, "", false, nil); err != nil { + if err := utils.UnmarshalJSON(data, &e, "", false, nil); err != nil { return err } return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstance.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstance.go index 328ac967..af62218f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstance.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstance.go @@ -16,13 +16,13 @@ import ( // - skipStep type EscalationInstance struct { // The CancelTicket message. - CancelTicket *CancelTicket `json:"cancelTicket,omitempty"` + EscalationInstanceCancelTicket *EscalationInstanceCancelTicket `json:"cancelTicket,omitempty"` // The ReassignToApprovers message. - ReassignToApprovers *ReassignToApprovers `json:"reassignToApprovers,omitempty"` + EscalationInstanceReassignToApprovers *EscalationInstanceReassignToApprovers `json:"reassignToApprovers,omitempty"` // The ReplacePolicy message. - ReplacePolicy *ReplacePolicy `json:"replacePolicy,omitempty"` + EscalationInstanceReplacePolicy *EscalationInstanceReplacePolicy `json:"replacePolicy,omitempty"` // The SkipStep message. - SkipStep *SkipStep `json:"skipStep,omitempty"` + EscalationInstanceSkipStep *EscalationInstanceSkipStep `json:"skipStep,omitempty"` // The alreadyEscalated field. AlreadyEscalated *bool `json:"alreadyEscalated,omitempty"` // The escalationComment field. @@ -41,32 +41,32 @@ func (e *EscalationInstance) UnmarshalJSON(data []byte) error { return nil } -func (e *EscalationInstance) GetCancelTicket() *CancelTicket { +func (e *EscalationInstance) GetEscalationInstanceCancelTicket() *EscalationInstanceCancelTicket { if e == nil { return nil } - return e.CancelTicket + return e.EscalationInstanceCancelTicket } -func (e *EscalationInstance) GetReassignToApprovers() *ReassignToApprovers { +func (e *EscalationInstance) GetEscalationInstanceReassignToApprovers() *EscalationInstanceReassignToApprovers { if e == nil { return nil } - return e.ReassignToApprovers + return e.EscalationInstanceReassignToApprovers } -func (e *EscalationInstance) GetReplacePolicy() *ReplacePolicy { +func (e *EscalationInstance) GetEscalationInstanceReplacePolicy() *EscalationInstanceReplacePolicy { if e == nil { return nil } - return e.ReplacePolicy + return e.EscalationInstanceReplacePolicy } -func (e *EscalationInstance) GetSkipStep() *SkipStep { +func (e *EscalationInstance) GetEscalationInstanceSkipStep() *EscalationInstanceSkipStep { if e == nil { return nil } - return e.SkipStep + return e.EscalationInstanceSkipStep } func (e *EscalationInstance) GetAlreadyEscalated() *bool { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstancecancelticket.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstancecancelticket.go new file mode 100644 index 00000000..cd11fa8d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstancecancelticket.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// EscalationInstanceCancelTicket - The CancelTicket message. +type EscalationInstanceCancelTicket struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstancereassigntoapprovers.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstancereassigntoapprovers.go new file mode 100644 index 00000000..909f61a0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstancereassigntoapprovers.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// EscalationInstanceReassignToApprovers - The ReassignToApprovers message. +type EscalationInstanceReassignToApprovers struct { + // The approverIds field. + ApproverIds []string `json:"approverIds,omitempty"` +} + +func (e *EscalationInstanceReassignToApprovers) GetApproverIds() []string { + if e == nil { + return nil + } + return e.ApproverIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstancereplacepolicy.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstancereplacepolicy.go new file mode 100644 index 00000000..4b8f72df --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstancereplacepolicy.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// EscalationInstanceReplacePolicy - The ReplacePolicy message. +type EscalationInstanceReplacePolicy struct { + // The policyId field. + PolicyID *string `json:"policyId,omitempty"` +} + +func (e *EscalationInstanceReplacePolicy) GetPolicyID() *string { + if e == nil { + return nil + } + return e.PolicyID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstanceskipstep.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstanceskipstep.go new file mode 100644 index 00000000..a52561ef --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/escalationinstanceskipstep.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// EscalationInstanceSkipStep - The SkipStep message. +type EscalationInstanceSkipStep struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/executeautomationresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/executeautomationresponse.go index 79119fbb..85444dcf 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/executeautomationresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/executeautomationresponse.go @@ -2,12 +2,27 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // The ExecuteAutomationResponse message. type ExecuteAutomationResponse struct { - // The executionId field. + // The unique identifier of the newly created execution. ExecutionID *int64 `integer:"string" json:"executionId,omitempty"` } +func (e ExecuteAutomationResponse) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(e, "", false) +} + +func (e *ExecuteAutomationResponse) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &e, "", false, nil); err != nil { + return err + } + return nil +} + func (e *ExecuteAutomationResponse) GetExecutionID() *int64 { if e == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/expiringaccesspreference.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/expiringaccesspreference.go new file mode 100644 index 00000000..006852bc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/expiringaccesspreference.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ExpiringAccessPreference message. +type ExpiringAccessPreference struct { + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The locked field. + Locked *bool `json:"locked,omitempty"` +} + +func (e *ExpiringAccessPreference) GetEnabled() *bool { + if e == nil { + return nil + } + return e.Enabled +} + +func (e *ExpiringAccessPreference) GetLocked() *bool { + if e == nil { + return nil + } + return e.Locked +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicecreaterequest.go index f9622729..800386dc 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicecreaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicecreaterequest.go @@ -9,7 +9,7 @@ package shared type ExportServiceCreateRequest struct { // The ExportToDatasource message. ExportToDatasource *ExportToDatasource `json:"datasource,omitempty"` - // The display name of the new policy. + // The display name of the new system log exporter. DisplayName *string `json:"displayName,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicelisteventsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicelisteventsrequest.go index e4ed8d9a..6e36ca97 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicelisteventsrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicelisteventsrequest.go @@ -2,7 +2,7 @@ package shared -// The ExportServiceListEventsRequest message. +// ExportServiceListEventsRequest is the request for listing audit events within a specific export. type ExportServiceListEventsRequest struct { // The pageSize field. PageSize *int `json:"pageSize,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicelisteventsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicelisteventsresponse.go index ecac17d4..ae9cb151 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicelisteventsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportservicelisteventsresponse.go @@ -2,11 +2,11 @@ package shared -// The ExportServiceListEventsResponse message. +// ExportServiceListEventsResponse is the response containing audit events for an export. type ExportServiceListEventsResponse struct { // List contains an array of JSON OCSF events. List []map[string]any `json:"list,omitempty"` - // The nextPageToken field. + // The token to retrieve the next page of results, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportssearchservicesearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportssearchservicesearchrequest.go index f6bf32ba..1f73f28d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportssearchservicesearchrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportssearchservicesearchrequest.go @@ -2,7 +2,7 @@ package shared -// The ExportsSearchServiceSearchRequest message. +// ExportsSearchServiceSearchRequest is the request for searching system log exports. type ExportsSearchServiceSearchRequest struct { // Search for system log exporters with a case insensitive match on the display name. DisplayName *string `json:"displayName,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportssearchservicesearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportssearchservicesearchresponse.go index f2928b11..1ad6b128 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportssearchservicesearchresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/exportssearchservicesearchresponse.go @@ -2,11 +2,11 @@ package shared -// The ExportsSearchServiceSearchResponse message. +// ExportsSearchServiceSearchResponse is the response for searching system log exports. type ExportsSearchServiceSearchResponse struct { - // The list field. + // The list of system log exports matching the search criteria. List []Exporter `json:"list,omitempty"` - // The nextPageToken field. + // The token to retrieve the next page of results, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/expressionprovisioner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/expressionprovisioner.go new file mode 100644 index 00000000..ba8bfb55 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/expressionprovisioner.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ExpressionProvisioner evaluates CEL expressions to determine provisioners. +type ExpressionProvisioner struct { + // Whether the provisioner can reassign the task. + AllowReassignment *bool `json:"allowReassignment,omitempty"` + // The CEL expressions to evaluate. + Expressions []string `json:"expressions,omitempty"` + // Fallback user IDs if expression evaluation yields no users. + FallbackUserIds []string `json:"fallbackUserIds,omitempty"` +} + +func (e *ExpressionProvisioner) GetAllowReassignment() *bool { + if e == nil { + return nil + } + return e.AllowReassignment +} + +func (e *ExpressionProvisioner) GetExpressions() []string { + if e == nil { + return nil + } + return e.Expressions +} + +func (e *ExpressionProvisioner) GetFallbackUserIds() []string { + if e == nil { + return nil + } + return e.FallbackUserIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/externalclientinfo.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/externalclientinfo.go new file mode 100644 index 00000000..5ae47d64 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/externalclientinfo.go @@ -0,0 +1,191 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// ClientIDType - How the client_id was established. +type ClientIDType string + +const ( + ClientIDTypeClientIDTypeUnspecified ClientIDType = "CLIENT_ID_TYPE_UNSPECIFIED" + ClientIDTypeClientIDTypeDcr ClientIDType = "CLIENT_ID_TYPE_DCR" + ClientIDTypeClientIDTypeMetadataURL ClientIDType = "CLIENT_ID_TYPE_METADATA_URL" +) + +func (e ClientIDType) ToPointer() *ClientIDType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *ClientIDType) IsExact() bool { + if e != nil { + switch *e { + case "CLIENT_ID_TYPE_UNSPECIFIED", "CLIENT_ID_TYPE_DCR", "CLIENT_ID_TYPE_METADATA_URL": + return true + } + } + return false +} + +// WellKnownClient - The wellKnownClient field. +type WellKnownClient string + +const ( + WellKnownClientWellKnownClientUnspecified WellKnownClient = "WELL_KNOWN_CLIENT_UNSPECIFIED" + WellKnownClientWellKnownClientUnknown WellKnownClient = "WELL_KNOWN_CLIENT_UNKNOWN" + WellKnownClientWellKnownClientClaudeAi WellKnownClient = "WELL_KNOWN_CLIENT_CLAUDE_AI" + WellKnownClientWellKnownClientClaudeDesktop WellKnownClient = "WELL_KNOWN_CLIENT_CLAUDE_DESKTOP" + WellKnownClientWellKnownClientClaudeCode WellKnownClient = "WELL_KNOWN_CLIENT_CLAUDE_CODE" + WellKnownClientWellKnownClientMcpInspector WellKnownClient = "WELL_KNOWN_CLIENT_MCP_INSPECTOR" + WellKnownClientWellKnownClientChatgpt WellKnownClient = "WELL_KNOWN_CLIENT_CHATGPT" + WellKnownClientWellKnownClientVscode WellKnownClient = "WELL_KNOWN_CLIENT_VSCODE" + WellKnownClientWellKnownClientCursor WellKnownClient = "WELL_KNOWN_CLIENT_CURSOR" + WellKnownClientWellKnownClientWindsurf WellKnownClient = "WELL_KNOWN_CLIENT_WINDSURF" + WellKnownClientWellKnownClientZed WellKnownClient = "WELL_KNOWN_CLIENT_ZED" + WellKnownClientWellKnownClientJetbrains WellKnownClient = "WELL_KNOWN_CLIENT_JETBRAINS" + WellKnownClientWellKnownClientDockerMcpToolkit WellKnownClient = "WELL_KNOWN_CLIENT_DOCKER_MCP_TOOLKIT" +) + +func (e WellKnownClient) ToPointer() *WellKnownClient { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *WellKnownClient) IsExact() bool { + if e != nil { + switch *e { + case "WELL_KNOWN_CLIENT_UNSPECIFIED", "WELL_KNOWN_CLIENT_UNKNOWN", "WELL_KNOWN_CLIENT_CLAUDE_AI", "WELL_KNOWN_CLIENT_CLAUDE_DESKTOP", "WELL_KNOWN_CLIENT_CLAUDE_CODE", "WELL_KNOWN_CLIENT_MCP_INSPECTOR", "WELL_KNOWN_CLIENT_CHATGPT", "WELL_KNOWN_CLIENT_VSCODE", "WELL_KNOWN_CLIENT_CURSOR", "WELL_KNOWN_CLIENT_WINDSURF", "WELL_KNOWN_CLIENT_ZED", "WELL_KNOWN_CLIENT_JETBRAINS", "WELL_KNOWN_CLIENT_DOCKER_MCP_TOOLKIT": + return true + } + } + return false +} + +// ExternalClientInfo provides information about an approved external client. +// +// Used by both List (user's own grants) and Search (admin view of all grants). +type ExternalClientInfo struct { + // OAuth2 client ID - canonical identifier for this connection (globally unique per DCR) + ClientID *string `json:"clientId,omitempty"` + // How the client_id was established. + ClientIDType *ClientIDType `json:"clientIdType,omitempty"` + // Original CIMD metadata URL (e.g., "https://cursor.com/.well-known/oauth-client"). + // Empty for DCR clients. + ClientIDURL *string `json:"clientIdUrl,omitempty"` + // Original client name from DCR registration + ClientName *string `json:"clientName,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // User-provided custom name (defaults to client_name if not set) + DisplayName *string `json:"displayName,omitempty"` + LastUsedAt *time.Time `json:"lastUsedAt,omitempty"` + // MCP client record ID for AI governance tracking. May be empty for legacy grants. + McpClientID *string `json:"mcpClientId,omitempty"` + // Role IDs granted to this client - frontend can fetch display names via SearchRoles + RoleIds []string `json:"roleIds,omitempty"` + // The user who approved this external client (always populated) + UserID *string `json:"userId,omitempty"` + // Verified domain from the client_id URL (e.g., "cursor.com"). + // Empty for DCR clients. + VerifiedDomain *string `json:"verifiedDomain,omitempty"` + // The wellKnownClient field. + WellKnownClient *WellKnownClient `json:"wellKnownClient,omitempty"` +} + +func (e ExternalClientInfo) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(e, "", false) +} + +func (e *ExternalClientInfo) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &e, "", false, nil); err != nil { + return err + } + return nil +} + +func (e *ExternalClientInfo) GetClientID() *string { + if e == nil { + return nil + } + return e.ClientID +} + +func (e *ExternalClientInfo) GetClientIDType() *ClientIDType { + if e == nil { + return nil + } + return e.ClientIDType +} + +func (e *ExternalClientInfo) GetClientIDURL() *string { + if e == nil { + return nil + } + return e.ClientIDURL +} + +func (e *ExternalClientInfo) GetClientName() *string { + if e == nil { + return nil + } + return e.ClientName +} + +func (e *ExternalClientInfo) GetCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.CreatedAt +} + +func (e *ExternalClientInfo) GetDisplayName() *string { + if e == nil { + return nil + } + return e.DisplayName +} + +func (e *ExternalClientInfo) GetLastUsedAt() *time.Time { + if e == nil { + return nil + } + return e.LastUsedAt +} + +func (e *ExternalClientInfo) GetMcpClientID() *string { + if e == nil { + return nil + } + return e.McpClientID +} + +func (e *ExternalClientInfo) GetRoleIds() []string { + if e == nil { + return nil + } + return e.RoleIds +} + +func (e *ExternalClientInfo) GetUserID() *string { + if e == nil { + return nil + } + return e.UserID +} + +func (e *ExternalClientInfo) GetVerifiedDomain() *string { + if e == nil { + return nil + } + return e.VerifiedDomain +} + +func (e *ExternalClientInfo) GetWellKnownClient() *WellKnownClient { + if e == nil { + return nil + } + return e.WellKnownClient +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/externalclientsearchservicesearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/externalclientsearchservicesearchrequest.go new file mode 100644 index 00000000..9680dd7d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/externalclientsearchservicesearchrequest.go @@ -0,0 +1,95 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type WellKnownClients string + +const ( + WellKnownClientsWellKnownClientUnspecified WellKnownClients = "WELL_KNOWN_CLIENT_UNSPECIFIED" + WellKnownClientsWellKnownClientUnknown WellKnownClients = "WELL_KNOWN_CLIENT_UNKNOWN" + WellKnownClientsWellKnownClientClaudeAi WellKnownClients = "WELL_KNOWN_CLIENT_CLAUDE_AI" + WellKnownClientsWellKnownClientClaudeDesktop WellKnownClients = "WELL_KNOWN_CLIENT_CLAUDE_DESKTOP" + WellKnownClientsWellKnownClientClaudeCode WellKnownClients = "WELL_KNOWN_CLIENT_CLAUDE_CODE" + WellKnownClientsWellKnownClientMcpInspector WellKnownClients = "WELL_KNOWN_CLIENT_MCP_INSPECTOR" + WellKnownClientsWellKnownClientChatgpt WellKnownClients = "WELL_KNOWN_CLIENT_CHATGPT" + WellKnownClientsWellKnownClientVscode WellKnownClients = "WELL_KNOWN_CLIENT_VSCODE" + WellKnownClientsWellKnownClientCursor WellKnownClients = "WELL_KNOWN_CLIENT_CURSOR" + WellKnownClientsWellKnownClientWindsurf WellKnownClients = "WELL_KNOWN_CLIENT_WINDSURF" + WellKnownClientsWellKnownClientZed WellKnownClients = "WELL_KNOWN_CLIENT_ZED" + WellKnownClientsWellKnownClientJetbrains WellKnownClients = "WELL_KNOWN_CLIENT_JETBRAINS" + WellKnownClientsWellKnownClientDockerMcpToolkit WellKnownClients = "WELL_KNOWN_CLIENT_DOCKER_MCP_TOOLKIT" +) + +func (e WellKnownClients) ToPointer() *WellKnownClients { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *WellKnownClients) IsExact() bool { + if e != nil { + switch *e { + case "WELL_KNOWN_CLIENT_UNSPECIFIED", "WELL_KNOWN_CLIENT_UNKNOWN", "WELL_KNOWN_CLIENT_CLAUDE_AI", "WELL_KNOWN_CLIENT_CLAUDE_DESKTOP", "WELL_KNOWN_CLIENT_CLAUDE_CODE", "WELL_KNOWN_CLIENT_MCP_INSPECTOR", "WELL_KNOWN_CLIENT_CHATGPT", "WELL_KNOWN_CLIENT_VSCODE", "WELL_KNOWN_CLIENT_CURSOR", "WELL_KNOWN_CLIENT_WINDSURF", "WELL_KNOWN_CLIENT_ZED", "WELL_KNOWN_CLIENT_JETBRAINS", "WELL_KNOWN_CLIENT_DOCKER_MCP_TOOLKIT": + return true + } + } + return false +} + +// The ExternalClientSearchServiceSearchRequest message. +type ExternalClientSearchServiceSearchRequest struct { + // Exact-match filter on client_id values (e.g., CIMD URLs). + // Returns only grants whose client_id matches one of these values. + ClientIDUrls []string `json:"clientIdUrls,omitempty"` + // The pageSize field. + PageSize *int `json:"pageSize,omitempty"` + // The pageToken field. + PageToken *string `json:"pageToken,omitempty"` + // Free-text search on client_name and user display name + Query *string `json:"query,omitempty"` + // Filter by specific user IDs + Users []UserRef `json:"users,omitempty"` + // Filter by well-known client type (e.g., CLAUDE_CODE, CURSOR, etc.) + WellKnownClients []WellKnownClients `json:"wellKnownClients,omitempty"` +} + +func (e *ExternalClientSearchServiceSearchRequest) GetClientIDUrls() []string { + if e == nil { + return nil + } + return e.ClientIDUrls +} + +func (e *ExternalClientSearchServiceSearchRequest) GetPageSize() *int { + if e == nil { + return nil + } + return e.PageSize +} + +func (e *ExternalClientSearchServiceSearchRequest) GetPageToken() *string { + if e == nil { + return nil + } + return e.PageToken +} + +func (e *ExternalClientSearchServiceSearchRequest) GetQuery() *string { + if e == nil { + return nil + } + return e.Query +} + +func (e *ExternalClientSearchServiceSearchRequest) GetUsers() []UserRef { + if e == nil { + return nil + } + return e.Users +} + +func (e *ExternalClientSearchServiceSearchRequest) GetWellKnownClients() []WellKnownClients { + if e == nil { + return nil + } + return e.WellKnownClients +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/externalclientsearchservicesearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/externalclientsearchservicesearchresponse.go new file mode 100644 index 00000000..be525beb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/externalclientsearchservicesearchresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ExternalClientSearchServiceSearchResponse message. +type ExternalClientSearchServiceSearchResponse struct { + // Uses ExternalClientInfo with user_id populated for admin views + List []ExternalClientInfo `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (e *ExternalClientSearchServiceSearchResponse) GetList() []ExternalClientInfo { + if e == nil { + return nil + } + return e.List +} + +func (e *ExternalClientSearchServiceSearchResponse) GetNextPageToken() *string { + if e == nil { + return nil + } + return e.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facetrange.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facetrange.go index 0b2a7323..7a91bb23 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facetrange.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facetrange.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // The FacetRange message. type FacetRange struct { // The count of items in the range. @@ -16,6 +20,17 @@ type FacetRange struct { To *int64 `integer:"string" json:"to,omitempty"` } +func (f FacetRange) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(f, "", false) +} + +func (f *FacetRange) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &f, "", false, nil); err != nil { + return err + } + return nil +} + func (f *FacetRange) GetCount() *int64 { if f == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facets.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facets.go index 495c3e85..1382f5e5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facets.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facets.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // Facets - Indicates one value of a facet. type Facets struct { // The count of items in this facet. @@ -10,6 +14,17 @@ type Facets struct { Facets []FacetCategory `json:"facets,omitempty"` } +func (f Facets) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(f, "", false) +} + +func (f *Facets) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &f, "", false, nil); err != nil { + return err + } + return nil +} + func (f *Facets) GetCount() *int64 { if f == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facetvalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facetvalue.go index 4801e858..86cbf9b7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facetvalue.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/facetvalue.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // A FacetValue message contains count and value of the facet entry. type FacetValue struct { // The count of the values in this facet. @@ -14,6 +18,17 @@ type FacetValue struct { Value *string `json:"value,omitempty"` } +func (f FacetValue) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(f, "", false) +} + +func (f *FacetValue) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &f, "", false, nil); err != nil { + return err + } + return nil +} + func (f *FacetValue) GetCount() *int64 { if f == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/field.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/field.go index 3bd1d8da..f0fb7450 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/field.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/field.go @@ -20,7 +20,11 @@ package shared // - stringMap type Field struct { // The CheckboxField message. - CheckboxField *CheckboxField1 `json:"checkbox,omitempty"` + ConnectorCheckboxField *ConnectorCheckboxField `json:"checkbox,omitempty"` + // The SelectField message. + ConnectorSelectField *ConnectorSelectField `json:"select,omitempty"` + // The TextField message. + ConnectorTextField *ConnectorTextField `json:"text,omitempty"` // The ImportField message. ImportField *ImportField `json:"import,omitempty"` // The KeyValueField message. @@ -35,16 +39,12 @@ type Field struct { ReadOnlyField *ReadOnlyField `json:"readOnly,omitempty"` // The RotatableSecretField message. RotatableSecretField *RotatableSecretField `json:"secret,omitempty"` - // The SelectField message. - SelectField *SelectField `json:"select,omitempty"` // The StringField message. StringField *StringField `json:"str,omitempty"` // The StringListField message. StringListField *StringListField `json:"strList,omitempty"` // The StringMapField message. StringMapField *StringMapField `json:"stringMap,omitempty"` - // The TextField message. - TextField *TextField `json:"text,omitempty"` // Optional. Additional placeholder text for the field // In cases where a single placeholder is not enough to describe the field AdditionalPlaceholder *string `json:"additionalPlaceholder,omitempty"` @@ -62,11 +62,25 @@ type Field struct { PostCreate *bool `json:"postCreate,omitempty"` } -func (f *Field) GetCheckboxField() *CheckboxField1 { +func (f *Field) GetConnectorCheckboxField() *ConnectorCheckboxField { + if f == nil { + return nil + } + return f.ConnectorCheckboxField +} + +func (f *Field) GetConnectorSelectField() *ConnectorSelectField { + if f == nil { + return nil + } + return f.ConnectorSelectField +} + +func (f *Field) GetConnectorTextField() *ConnectorTextField { if f == nil { return nil } - return f.CheckboxField + return f.ConnectorTextField } func (f *Field) GetImportField() *ImportField { @@ -118,13 +132,6 @@ func (f *Field) GetRotatableSecretField() *RotatableSecretField { return f.RotatableSecretField } -func (f *Field) GetSelectField() *SelectField { - if f == nil { - return nil - } - return f.SelectField -} - func (f *Field) GetStringField() *StringField { if f == nil { return nil @@ -146,13 +153,6 @@ func (f *Field) GetStringMapField() *StringMapField { return f.StringMapField } -func (f *Field) GetTextField() *TextField { - if f == nil { - return nil - } - return f.TextField -} - func (f *Field) GetAdditionalPlaceholder() *string { if f == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldgroup.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldgroup.go index 91cb6aa4..0533d81c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldgroup.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldgroup.go @@ -6,13 +6,13 @@ package shared type FieldGroup struct { // The default field. Default *bool `json:"default,omitempty"` - // The displayName field. + // Nice name this group (e.g. renders as a Tab label) DisplayName *string `json:"displayName,omitempty"` - // The fields field. - Fields []string `json:"fields,omitempty"` - // The helpText field. + // Field names are "guaranteed" to be unique, but can be repeated in and between lists. + FieldNames []string `json:"fieldNames,omitempty"` + // Optional. User-facing help text. HelpText *string `json:"helpText,omitempty"` - // The name field. + // Unique ID. Name *string `json:"name,omitempty"` } @@ -30,11 +30,11 @@ func (f *FieldGroup) GetDisplayName() *string { return f.DisplayName } -func (f *FieldGroup) GetFields() []string { +func (f *FieldGroup) GetFieldNames() []string { if f == nil { return nil } - return f.Fields + return f.FieldNames } func (f *FieldGroup) GetHelpText() *string { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldrelationship.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldrelationship.go index dd553fee..a03e4109 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldrelationship.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldrelationship.go @@ -10,9 +10,13 @@ package shared // - requiredTogether // - atLeastOne // - mutuallyExclusive +// - dependentOn type FieldRelationship struct { // The AtLeastOne message. AtLeastOne *AtLeastOne `json:"atLeastOne,omitempty"` + // DependentOn means the fields in field_names are only valid if all fields + // in dependency_field_names are also present + DependentOn *DependentOn `json:"dependentOn,omitempty"` // The MutuallyExclusive message. MutuallyExclusive *MutuallyExclusive `json:"mutuallyExclusive,omitempty"` // The RequiredTogether message. @@ -28,6 +32,13 @@ func (f *FieldRelationship) GetAtLeastOne() *AtLeastOne { return f.AtLeastOne } +func (f *FieldRelationship) GetDependentOn() *DependentOn { + if f == nil { + return nil + } + return f.DependentOn +} + func (f *FieldRelationship) GetMutuallyExclusive() *MutuallyExclusive { if f == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/filefield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/filefield.go index d91f6820..8880df96 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/filefield.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/filefield.go @@ -2,24 +2,34 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // The FileField message. // // This message contains a oneof named view. Only a single field of the following list may be set at a time: // - fileInputField -// -// This message contains a oneof named _max_file_size. Only a single field of the following list may be set at a time: -// - maxFileSize type FileField struct { // The FileInputField message. FileInputField *FileInputField `json:"fileInputField,omitempty"` // The acceptedFileTypes field. AcceptedFileTypes []string `json:"acceptedFileTypes,omitempty"` // The maxFileSize field. - // This field is part of the `_max_file_size` oneof. - // See the documentation for `c1.api.form.v1.FileField` for more details. MaxFileSize *int64 `integer:"string" json:"maxFileSize,omitempty"` } +func (f FileField) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(f, "", false) +} + +func (f *FileField) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &f, "", false, nil); err != nil { + return err + } + return nil +} + func (f *FileField) GetFileInputField() *FileInputField { if f == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/finding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/finding.go new file mode 100644 index 00000000..8b64137e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/finding.go @@ -0,0 +1,367 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// FindingSeverity - The severity field. +type FindingSeverity string + +const ( + FindingSeverityFindingSeverityUnspecified FindingSeverity = "FINDING_SEVERITY_UNSPECIFIED" + FindingSeverityFindingSeverityInfo FindingSeverity = "FINDING_SEVERITY_INFO" + FindingSeverityFindingSeverityLow FindingSeverity = "FINDING_SEVERITY_LOW" + FindingSeverityFindingSeverityMedium FindingSeverity = "FINDING_SEVERITY_MEDIUM" + FindingSeverityFindingSeverityHigh FindingSeverity = "FINDING_SEVERITY_HIGH" + FindingSeverityFindingSeverityCritical FindingSeverity = "FINDING_SEVERITY_CRITICAL" +) + +func (e FindingSeverity) ToPointer() *FindingSeverity { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *FindingSeverity) IsExact() bool { + if e != nil { + switch *e { + case "FINDING_SEVERITY_UNSPECIFIED", "FINDING_SEVERITY_INFO", "FINDING_SEVERITY_LOW", "FINDING_SEVERITY_MEDIUM", "FINDING_SEVERITY_HIGH", "FINDING_SEVERITY_CRITICAL": + return true + } + } + return false +} + +// FindingState - The state field. +type FindingState string + +const ( + FindingStateFindingStateUnspecified FindingState = "FINDING_STATE_UNSPECIFIED" + FindingStateFindingStateOpen FindingState = "FINDING_STATE_OPEN" + FindingStateFindingStateInProgress FindingState = "FINDING_STATE_IN_PROGRESS" + FindingStateFindingStateResolved FindingState = "FINDING_STATE_RESOLVED" + FindingStateFindingStateSnoozed FindingState = "FINDING_STATE_SNOOZED" + FindingStateFindingStateRiskAccepted FindingState = "FINDING_STATE_RISK_ACCEPTED" + FindingStateFindingStateSuppressed FindingState = "FINDING_STATE_SUPPRESSED" +) + +func (e FindingState) ToPointer() *FindingState { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *FindingState) IsExact() bool { + if e != nil { + switch *e { + case "FINDING_STATE_UNSPECIFIED", "FINDING_STATE_OPEN", "FINDING_STATE_IN_PROGRESS", "FINDING_STATE_RESOLVED", "FINDING_STATE_SNOOZED", "FINDING_STATE_RISK_ACCEPTED", "FINDING_STATE_SUPPRESSED": + return true + } + } + return false +} + +// The Finding message. +// +// This message contains a oneof named finding_type. Only a single field of the following list may be set at a time: +// - similarUsernameMatch +// - serviceAccountMisclassification +// +// This message contains a oneof named target. Only a single field of the following list may be set at a time: +// - identityUserTarget +// - appUserTarget +// +// This message contains a oneof named evidence. Only a single field of the following list may be set at a time: +// - similarUsernameMatchEvidence +// - serviceAccountMisclassificationEvidence +type Finding struct { + // The AppUserTarget message. + AppUserTarget *AppUserTarget `json:"appUserTarget,omitempty"` + // The FindingOwnerRef message. + // + // This message contains a oneof named owner. Only a single field of the following list may be set at a time: + // - identityUserId + // - appOwnerAppId + // - managerOfUserId + // - userSetId + // + FindingOwnerRef *FindingOwnerRef `json:"assignedOwner,omitempty"` + // The FindingOwnerRef message. + // + // This message contains a oneof named owner. Only a single field of the following list may be set at a time: + // - identityUserId + // - appOwnerAppId + // - managerOfUserId + // - userSetId + // + FindingOwnerRef1 *FindingOwnerRef `json:"computedOwner,omitempty"` + // The FindingRiskScore message. + FindingRiskScore *FindingRiskScore `json:"riskScore,omitempty"` + // The IdentityUserTarget message. + IdentityUserTarget *IdentityUserTarget `json:"identityUserTarget,omitempty"` + // The ServiceAccountMisclassificationEvidence message. + ServiceAccountMisclassificationEvidence *ServiceAccountMisclassificationEvidence `json:"serviceAccountMisclassificationEvidence,omitempty"` + // The ServiceAccountMisclassificationType message. + ServiceAccountMisclassificationType *ServiceAccountMisclassificationType `json:"serviceAccountMisclassification,omitempty"` + // The SimilarUsernameMatchEvidence message. + SimilarUsernameMatchEvidence *SimilarUsernameMatchEvidence `json:"similarUsernameMatchEvidence,omitempty"` + // The SimilarUsernameMatchType message. + SimilarUsernameMatchType *SimilarUsernameMatchType `json:"similarUsernameMatch,omitempty"` + // The appId field. + AppID *string `json:"appId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The customTags field. + CustomTags map[string]string `json:"customTags,omitempty"` + // The fingerprint field. + Fingerprint *string `json:"fingerprint,omitempty"` + FirstObservedAt *time.Time `json:"firstObservedAt,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + LastObservedAt *time.Time `json:"lastObservedAt,omitempty"` + // The recurrenceCount field. + RecurrenceCount *int64 `json:"recurrenceCount,omitempty"` + // The remediationDescription field. + RemediationDescription *string `json:"remediationDescription,omitempty"` + ResolvedAt *time.Time `json:"resolvedAt,omitempty"` + RiskAcceptanceExpiresAt *time.Time `json:"riskAcceptanceExpiresAt,omitempty"` + // The riskAcceptanceJustification field. + RiskAcceptanceJustification *string `json:"riskAcceptanceJustification,omitempty"` + // The severity field. + Severity *FindingSeverity `json:"severity,omitempty"` + // The snoozeReason field. + SnoozeReason *string `json:"snoozeReason,omitempty"` + SnoozeUntil *time.Time `json:"snoozeUntil,omitempty"` + // The sourceDetectorId field. + SourceDetectorID *string `json:"sourceDetectorId,omitempty"` + // The state field. + State *FindingState `json:"state,omitempty"` + // The stateUpdatedById field. + StateUpdatedByID *string `json:"stateUpdatedById,omitempty"` + // The suppressReason field. + SuppressReason *string `json:"suppressReason,omitempty"` + // The taskId field. + TaskID *string `json:"taskId,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (f Finding) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(f, "", false) +} + +func (f *Finding) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &f, "", false, nil); err != nil { + return err + } + return nil +} + +func (f *Finding) GetAppUserTarget() *AppUserTarget { + if f == nil { + return nil + } + return f.AppUserTarget +} + +func (f *Finding) GetFindingOwnerRef() *FindingOwnerRef { + if f == nil { + return nil + } + return f.FindingOwnerRef +} + +func (f *Finding) GetFindingOwnerRef1() *FindingOwnerRef { + if f == nil { + return nil + } + return f.FindingOwnerRef1 +} + +func (f *Finding) GetFindingRiskScore() *FindingRiskScore { + if f == nil { + return nil + } + return f.FindingRiskScore +} + +func (f *Finding) GetIdentityUserTarget() *IdentityUserTarget { + if f == nil { + return nil + } + return f.IdentityUserTarget +} + +func (f *Finding) GetServiceAccountMisclassificationEvidence() *ServiceAccountMisclassificationEvidence { + if f == nil { + return nil + } + return f.ServiceAccountMisclassificationEvidence +} + +func (f *Finding) GetServiceAccountMisclassificationType() *ServiceAccountMisclassificationType { + if f == nil { + return nil + } + return f.ServiceAccountMisclassificationType +} + +func (f *Finding) GetSimilarUsernameMatchEvidence() *SimilarUsernameMatchEvidence { + if f == nil { + return nil + } + return f.SimilarUsernameMatchEvidence +} + +func (f *Finding) GetSimilarUsernameMatchType() *SimilarUsernameMatchType { + if f == nil { + return nil + } + return f.SimilarUsernameMatchType +} + +func (f *Finding) GetAppID() *string { + if f == nil { + return nil + } + return f.AppID +} + +func (f *Finding) GetCreatedAt() *time.Time { + if f == nil { + return nil + } + return f.CreatedAt +} + +func (f *Finding) GetCustomTags() map[string]string { + if f == nil { + return nil + } + return f.CustomTags +} + +func (f *Finding) GetFingerprint() *string { + if f == nil { + return nil + } + return f.Fingerprint +} + +func (f *Finding) GetFirstObservedAt() *time.Time { + if f == nil { + return nil + } + return f.FirstObservedAt +} + +func (f *Finding) GetID() *string { + if f == nil { + return nil + } + return f.ID +} + +func (f *Finding) GetLastObservedAt() *time.Time { + if f == nil { + return nil + } + return f.LastObservedAt +} + +func (f *Finding) GetRecurrenceCount() *int64 { + if f == nil { + return nil + } + return f.RecurrenceCount +} + +func (f *Finding) GetRemediationDescription() *string { + if f == nil { + return nil + } + return f.RemediationDescription +} + +func (f *Finding) GetResolvedAt() *time.Time { + if f == nil { + return nil + } + return f.ResolvedAt +} + +func (f *Finding) GetRiskAcceptanceExpiresAt() *time.Time { + if f == nil { + return nil + } + return f.RiskAcceptanceExpiresAt +} + +func (f *Finding) GetRiskAcceptanceJustification() *string { + if f == nil { + return nil + } + return f.RiskAcceptanceJustification +} + +func (f *Finding) GetSeverity() *FindingSeverity { + if f == nil { + return nil + } + return f.Severity +} + +func (f *Finding) GetSnoozeReason() *string { + if f == nil { + return nil + } + return f.SnoozeReason +} + +func (f *Finding) GetSnoozeUntil() *time.Time { + if f == nil { + return nil + } + return f.SnoozeUntil +} + +func (f *Finding) GetSourceDetectorID() *string { + if f == nil { + return nil + } + return f.SourceDetectorID +} + +func (f *Finding) GetState() *FindingState { + if f == nil { + return nil + } + return f.State +} + +func (f *Finding) GetStateUpdatedByID() *string { + if f == nil { + return nil + } + return f.StateUpdatedByID +} + +func (f *Finding) GetSuppressReason() *string { + if f == nil { + return nil + } + return f.SuppressReason +} + +func (f *Finding) GetTaskID() *string { + if f == nil { + return nil + } + return f.TaskID +} + +func (f *Finding) GetUpdatedAt() *time.Time { + if f == nil { + return nil + } + return f.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingownerref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingownerref.go new file mode 100644 index 00000000..bcd95bbb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingownerref.go @@ -0,0 +1,57 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The FindingOwnerRef message. +// +// This message contains a oneof named owner. Only a single field of the following list may be set at a time: +// - identityUserId +// - appOwnerAppId +// - managerOfUserId +// - userSetId +type FindingOwnerRef struct { + // The appOwnerAppId field. + // This field is part of the `owner` oneof. + // See the documentation for `c1.api.finding.v1.FindingOwnerRef` for more details. + AppOwnerAppID *string `json:"appOwnerAppId,omitempty"` + // The identityUserId field. + // This field is part of the `owner` oneof. + // See the documentation for `c1.api.finding.v1.FindingOwnerRef` for more details. + IdentityUserID *string `json:"identityUserId,omitempty"` + // The managerOfUserId field. + // This field is part of the `owner` oneof. + // See the documentation for `c1.api.finding.v1.FindingOwnerRef` for more details. + ManagerOfUserID *string `json:"managerOfUserId,omitempty"` + // The userSetId field. + // This field is part of the `owner` oneof. + // See the documentation for `c1.api.finding.v1.FindingOwnerRef` for more details. + UserSetID *string `json:"userSetId,omitempty"` +} + +func (f *FindingOwnerRef) GetAppOwnerAppID() *string { + if f == nil { + return nil + } + return f.AppOwnerAppID +} + +func (f *FindingOwnerRef) GetIdentityUserID() *string { + if f == nil { + return nil + } + return f.IdentityUserID +} + +func (f *FindingOwnerRef) GetManagerOfUserID() *string { + if f == nil { + return nil + } + return f.ManagerOfUserID +} + +func (f *FindingOwnerRef) GetUserSetID() *string { + if f == nil { + return nil + } + return f.UserSetID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingref.go new file mode 100644 index 00000000..9f6f9017 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingref.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The FindingRef message. +type FindingRef struct { + // The ID of the finding. + ID *string `json:"id,omitempty"` +} + +func (f *FindingRef) GetID() *string { + if f == nil { + return nil + } + return f.ID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingriskfactor.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingriskfactor.go new file mode 100644 index 00000000..6def23f2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingriskfactor.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FindingRiskFactorSeverity - The severity field. +type FindingRiskFactorSeverity string + +const ( + FindingRiskFactorSeverityFindingSeverityUnspecified FindingRiskFactorSeverity = "FINDING_SEVERITY_UNSPECIFIED" + FindingRiskFactorSeverityFindingSeverityInfo FindingRiskFactorSeverity = "FINDING_SEVERITY_INFO" + FindingRiskFactorSeverityFindingSeverityLow FindingRiskFactorSeverity = "FINDING_SEVERITY_LOW" + FindingRiskFactorSeverityFindingSeverityMedium FindingRiskFactorSeverity = "FINDING_SEVERITY_MEDIUM" + FindingRiskFactorSeverityFindingSeverityHigh FindingRiskFactorSeverity = "FINDING_SEVERITY_HIGH" + FindingRiskFactorSeverityFindingSeverityCritical FindingRiskFactorSeverity = "FINDING_SEVERITY_CRITICAL" +) + +func (e FindingRiskFactorSeverity) ToPointer() *FindingRiskFactorSeverity { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *FindingRiskFactorSeverity) IsExact() bool { + if e != nil { + switch *e { + case "FINDING_SEVERITY_UNSPECIFIED", "FINDING_SEVERITY_INFO", "FINDING_SEVERITY_LOW", "FINDING_SEVERITY_MEDIUM", "FINDING_SEVERITY_HIGH", "FINDING_SEVERITY_CRITICAL": + return true + } + } + return false +} + +// The FindingRiskFactor message. +type FindingRiskFactor struct { + // The description field. + Description *string `json:"description,omitempty"` + // The name field. + Name *string `json:"name,omitempty"` + // The severity field. + Severity *FindingRiskFactorSeverity `json:"severity,omitempty"` + // The weight field. + Weight *int64 `json:"weight,omitempty"` +} + +func (f *FindingRiskFactor) GetDescription() *string { + if f == nil { + return nil + } + return f.Description +} + +func (f *FindingRiskFactor) GetName() *string { + if f == nil { + return nil + } + return f.Name +} + +func (f *FindingRiskFactor) GetSeverity() *FindingRiskFactorSeverity { + if f == nil { + return nil + } + return f.Severity +} + +func (f *FindingRiskFactor) GetWeight() *int64 { + if f == nil { + return nil + } + return f.Weight +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingriskscore.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingriskscore.go new file mode 100644 index 00000000..a71acd24 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingriskscore.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The FindingRiskScore message. +type FindingRiskScore struct { + // The originalScore field. + OriginalScore *int64 `json:"originalScore,omitempty"` + // The overrideByUserId field. + OverrideByUserID *string `json:"overrideByUserId,omitempty"` + // The overrideScore field. + OverrideScore *int64 `json:"overrideScore,omitempty"` + // The riskFactors field. + RiskFactors []FindingRiskFactor `json:"riskFactors,omitempty"` + // The score field. + Score *int64 `json:"score,omitempty"` + // The systemScore field. + SystemScore *int64 `json:"systemScore,omitempty"` +} + +func (f *FindingRiskScore) GetOriginalScore() *int64 { + if f == nil { + return nil + } + return f.OriginalScore +} + +func (f *FindingRiskScore) GetOverrideByUserID() *string { + if f == nil { + return nil + } + return f.OverrideByUserID +} + +func (f *FindingRiskScore) GetOverrideScore() *int64 { + if f == nil { + return nil + } + return f.OverrideScore +} + +func (f *FindingRiskScore) GetRiskFactors() []FindingRiskFactor { + if f == nil { + return nil + } + return f.RiskFactors +} + +func (f *FindingRiskScore) GetScore() *int64 { + if f == nil { + return nil + } + return f.Score +} + +func (f *FindingRiskScore) GetSystemScore() *int64 { + if f == nil { + return nil + } + return f.SystemScore +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingroutingrule.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingroutingrule.go new file mode 100644 index 00000000..d3aa28ae --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingroutingrule.go @@ -0,0 +1,126 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// The FindingRoutingRule message. +type FindingRoutingRule struct { + // The FindingRoutingRuleAction message. + // + // This message contains a oneof named action. Only a single field of the following list may be set at a time: + // - createTask + // - suppress + // - notify + // + FindingRoutingRuleAction *FindingRoutingRuleAction `json:"action,omitempty"` + // The appId field. + AppID *string `json:"appId,omitempty"` + // The condition field. + Condition *string `json:"condition,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The description field. + Description *string `json:"description,omitempty"` + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + // The priority field. + Priority *int `json:"priority,omitempty"` + // The templateId field. + TemplateID *string `json:"templateId,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (f FindingRoutingRule) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(f, "", false) +} + +func (f *FindingRoutingRule) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &f, "", false, nil); err != nil { + return err + } + return nil +} + +func (f *FindingRoutingRule) GetFindingRoutingRuleAction() *FindingRoutingRuleAction { + if f == nil { + return nil + } + return f.FindingRoutingRuleAction +} + +func (f *FindingRoutingRule) GetAppID() *string { + if f == nil { + return nil + } + return f.AppID +} + +func (f *FindingRoutingRule) GetCondition() *string { + if f == nil { + return nil + } + return f.Condition +} + +func (f *FindingRoutingRule) GetCreatedAt() *time.Time { + if f == nil { + return nil + } + return f.CreatedAt +} + +func (f *FindingRoutingRule) GetDescription() *string { + if f == nil { + return nil + } + return f.Description +} + +func (f *FindingRoutingRule) GetDisplayName() *string { + if f == nil { + return nil + } + return f.DisplayName +} + +func (f *FindingRoutingRule) GetEnabled() *bool { + if f == nil { + return nil + } + return f.Enabled +} + +func (f *FindingRoutingRule) GetID() *string { + if f == nil { + return nil + } + return f.ID +} + +func (f *FindingRoutingRule) GetPriority() *int { + if f == nil { + return nil + } + return f.Priority +} + +func (f *FindingRoutingRule) GetTemplateID() *string { + if f == nil { + return nil + } + return f.TemplateID +} + +func (f *FindingRoutingRule) GetUpdatedAt() *time.Time { + if f == nil { + return nil + } + return f.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingroutingruleaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingroutingruleaction.go new file mode 100644 index 00000000..d2654ed3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingroutingruleaction.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The FindingRoutingRuleAction message. +// +// This message contains a oneof named action. Only a single field of the following list may be set at a time: +// - createTask +// - suppress +// - notify +type FindingRoutingRuleAction struct { + // The CreateTaskAction message. + CreateTaskAction *CreateTaskAction `json:"createTask,omitempty"` + // The NotifyAction message. + NotifyAction *NotifyAction `json:"notify,omitempty"` + // The SuppressRoutingAction message. + SuppressRoutingAction *SuppressRoutingAction `json:"suppress,omitempty"` +} + +func (f *FindingRoutingRuleAction) GetCreateTaskAction() *CreateTaskAction { + if f == nil { + return nil + } + return f.CreateTaskAction +} + +func (f *FindingRoutingRuleAction) GetNotifyAction() *NotifyAction { + if f == nil { + return nil + } + return f.NotifyAction +} + +func (f *FindingRoutingRuleAction) GetSuppressRoutingAction() *SuppressRoutingAction { + if f == nil { + return nil + } + return f.SuppressRoutingAction +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingsearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingsearchrequest.go new file mode 100644 index 00000000..38021dc5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingsearchrequest.go @@ -0,0 +1,133 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type Severities string + +const ( + SeveritiesFindingSeverityUnspecified Severities = "FINDING_SEVERITY_UNSPECIFIED" + SeveritiesFindingSeverityInfo Severities = "FINDING_SEVERITY_INFO" + SeveritiesFindingSeverityLow Severities = "FINDING_SEVERITY_LOW" + SeveritiesFindingSeverityMedium Severities = "FINDING_SEVERITY_MEDIUM" + SeveritiesFindingSeverityHigh Severities = "FINDING_SEVERITY_HIGH" + SeveritiesFindingSeverityCritical Severities = "FINDING_SEVERITY_CRITICAL" +) + +func (e Severities) ToPointer() *Severities { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Severities) IsExact() bool { + if e != nil { + switch *e { + case "FINDING_SEVERITY_UNSPECIFIED", "FINDING_SEVERITY_INFO", "FINDING_SEVERITY_LOW", "FINDING_SEVERITY_MEDIUM", "FINDING_SEVERITY_HIGH", "FINDING_SEVERITY_CRITICAL": + return true + } + } + return false +} + +type States string + +const ( + StatesFindingStateUnspecified States = "FINDING_STATE_UNSPECIFIED" + StatesFindingStateOpen States = "FINDING_STATE_OPEN" + StatesFindingStateInProgress States = "FINDING_STATE_IN_PROGRESS" + StatesFindingStateResolved States = "FINDING_STATE_RESOLVED" + StatesFindingStateSnoozed States = "FINDING_STATE_SNOOZED" + StatesFindingStateRiskAccepted States = "FINDING_STATE_RISK_ACCEPTED" + StatesFindingStateSuppressed States = "FINDING_STATE_SUPPRESSED" +) + +func (e States) ToPointer() *States { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *States) IsExact() bool { + if e != nil { + switch *e { + case "FINDING_STATE_UNSPECIFIED", "FINDING_STATE_OPEN", "FINDING_STATE_IN_PROGRESS", "FINDING_STATE_RESOLVED", "FINDING_STATE_SNOOZED", "FINDING_STATE_RISK_ACCEPTED", "FINDING_STATE_SUPPRESSED": + return true + } + } + return false +} + +// The FindingSearchRequest message. +type FindingSearchRequest struct { + // Filter by app IDs (OR within field). + AppIds []string `json:"appIds,omitempty"` + // Filter by app user IDs (OR within field). Matches findings whose + // target.app_user_target.app_user_id is in this list. + AppUserIds []string `json:"appUserIds,omitempty"` + // Filter by finding type discriminators (OR within field). + FindingTypes []string `json:"findingTypes,omitempty"` + // Maximum number of findings to return per page. + PageSize *int `json:"pageSize,omitempty"` + // Pagination token from a previous response. + PageToken *string `json:"pageToken,omitempty"` + // Free text search query. + Query *string `json:"query,omitempty"` + // Filter by severities (OR within field). + Severities []Severities `json:"severities,omitempty"` + // Filter by states (OR within field). + States []States `json:"states,omitempty"` +} + +func (f *FindingSearchRequest) GetAppIds() []string { + if f == nil { + return nil + } + return f.AppIds +} + +func (f *FindingSearchRequest) GetAppUserIds() []string { + if f == nil { + return nil + } + return f.AppUserIds +} + +func (f *FindingSearchRequest) GetFindingTypes() []string { + if f == nil { + return nil + } + return f.FindingTypes +} + +func (f *FindingSearchRequest) GetPageSize() *int { + if f == nil { + return nil + } + return f.PageSize +} + +func (f *FindingSearchRequest) GetPageToken() *string { + if f == nil { + return nil + } + return f.PageToken +} + +func (f *FindingSearchRequest) GetQuery() *string { + if f == nil { + return nil + } + return f.Query +} + +func (f *FindingSearchRequest) GetSeverities() []Severities { + if f == nil { + return nil + } + return f.Severities +} + +func (f *FindingSearchRequest) GetStates() []States { + if f == nil { + return nil + } + return f.States +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingsearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingsearchresponse.go new file mode 100644 index 00000000..ad4017f0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/findingsearchresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The FindingSearchResponse message. +type FindingSearchResponse struct { + // The list field. + List []Finding `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (f *FindingSearchResponse) GetList() []Finding { + if f == nil { + return nil + } + return f.List +} + +func (f *FindingSearchResponse) GetNextPageToken() *string { + if f == nil { + return nil + } + return f.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fixed32rules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fixed32rules.go index 93082c65..8582ccfa 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fixed32rules.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fixed32rules.go @@ -86,3 +86,6 @@ func (f *Fixed32Rules) GetNotIn() []int64 { } return f.NotIn } + +// #region class-body-fixed32rules +// #endregion class-body-fixed32rules diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fixed64rules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fixed64rules.go index 8793bff1..61bda0c6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fixed64rules.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fixed64rules.go @@ -86,3 +86,6 @@ func (f *Fixed64Rules) GetNotIn() []string { } return f.NotIn } + +// #region class-body-fixed64rules +// #endregion class-body-fixed64rules diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcerunbundleautomationrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcerunbundleautomationrequest.go index ba448f20..f2ce6e8f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcerunbundleautomationrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcerunbundleautomationrequest.go @@ -2,9 +2,9 @@ package shared -// The ForceRunBundleAutomationRequest message. +// ForceRunBundleAutomationRequest - The request message for triggering an immediate bundle automation run. type ForceRunBundleAutomationRequest struct { - // The refs field. + // Optional entitlement references to scope the run to specific entitlements. Refs []AppEntitlementRef `json:"refs,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcerunbundleautomationresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcerunbundleautomationresponse.go index 261a622d..27f44003 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcerunbundleautomationresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcerunbundleautomationresponse.go @@ -2,6 +2,6 @@ package shared -// The ForceRunBundleAutomationResponse message. +// ForceRunBundleAutomationResponse - The response message for triggering a bundle automation run. type ForceRunBundleAutomationResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcesyncresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcesyncresponse.go index 5de38c91..9af1cc2c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcesyncresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forcesyncresponse.go @@ -2,6 +2,6 @@ package shared -// The ForceSyncResponse message. +// ForceSyncResponse - Empty response body. Status code indicates success. type ForceSyncResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/form.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/form.go index 0d9424d8..2582fc31 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/form.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/form.go @@ -5,12 +5,12 @@ package shared // The Form message. type Form struct { // A form is a collection of fields to be filled out by a user - Form *FormInput `json:"form,omitempty"` + RequestSchemaForm *RequestSchemaForm `json:"form,omitempty"` } -func (f *Form) GetForm() *FormInput { +func (f *Form) GetRequestSchemaForm() *RequestSchemaForm { if f == nil { return nil } - return f.Form + return f.RequestSchemaForm } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formfield.go similarity index 64% rename from vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldinput.go rename to vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formfield.go index 8f87717e..8bb516f5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/fieldinput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formfield.go @@ -2,7 +2,7 @@ package shared -// FieldInput - A field is a single input meant to collect a piece of data from a user +// FormField - A field is a single input meant to collect a piece of data from a user // // This message contains a oneof named type. Only a single field of the following list may be set at a time: // - stringField @@ -11,12 +11,13 @@ package shared // - int64Field // - fileField // - oauth2Field +// - stringMapField // // This message contains a oneof named provider_config. Only a single field of the following list may be set at a time: // - userConfig // - adminConfig // - sharedConfig -type FieldInput struct { +type FormField struct { // The AdminProviderConfig message. AdminProviderConfig *AdminProviderConfig `json:"adminConfig,omitempty"` // The BoolField message. @@ -25,34 +26,29 @@ type FieldInput struct { // - checkboxField // - toggleField // - // - // This message contains a oneof named _rules. Only a single field of the following list may be set at a time: - // - rules - // BoolField *BoolField `json:"boolField,omitempty"` // The FileField message. // // This message contains a oneof named view. Only a single field of the following list may be set at a time: // - fileInputField // + FileField *FileField `json:"fileField,omitempty"` + // The StringField message. // - // This message contains a oneof named _max_file_size. Only a single field of the following list may be set at a time: - // - maxFileSize + // This message contains a oneof named view. Only a single field of the following list may be set at a time: + // - textField + // - passwordField + // - selectField + // - pickerField // - FileField *FileField `json:"fileField,omitempty"` + FormStringField *FormStringField `json:"stringField,omitempty"` + // The StringMapField message. + FormStringMapField *FormStringMapField `json:"stringMapField,omitempty"` // The Int64Field message. // // This message contains a oneof named view. Only a single field of the following list may be set at a time: // - numberField // - // - // This message contains a oneof named _default_value. Only a single field of the following list may be set at a time: - // - defaultValue - // - // - // This message contains a oneof named _rules. Only a single field of the following list may be set at a time: - // - rules - // Int64Field *Int64Field `json:"int64Field,omitempty"` // The Oauth2Field message. // @@ -62,29 +58,12 @@ type FieldInput struct { Oauth2Field *Oauth2Field1 `json:"oauth2Field,omitempty"` // The SharedProviderConfig message. SharedProviderConfig *SharedProviderConfig `json:"sharedConfig,omitempty"` - // The StringField message. - // - // This message contains a oneof named view. Only a single field of the following list may be set at a time: - // - textField - // - passwordField - // - selectField - // - pickerField - // - // - // This message contains a oneof named _rules. Only a single field of the following list may be set at a time: - // - rules - // - StringField *StringField `json:"stringField,omitempty"` // The StringSliceField message. // // This message contains a oneof named view. Only a single field of the following list may be set at a time: // - chipsField // - pickerField // - // - // This message contains a oneof named _rules. Only a single field of the following list may be set at a time: - // - rules - // StringSliceField *StringSliceField `json:"stringSliceField,omitempty"` // The UserProviderConfig message. UserProviderConfig *UserProviderConfig `json:"userConfig,omitempty"` @@ -94,88 +73,104 @@ type FieldInput struct { DisplayName *string `json:"displayName,omitempty"` // The name field. Name *string `json:"name,omitempty"` + // The required field. + Required *bool `json:"required,omitempty"` } -func (f *FieldInput) GetAdminProviderConfig() *AdminProviderConfig { +func (f *FormField) GetAdminProviderConfig() *AdminProviderConfig { if f == nil { return nil } return f.AdminProviderConfig } -func (f *FieldInput) GetBoolField() *BoolField { +func (f *FormField) GetBoolField() *BoolField { if f == nil { return nil } return f.BoolField } -func (f *FieldInput) GetFileField() *FileField { +func (f *FormField) GetFileField() *FileField { if f == nil { return nil } return f.FileField } -func (f *FieldInput) GetInt64Field() *Int64Field { +func (f *FormField) GetFormStringField() *FormStringField { if f == nil { return nil } - return f.Int64Field + return f.FormStringField } -func (f *FieldInput) GetOauth2Field() *Oauth2Field1 { +func (f *FormField) GetFormStringMapField() *FormStringMapField { if f == nil { return nil } - return f.Oauth2Field + return f.FormStringMapField } -func (f *FieldInput) GetSharedProviderConfig() *SharedProviderConfig { +func (f *FormField) GetInt64Field() *Int64Field { if f == nil { return nil } - return f.SharedProviderConfig + return f.Int64Field } -func (f *FieldInput) GetStringField() *StringField { +func (f *FormField) GetOauth2Field() *Oauth2Field1 { if f == nil { return nil } - return f.StringField + return f.Oauth2Field } -func (f *FieldInput) GetStringSliceField() *StringSliceField { +func (f *FormField) GetSharedProviderConfig() *SharedProviderConfig { + if f == nil { + return nil + } + return f.SharedProviderConfig +} + +func (f *FormField) GetStringSliceField() *StringSliceField { if f == nil { return nil } return f.StringSliceField } -func (f *FieldInput) GetUserProviderConfig() *UserProviderConfig { +func (f *FormField) GetUserProviderConfig() *UserProviderConfig { if f == nil { return nil } return f.UserProviderConfig } -func (f *FieldInput) GetDescription() *string { +func (f *FormField) GetDescription() *string { if f == nil { return nil } return f.Description } -func (f *FieldInput) GetDisplayName() *string { +func (f *FormField) GetDisplayName() *string { if f == nil { return nil } return f.DisplayName } -func (f *FieldInput) GetName() *string { +func (f *FormField) GetName() *string { if f == nil { return nil } return f.Name } + +func (f *FormField) GetRequired() *bool { + if f == nil { + return nil + } + return f.Required +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formfieldgroup.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formfieldgroup.go new file mode 100644 index 00000000..0a41827c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formfieldgroup.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FormFieldGroup - The FieldGroup message. +type FormFieldGroup struct { + // The default field. + Default *bool `json:"default,omitempty"` + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + // The fields field. + Fields []string `json:"fields,omitempty"` + // The helpText field. + HelpText *string `json:"helpText,omitempty"` + // The name field. + Name *string `json:"name,omitempty"` +} + +func (f *FormFieldGroup) GetDefault() *bool { + if f == nil { + return nil + } + return f.Default +} + +func (f *FormFieldGroup) GetDisplayName() *string { + if f == nil { + return nil + } + return f.DisplayName +} + +func (f *FormFieldGroup) GetFields() []string { + if f == nil { + return nil + } + return f.Fields +} + +func (f *FormFieldGroup) GetHelpText() *string { + if f == nil { + return nil + } + return f.HelpText +} + +func (f *FormFieldGroup) GetName() *string { + if f == nil { + return nil + } + return f.Name +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminput.go index 012ea7e7..cc73cdf6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminput.go @@ -2,60 +2,15 @@ package shared -// FormInput - A form is a collection of fields to be filled out by a user +// FormInput - The Form message. type FormInput struct { - // The description field. - Description *string `json:"description,omitempty"` - // The displayName field. - DisplayName *string `json:"displayName,omitempty"` - // The fieldGroups field. - FieldGroups []FieldGroup `json:"fieldGroups,omitempty"` - // The fieldRelationships field. - FieldRelationships []FieldRelationship `json:"fieldRelationships,omitempty"` - // The fields field. - Fields []FieldInput `json:"fields,omitempty"` - // The id field. - ID *string `json:"id,omitempty"` + // A form is a collection of fields to be filled out by a user + RequestSchemaForm *RequestSchemaForm `json:"form,omitempty"` } -func (f *FormInput) GetDescription() *string { +func (f *FormInput) GetRequestSchemaForm() *RequestSchemaForm { if f == nil { return nil } - return f.Description -} - -func (f *FormInput) GetDisplayName() *string { - if f == nil { - return nil - } - return f.DisplayName -} - -func (f *FormInput) GetFieldGroups() []FieldGroup { - if f == nil { - return nil - } - return f.FieldGroups -} - -func (f *FormInput) GetFieldRelationships() []FieldRelationship { - if f == nil { - return nil - } - return f.FieldRelationships -} - -func (f *FormInput) GetFields() []FieldInput { - if f == nil { - return nil - } - return f.Fields -} - -func (f *FormInput) GetID() *string { - if f == nil { - return nil - } - return f.ID + return f.RequestSchemaForm } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminput1.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminput1.go deleted file mode 100644 index 768827ae..00000000 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminput1.go +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -// FormInput1 - The Form message. -type FormInput1 struct { - // A form is a collection of fields to be filled out by a user - Form *FormInput `json:"form,omitempty"` -} - -func (f *FormInput1) GetForm() *FormInput { - if f == nil { - return nil - } - return f.Form -} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminstance.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminstance.go index 4cdd2312..c4a993c6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminstance.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/forminstance.go @@ -34,12 +34,12 @@ func (e *FormInstanceState) IsExact() bool { // - reassigned // - skipped type FormInstance struct { - // A form is a collection of fields to be filled out by a user - Form *FormInput `json:"form,omitempty"` // The FormCompletedAction message. FormCompletedAction *FormCompletedAction `json:"completed,omitempty"` // The ReassignedAction object describes the outcome of a policy step that has been reassigned. ReassignedAction *ReassignedAction `json:"reassigned,omitempty"` + // A form is a collection of fields to be filled out by a user + RequestSchemaForm *RequestSchemaForm `json:"form,omitempty"` // The restart action describes the outcome of policy steps for when the task was restarted. This can be applied to multiple steps since restart skips all pending next steps. RestartAction *RestartAction `json:"restarted,omitempty"` // The SkippedAction object describes the outcome of a policy step that has been skipped. @@ -49,25 +49,25 @@ type FormInstance struct { State *FormInstanceState `json:"state,omitempty"` } -func (f *FormInstance) GetForm() *FormInput { +func (f *FormInstance) GetFormCompletedAction() *FormCompletedAction { if f == nil { return nil } - return f.Form + return f.FormCompletedAction } -func (f *FormInstance) GetFormCompletedAction() *FormCompletedAction { +func (f *FormInstance) GetReassignedAction() *ReassignedAction { if f == nil { return nil } - return f.FormCompletedAction + return f.ReassignedAction } -func (f *FormInstance) GetReassignedAction() *ReassignedAction { +func (f *FormInstance) GetRequestSchemaForm() *RequestSchemaForm { if f == nil { return nil } - return f.ReassignedAction + return f.RequestSchemaForm } func (f *FormInstance) GetRestartAction() *RestartAction { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formstringfield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formstringfield.go new file mode 100644 index 00000000..264ad179 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formstringfield.go @@ -0,0 +1,95 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FormStringField - The StringField message. +// +// This message contains a oneof named view. Only a single field of the following list may be set at a time: +// - textField +// - passwordField +// - selectField +// - pickerField +type FormStringField struct { + // The PasswordField message. + PasswordField *PasswordField `json:"passwordField,omitempty"` + // The PickerField message. + // + // This message contains a oneof named type. Only a single field of the following list may be set at a time: + // - appUserPicker + // - resourcePicker + // - c1UserPicker + // + PickerField *PickerField `json:"pickerField,omitempty"` + // The SelectField message. + SelectField *SelectField `json:"selectField,omitempty"` + // StringRules describe the constraints applied to `string` values + // + // This message contains a oneof named well_known. Only a single field of the following list may be set at a time: + // - email + // - hostname + // - ip + // - ipv4 + // - ipv6 + // - uri + // - uriRef + // - address + // - uuid + // - wellKnownRegex + // + StringRules *StringRules `json:"rules,omitempty"` + // The TextField message. + TextField *TextField `json:"textField,omitempty"` + // The defaultValue field. + DefaultValue *string `json:"defaultValue,omitempty"` + // The placeholder field. + Placeholder *string `json:"placeholder,omitempty"` +} + +func (f *FormStringField) GetPasswordField() *PasswordField { + if f == nil { + return nil + } + return f.PasswordField +} + +func (f *FormStringField) GetPickerField() *PickerField { + if f == nil { + return nil + } + return f.PickerField +} + +func (f *FormStringField) GetSelectField() *SelectField { + if f == nil { + return nil + } + return f.SelectField +} + +func (f *FormStringField) GetStringRules() *StringRules { + if f == nil { + return nil + } + return f.StringRules +} + +func (f *FormStringField) GetTextField() *TextField { + if f == nil { + return nil + } + return f.TextField +} + +func (f *FormStringField) GetDefaultValue() *string { + if f == nil { + return nil + } + return f.DefaultValue +} + +func (f *FormStringField) GetPlaceholder() *string { + if f == nil { + return nil + } + return f.Placeholder +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formstringmapfield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formstringmapfield.go new file mode 100644 index 00000000..9647d07b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formstringmapfield.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FormStringMapField - The StringMapField message. +type FormStringMapField struct { + // The StringMapRules message. + StringMapRules *StringMapRules `json:"rules,omitempty"` + // The defaultValue field. + DefaultValue map[string]string `json:"defaultValue,omitempty"` +} + +func (f *FormStringMapField) GetStringMapRules() *StringMapRules { + if f == nil { + return nil + } + return f.StringMapRules +} + +func (f *FormStringMapField) GetDefaultValue() map[string]string { + if f == nil { + return nil + } + return f.DefaultValue +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formtrigger.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formtrigger.go deleted file mode 100644 index 5f116ec5..00000000 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/formtrigger.go +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -// The FormTrigger message. -type FormTrigger struct { - // A form is a collection of fields to be filled out by a user - Form *FormInput `json:"form,omitempty"` -} - -func (f *FormTrigger) GetForm() *FormInput { - if f == nil { - return nil - } - return f.Form -} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/function.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/function.go index 74d15299..e952b7e2 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/function.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/function.go @@ -13,6 +13,7 @@ type FunctionType string const ( FunctionTypeFunctionTypeUnspecified FunctionType = "FUNCTION_TYPE_UNSPECIFIED" FunctionTypeFunctionTypeAny FunctionType = "FUNCTION_TYPE_ANY" + FunctionTypeFunctionTypeCodeMode FunctionType = "FUNCTION_TYPE_CODE_MODE" ) func (e FunctionType) ToPointer() *FunctionType { @@ -23,7 +24,7 @@ func (e FunctionType) ToPointer() *FunctionType { func (e *FunctionType) IsExact() bool { if e != nil { switch *e { - case "FUNCTION_TYPE_UNSPECIFIED", "FUNCTION_TYPE_ANY": + case "FUNCTION_TYPE_UNSPECIFIED", "FUNCTION_TYPE_ANY", "FUNCTION_TYPE_CODE_MODE": return true } } @@ -38,8 +39,6 @@ type Function struct { Description *string `json:"description,omitempty"` // The displayName field. DisplayName *string `json:"displayName,omitempty"` - // The encryptedValues field. - EncryptedValues map[string]string `json:"encryptedValues,omitempty"` // The functionType field. FunctionType *FunctionType `json:"functionType,omitempty"` // The head field. @@ -58,8 +57,17 @@ type Function struct { // // Currently only the "Read-Only Administrator" role (system:viewer) is supported. // The role ID can be obtained from the roles API. - ScopedRoleIds []string `json:"scopedRoleIds,omitempty"` - UpdatedAt *time.Time `json:"updatedAt,omitempty"` + ScopedRoleIds []string `json:"scopedRoleIds,omitempty"` + // The secret field. + Secret map[string]string `json:"secret,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + // FN-347 transition flag. When true, the function authenticates to c1-api + // as user: via the AssumeIdentity token exchange using its + // ServicePrincipalBinding; when false, it authenticates as + // function:. Read-only from clients: set by CreateFunction (when the + // tenant has completed the FunctionsToSPN migration) and by the migration + // itself, never by UpdateFunction. Retired once all functions are on SPN. + UseSpn *bool `json:"useSpn,omitempty"` } func (f Function) MarshalJSON() ([]byte, error) { @@ -101,13 +109,6 @@ func (f *Function) GetDisplayName() *string { return f.DisplayName } -func (f *Function) GetEncryptedValues() map[string]string { - if f == nil { - return nil - } - return f.EncryptedValues -} - func (f *Function) GetFunctionType() *FunctionType { if f == nil { return nil @@ -157,6 +158,13 @@ func (f *Function) GetScopedRoleIds() []string { return f.ScopedRoleIds } +func (f *Function) GetSecret() map[string]string { + if f == nil { + return nil + } + return f.Secret +} + func (f *Function) GetUpdatedAt() *time.Time { if f == nil { return nil @@ -164,14 +172,19 @@ func (f *Function) GetUpdatedAt() *time.Time { return f.UpdatedAt } +func (f *Function) GetUseSpn() *bool { + if f == nil { + return nil + } + return f.UseSpn +} + // FunctionInput - Function represents a customer-provided code extension in the API type FunctionInput struct { // The description field. Description *string `json:"description,omitempty"` // The displayName field. DisplayName *string `json:"displayName,omitempty"` - // The encryptedValues field. - EncryptedValues map[string]string `json:"encryptedValues,omitempty"` // The functionType field. FunctionType *FunctionType `json:"functionType,omitempty"` // The head field. @@ -191,6 +204,8 @@ type FunctionInput struct { // Currently only the "Read-Only Administrator" role (system:viewer) is supported. // The role ID can be obtained from the roles API. ScopedRoleIds []string `json:"scopedRoleIds,omitempty"` + // The secret field. + Secret map[string]string `json:"secret,omitempty"` } func (f *FunctionInput) GetDescription() *string { @@ -207,13 +222,6 @@ func (f *FunctionInput) GetDisplayName() *string { return f.DisplayName } -func (f *FunctionInput) GetEncryptedValues() map[string]string { - if f == nil { - return nil - } - return f.EncryptedValues -} - func (f *FunctionInput) GetFunctionType() *FunctionType { if f == nil { return nil @@ -262,3 +270,10 @@ func (f *FunctionInput) GetScopedRoleIds() []string { } return f.ScopedRoleIds } + +func (f *FunctionInput) GetSecret() map[string]string { + if f == nil { + return nil + } + return f.Secret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functioncall.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functioncall.go new file mode 100644 index 00000000..4af2c34f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functioncall.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FunctionCall represents a client-side function invocation. +type FunctionCall struct { + // The args field. + Args map[string]string `json:"args,omitempty"` + // The call field. + Call *string `json:"call,omitempty"` + // The message field. + Message *string `json:"message,omitempty"` +} + +func (f *FunctionCall) GetArgs() map[string]string { + if f == nil { + return nil + } + return f.Args +} + +func (f *FunctionCall) GetCall() *string { + if f == nil { + return nil + } + return f.Call +} + +func (f *FunctionCall) GetMessage() *string { + if f == nil { + return nil + } + return f.Message +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsinvocationsearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsinvocationsearchrequest.go new file mode 100644 index 00000000..5199d308 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsinvocationsearchrequest.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FunctionsInvocationSearchRequest is the request for searching function invocations. +// +// Results are returned in descending order by created_at (newest first). +type FunctionsInvocationSearchRequest struct { + // The number of results to return per page. + PageSize *int `json:"pageSize,omitempty"` + // The pagination token for fetching the next page. + PageToken *string `json:"pageToken,omitempty"` +} + +func (f *FunctionsInvocationSearchRequest) GetPageSize() *int { + if f == nil { + return nil + } + return f.PageSize +} + +func (f *FunctionsInvocationSearchRequest) GetPageToken() *string { + if f == nil { + return nil + } + return f.PageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsinvocationsearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsinvocationsearchresponse.go new file mode 100644 index 00000000..c9040b6f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsinvocationsearchresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FunctionsInvocationSearchResponse is the response for searching function invocations. +type FunctionsInvocationSearchResponse struct { + // The list of function invocations, ordered by created_at descending. + List []FunctionInvocation `json:"list,omitempty"` + // The pagination token for fetching the next page. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (f *FunctionsInvocationSearchResponse) GetList() []FunctionInvocation { + if f == nil { + return nil + } + return f.List +} + +func (f *FunctionsInvocationSearchResponse) GetNextPageToken() *string { + if f == nil { + return nil + } + return f.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionssearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionssearchrequest.go index 5250fc44..1b1fe028 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionssearchrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionssearchrequest.go @@ -7,6 +7,7 @@ type FunctionTypes string const ( FunctionTypesFunctionTypeUnspecified FunctionTypes = "FUNCTION_TYPE_UNSPECIFIED" FunctionTypesFunctionTypeAny FunctionTypes = "FUNCTION_TYPE_ANY" + FunctionTypesFunctionTypeCodeMode FunctionTypes = "FUNCTION_TYPE_CODE_MODE" ) func (e FunctionTypes) ToPointer() *FunctionTypes { @@ -17,7 +18,7 @@ func (e FunctionTypes) ToPointer() *FunctionTypes { func (e *FunctionTypes) IsExact() bool { if e != nil { switch *e { - case "FUNCTION_TYPE_UNSPECIFIED", "FUNCTION_TYPE_ANY": + case "FUNCTION_TYPE_UNSPECIFIED", "FUNCTION_TYPE_ANY", "FUNCTION_TYPE_CODE_MODE": return true } } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreatefinalcommitrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreatefinalcommitrequest.go new file mode 100644 index 00000000..0f578e0b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreatefinalcommitrequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The FunctionsServiceCreateFinalCommitRequest message. +type FunctionsServiceCreateFinalCommitRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreatefinalcommitresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreatefinalcommitresponse.go new file mode 100644 index 00000000..5e820d7a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreatefinalcommitresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The FunctionsServiceCreateFinalCommitResponse message. +type FunctionsServiceCreateFinalCommitResponse struct { + // FunctionCommit represents a single commit in a function's history + FunctionCommit *FunctionCommit `json:"commit,omitempty"` +} + +func (f *FunctionsServiceCreateFinalCommitResponse) GetFunctionCommit() *FunctionCommit { + if f == nil { + return nil + } + return f.FunctionCommit +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreatefunctionrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreatefunctionrequest.go index 30a91f71..befaf1e7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreatefunctionrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreatefunctionrequest.go @@ -2,12 +2,13 @@ package shared -// FunctionsServiceCreateFunctionRequestFunctionType - The functionType field. +// FunctionsServiceCreateFunctionRequestFunctionType - The type of function to create, controlling its execution environment and capabilities. type FunctionsServiceCreateFunctionRequestFunctionType string const ( FunctionsServiceCreateFunctionRequestFunctionTypeFunctionTypeUnspecified FunctionsServiceCreateFunctionRequestFunctionType = "FUNCTION_TYPE_UNSPECIFIED" FunctionsServiceCreateFunctionRequestFunctionTypeFunctionTypeAny FunctionsServiceCreateFunctionRequestFunctionType = "FUNCTION_TYPE_ANY" + FunctionsServiceCreateFunctionRequestFunctionTypeFunctionTypeCodeMode FunctionsServiceCreateFunctionRequestFunctionType = "FUNCTION_TYPE_CODE_MODE" ) func (e FunctionsServiceCreateFunctionRequestFunctionType) ToPointer() *FunctionsServiceCreateFunctionRequestFunctionType { @@ -18,7 +19,7 @@ func (e FunctionsServiceCreateFunctionRequestFunctionType) ToPointer() *Function func (e *FunctionsServiceCreateFunctionRequestFunctionType) IsExact() bool { if e != nil { switch *e { - case "FUNCTION_TYPE_UNSPECIFIED", "FUNCTION_TYPE_ANY": + case "FUNCTION_TYPE_UNSPECIFIED", "FUNCTION_TYPE_ANY", "FUNCTION_TYPE_CODE_MODE": return true } } @@ -27,15 +28,15 @@ func (e *FunctionsServiceCreateFunctionRequestFunctionType) IsExact() bool { // The FunctionsServiceCreateFunctionRequest message. type FunctionsServiceCreateFunctionRequest struct { - // The commitMessage field. + // The commit message describing the initial code submission. CommitMessage *string `json:"commitMessage,omitempty"` - // The description field. + // A description of what the function does. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name for the function. DisplayName *string `json:"displayName,omitempty"` - // The functionType field. + // The type of function to create, controlling its execution environment and capabilities. FunctionType *FunctionsServiceCreateFunctionRequestFunctionType `json:"functionType,omitempty"` - // The initialContent field. + // Map of filename to file content for the initial code commit. InitialContent map[string]string `json:"initialContent,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreateinitialcommitrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreateinitialcommitrequest.go new file mode 100644 index 00000000..5a58f58d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreateinitialcommitrequest.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The FunctionsServiceCreateInitialCommitRequest message. +type FunctionsServiceCreateInitialCommitRequest struct { + // The commitMessage field. + CommitMessage *string `json:"commitMessage,omitempty"` + // The filenames field. + Filenames []string `json:"filenames,omitempty"` +} + +func (f *FunctionsServiceCreateInitialCommitRequest) GetCommitMessage() *string { + if f == nil { + return nil + } + return f.CommitMessage +} + +func (f *FunctionsServiceCreateInitialCommitRequest) GetFilenames() []string { + if f == nil { + return nil + } + return f.Filenames +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreateinitialcommitresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreateinitialcommitresponse.go new file mode 100644 index 00000000..2e451ddd --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicecreateinitialcommitresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The FunctionsServiceCreateInitialCommitResponse message. +type FunctionsServiceCreateInitialCommitResponse struct { + // The commitId field. + CommitID *string `json:"commitId,omitempty"` + // The uploadUrls field. + UploadUrls map[string]string `json:"uploadUrls,omitempty"` +} + +func (f *FunctionsServiceCreateInitialCommitResponse) GetCommitID() *string { + if f == nil { + return nil + } + return f.CommitID +} + +func (f *FunctionsServiceCreateInitialCommitResponse) GetUploadUrls() map[string]string { + if f == nil { + return nil + } + return f.UploadUrls +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicegetcommitcontentresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicegetcommitcontentresponse.go new file mode 100644 index 00000000..f68959ff --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicegetcommitcontentresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FunctionsServiceGetCommitContentResponse contains a commit and all its file contents. +type FunctionsServiceGetCommitContentResponse struct { + // FunctionCommit represents a single commit in a function's history + FunctionCommit *FunctionCommit `json:"commit,omitempty"` + // Map of filename to file content bytes. + Files map[string]string `json:"files,omitempty"` +} + +func (f *FunctionsServiceGetCommitContentResponse) GetFunctionCommit() *FunctionCommit { + if f == nil { + return nil + } + return f.FunctionCommit +} + +func (f *FunctionsServiceGetCommitContentResponse) GetFiles() map[string]string { + if f == nil { + return nil + } + return f.Files +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicegetfunctionsecretencryptionkeyresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicegetfunctionsecretencryptionkeyresponse.go deleted file mode 100644 index d67f05bd..00000000 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicegetfunctionsecretencryptionkeyresponse.go +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -// The FunctionsServiceGetFunctionSecretEncryptionKeyResponse message. -type FunctionsServiceGetFunctionSecretEncryptionKeyResponse struct { - // The publicKey field. - PublicKey *string `json:"publicKey,omitempty"` -} - -func (f *FunctionsServiceGetFunctionSecretEncryptionKeyResponse) GetPublicKey() *string { - if f == nil { - return nil - } - return f.PublicKey -} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicegetlockfileresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicegetlockfileresponse.go new file mode 100644 index 00000000..64ba0dbc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicegetlockfileresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FunctionsServiceGetLockFileResponse returns the deno lock file content for a commit. +type FunctionsServiceGetLockFileResponse struct { + // The raw content of the deno lock file (empty if not found). + Content *string `json:"content,omitempty"` + // Whether the lock file exists for this commit. + Exists *bool `json:"exists,omitempty"` +} + +func (f *FunctionsServiceGetLockFileResponse) GetContent() *string { + if f == nil { + return nil + } + return f.Content +} + +func (f *FunctionsServiceGetLockFileResponse) GetExists() *bool { + if f == nil { + return nil + } + return f.Exists +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsserviceinvokerequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsserviceinvokerequest.go index 71ad58c3..ac99f7b5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsserviceinvokerequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsserviceinvokerequest.go @@ -7,12 +7,14 @@ package shared // This message contains a oneof named arg. Only a single field of the following list may be set at a time: // - json type FunctionsServiceInvokeRequest struct { - // The commitId field. + // The commit ID specifying which version of the function code to run. CommitID *string `json:"commitId,omitempty"` - // The json field. + // The JSON-encoded input data passed to the function. // This field is part of the `arg` oneof. // See the documentation for `c1.api.functions.v1.FunctionsServiceInvokeRequest` for more details. JSON *string `json:"json,omitempty"` + // Optional VFS volume ID to attach to this invocation. If empty, VFS operations will error. + VfsID *string `json:"vfsId,omitempty"` } func (f *FunctionsServiceInvokeRequest) GetCommitID() *string { @@ -28,3 +30,10 @@ func (f *FunctionsServiceInvokeRequest) GetJSON() *string { } return f.JSON } + +func (f *FunctionsServiceInvokeRequest) GetVfsID() *string { + if f == nil { + return nil + } + return f.VfsID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsserviceinvokeresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsserviceinvokeresponse.go index 236ce0be..35b09141 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsserviceinvokeresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsserviceinvokeresponse.go @@ -7,9 +7,9 @@ package shared // This message contains a oneof named resp. Only a single field of the following list may be set at a time: // - json type FunctionsServiceInvokeResponse struct { - // The invocationId field. + // The ID of the created invocation, used to track execution status and retrieve results. InvocationID *string `json:"invocationId,omitempty"` - // The json field. + // Deprecated. The JSON-encoded output returned by the function. // This field is part of the `resp` oneof. // See the documentation for `c1.api.functions.v1.FunctionsServiceInvokeResponse` for more details. // diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicetestrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicetestrequest.go new file mode 100644 index 00000000..7be1589b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicetestrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FunctionsServiceTestRequest runs tests for a function at a specific commit. +type FunctionsServiceTestRequest struct { + // The commit ID to test. If empty, the published commit is used. + CommitID *string `json:"commitId,omitempty"` +} + +func (f *FunctionsServiceTestRequest) GetCommitID() *string { + if f == nil { + return nil + } + return f.CommitID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicetestresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicetestresponse.go new file mode 100644 index 00000000..71877c4c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functionsservicetestresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FunctionsServiceTestResponse contains test execution results. +type FunctionsServiceTestResponse struct { + // FunctionTestResult contains the result of a single test case execution. + FunctionTestResult *FunctionTestResult `json:"result,omitempty"` + // All test results. + Results []FunctionTestResult `json:"results,omitempty"` +} + +func (f *FunctionsServiceTestResponse) GetFunctionTestResult() *FunctionTestResult { + if f == nil { + return nil + } + return f.FunctionTestResult +} + +func (f *FunctionsServiceTestResponse) GetResults() []FunctionTestResult { + if f == nil { + return nil + } + return f.Results +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functiontestresult.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functiontestresult.go new file mode 100644 index 00000000..a3843760 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functiontestresult.go @@ -0,0 +1,77 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FunctionTestResultStatus - The test result status. +type FunctionTestResultStatus string + +const ( + FunctionTestResultStatusFunctionTestResultStatusUnspecified FunctionTestResultStatus = "FUNCTION_TEST_RESULT_STATUS_UNSPECIFIED" + FunctionTestResultStatusFunctionTestResultStatusOk FunctionTestResultStatus = "FUNCTION_TEST_RESULT_STATUS_OK" + FunctionTestResultStatusFunctionTestResultStatusFail FunctionTestResultStatus = "FUNCTION_TEST_RESULT_STATUS_FAIL" + FunctionTestResultStatusFunctionTestResultStatusSkipped FunctionTestResultStatus = "FUNCTION_TEST_RESULT_STATUS_SKIPPED" +) + +func (e FunctionTestResultStatus) ToPointer() *FunctionTestResultStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *FunctionTestResultStatus) IsExact() bool { + if e != nil { + switch *e { + case "FUNCTION_TEST_RESULT_STATUS_UNSPECIFIED", "FUNCTION_TEST_RESULT_STATUS_OK", "FUNCTION_TEST_RESULT_STATUS_FAIL", "FUNCTION_TEST_RESULT_STATUS_SKIPPED": + return true + } + } + return false +} + +// FunctionTestResult contains the result of a single test case execution. +type FunctionTestResult struct { + // The assertions evaluated during the test. + Assertions []FunctionTestResultAssertion `json:"assertions,omitempty"` + // Error message if the test errored (distinct from assertion failure). + Error *string `json:"error,omitempty"` + // The log entries captured during the test. + Logs []FunctionTestResultLog `json:"logs,omitempty"` + // The test name. + Name *string `json:"name,omitempty"` + // The test result status. + Status *FunctionTestResultStatus `json:"status,omitempty"` +} + +func (f *FunctionTestResult) GetAssertions() []FunctionTestResultAssertion { + if f == nil { + return nil + } + return f.Assertions +} + +func (f *FunctionTestResult) GetError() *string { + if f == nil { + return nil + } + return f.Error +} + +func (f *FunctionTestResult) GetLogs() []FunctionTestResultLog { + if f == nil { + return nil + } + return f.Logs +} + +func (f *FunctionTestResult) GetName() *string { + if f == nil { + return nil + } + return f.Name +} + +func (f *FunctionTestResult) GetStatus() *FunctionTestResultStatus { + if f == nil { + return nil + } + return f.Status +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functiontestresultassertion.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functiontestresultassertion.go new file mode 100644 index 00000000..ae0cec56 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functiontestresultassertion.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FunctionTestResultAssertion - A single assertion within a test. +type FunctionTestResultAssertion struct { + // The actual value. + Actual *string `json:"actual,omitempty"` + // Source location of the assertion. + At *string `json:"at,omitempty"` + // Description of the assertion. + Description *string `json:"description,omitempty"` + // The expected value. + Expected *string `json:"expected,omitempty"` + // The comparison operator (e.g., "==", "!="). + Operator *string `json:"operator,omitempty"` + // Whether the assertion passed. + Pass *bool `json:"pass,omitempty"` +} + +func (f *FunctionTestResultAssertion) GetActual() *string { + if f == nil { + return nil + } + return f.Actual +} + +func (f *FunctionTestResultAssertion) GetAt() *string { + if f == nil { + return nil + } + return f.At +} + +func (f *FunctionTestResultAssertion) GetDescription() *string { + if f == nil { + return nil + } + return f.Description +} + +func (f *FunctionTestResultAssertion) GetExpected() *string { + if f == nil { + return nil + } + return f.Expected +} + +func (f *FunctionTestResultAssertion) GetOperator() *string { + if f == nil { + return nil + } + return f.Operator +} + +func (f *FunctionTestResultAssertion) GetPass() *bool { + if f == nil { + return nil + } + return f.Pass +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functiontestresultlog.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functiontestresultlog.go new file mode 100644 index 00000000..44201f9c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/functiontestresultlog.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// FunctionTestResultLog - A log entry captured during a test. +type FunctionTestResultLog struct { + // The log level (e.g., "info", "error"). + Level *string `json:"level,omitempty"` + // The log message content. + Log *string `json:"log,omitempty"` + // The log source (e.g., "stdout", "stderr"). + Source *string `json:"source,omitempty"` +} + +func (f *FunctionTestResultLog) GetLevel() *string { + if f == nil { + return nil + } + return f.Level +} + +func (f *FunctionTestResultLog) GetLog() *string { + if f == nil { + return nil + } + return f.Log +} + +func (f *FunctionTestResultLog) GetSource() *string { + if f == nil { + return nil + } + return f.Source +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/generatepassword.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/generatepassword.go index f1e936ea..bdc2f5c4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/generatepassword.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/generatepassword.go @@ -4,4 +4,30 @@ package shared // The GeneratePassword message. type GeneratePassword struct { + // GeneratePasswordPolicy defines inline password generation rules. + // + // This message contains a oneof named character_rules. Only a single field of the following list may be set at a time: + // - noRestrictions + // - customCharacters + // - excludedCharacters + // + GeneratePasswordPolicy *GeneratePasswordPolicy `json:"policy,omitempty"` + // Deprecated: password policy ID lookup is no longer used. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + PasswordPolicyID *string `json:"passwordPolicyId,omitempty"` +} + +func (g *GeneratePassword) GetGeneratePasswordPolicy() *GeneratePasswordPolicy { + if g == nil { + return nil + } + return g.GeneratePasswordPolicy +} + +func (g *GeneratePassword) GetPasswordPolicyID() *string { + if g == nil { + return nil + } + return g.PasswordPolicyID } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/generatepasswordpolicy.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/generatepasswordpolicy.go new file mode 100644 index 00000000..825aaef5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/generatepasswordpolicy.go @@ -0,0 +1,99 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// GeneratePasswordPolicy defines inline password generation rules. +// +// This message contains a oneof named character_rules. Only a single field of the following list may be set at a time: +// - noRestrictions +// - customCharacters +// - excludedCharacters +type GeneratePasswordPolicy struct { + // The customCharacters field. + // This field is part of the `character_rules` oneof. + // See the documentation for `c1.api.automations.v1.GeneratePasswordPolicy` for more details. + CustomCharacters *string `json:"customCharacters,omitempty"` + // The excludedCharacters field. + // This field is part of the `character_rules` oneof. + // See the documentation for `c1.api.automations.v1.GeneratePasswordPolicy` for more details. + ExcludedCharacters *string `json:"excludedCharacters,omitempty"` + // The maxCharacterCount field. + MaxCharacterCount *int `json:"maxCharacterCount,omitempty"` + // The minCharacterCount field. + MinCharacterCount *int `json:"minCharacterCount,omitempty"` + // The noRestrictions field. + // This field is part of the `character_rules` oneof. + // See the documentation for `c1.api.automations.v1.GeneratePasswordPolicy` for more details. + NoRestrictions *bool `json:"noRestrictions,omitempty"` + // The requireLowercase field. + RequireLowercase *bool `json:"requireLowercase,omitempty"` + // The requireNumbers field. + RequireNumbers *bool `json:"requireNumbers,omitempty"` + // The requireSpecialCharacters field. + RequireSpecialCharacters *bool `json:"requireSpecialCharacters,omitempty"` + // The requireUppercase field. + RequireUppercase *bool `json:"requireUppercase,omitempty"` +} + +func (g *GeneratePasswordPolicy) GetCustomCharacters() *string { + if g == nil { + return nil + } + return g.CustomCharacters +} + +func (g *GeneratePasswordPolicy) GetExcludedCharacters() *string { + if g == nil { + return nil + } + return g.ExcludedCharacters +} + +func (g *GeneratePasswordPolicy) GetMaxCharacterCount() *int { + if g == nil { + return nil + } + return g.MaxCharacterCount +} + +func (g *GeneratePasswordPolicy) GetMinCharacterCount() *int { + if g == nil { + return nil + } + return g.MinCharacterCount +} + +func (g *GeneratePasswordPolicy) GetNoRestrictions() *bool { + if g == nil { + return nil + } + return g.NoRestrictions +} + +func (g *GeneratePasswordPolicy) GetRequireLowercase() *bool { + if g == nil { + return nil + } + return g.RequireLowercase +} + +func (g *GeneratePasswordPolicy) GetRequireNumbers() *bool { + if g == nil { + return nil + } + return g.RequireNumbers +} + +func (g *GeneratePasswordPolicy) GetRequireSpecialCharacters() *bool { + if g == nil { + return nil + } + return g.RequireSpecialCharacters +} + +func (g *GeneratePasswordPolicy) GetRequireUppercase() *bool { + if g == nil { + return nil + } + return g.RequireUppercase +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getappentitlementmonitorbindingrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getappentitlementmonitorbindingrequest.go index 7efa04fe..52656437 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getappentitlementmonitorbindingrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getappentitlementmonitorbindingrequest.go @@ -2,7 +2,7 @@ package shared -// GetAppEntitlementMonitorBindingRequestEntitlementGroup - The entitlementGroup field. +// GetAppEntitlementMonitorBindingRequestEntitlementGroup - Which side of the conflict monitor (A or B) this binding belongs to. type GetAppEntitlementMonitorBindingRequestEntitlementGroup string const ( @@ -26,15 +26,15 @@ func (e *GetAppEntitlementMonitorBindingRequestEntitlementGroup) IsExact() bool return false } -// The GetAppEntitlementMonitorBindingRequest message. +// GetAppEntitlementMonitorBindingRequest - The request message for retrieving a single app entitlement monitor binding. type GetAppEntitlementMonitorBindingRequest struct { - // The appEntitlementId field. + // The unique identifier of the app entitlement bound to the monitor. AppEntitlementID *string `json:"appEntitlementId,omitempty"` - // The appId field. + // The unique identifier of the application containing the entitlement. AppID *string `json:"appId,omitempty"` - // The entitlementGroup field. + // Which side of the conflict monitor (A or B) this binding belongs to. EntitlementGroup *GetAppEntitlementMonitorBindingRequestEntitlementGroup `json:"entitlementGroup,omitempty"` - // The monitorId field. + // The unique identifier of the conflict monitor. MonitorID *string `json:"monitorId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getappentitlementproxyresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getappentitlementproxyresponse.go index a1ce9d3b..a48cd215 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getappentitlementproxyresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getappentitlementproxyresponse.go @@ -38,11 +38,11 @@ func (g *GetAppEntitlementProxyResponseExpanded) GetAdditionalProperties() map[s return g.AdditionalProperties } -// The GetAppEntitlementProxyResponse message. +// GetAppEntitlementProxyResponse - The response message for getting a specific entitlement proxy binding. type GetAppEntitlementProxyResponse struct { // The AppEntitlementProxyView message. AppEntitlementProxyView *AppEntitlementProxyView `json:"appProxyEntitlementView,omitempty"` - // The expanded field. + // List of serialized related objects. Expanded []GetAppEntitlementProxyResponseExpanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getautomationexecutionresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getautomationexecutionresponse.go index 29c1f862..e93504d0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getautomationexecutionresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getautomationexecutionresponse.go @@ -44,7 +44,7 @@ type GetAutomationExecutionResponse struct { AutomationExecution *AutomationExecution `json:"automationExecution,omitempty"` // The AutomationExecutionView message. AutomationExecutionView *AutomationExecutionView `json:"view,omitempty"` - // The expanded field. + // Related objects requested via the expand mask. Expanded []GetAutomationExecutionResponseExpanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getawsexternalidresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getawsexternalidresponse.go index 470dd349..8c66149b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getawsexternalidresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getawsexternalidresponse.go @@ -4,7 +4,7 @@ package shared // The GetAWSExternalIDResponse message. type GetAWSExternalIDResponse struct { - // The AWSExternalID message. + // AWSExternalID contains the tenant's external ID for AWS IAM role trust policies. AWSExternalID *AWSExternalID `json:"awsExternalId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getcontactsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getcontactsresponse.go new file mode 100644 index 00000000..76b39591 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getcontactsresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GetContactsResponse message. +type GetContactsResponse struct { + // Contacts represents the contact configuration for an organization. + Contacts *Contacts `json:"contacts,omitempty"` +} + +func (g *GetContactsResponse) GetContacts() *Contacts { + if g == nil { + return nil + } + return g.Contacts +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getcustomanalysisresultresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getcustomanalysisresultresponse.go new file mode 100644 index 00000000..716bf309 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getcustomanalysisresultresponse.go @@ -0,0 +1,113 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// GetCustomAnalysisResultResponseStatus - The status field. +type GetCustomAnalysisResultResponseStatus string + +const ( + GetCustomAnalysisResultResponseStatusRunStatusUnspecified GetCustomAnalysisResultResponseStatus = "RUN_STATUS_UNSPECIFIED" + GetCustomAnalysisResultResponseStatusRunStatusRunning GetCustomAnalysisResultResponseStatus = "RUN_STATUS_RUNNING" + GetCustomAnalysisResultResponseStatusRunStatusCompleted GetCustomAnalysisResultResponseStatus = "RUN_STATUS_COMPLETED" + GetCustomAnalysisResultResponseStatusRunStatusFailed GetCustomAnalysisResultResponseStatus = "RUN_STATUS_FAILED" +) + +func (e GetCustomAnalysisResultResponseStatus) ToPointer() *GetCustomAnalysisResultResponseStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *GetCustomAnalysisResultResponseStatus) IsExact() bool { + if e != nil { + switch *e { + case "RUN_STATUS_UNSPECIFIED", "RUN_STATUS_RUNNING", "RUN_STATUS_COMPLETED", "RUN_STATUS_FAILED": + return true + } + } + return false +} + +// The GetCustomAnalysisResultResponse message. +type GetCustomAnalysisResultResponse struct { + // The appsAnalyzed field. + AppsAnalyzed *int `json:"appsAnalyzed,omitempty"` + // Cluster results. + Clusters []EntitlementCluster `json:"clusters,omitempty"` + // The cohortSize field. + CohortSize *int `json:"cohortSize,omitempty"` + // Entitlement coverage results. + Entitlements []CohortEntitlement `json:"entitlements,omitempty"` + // The errorMessage field. + ErrorMessage *string `json:"errorMessage,omitempty"` + // The facetUserCount field. + FacetUserCount *int `json:"facetUserCount,omitempty"` + // Facet results. + Facets []AttributeFacet `json:"facets,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + // The status field. + Status *GetCustomAnalysisResultResponseStatus `json:"status,omitempty"` +} + +func (g *GetCustomAnalysisResultResponse) GetAppsAnalyzed() *int { + if g == nil { + return nil + } + return g.AppsAnalyzed +} + +func (g *GetCustomAnalysisResultResponse) GetClusters() []EntitlementCluster { + if g == nil { + return nil + } + return g.Clusters +} + +func (g *GetCustomAnalysisResultResponse) GetCohortSize() *int { + if g == nil { + return nil + } + return g.CohortSize +} + +func (g *GetCustomAnalysisResultResponse) GetEntitlements() []CohortEntitlement { + if g == nil { + return nil + } + return g.Entitlements +} + +func (g *GetCustomAnalysisResultResponse) GetErrorMessage() *string { + if g == nil { + return nil + } + return g.ErrorMessage +} + +func (g *GetCustomAnalysisResultResponse) GetFacetUserCount() *int { + if g == nil { + return nil + } + return g.FacetUserCount +} + +func (g *GetCustomAnalysisResultResponse) GetFacets() []AttributeFacet { + if g == nil { + return nil + } + return g.Facets +} + +func (g *GetCustomAnalysisResultResponse) GetID() *string { + if g == nil { + return nil + } + return g.ID +} + +func (g *GetCustomAnalysisResultResponse) GetStatus() *GetCustomAnalysisResultResponseStatus { + if g == nil { + return nil + } + return g.Status +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getemailcapabilitiesresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getemailcapabilitiesresponse.go new file mode 100644 index 00000000..6e556b66 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getemailcapabilitiesresponse.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GetEmailCapabilitiesResponse message. +type GetEmailCapabilitiesResponse struct { + // True when external email addresses (outside C1 users) can be used as + // recipients in automation email steps. False when only the C1 built-in + // provider is configured (C1 users only). + ExternalEmailSupported *bool `json:"externalEmailSupported,omitempty"` +} + +func (g *GetEmailCapabilitiesResponse) GetExternalEmailSupported() *bool { + if g == nil { + return nil + } + return g.ExternalEmailSupported +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getentitlementownerresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getentitlementownerresponse.go new file mode 100644 index 00000000..c825495c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getentitlementownerresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// GetEntitlementOwnerResponse is the response for getting an entitlement ownership source. +type GetEntitlementOwnerResponse struct { + // AppOwnerEntitlement represents an entitlement ownership source for an app. + AppOwnerEntitlement *AppOwnerEntitlement `json:"appOwnerEntitlement,omitempty"` +} + +func (g *GetEntitlementOwnerResponse) GetAppOwnerEntitlement() *AppOwnerEntitlement { + if g == nil { + return nil + } + return g.AppOwnerEntitlement +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getfindingresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getfindingresponse.go new file mode 100644 index 00000000..8a580a14 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getfindingresponse.go @@ -0,0 +1,76 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + +// GetFindingResponseExpanded - Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. +type GetFindingResponseExpanded struct { + // The type of the serialized message. + AtType *string `json:"@type,omitempty"` + AdditionalProperties map[string]any `additionalProperties:"true" json:"-"` +} + +func (g GetFindingResponseExpanded) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetFindingResponseExpanded) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, nil); err != nil { + return err + } + return nil +} + +func (g *GetFindingResponseExpanded) GetAtType() *string { + if g == nil { + return nil + } + return g.AtType +} + +func (g *GetFindingResponseExpanded) GetAdditionalProperties() map[string]any { + if g == nil { + return nil + } + return g.AdditionalProperties +} + +// The GetFindingResponse message. +type GetFindingResponse struct { + // The Finding message. + // + // This message contains a oneof named finding_type. Only a single field of the following list may be set at a time: + // - similarUsernameMatch + // - serviceAccountMisclassification + // + // + // This message contains a oneof named target. Only a single field of the following list may be set at a time: + // - identityUserTarget + // - appUserTarget + // + // + // This message contains a oneof named evidence. Only a single field of the following list may be set at a time: + // - similarUsernameMatchEvidence + // - serviceAccountMisclassificationEvidence + // + Finding *Finding `json:"finding,omitempty"` + // The expanded field. + Expanded []GetFindingResponseExpanded `json:"expanded,omitempty"` +} + +func (g *GetFindingResponse) GetFinding() *Finding { + if g == nil { + return nil + } + return g.Finding +} + +func (g *GetFindingResponse) GetExpanded() []GetFindingResponseExpanded { + if g == nil { + return nil + } + return g.Expanded +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getfindingroutingruleresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getfindingroutingruleresponse.go new file mode 100644 index 00000000..de0ecb4d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getfindingroutingruleresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GetFindingRoutingRuleResponse message. +type GetFindingRoutingRuleResponse struct { + // The FindingRoutingRule message. + FindingRoutingRule *FindingRoutingRule `json:"routingRule,omitempty"` +} + +func (g *GetFindingRoutingRuleResponse) GetFindingRoutingRule() *FindingRoutingRule { + if g == nil { + return nil + } + return g.FindingRoutingRule +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getlatestrunresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getlatestrunresponse.go new file mode 100644 index 00000000..b00d829d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getlatestrunresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GetLatestRunResponse message. +type GetLatestRunResponse struct { + // The RoleMiningManagementRun message. + RoleMiningManagementRun *RoleMiningManagementRun `json:"run,omitempty"` +} + +func (g *GetLatestRunResponse) GetRoleMiningManagementRun() *RoleMiningManagementRun { + if g == nil { + return nil + } + return g.RoleMiningManagementRun +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getonboardingsettingsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getonboardingsettingsresponse.go new file mode 100644 index 00000000..fbbba584 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getonboardingsettingsresponse.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// GetOnboardingSettingsResponseStatus - The current status of the tenant onboarding process. +type GetOnboardingSettingsResponseStatus string + +const ( + GetOnboardingSettingsResponseStatusOnboardingStatusUnspecified GetOnboardingSettingsResponseStatus = "ONBOARDING_STATUS_UNSPECIFIED" + GetOnboardingSettingsResponseStatusOnboardingStatusNotStarted GetOnboardingSettingsResponseStatus = "ONBOARDING_STATUS_NOT_STARTED" + GetOnboardingSettingsResponseStatusOnboardingStatusInProgress GetOnboardingSettingsResponseStatus = "ONBOARDING_STATUS_IN_PROGRESS" + GetOnboardingSettingsResponseStatusOnboardingStatusComplete GetOnboardingSettingsResponseStatus = "ONBOARDING_STATUS_COMPLETE" + GetOnboardingSettingsResponseStatusOnboardingStatusDismissed GetOnboardingSettingsResponseStatus = "ONBOARDING_STATUS_DISMISSED" +) + +func (e GetOnboardingSettingsResponseStatus) ToPointer() *GetOnboardingSettingsResponseStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *GetOnboardingSettingsResponseStatus) IsExact() bool { + if e != nil { + switch *e { + case "ONBOARDING_STATUS_UNSPECIFIED", "ONBOARDING_STATUS_NOT_STARTED", "ONBOARDING_STATUS_IN_PROGRESS", "ONBOARDING_STATUS_COMPLETE", "ONBOARDING_STATUS_DISMISSED": + return true + } + } + return false +} + +// The GetOnboardingSettingsResponse message. +type GetOnboardingSettingsResponse struct { + // The OnboardingOrgContext message. + OnboardingOrgContext *OnboardingOrgContext `json:"orgContext,omitempty"` + // The identifier of the onboarding conversation thread, if one is in progress. + ConversationID *string `json:"conversationId,omitempty"` + // The intents field. + Intents []string `json:"intents,omitempty"` + // The current status of the tenant onboarding process. + Status *GetOnboardingSettingsResponseStatus `json:"status,omitempty"` +} + +func (g *GetOnboardingSettingsResponse) GetOnboardingOrgContext() *OnboardingOrgContext { + if g == nil { + return nil + } + return g.OnboardingOrgContext +} + +func (g *GetOnboardingSettingsResponse) GetConversationID() *string { + if g == nil { + return nil + } + return g.ConversationID +} + +func (g *GetOnboardingSettingsResponse) GetIntents() []string { + if g == nil { + return nil + } + return g.Intents +} + +func (g *GetOnboardingSettingsResponse) GetStatus() *GetOnboardingSettingsResponseStatus { + if g == nil { + return nil + } + return g.Status +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getorgnotificationsettingsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getorgnotificationsettingsresponse.go new file mode 100644 index 00000000..264d246b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getorgnotificationsettingsresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GetOrgNotificationSettingsResponse message. +type GetOrgNotificationSettingsResponse struct { + // OrgNotificationSettings contains organization-wide notification channel configurations and default preferences. + OrgNotificationSettings *OrgNotificationSettings `json:"orgNotificationSettings,omitempty"` +} + +func (g *GetOrgNotificationSettingsResponse) GetOrgNotificationSettings() *OrgNotificationSettings { + if g == nil { + return nil + } + return g.OrgNotificationSettings +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getpolicyresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getpolicyresponse.go index 3a487d3b..b3465416 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getpolicyresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getpolicyresponse.go @@ -4,7 +4,10 @@ package shared // The GetPolicyResponse message contains the policy object. type GetPolicyResponse struct { - // A policy describes the behavior of the ConductorOne system when processing a task. You can describe the type, approvers, fallback behavior, and escalation processes. + // A policy defines a workflow (sequence of steps) that runs when processing + // access requests, reviews, or revocations. Policies support conditional + // routing: different conditions can trigger different step sequences, with a + // baseline fallback. Policy *Policy `json:"policy,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getroleminingconfigresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getroleminingconfigresponse.go new file mode 100644 index 00000000..ae808c07 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getroleminingconfigresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GetRoleMiningConfigResponse message. +type GetRoleMiningConfigResponse struct { + // The RoleMiningManagementConfig message. + RoleMiningManagementConfig *RoleMiningManagementConfig `json:"config,omitempty"` +} + +func (g *GetRoleMiningConfigResponse) GetRoleMiningManagementConfig() *RoleMiningManagementConfig { + if g == nil { + return nil + } + return g.RoleMiningManagementConfig +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getsessionsettingsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getsessionsettingsresponse.go index 83988ce4..151e500a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getsessionsettingsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getsessionsettingsresponse.go @@ -4,7 +4,7 @@ package shared // The GetSessionSettingsResponse message. type GetSessionSettingsResponse struct { - // The SessionSettings message. + // SessionSettings configures session security for the tenant, including timeouts and per-role IP restrictions. SessionSettings *SessionSettings `json:"sessionSettings,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getstepupproviderresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getstepupproviderresponse.go index b92d1781..0a0cb757 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getstepupproviderresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getstepupproviderresponse.go @@ -4,7 +4,7 @@ package shared // The GetStepUpProviderResponse message. type GetStepUpProviderResponse struct { - // The StepUpProvider message. + // StepUpProvider represents a configured step-up authentication integration (e.g., Duo, custom OIDC). // // This message contains a oneof named settings. Only a single field of the following list may be set at a time: // - oauth2 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getsuggestionresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getsuggestionresponse.go new file mode 100644 index 00000000..76e6e735 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getsuggestionresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GetSuggestionResponse message. +type GetSuggestionResponse struct { + // The RoleMiningManagementSuggestion message. + RoleMiningManagementSuggestion *RoleMiningManagementSuggestion `json:"suggestion,omitempty"` +} + +func (g *GetSuggestionResponse) GetRoleMiningManagementSuggestion() *RoleMiningManagementSuggestion { + if g == nil { + return nil + } + return g.RoleMiningManagementSuggestion +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/gettenantemailproviderresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/gettenantemailproviderresponse.go new file mode 100644 index 00000000..d3f0841a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/gettenantemailproviderresponse.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GetTenantEmailProviderResponse message. +type GetTenantEmailProviderResponse struct { + // TenantEmailProvider is the API representation of the tenant's email provider. + // + // This message contains a oneof named provider. Only a single field of the following list may be set at a time: + // - c1Builtin + // - awsSes + // - sendgrid + // - microsoftGraph + // - googleWorkspace + // + TenantEmailProvider *TenantEmailProvider `json:"emailProvider,omitempty"` +} + +func (g *GetTenantEmailProviderResponse) GetTenantEmailProvider() *TenantEmailProvider { + if g == nil { + return nil + } + return g.TenantEmailProvider +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getusernotificationsettingsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getusernotificationsettingsresponse.go new file mode 100644 index 00000000..e2b47009 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getusernotificationsettingsresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GetUserNotificationSettingsResponse message. +type GetUserNotificationSettingsResponse struct { + // UserNotificationSettings contains the calling user's personal notification preferences. + UserNotificationSettings *UserNotificationSettings `json:"userNotificationSettings,omitempty"` +} + +func (g *GetUserNotificationSettingsResponse) GetUserNotificationSettings() *UserNotificationSettings { + if g == nil { + return nil + } + return g.UserNotificationSettings +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getuserownerresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getuserownerresponse.go new file mode 100644 index 00000000..09defb16 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getuserownerresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// GetUserOwnerResponse is the response for getting a user ownership source. +type GetUserOwnerResponse struct { + // AppOwnerUser represents a user ownership source for an app. + AppOwnerUser *AppOwnerUser `json:"appOwnerUser,omitempty"` +} + +func (g *GetUserOwnerResponse) GetAppOwnerUser() *AppOwnerUser { + if g == nil { + return nil + } + return g.AppOwnerUser +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getuserprofiletypesresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getuserprofiletypesresponse.go index 3c54ac2e..0bf7022a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getuserprofiletypesresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/getuserprofiletypesresponse.go @@ -2,9 +2,9 @@ package shared -// The GetUserProfileTypesResponse message. +// GetUserProfileTypesResponse is the response containing the profile types for a user. type GetUserProfileTypesResponse struct { - // The profileTypes field. + // The list of profile types associated with the user across their connected apps. ProfileTypes []ProfileType `json:"profileTypes,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/googleworkspaceproviderconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/googleworkspaceproviderconfig.go new file mode 100644 index 00000000..7c9c0f56 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/googleworkspaceproviderconfig.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// GoogleWorkspaceProviderConfig configures sending via Google Workspace Gmail API +// +// using domain-wide delegation with a service account. +// Requires: customer Workspace super admin grants DWD to the service account's +// OAuth client ID for the gmail.send scope. +type GoogleWorkspaceProviderConfig struct { + // The Workspace user email to impersonate via domain-wide delegation. + // Typically a dedicated sender like noreply@customer.com. + DelegatedUser *string `json:"delegatedUser,omitempty"` + // Service account JSON credentials. Write-only: accepted on create/update, never returned in Get. + // Empty on update means "keep existing credentials". + ServiceAccountJSON *string `json:"serviceAccountJson,omitempty"` +} + +func (g *GoogleWorkspaceProviderConfig) GetDelegatedUser() *string { + if g == nil { + return nil + } + return g.DelegatedUser +} + +func (g *GoogleWorkspaceProviderConfig) GetServiceAccountJSON() *string { + if g == nil { + return nil + } + return g.ServiceAccountJSON +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusioncriteria.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusioncriteria.go new file mode 100644 index 00000000..c2008621 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusioncriteria.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GrantEntitlementExclusionCriteria message. +type GrantEntitlementExclusionCriteria struct { + // The excludedAppIds field. + ExcludedAppIds []string `json:"excludedAppIds,omitempty"` + // The excludedComplianceFrameworkIds field. + ExcludedComplianceFrameworkIds []string `json:"excludedComplianceFrameworkIds,omitempty"` + // The excludedRiskLevelIds field. + ExcludedRiskLevelIds []string `json:"excludedRiskLevelIds,omitempty"` +} + +func (g *GrantEntitlementExclusionCriteria) GetExcludedAppIds() []string { + if g == nil { + return nil + } + return g.ExcludedAppIds +} + +func (g *GrantEntitlementExclusionCriteria) GetExcludedComplianceFrameworkIds() []string { + if g == nil { + return nil + } + return g.ExcludedComplianceFrameworkIds +} + +func (g *GrantEntitlementExclusionCriteria) GetExcludedRiskLevelIds() []string { + if g == nil { + return nil + } + return g.ExcludedRiskLevelIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusionlist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusionlist.go new file mode 100644 index 00000000..240469eb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusionlist.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GrantEntitlementExclusionList message. +type GrantEntitlementExclusionList struct { + // The excludedAppEntitlementRefs field. + ExcludedAppEntitlementRefs []AppEntitlementRef `json:"excludedAppEntitlementRefs,omitempty"` +} + +func (g *GrantEntitlementExclusionList) GetExcludedAppEntitlementRefs() []AppEntitlementRef { + if g == nil { + return nil + } + return g.ExcludedAppEntitlementRefs +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusionlistcel.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusionlistcel.go new file mode 100644 index 00000000..0c343ea6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusionlistcel.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GrantEntitlementExclusionListCel message. +type GrantEntitlementExclusionListCel struct { + // The excludedAppEntitlementRefsCel field. + ExcludedAppEntitlementRefsCel *string `json:"excludedAppEntitlementRefsCel,omitempty"` +} + +func (g *GrantEntitlementExclusionListCel) GetExcludedAppEntitlementRefsCel() *string { + if g == nil { + return nil + } + return g.ExcludedAppEntitlementRefsCel +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusionnone.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusionnone.go new file mode 100644 index 00000000..95866686 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementexclusionnone.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GrantEntitlementExclusionNone message. +type GrantEntitlementExclusionNone struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementinclusioncriteria.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementinclusioncriteria.go new file mode 100644 index 00000000..a4c2033e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementinclusioncriteria.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GrantEntitlementInclusionCriteria message. +type GrantEntitlementInclusionCriteria struct { + // The appIds field. + AppIds []string `json:"appIds,omitempty"` + // The complianceFrameworkIds field. + ComplianceFrameworkIds []string `json:"complianceFrameworkIds,omitempty"` + // The riskLevelIds field. + RiskLevelIds []string `json:"riskLevelIds,omitempty"` +} + +func (g *GrantEntitlementInclusionCriteria) GetAppIds() []string { + if g == nil { + return nil + } + return g.AppIds +} + +func (g *GrantEntitlementInclusionCriteria) GetComplianceFrameworkIds() []string { + if g == nil { + return nil + } + return g.ComplianceFrameworkIds +} + +func (g *GrantEntitlementInclusionCriteria) GetRiskLevelIds() []string { + if g == nil { + return nil + } + return g.RiskLevelIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementinclusionlist.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementinclusionlist.go new file mode 100644 index 00000000..420cedb1 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementinclusionlist.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GrantEntitlementInclusionList message. +type GrantEntitlementInclusionList struct { + // The appEntitlementRefs field. + AppEntitlementRefs []AppEntitlementRef `json:"appEntitlementRefs,omitempty"` +} + +func (g *GrantEntitlementInclusionList) GetAppEntitlementRefs() []AppEntitlementRef { + if g == nil { + return nil + } + return g.AppEntitlementRefs +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementinclusionlistcel.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementinclusionlistcel.go new file mode 100644 index 00000000..66dfe51d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlementinclusionlistcel.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The GrantEntitlementInclusionListCel message. +type GrantEntitlementInclusionListCel struct { + // The appEntitlementRefsCel field. + AppEntitlementRefsCel *string `json:"appEntitlementRefsCel,omitempty"` +} + +func (g *GrantEntitlementInclusionListCel) GetAppEntitlementRefsCel() *string { + if g == nil { + return nil + } + return g.AppEntitlementRefsCel +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlements.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlements.go index 2e038232..eaad2243 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlements.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/grantentitlements.go @@ -3,38 +3,94 @@ package shared // The GrantEntitlements message. +// +// This message contains a oneof named inclusion. Only a single field of the following list may be set at a time: +// - inclusionList +// - inclusionCriteria +// - inclusionListCel +// +// This message contains a oneof named exclusion. Only a single field of the following list may be set at a time: +// - exclusionNone +// - exclusionList +// - exclusionCriteria +// - exclusionListCel type GrantEntitlements struct { + // The GrantEntitlementExclusionCriteria message. + GrantEntitlementExclusionCriteria *GrantEntitlementExclusionCriteria `json:"exclusionCriteria,omitempty"` + // The GrantEntitlementExclusionList message. + GrantEntitlementExclusionList *GrantEntitlementExclusionList `json:"exclusionList,omitempty"` + // The GrantEntitlementExclusionListCel message. + GrantEntitlementExclusionListCel *GrantEntitlementExclusionListCel `json:"exclusionListCel,omitempty"` + // The GrantEntitlementExclusionNone message. + GrantEntitlementExclusionNone *GrantEntitlementExclusionNone `json:"exclusionNone,omitempty"` + // The GrantEntitlementInclusionCriteria message. + GrantEntitlementInclusionCriteria *GrantEntitlementInclusionCriteria `json:"inclusionCriteria,omitempty"` + // The GrantEntitlementInclusionList message. + GrantEntitlementInclusionList *GrantEntitlementInclusionList `json:"inclusionList,omitempty"` + // The GrantEntitlementInclusionListCel message. + GrantEntitlementInclusionListCel *GrantEntitlementInclusionListCel `json:"inclusionListCel,omitempty"` // A reference to a user. UserRef *UserRef `json:"userRef,omitempty"` - // The appEntitlementRefs field. - AppEntitlementRefs []AppEntitlementRef `json:"appEntitlementRefs,omitempty"` - // The appEntitlementRefsCel field. - AppEntitlementRefsCel *string `json:"appEntitlementRefsCel,omitempty"` // If true, the step will use the subject user of the automation as the subject. UseSubjectUser *bool `json:"useSubjectUser,omitempty"` // The userIdCel field. UserIDCel *string `json:"userIdCel,omitempty"` } -func (g *GrantEntitlements) GetUserRef() *UserRef { +func (g *GrantEntitlements) GetGrantEntitlementExclusionCriteria() *GrantEntitlementExclusionCriteria { if g == nil { return nil } - return g.UserRef + return g.GrantEntitlementExclusionCriteria +} + +func (g *GrantEntitlements) GetGrantEntitlementExclusionList() *GrantEntitlementExclusionList { + if g == nil { + return nil + } + return g.GrantEntitlementExclusionList } -func (g *GrantEntitlements) GetAppEntitlementRefs() []AppEntitlementRef { +func (g *GrantEntitlements) GetGrantEntitlementExclusionListCel() *GrantEntitlementExclusionListCel { if g == nil { return nil } - return g.AppEntitlementRefs + return g.GrantEntitlementExclusionListCel } -func (g *GrantEntitlements) GetAppEntitlementRefsCel() *string { +func (g *GrantEntitlements) GetGrantEntitlementExclusionNone() *GrantEntitlementExclusionNone { if g == nil { return nil } - return g.AppEntitlementRefsCel + return g.GrantEntitlementExclusionNone +} + +func (g *GrantEntitlements) GetGrantEntitlementInclusionCriteria() *GrantEntitlementInclusionCriteria { + if g == nil { + return nil + } + return g.GrantEntitlementInclusionCriteria +} + +func (g *GrantEntitlements) GetGrantEntitlementInclusionList() *GrantEntitlementInclusionList { + if g == nil { + return nil + } + return g.GrantEntitlementInclusionList +} + +func (g *GrantEntitlements) GetGrantEntitlementInclusionListCel() *GrantEntitlementInclusionListCel { + if g == nil { + return nil + } + return g.GrantEntitlementInclusionListCel +} + +func (g *GrantEntitlements) GetUserRef() *UserRef { + if g == nil { + return nil + } + return g.UserRef } func (g *GrantEntitlements) GetUseSubjectUser() *bool { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/granttriggerfilter.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/granttriggerfilter.go index d4ecef85..f2caef9f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/granttriggerfilter.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/granttriggerfilter.go @@ -12,8 +12,6 @@ package shared type GrantTriggerFilter struct { // The AccountFilter message. AccountFilter *AccountFilter `json:"accountFilter,omitempty"` - // The EntitlementFilter message. - EntitlementFilter *EntitlementFilter `json:"entitlementFilter,omitempty"` // The EntitlementInclusionAll message. EntitlementInclusionAll *EntitlementInclusionAll `json:"inclusionAll,omitempty"` // The EntitlementInclusionCriteria message. @@ -33,13 +31,6 @@ func (g *GrantTriggerFilter) GetAccountFilter() *AccountFilter { return g.AccountFilter } -func (g *GrantTriggerFilter) GetEntitlementFilter() *EntitlementFilter { - if g == nil { - return nil - } - return g.EntitlementFilter -} - func (g *GrantTriggerFilter) GetEntitlementInclusionAll() *EntitlementInclusionAll { if g == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/groupauthzvault.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/groupauthzvault.go index 31fb3e88..130027dd 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/groupauthzvault.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/groupauthzvault.go @@ -2,6 +2,6 @@ package shared -// The GroupAuthzVault message. +// GroupAuthzVault configures a vault that uses group-based authorization to control access to stored credentials. type GroupAuthzVault struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/groupprovisioner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/groupprovisioner.go new file mode 100644 index 00000000..f565ca7d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/groupprovisioner.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// GroupProvisioner resolves to members of a specific group. +type GroupProvisioner struct { + // Whether the provisioner can reassign the task. + AllowReassignment *bool `json:"allowReassignment,omitempty"` + // The app group ID (entitlement ID). + AppGroupID *string `json:"appGroupId,omitempty"` + // The app ID containing the group. + AppID *string `json:"appId,omitempty"` + // Fallback user IDs if no group members are found. + FallbackUserIds []string `json:"fallbackUserIds,omitempty"` +} + +func (g *GroupProvisioner) GetAllowReassignment() *bool { + if g == nil { + return nil + } + return g.AllowReassignment +} + +func (g *GroupProvisioner) GetAppGroupID() *string { + if g == nil { + return nil + } + return g.AppGroupID +} + +func (g *GroupProvisioner) GetAppID() *string { + if g == nil { + return nil + } + return g.AppID +} + +func (g *GroupProvisioner) GetFallbackUserIds() []string { + if g == nil { + return nil + } + return g.FallbackUserIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hook.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hook.go new file mode 100644 index 00000000..14dad891 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hook.go @@ -0,0 +1,255 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// Event - The event field. +type Event string + +const ( + EventHookEventTypeUnspecified Event = "HOOK_EVENT_TYPE_UNSPECIFIED" + EventHookEventTypePreToolUse Event = "HOOK_EVENT_TYPE_PRE_TOOL_USE" + EventHookEventTypePostToolUse Event = "HOOK_EVENT_TYPE_POST_TOOL_USE" +) + +func (e Event) ToPointer() *Event { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Event) IsExact() bool { + if e != nil { + switch *e { + case "HOOK_EVENT_TYPE_UNSPECIFIED", "HOOK_EVENT_TYPE_PRE_TOOL_USE", "HOOK_EVENT_TYPE_POST_TOOL_USE": + return true + } + } + return false +} + +// Hook represents a customer-configured interception point for tool calls. +// +// This message contains a oneof named hook_type. Only a single field of the following list may be set at a time: +// - function +// - builtinPattern +type Hook struct { + // BuiltInPattern references a ConductorOne-maintained DLP pattern. + // The specific pattern and its configuration are encoded as a oneof. + // + // This message contains a oneof named config. Only a single field of the following list may be set at a time: + // - piiRedaction + // - creditCardBlocking + // - queryScopeLimit + // - writeAuthorization + // - sensitiveFileGuard + // + BuiltInPattern *BuiltInPattern `json:"builtinPattern,omitempty"` + // HookFilter determines which tool calls a hook applies to. + HookFilter *HookFilter `json:"filter,omitempty"` + // HookFunctionRef identifies a customer-authored function to invoke. + HookFunctionRef *HookFunctionRef `json:"function,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The description field. + Description *string `json:"description,omitempty"` + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The event field. + Event *Event `json:"event,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + // The priority field. + Priority *int `json:"priority,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (h Hook) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(h, "", false) +} + +func (h *Hook) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &h, "", false, nil); err != nil { + return err + } + return nil +} + +func (h *Hook) GetBuiltInPattern() *BuiltInPattern { + if h == nil { + return nil + } + return h.BuiltInPattern +} + +func (h *Hook) GetHookFilter() *HookFilter { + if h == nil { + return nil + } + return h.HookFilter +} + +func (h *Hook) GetHookFunctionRef() *HookFunctionRef { + if h == nil { + return nil + } + return h.HookFunctionRef +} + +func (h *Hook) GetCreatedAt() *time.Time { + if h == nil { + return nil + } + return h.CreatedAt +} + +func (h *Hook) GetDescription() *string { + if h == nil { + return nil + } + return h.Description +} + +func (h *Hook) GetDisplayName() *string { + if h == nil { + return nil + } + return h.DisplayName +} + +func (h *Hook) GetEnabled() *bool { + if h == nil { + return nil + } + return h.Enabled +} + +func (h *Hook) GetEvent() *Event { + if h == nil { + return nil + } + return h.Event +} + +func (h *Hook) GetID() *string { + if h == nil { + return nil + } + return h.ID +} + +func (h *Hook) GetPriority() *int { + if h == nil { + return nil + } + return h.Priority +} + +func (h *Hook) GetUpdatedAt() *time.Time { + if h == nil { + return nil + } + return h.UpdatedAt +} + +// HookInput - Hook represents a customer-configured interception point for tool calls. +// +// This message contains a oneof named hook_type. Only a single field of the following list may be set at a time: +// - function +// - builtinPattern +type HookInput struct { + // BuiltInPattern references a ConductorOne-maintained DLP pattern. + // The specific pattern and its configuration are encoded as a oneof. + // + // This message contains a oneof named config. Only a single field of the following list may be set at a time: + // - piiRedaction + // - creditCardBlocking + // - queryScopeLimit + // - writeAuthorization + // - sensitiveFileGuard + // + BuiltInPattern *BuiltInPattern `json:"builtinPattern,omitempty"` + // HookFilter determines which tool calls a hook applies to. + HookFilter *HookFilter `json:"filter,omitempty"` + // HookFunctionRef identifies a customer-authored function to invoke. + HookFunctionRef *HookFunctionRef `json:"function,omitempty"` + // The description field. + Description *string `json:"description,omitempty"` + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The event field. + Event *Event `json:"event,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + // The priority field. + Priority *int `json:"priority,omitempty"` +} + +func (h *HookInput) GetBuiltInPattern() *BuiltInPattern { + if h == nil { + return nil + } + return h.BuiltInPattern +} + +func (h *HookInput) GetHookFilter() *HookFilter { + if h == nil { + return nil + } + return h.HookFilter +} + +func (h *HookInput) GetHookFunctionRef() *HookFunctionRef { + if h == nil { + return nil + } + return h.HookFunctionRef +} + +func (h *HookInput) GetDescription() *string { + if h == nil { + return nil + } + return h.Description +} + +func (h *HookInput) GetDisplayName() *string { + if h == nil { + return nil + } + return h.DisplayName +} + +func (h *HookInput) GetEnabled() *bool { + if h == nil { + return nil + } + return h.Enabled +} + +func (h *HookInput) GetEvent() *Event { + if h == nil { + return nil + } + return h.Event +} + +func (h *HookInput) GetID() *string { + if h == nil { + return nil + } + return h.ID +} + +func (h *HookInput) GetPriority() *int { + if h == nil { + return nil + } + return h.Priority +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookfilter.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookfilter.go new file mode 100644 index 00000000..73440df3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookfilter.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// HookFilter determines which tool calls a hook applies to. +type HookFilter struct { + // CEL expression evaluated against tool call context. + // Available variable: ctx.tool_name (string). + // Must evaluate to bool. Empty matches all tools. + CelExpression *string `json:"celExpression,omitempty"` +} + +func (h *HookFilter) GetCelExpression() *string { + if h == nil { + return nil + } + return h.CelExpression +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookfunctionref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookfunctionref.go new file mode 100644 index 00000000..1b70af4d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookfunctionref.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// HookFunctionRef identifies a customer-authored function to invoke. +type HookFunctionRef struct { + // If empty, the function's published commit is used at invocation time. + CommitID *string `json:"commitId,omitempty"` + // The functionId field. + FunctionID *string `json:"functionId,omitempty"` +} + +func (h *HookFunctionRef) GetCommitID() *string { + if h == nil { + return nil + } + return h.CommitID +} + +func (h *HookFunctionRef) GetFunctionID() *string { + if h == nil { + return nil + } + return h.FunctionID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookref.go new file mode 100644 index 00000000..d7193757 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookref.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The HookRef message. +type HookRef struct { + // The id field. + ID *string `json:"id,omitempty"` +} + +func (h *HookRef) GetID() *string { + if h == nil { + return nil + } + return h.ID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookssearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookssearchrequest.go new file mode 100644 index 00000000..7f76bc57 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookssearchrequest.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The HooksSearchRequest message. +type HooksSearchRequest struct { + // The pageSize field. + PageSize *int `json:"pageSize,omitempty"` + // The pageToken field. + PageToken *string `json:"pageToken,omitempty"` + // The query field. + Query *string `json:"query,omitempty"` + // The refs field. + Refs []HookRef `json:"refs,omitempty"` +} + +func (h *HooksSearchRequest) GetPageSize() *int { + if h == nil { + return nil + } + return h.PageSize +} + +func (h *HooksSearchRequest) GetPageToken() *string { + if h == nil { + return nil + } + return h.PageToken +} + +func (h *HooksSearchRequest) GetQuery() *string { + if h == nil { + return nil + } + return h.Query +} + +func (h *HooksSearchRequest) GetRefs() []HookRef { + if h == nil { + return nil + } + return h.Refs +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookssearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookssearchresponse.go new file mode 100644 index 00000000..14ec96f4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hookssearchresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The HooksSearchResponse message. +type HooksSearchResponse struct { + // The list field. + List []Hook `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (h *HooksSearchResponse) GetList() []Hook { + if h == nil { + return nil + } + return h.List +} + +func (h *HooksSearchResponse) GetNextPageToken() *string { + if h == nil { + return nil + } + return h.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicecreaterequest.go new file mode 100644 index 00000000..6fb267da --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicecreaterequest.go @@ -0,0 +1,116 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// HooksServiceCreateRequestEvent - The event field. +type HooksServiceCreateRequestEvent string + +const ( + HooksServiceCreateRequestEventHookEventTypeUnspecified HooksServiceCreateRequestEvent = "HOOK_EVENT_TYPE_UNSPECIFIED" + HooksServiceCreateRequestEventHookEventTypePreToolUse HooksServiceCreateRequestEvent = "HOOK_EVENT_TYPE_PRE_TOOL_USE" + HooksServiceCreateRequestEventHookEventTypePostToolUse HooksServiceCreateRequestEvent = "HOOK_EVENT_TYPE_POST_TOOL_USE" +) + +func (e HooksServiceCreateRequestEvent) ToPointer() *HooksServiceCreateRequestEvent { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *HooksServiceCreateRequestEvent) IsExact() bool { + if e != nil { + switch *e { + case "HOOK_EVENT_TYPE_UNSPECIFIED", "HOOK_EVENT_TYPE_PRE_TOOL_USE", "HOOK_EVENT_TYPE_POST_TOOL_USE": + return true + } + } + return false +} + +// The HooksServiceCreateRequest message. +// +// This message contains a oneof named hook_type. Only a single field of the following list may be set at a time: +// - function +// - builtinPattern +type HooksServiceCreateRequest struct { + // BuiltInPattern references a ConductorOne-maintained DLP pattern. + // The specific pattern and its configuration are encoded as a oneof. + // + // This message contains a oneof named config. Only a single field of the following list may be set at a time: + // - piiRedaction + // - creditCardBlocking + // - queryScopeLimit + // - writeAuthorization + // - sensitiveFileGuard + // + BuiltInPattern *BuiltInPattern `json:"builtinPattern,omitempty"` + // HookFilter determines which tool calls a hook applies to. + HookFilter *HookFilter `json:"filter,omitempty"` + // HookFunctionRef identifies a customer-authored function to invoke. + HookFunctionRef *HookFunctionRef `json:"function,omitempty"` + // The description field. + Description *string `json:"description,omitempty"` + // The displayName field. + DisplayName string `json:"displayName"` + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The event field. + Event *HooksServiceCreateRequestEvent `json:"event,omitempty"` + // The priority field. + Priority *int `json:"priority,omitempty"` +} + +func (h *HooksServiceCreateRequest) GetBuiltInPattern() *BuiltInPattern { + if h == nil { + return nil + } + return h.BuiltInPattern +} + +func (h *HooksServiceCreateRequest) GetHookFilter() *HookFilter { + if h == nil { + return nil + } + return h.HookFilter +} + +func (h *HooksServiceCreateRequest) GetHookFunctionRef() *HookFunctionRef { + if h == nil { + return nil + } + return h.HookFunctionRef +} + +func (h *HooksServiceCreateRequest) GetDescription() *string { + if h == nil { + return nil + } + return h.Description +} + +func (h *HooksServiceCreateRequest) GetDisplayName() string { + if h == nil { + return "" + } + return h.DisplayName +} + +func (h *HooksServiceCreateRequest) GetEnabled() *bool { + if h == nil { + return nil + } + return h.Enabled +} + +func (h *HooksServiceCreateRequest) GetEvent() *HooksServiceCreateRequestEvent { + if h == nil { + return nil + } + return h.Event +} + +func (h *HooksServiceCreateRequest) GetPriority() *int { + if h == nil { + return nil + } + return h.Priority +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicecreateresponse.go new file mode 100644 index 00000000..13c1b07c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicecreateresponse.go @@ -0,0 +1,21 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The HooksServiceCreateResponse message. +type HooksServiceCreateResponse struct { + // Hook represents a customer-configured interception point for tool calls. + // + // This message contains a oneof named hook_type. Only a single field of the following list may be set at a time: + // - function + // - builtinPattern + // + Hook *Hook `json:"hook,omitempty"` +} + +func (h *HooksServiceCreateResponse) GetHook() *Hook { + if h == nil { + return nil + } + return h.Hook +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicedeleterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicedeleterequest.go new file mode 100644 index 00000000..715f416d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicedeleterequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The HooksServiceDeleteRequest message. +type HooksServiceDeleteRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicedeleteresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicedeleteresponse.go new file mode 100644 index 00000000..0a4ee67a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicedeleteresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The HooksServiceDeleteResponse message. +type HooksServiceDeleteResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicegetresponse.go new file mode 100644 index 00000000..7b3fcdcc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicegetresponse.go @@ -0,0 +1,21 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The HooksServiceGetResponse message. +type HooksServiceGetResponse struct { + // Hook represents a customer-configured interception point for tool calls. + // + // This message contains a oneof named hook_type. Only a single field of the following list may be set at a time: + // - function + // - builtinPattern + // + Hook *Hook `json:"hook,omitempty"` +} + +func (h *HooksServiceGetResponse) GetHook() *Hook { + if h == nil { + return nil + } + return h.Hook +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicelistresponse.go new file mode 100644 index 00000000..660875f2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksservicelistresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The HooksServiceListResponse message. +type HooksServiceListResponse struct { + // The list field. + List []Hook `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (h *HooksServiceListResponse) GetList() []Hook { + if h == nil { + return nil + } + return h.List +} + +func (h *HooksServiceListResponse) GetNextPageToken() *string { + if h == nil { + return nil + } + return h.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksserviceupdaterequest.go new file mode 100644 index 00000000..117f3fa3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksserviceupdaterequest.go @@ -0,0 +1,29 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The HooksServiceUpdateRequest message. +type HooksServiceUpdateRequest struct { + // Hook represents a customer-configured interception point for tool calls. + // + // This message contains a oneof named hook_type. Only a single field of the following list may be set at a time: + // - function + // - builtinPattern + // + Hook *HookInput `json:"hook,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` +} + +func (h *HooksServiceUpdateRequest) GetHook() *HookInput { + if h == nil { + return nil + } + return h.Hook +} + +func (h *HooksServiceUpdateRequest) GetUpdateMask() *string { + if h == nil { + return nil + } + return h.UpdateMask +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksserviceupdateresponse.go new file mode 100644 index 00000000..e31f080c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/hooksserviceupdateresponse.go @@ -0,0 +1,21 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The HooksServiceUpdateResponse message. +type HooksServiceUpdateResponse struct { + // Hook represents a customer-configured interception point for tool calls. + // + // This message contains a oneof named hook_type. Only a single field of the following list may be set at a time: + // - function + // - builtinPattern + // + Hook *Hook `json:"hook,omitempty"` +} + +func (h *HooksServiceUpdateResponse) GetHook() *Hook { + if h == nil { + return nil + } + return h.Hook +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/identityusertarget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/identityusertarget.go new file mode 100644 index 00000000..a8e0c8ba --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/identityusertarget.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The IdentityUserTarget message. +type IdentityUserTarget struct { + // The identityUserId field. + IdentityUserID *string `json:"identityUserId,omitempty"` +} + +func (i *IdentityUserTarget) GetIdentityUserID() *string { + if i == nil { + return nil + } + return i.IdentityUserID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int32rules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int32rules.go index 987d6050..710a9e44 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int32rules.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int32rules.go @@ -86,3 +86,6 @@ func (i *Int32Rules) GetNotIn() []int { } return i.NotIn } + +// #region class-body-int32rules +// #endregion class-body-int32rules diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int64field.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int64field.go index 5411d2a2..566388ce 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int64field.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int64field.go @@ -2,29 +2,36 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // The Int64Field message. // // This message contains a oneof named view. Only a single field of the following list may be set at a time: // - numberField -// -// This message contains a oneof named _default_value. Only a single field of the following list may be set at a time: -// - defaultValue -// -// This message contains a oneof named _rules. Only a single field of the following list may be set at a time: -// - rules type Int64Field struct { // Int64Rules describes the constraints applied to `int64` values Int64Rules *Int64Rules `json:"rules,omitempty"` // The NumberField message. NumberField *NumberField `json:"numberField,omitempty"` // The defaultValue field. - // This field is part of the `_default_value` oneof. - // See the documentation for `c1.api.form.v1.Int64Field` for more details. DefaultValue *int64 `integer:"string" json:"defaultValue,omitempty"` // The placeholder field. Placeholder *string `json:"placeholder,omitempty"` } +func (i Int64Field) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(i, "", false) +} + +func (i *Int64Field) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &i, "", false, nil); err != nil { + return err + } + return nil +} + func (i *Int64Field) GetInt64Rules() *Int64Rules { if i == nil { return nil @@ -52,3 +59,6 @@ func (i *Int64Field) GetPlaceholder() *string { } return i.Placeholder } + +// #region class-body-int64field +// #endregion class-body-int64field diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int64rules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int64rules.go index ef63ada8..ed46e22e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int64rules.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/int64rules.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // Int64Rules describes the constraints applied to `int64` values type Int64Rules struct { // Const specifies that this field must be exactly the specified value @@ -31,6 +35,17 @@ type Int64Rules struct { NotIn []int64 `integer:"string" json:"notIn,omitempty"` } +func (i Int64Rules) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(i, "", false) +} + +func (i *Int64Rules) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &i, "", false, nil); err != nil { + return err + } + return nil +} + func (i *Int64Rules) GetConst() *int64 { if i == nil { return nil @@ -86,3 +101,6 @@ func (i *Int64Rules) GetNotIn() []int64 { } return i.NotIn } + +// #region class-body-int64rules +// #endregion class-body-int64rules diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/item.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/item.go new file mode 100644 index 00000000..9216e369 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/item.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The Item message. +type Item struct { + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + // The value field. + Value *string `json:"value,omitempty"` +} + +func (i *Item) GetDisplayName() *string { + if i == nil { + return nil + } + return i.DisplayName +} + +func (i *Item) GetValue() *string { + if i == nil { + return nil + } + return i.Value +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/keyvaluefield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/keyvaluefield.go index 1aef26f2..cd1e8155 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/keyvaluefield.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/keyvaluefield.go @@ -6,6 +6,8 @@ package shared type KeyValueField struct { // The secret field. Secret *bool `json:"secret,omitempty"` + // When true, UI allows file uploads per key-value entry. + SupportsFileUpload *bool `json:"supportsFileUpload,omitempty"` } func (k *KeyValueField) GetSecret() *bool { @@ -14,3 +16,10 @@ func (k *KeyValueField) GetSecret() *bool { } return k.Secret } + +func (k *KeyValueField) GetSupportsFileUpload() *bool { + if k == nil { + return nil + } + return k.SupportsFileUpload +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listappresourceownersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listappresourceownersresponse.go index d7189034..8fcf76be 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listappresourceownersresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listappresourceownersresponse.go @@ -4,6 +4,9 @@ package shared // The ListAppResourceOwnersResponse message contains a list of results and a nextPageToken if applicable type ListAppResourceOwnersResponse struct { + // User IDs of owners that are immutable and cannot be removed by the user. + // These owners are managed by the system (e.g., connector-sourced) and will be updated automatically. + ImmutableUserIds []string `json:"immutableUserIds,omitempty"` // The list of results containing up to X results, where X is the page size defined in the request. List []User `json:"list,omitempty"` // The nextPageToken is shown for the next page if the number of results is larger than the max page size. @@ -12,6 +15,13 @@ type ListAppResourceOwnersResponse struct { NextPageToken *string `json:"nextPageToken,omitempty"` } +func (l *ListAppResourceOwnersResponse) GetImmutableUserIds() []string { + if l == nil { + return nil + } + return l.ImmutableUserIds +} + func (l *ListAppResourceOwnersResponse) GetList() []User { if l == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listautomationexecutionsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listautomationexecutionsresponse.go index 0fac5789..d947b1c6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listautomationexecutionsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listautomationexecutionsresponse.go @@ -4,9 +4,9 @@ package shared // The ListAutomationExecutionsResponse message. type ListAutomationExecutionsResponse struct { - // The automationExecutions field. + // The page of automation executions. AutomationExecutions []AutomationExecution `json:"automationExecutions,omitempty"` - // The nextPageToken field. + // Token to retrieve the next page of results, empty when no more results exist. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listautomationsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listautomationsresponse.go index eb09f41c..60997fa6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listautomationsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listautomationsresponse.go @@ -4,9 +4,9 @@ package shared // The ListAutomationsResponse message. type ListAutomationsResponse struct { - // The list field. + // The page of automations. List []Automation `json:"list,omitempty"` - // The nextPageToken field. + // Token to retrieve the next page of results, empty when no more results exist. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listcomplianceframeworksresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listcomplianceframeworksresponse.go index beeb4f4c..2ed47487 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listcomplianceframeworksresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listcomplianceframeworksresponse.go @@ -2,11 +2,11 @@ package shared -// The ListComplianceFrameworksResponse message. +// ListComplianceFrameworksResponse is the response for listing compliance framework attribute values. type ListComplianceFrameworksResponse struct { - // The list field. + // The list of compliance framework attribute values. List []AttributeValue `json:"list,omitempty"` - // The nextPageToken field. + // The token to retrieve the next page of results, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listfindingroutingrulesresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listfindingroutingrulesresponse.go new file mode 100644 index 00000000..6e5e2071 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listfindingroutingrulesresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ListFindingRoutingRulesResponse message. +type ListFindingRoutingRulesResponse struct { + // The list field. + List []FindingRoutingRule `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (l *ListFindingRoutingRulesResponse) GetList() []FindingRoutingRule { + if l == nil { + return nil + } + return l.List +} + +func (l *ListFindingRoutingRulesResponse) GetNextPageToken() *string { + if l == nil { + return nil + } + return l.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listorgdomainsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listorgdomainsresponse.go index 2f464db0..a78bda62 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listorgdomainsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listorgdomainsresponse.go @@ -4,9 +4,9 @@ package shared // The ListOrgDomainsResponse message. type ListOrgDomainsResponse struct { - // The list field. + // The list of verified domains. List []OrgDomain `json:"list,omitempty"` - // The nextPageToken field. + // A token to retrieve the next page of results, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listrisklevelsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listrisklevelsresponse.go index baa2ea32..8e5cd4b6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listrisklevelsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listrisklevelsresponse.go @@ -2,11 +2,11 @@ package shared -// The ListRiskLevelsResponse message. +// ListRiskLevelsResponse is the response for listing risk level attribute values. type ListRiskLevelsResponse struct { - // The list field. + // The list of risk level attribute values. List []AttributeValue `json:"list,omitempty"` - // The nextPageToken field. + // The token to retrieve the next page of results, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listrunsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listrunsresponse.go new file mode 100644 index 00000000..93dc5214 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listrunsresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ListRunsResponse message. +type ListRunsResponse struct { + // The list of role mining analysis runs. + List []RoleMiningManagementRun `json:"list,omitempty"` + // Token to retrieve the next page of results, empty if no more results. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (l *ListRunsResponse) GetList() []RoleMiningManagementRun { + if l == nil { + return nil + } + return l.List +} + +func (l *ListRunsResponse) GetNextPageToken() *string { + if l == nil { + return nil + } + return l.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/liststepupprovidersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/liststepupprovidersresponse.go index f839f5e0..03299d6c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/liststepupprovidersresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/liststepupprovidersresponse.go @@ -4,9 +4,9 @@ package shared // The ListStepUpProvidersResponse message. type ListStepUpProvidersResponse struct { - // The list field. + // The list of step-up authentication providers. List []StepUpProvider `json:"list,omitempty"` - // The nextPageToken field. + // A token to retrieve the next page of results, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listsuggestionsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listsuggestionsresponse.go new file mode 100644 index 00000000..3cba595b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/listsuggestionsresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ListSuggestionsResponse message. +type ListSuggestionsResponse struct { + // The list of role mining suggestions. + List []RoleMiningManagementSuggestion `json:"list,omitempty"` + // Token to retrieve the next page of results, empty if no more results. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (l *ListSuggestionsResponse) GetList() []RoleMiningManagementSuggestion { + if l == nil { + return nil + } + return l.List +} + +func (l *ListSuggestionsResponse) GetNextPageToken() *string { + if l == nil { + return nil + } + return l.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfig.go new file mode 100644 index 00000000..d1c592d4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfig.go @@ -0,0 +1,124 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// LocalDirectoryConfig is the public representation of a C1-managed local +// +// directory configuration. The underlying directory infrastructure is provided +// by the linked App (identified by app_id). +type LocalDirectoryConfig struct { + // Whether unauthenticated users may self-register in this directory. + AllowSelfRegistration *bool `json:"allowSelfRegistration,omitempty"` + // app_id is the identifier for this config and its linked App. Read-only after creation. + AppID *string `json:"appId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Optional FK to a ProfileType applied to new users created via this directory. + DefaultProfileTypeID *string `json:"defaultProfileTypeId,omitempty"` + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + InvitationTTL *string `json:"invitationTtl,omitempty"` + // Whether this is the default local directory for the tenant. + // At most one config per tenant may be the default. + IsDefault *bool `json:"isDefault,omitempty"` + // Optional FK to an onboarding flow applied by default when inviting users. + OnboardingFlowID *string `json:"onboardingFlowId,omitempty"` + // Optional FK to a ThirdPartyOrganization. Empty means standalone (no vendor linkage). + OrganizationID *string `json:"organizationId,omitempty"` + // Email domain allowlist for self-registration. Empty allows any domain when + // allow_self_registration is true. + SelfRegistrationDomains []string `json:"selfRegistrationDomains,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (l LocalDirectoryConfig) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *LocalDirectoryConfig) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, nil); err != nil { + return err + } + return nil +} + +func (l *LocalDirectoryConfig) GetAllowSelfRegistration() *bool { + if l == nil { + return nil + } + return l.AllowSelfRegistration +} + +func (l *LocalDirectoryConfig) GetAppID() *string { + if l == nil { + return nil + } + return l.AppID +} + +func (l *LocalDirectoryConfig) GetCreatedAt() *time.Time { + if l == nil { + return nil + } + return l.CreatedAt +} + +func (l *LocalDirectoryConfig) GetDefaultProfileTypeID() *string { + if l == nil { + return nil + } + return l.DefaultProfileTypeID +} + +func (l *LocalDirectoryConfig) GetDisplayName() *string { + if l == nil { + return nil + } + return l.DisplayName +} + +func (l *LocalDirectoryConfig) GetInvitationTTL() *string { + if l == nil { + return nil + } + return l.InvitationTTL +} + +func (l *LocalDirectoryConfig) GetIsDefault() *bool { + if l == nil { + return nil + } + return l.IsDefault +} + +func (l *LocalDirectoryConfig) GetOnboardingFlowID() *string { + if l == nil { + return nil + } + return l.OnboardingFlowID +} + +func (l *LocalDirectoryConfig) GetOrganizationID() *string { + if l == nil { + return nil + } + return l.OrganizationID +} + +func (l *LocalDirectoryConfig) GetSelfRegistrationDomains() []string { + if l == nil { + return nil + } + return l.SelfRegistrationDomains +} + +func (l *LocalDirectoryConfig) GetUpdatedAt() *time.Time { + if l == nil { + return nil + } + return l.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfiginput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfiginput.go new file mode 100644 index 00000000..d2c02cf4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfiginput.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// LocalDirectoryConfigInput - LocalDirectoryConfig is the public representation of a C1-managed local +// +// directory configuration. The underlying directory infrastructure is provided +// by the linked App (identified by app_id). +type LocalDirectoryConfigInput struct { + // Whether unauthenticated users may self-register in this directory. + AllowSelfRegistration *bool `json:"allowSelfRegistration,omitempty"` + // Optional FK to a ProfileType applied to new users created via this directory. + DefaultProfileTypeID *string `json:"defaultProfileTypeId,omitempty"` + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + InvitationTTL *string `json:"invitationTtl,omitempty"` + // Whether this is the default local directory for the tenant. + // At most one config per tenant may be the default. + IsDefault *bool `json:"isDefault,omitempty"` + // Optional FK to an onboarding flow applied by default when inviting users. + OnboardingFlowID *string `json:"onboardingFlowId,omitempty"` + // Optional FK to a ThirdPartyOrganization. Empty means standalone (no vendor linkage). + OrganizationID *string `json:"organizationId,omitempty"` + // Email domain allowlist for self-registration. Empty allows any domain when + // allow_self_registration is true. + SelfRegistrationDomains []string `json:"selfRegistrationDomains,omitempty"` +} + +func (l *LocalDirectoryConfigInput) GetAllowSelfRegistration() *bool { + if l == nil { + return nil + } + return l.AllowSelfRegistration +} + +func (l *LocalDirectoryConfigInput) GetDefaultProfileTypeID() *string { + if l == nil { + return nil + } + return l.DefaultProfileTypeID +} + +func (l *LocalDirectoryConfigInput) GetDisplayName() *string { + if l == nil { + return nil + } + return l.DisplayName +} + +func (l *LocalDirectoryConfigInput) GetInvitationTTL() *string { + if l == nil { + return nil + } + return l.InvitationTTL +} + +func (l *LocalDirectoryConfigInput) GetIsDefault() *bool { + if l == nil { + return nil + } + return l.IsDefault +} + +func (l *LocalDirectoryConfigInput) GetOnboardingFlowID() *string { + if l == nil { + return nil + } + return l.OnboardingFlowID +} + +func (l *LocalDirectoryConfigInput) GetOrganizationID() *string { + if l == nil { + return nil + } + return l.OrganizationID +} + +func (l *LocalDirectoryConfigInput) GetSelfRegistrationDomains() []string { + if l == nil { + return nil + } + return l.SelfRegistrationDomains +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicecreaterequest.go new file mode 100644 index 00000000..b9ea815f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicecreaterequest.go @@ -0,0 +1,87 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalDirectoryConfigServiceCreateRequest message. +type LocalDirectoryConfigServiceCreateRequest struct { + // The allowSelfRegistration field. + AllowSelfRegistration *bool `json:"allowSelfRegistration,omitempty"` + // FK to the existing App that will back this local directory. + AppID string `json:"appId"` + // The defaultProfileTypeId field. + DefaultProfileTypeID *string `json:"defaultProfileTypeId,omitempty"` + // The displayName field. + DisplayName string `json:"displayName"` + InvitationTTL *string `json:"invitationTtl,omitempty"` + // Whether this should be the default local directory for the tenant. + IsDefault *bool `json:"isDefault,omitempty"` + // The onboardingFlowId field. + OnboardingFlowID *string `json:"onboardingFlowId,omitempty"` + // Optional FK to a ThirdPartyOrganization. + OrganizationID *string `json:"organizationId,omitempty"` + // The selfRegistrationDomains field. + SelfRegistrationDomains []string `json:"selfRegistrationDomains,omitempty"` +} + +func (l *LocalDirectoryConfigServiceCreateRequest) GetAllowSelfRegistration() *bool { + if l == nil { + return nil + } + return l.AllowSelfRegistration +} + +func (l *LocalDirectoryConfigServiceCreateRequest) GetAppID() string { + if l == nil { + return "" + } + return l.AppID +} + +func (l *LocalDirectoryConfigServiceCreateRequest) GetDefaultProfileTypeID() *string { + if l == nil { + return nil + } + return l.DefaultProfileTypeID +} + +func (l *LocalDirectoryConfigServiceCreateRequest) GetDisplayName() string { + if l == nil { + return "" + } + return l.DisplayName +} + +func (l *LocalDirectoryConfigServiceCreateRequest) GetInvitationTTL() *string { + if l == nil { + return nil + } + return l.InvitationTTL +} + +func (l *LocalDirectoryConfigServiceCreateRequest) GetIsDefault() *bool { + if l == nil { + return nil + } + return l.IsDefault +} + +func (l *LocalDirectoryConfigServiceCreateRequest) GetOnboardingFlowID() *string { + if l == nil { + return nil + } + return l.OnboardingFlowID +} + +func (l *LocalDirectoryConfigServiceCreateRequest) GetOrganizationID() *string { + if l == nil { + return nil + } + return l.OrganizationID +} + +func (l *LocalDirectoryConfigServiceCreateRequest) GetSelfRegistrationDomains() []string { + if l == nil { + return nil + } + return l.SelfRegistrationDomains +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicecreateresponse.go new file mode 100644 index 00000000..0a0d5acf --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicecreateresponse.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalDirectoryConfigServiceCreateResponse message. +type LocalDirectoryConfigServiceCreateResponse struct { + // LocalDirectoryConfig is the public representation of a C1-managed local + // directory configuration. The underlying directory infrastructure is provided + // by the linked App (identified by app_id). + LocalDirectoryConfig *LocalDirectoryConfig `json:"localDirectoryConfig,omitempty"` +} + +func (l *LocalDirectoryConfigServiceCreateResponse) GetLocalDirectoryConfig() *LocalDirectoryConfig { + if l == nil { + return nil + } + return l.LocalDirectoryConfig +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicedeleterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicedeleterequest.go new file mode 100644 index 00000000..2ad3076a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicedeleterequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalDirectoryConfigServiceDeleteRequest message. +type LocalDirectoryConfigServiceDeleteRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicedeleteresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicedeleteresponse.go new file mode 100644 index 00000000..7b99310e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicedeleteresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalDirectoryConfigServiceDeleteResponse message. +type LocalDirectoryConfigServiceDeleteResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicegetresponse.go new file mode 100644 index 00000000..cc32b40e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicegetresponse.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalDirectoryConfigServiceGetResponse message. +type LocalDirectoryConfigServiceGetResponse struct { + // LocalDirectoryConfig is the public representation of a C1-managed local + // directory configuration. The underlying directory infrastructure is provided + // by the linked App (identified by app_id). + LocalDirectoryConfig *LocalDirectoryConfig `json:"localDirectoryConfig,omitempty"` +} + +func (l *LocalDirectoryConfigServiceGetResponse) GetLocalDirectoryConfig() *LocalDirectoryConfig { + if l == nil { + return nil + } + return l.LocalDirectoryConfig +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicelistresponse.go new file mode 100644 index 00000000..c16cd7a2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigservicelistresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalDirectoryConfigServiceListResponse message. +type LocalDirectoryConfigServiceListResponse struct { + // The list field. + List []LocalDirectoryConfig `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (l *LocalDirectoryConfigServiceListResponse) GetList() []LocalDirectoryConfig { + if l == nil { + return nil + } + return l.List +} + +func (l *LocalDirectoryConfigServiceListResponse) GetNextPageToken() *string { + if l == nil { + return nil + } + return l.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigserviceupdaterequest.go new file mode 100644 index 00000000..ee7efca4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigserviceupdaterequest.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalDirectoryConfigServiceUpdateRequest message. +type LocalDirectoryConfigServiceUpdateRequest struct { + // LocalDirectoryConfig is the public representation of a C1-managed local + // directory configuration. The underlying directory infrastructure is provided + // by the linked App (identified by app_id). + LocalDirectoryConfig *LocalDirectoryConfigInput `json:"localDirectoryConfig,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` +} + +func (l *LocalDirectoryConfigServiceUpdateRequest) GetLocalDirectoryConfig() *LocalDirectoryConfigInput { + if l == nil { + return nil + } + return l.LocalDirectoryConfig +} + +func (l *LocalDirectoryConfigServiceUpdateRequest) GetUpdateMask() *string { + if l == nil { + return nil + } + return l.UpdateMask +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigserviceupdateresponse.go new file mode 100644 index 00000000..0d20889c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localdirectoryconfigserviceupdateresponse.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalDirectoryConfigServiceUpdateResponse message. +type LocalDirectoryConfigServiceUpdateResponse struct { + // LocalDirectoryConfig is the public representation of a C1-managed local + // directory configuration. The underlying directory infrastructure is provided + // by the linked App (identified by app_id). + LocalDirectoryConfig *LocalDirectoryConfig `json:"localDirectoryConfig,omitempty"` +} + +func (l *LocalDirectoryConfigServiceUpdateResponse) GetLocalDirectoryConfig() *LocalDirectoryConfig { + if l == nil { + return nil + } + return l.LocalDirectoryConfig +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitation.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitation.go new file mode 100644 index 00000000..56c826e2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitation.go @@ -0,0 +1,189 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// LocalUserInvitationStatus - Current lifecycle status. Read-only. +type LocalUserInvitationStatus string + +const ( + LocalUserInvitationStatusLocalInvitationStatusUnspecified LocalUserInvitationStatus = "LOCAL_INVITATION_STATUS_UNSPECIFIED" + LocalUserInvitationStatusLocalInvitationStatusPending LocalUserInvitationStatus = "LOCAL_INVITATION_STATUS_PENDING" + LocalUserInvitationStatusLocalInvitationStatusAccepted LocalUserInvitationStatus = "LOCAL_INVITATION_STATUS_ACCEPTED" + LocalUserInvitationStatusLocalInvitationStatusRevoked LocalUserInvitationStatus = "LOCAL_INVITATION_STATUS_REVOKED" + LocalUserInvitationStatusLocalInvitationStatusExpired LocalUserInvitationStatus = "LOCAL_INVITATION_STATUS_EXPIRED" +) + +func (e LocalUserInvitationStatus) ToPointer() *LocalUserInvitationStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *LocalUserInvitationStatus) IsExact() bool { + if e != nil { + switch *e { + case "LOCAL_INVITATION_STATUS_UNSPECIFIED", "LOCAL_INVITATION_STATUS_PENDING", "LOCAL_INVITATION_STATUS_ACCEPTED", "LOCAL_INVITATION_STATUS_REVOKED", "LOCAL_INVITATION_STATUS_EXPIRED": + return true + } + } + return false +} + +// LocalUserInvitation is the public representation of a per-directory user invitation. +type LocalUserInvitation struct { + AcceptedAt *time.Time `json:"acceptedAt,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Set when status = ACCEPTED. FK to the created User. Read-only. + CreatedUserID *string `json:"createdUserId,omitempty"` + // FK to the LocalDirectoryConfig (app_id) this invitation belongs to. Read-only after creation. + DirectoryAppID *string `json:"directoryAppId,omitempty"` + // Display name to pre-populate on the new user account. + DisplayName *string `json:"displayName,omitempty"` + // Email address the invitation was sent to. + Email *string `json:"email,omitempty"` + ExpiresAt *time.Time `json:"expiresAt,omitempty"` + // Unique KSUID identifier. Read-only. + ID *string `json:"id,omitempty"` + // Optional initial role IDs to assign to the user upon acceptance. + InitialRoleIds []string `json:"initialRoleIds,omitempty"` + // FK to the User who created the invitation. Read-only. + InvitedByUserID *string `json:"invitedByUserId,omitempty"` + // Optional FK to a ThirdPartyJob. + JobID *string `json:"jobId,omitempty"` + // Optional onboarding flow override for this invitation. + OnboardingFlowID *string `json:"onboardingFlowId,omitempty"` + // Human-readable reason this user was invited. + Purpose *string `json:"purpose,omitempty"` + // Optional sponsor User override for this invitation. + SponsorUserID *string `json:"sponsorUserId,omitempty"` + // Current lifecycle status. Read-only. + Status *LocalUserInvitationStatus `json:"status,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (l LocalUserInvitation) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *LocalUserInvitation) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, nil); err != nil { + return err + } + return nil +} + +func (l *LocalUserInvitation) GetAcceptedAt() *time.Time { + if l == nil { + return nil + } + return l.AcceptedAt +} + +func (l *LocalUserInvitation) GetCreatedAt() *time.Time { + if l == nil { + return nil + } + return l.CreatedAt +} + +func (l *LocalUserInvitation) GetCreatedUserID() *string { + if l == nil { + return nil + } + return l.CreatedUserID +} + +func (l *LocalUserInvitation) GetDirectoryAppID() *string { + if l == nil { + return nil + } + return l.DirectoryAppID +} + +func (l *LocalUserInvitation) GetDisplayName() *string { + if l == nil { + return nil + } + return l.DisplayName +} + +func (l *LocalUserInvitation) GetEmail() *string { + if l == nil { + return nil + } + return l.Email +} + +func (l *LocalUserInvitation) GetExpiresAt() *time.Time { + if l == nil { + return nil + } + return l.ExpiresAt +} + +func (l *LocalUserInvitation) GetID() *string { + if l == nil { + return nil + } + return l.ID +} + +func (l *LocalUserInvitation) GetInitialRoleIds() []string { + if l == nil { + return nil + } + return l.InitialRoleIds +} + +func (l *LocalUserInvitation) GetInvitedByUserID() *string { + if l == nil { + return nil + } + return l.InvitedByUserID +} + +func (l *LocalUserInvitation) GetJobID() *string { + if l == nil { + return nil + } + return l.JobID +} + +func (l *LocalUserInvitation) GetOnboardingFlowID() *string { + if l == nil { + return nil + } + return l.OnboardingFlowID +} + +func (l *LocalUserInvitation) GetPurpose() *string { + if l == nil { + return nil + } + return l.Purpose +} + +func (l *LocalUserInvitation) GetSponsorUserID() *string { + if l == nil { + return nil + } + return l.SponsorUserID +} + +func (l *LocalUserInvitation) GetStatus() *LocalUserInvitationStatus { + if l == nil { + return nil + } + return l.Status +} + +func (l *LocalUserInvitation) GetUpdatedAt() *time.Time { + if l == nil { + return nil + } + return l.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicecreaterequest.go new file mode 100644 index 00000000..e266d39d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicecreaterequest.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalUserInvitationServiceCreateRequest message. +type LocalUserInvitationServiceCreateRequest struct { + // The displayName field. + DisplayName string `json:"displayName"` + // The email field. + Email string `json:"email"` + // Optional initial role IDs to assign upon acceptance. + InitialRoleIds []string `json:"initialRoleIds,omitempty"` + // Optional FK to a ThirdPartyJob. + JobID *string `json:"jobId,omitempty"` + // Optional onboarding flow override. + OnboardingFlowID *string `json:"onboardingFlowId,omitempty"` + // Human-readable reason for the invitation. + Purpose *string `json:"purpose,omitempty"` + // Optional sponsor User override. + SponsorUserID *string `json:"sponsorUserId,omitempty"` +} + +func (l *LocalUserInvitationServiceCreateRequest) GetDisplayName() string { + if l == nil { + return "" + } + return l.DisplayName +} + +func (l *LocalUserInvitationServiceCreateRequest) GetEmail() string { + if l == nil { + return "" + } + return l.Email +} + +func (l *LocalUserInvitationServiceCreateRequest) GetInitialRoleIds() []string { + if l == nil { + return nil + } + return l.InitialRoleIds +} + +func (l *LocalUserInvitationServiceCreateRequest) GetJobID() *string { + if l == nil { + return nil + } + return l.JobID +} + +func (l *LocalUserInvitationServiceCreateRequest) GetOnboardingFlowID() *string { + if l == nil { + return nil + } + return l.OnboardingFlowID +} + +func (l *LocalUserInvitationServiceCreateRequest) GetPurpose() *string { + if l == nil { + return nil + } + return l.Purpose +} + +func (l *LocalUserInvitationServiceCreateRequest) GetSponsorUserID() *string { + if l == nil { + return nil + } + return l.SponsorUserID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicecreateresponse.go new file mode 100644 index 00000000..a091b379 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicecreateresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalUserInvitationServiceCreateResponse message. +type LocalUserInvitationServiceCreateResponse struct { + // LocalUserInvitation is the public representation of a per-directory user invitation. + LocalUserInvitation *LocalUserInvitation `json:"invitation,omitempty"` +} + +func (l *LocalUserInvitationServiceCreateResponse) GetLocalUserInvitation() *LocalUserInvitation { + if l == nil { + return nil + } + return l.LocalUserInvitation +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicegetresponse.go new file mode 100644 index 00000000..61097f35 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicegetresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalUserInvitationServiceGetResponse message. +type LocalUserInvitationServiceGetResponse struct { + // LocalUserInvitation is the public representation of a per-directory user invitation. + LocalUserInvitation *LocalUserInvitation `json:"invitation,omitempty"` +} + +func (l *LocalUserInvitationServiceGetResponse) GetLocalUserInvitation() *LocalUserInvitation { + if l == nil { + return nil + } + return l.LocalUserInvitation +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicerevokerequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicerevokerequest.go new file mode 100644 index 00000000..78147522 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicerevokerequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalUserInvitationServiceRevokeRequest message. +type LocalUserInvitationServiceRevokeRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicerevokeresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicerevokeresponse.go new file mode 100644 index 00000000..7f8391b2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicerevokeresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalUserInvitationServiceRevokeResponse message. +type LocalUserInvitationServiceRevokeResponse struct { + // LocalUserInvitation is the public representation of a per-directory user invitation. + LocalUserInvitation *LocalUserInvitation `json:"invitation,omitempty"` +} + +func (l *LocalUserInvitationServiceRevokeResponse) GetLocalUserInvitation() *LocalUserInvitation { + if l == nil { + return nil + } + return l.LocalUserInvitation +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicesearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicesearchrequest.go new file mode 100644 index 00000000..766b4066 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicesearchrequest.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// StatusFilter - Optional filter by invitation status. +type StatusFilter string + +const ( + StatusFilterLocalInvitationStatusUnspecified StatusFilter = "LOCAL_INVITATION_STATUS_UNSPECIFIED" + StatusFilterLocalInvitationStatusPending StatusFilter = "LOCAL_INVITATION_STATUS_PENDING" + StatusFilterLocalInvitationStatusAccepted StatusFilter = "LOCAL_INVITATION_STATUS_ACCEPTED" + StatusFilterLocalInvitationStatusRevoked StatusFilter = "LOCAL_INVITATION_STATUS_REVOKED" + StatusFilterLocalInvitationStatusExpired StatusFilter = "LOCAL_INVITATION_STATUS_EXPIRED" +) + +func (e StatusFilter) ToPointer() *StatusFilter { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *StatusFilter) IsExact() bool { + if e != nil { + switch *e { + case "LOCAL_INVITATION_STATUS_UNSPECIFIED", "LOCAL_INVITATION_STATUS_PENDING", "LOCAL_INVITATION_STATUS_ACCEPTED", "LOCAL_INVITATION_STATUS_REVOKED", "LOCAL_INVITATION_STATUS_EXPIRED": + return true + } + } + return false +} + +// The LocalUserInvitationServiceSearchRequest message. +type LocalUserInvitationServiceSearchRequest struct { + // The directoryAppId field. + DirectoryAppID *string `json:"directoryAppId,omitempty"` + // The pageSize field. + PageSize *int `json:"pageSize,omitempty"` + // The pageToken field. + PageToken *string `json:"pageToken,omitempty"` + // Optional filter by invitation status. + StatusFilter *StatusFilter `json:"statusFilter,omitempty"` +} + +func (l *LocalUserInvitationServiceSearchRequest) GetDirectoryAppID() *string { + if l == nil { + return nil + } + return l.DirectoryAppID +} + +func (l *LocalUserInvitationServiceSearchRequest) GetPageSize() *int { + if l == nil { + return nil + } + return l.PageSize +} + +func (l *LocalUserInvitationServiceSearchRequest) GetPageToken() *string { + if l == nil { + return nil + } + return l.PageToken +} + +func (l *LocalUserInvitationServiceSearchRequest) GetStatusFilter() *StatusFilter { + if l == nil { + return nil + } + return l.StatusFilter +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicesearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicesearchresponse.go new file mode 100644 index 00000000..8baadc6c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/localuserinvitationservicesearchresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The LocalUserInvitationServiceSearchResponse message. +type LocalUserInvitationServiceSearchResponse struct { + // The list field. + List []LocalUserInvitation `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (l *LocalUserInvitationServiceSearchResponse) GetList() []LocalUserInvitation { + if l == nil { + return nil + } + return l.List +} + +func (l *LocalUserInvitationServiceSearchResponse) GetNextPageToken() *string { + if l == nil { + return nil + } + return l.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/magicvault.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/magicvault.go index 1258fcd4..d909cd1a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/magicvault.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/magicvault.go @@ -2,11 +2,11 @@ package shared -// The MagicVault message. +// MagicVault configures a vault that grants time-limited credential access via magic links. type MagicVault struct { - // The allowUnauthedViews field. + // Controls whether unauthenticated users can view credentials via a magic link. AllowUnauthedViews *bool `json:"allowUnauthedViews,omitempty"` - // The allowedViews field. + // The maximum number of times a credential in this vault may be viewed. AllowedViews *int64 `json:"allowedViews,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/managerprovisioner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/managerprovisioner.go new file mode 100644 index 00000000..a749097d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/managerprovisioner.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ManagerProvisioner resolves to the user's manager. +type ManagerProvisioner struct { + // Whether the provisioner can reassign the task. + AllowReassignment *bool `json:"allowReassignment,omitempty"` + // Fallback user IDs if no manager is found. + FallbackUserIds []string `json:"fallbackUserIds,omitempty"` +} + +func (m *ManagerProvisioner) GetAllowReassignment() *bool { + if m == nil { + return nil + } + return m.AllowReassignment +} + +func (m *ManagerProvisioner) GetFallbackUserIds() []string { + if m == nil { + return nil + } + return m.FallbackUserIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manuallymanagedusersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manuallymanagedusersresponse.go index 580427b0..26fa9cdd 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manuallymanagedusersresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manuallymanagedusersresponse.go @@ -4,10 +4,19 @@ package shared // The ManuallyManagedUsersResponse message. type ManuallyManagedUsersResponse struct { - // The failedUsersErrorMap field. + // The ID of the bulk action created to process the membership additions. + BulkActionID *string `json:"bulkActionId,omitempty"` + // A map of user IDs to error messages for users that could not be added. FailedUsersErrorMap map[string]string `json:"failedUsersErrorMap,omitempty"` } +func (m *ManuallyManagedUsersResponse) GetBulkActionID() *string { + if m == nil { + return nil + } + return m.BulkActionID +} + func (m *ManuallyManagedUsersResponse) GetFailedUsersErrorMap() map[string]string { if m == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manualprovision.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manualprovision.go index c4eab123..cc4c9b67 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manualprovision.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/manualprovision.go @@ -4,12 +4,31 @@ package shared // ManualProvision - Manual provisioning indicates that a human must intervene for the provisioning of this step. type ManualProvision struct { + // ProvisionerAssignment defines how a provisioner is dynamically assigned. + // + // This message contains a oneof named typ. Only a single field of the following list may be set at a time: + // - users + // - appOwners + // - group + // - manager + // - expression + // - entitlementOwners + // + ProvisionerAssignment *ProvisionerAssignment `json:"assignee,omitempty"` // This field indicates a text body of instructions for the provisioner to indicate. Instructions *string `json:"instructions,omitempty"` // An array of users that are required to provision during this step. + // Deprecated: Use assignee field instead for dynamic provisioner assignment. UserIds []string `json:"userIds,omitempty"` } +func (m *ManualProvision) GetProvisionerAssignment() *ProvisionerAssignment { + if m == nil { + return nil + } + return m.ProvisionerAssignment +} + func (m *ManualProvision) GetInstructions() *string { if m == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/microsoftgraphproviderconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/microsoftgraphproviderconfig.go new file mode 100644 index 00000000..50f9a69f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/microsoftgraphproviderconfig.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// MicrosoftGraphProviderConfig configures sending via Microsoft Graph sendMail API. +// +// Requires an Azure AD app registration with Mail.Send application permission (admin-consented). +type MicrosoftGraphProviderConfig struct { + // Customer's Azure AD tenant ID (directory ID). + AzureTenantID *string `json:"azureTenantId,omitempty"` + // App registration client ID with Mail.Send application permission. + ClientID *string `json:"clientId,omitempty"` + // Client secret. Write-only: accepted on create/update, never returned in Get. + // Empty on update means "keep existing secret". + ClientSecret *string `json:"clientSecret,omitempty"` +} + +func (m *MicrosoftGraphProviderConfig) GetAzureTenantID() *string { + if m == nil { + return nil + } + return m.AzureTenantID +} + +func (m *MicrosoftGraphProviderConfig) GetClientID() *string { + if m == nil { + return nil + } + return m.ClientID +} + +func (m *MicrosoftGraphProviderConfig) GetClientSecret() *string { + if m == nil { + return nil + } + return m.ClientSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/msteamschannelsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/msteamschannelsettings.go new file mode 100644 index 00000000..f5ba9a69 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/msteamschannelsettings.go @@ -0,0 +1,115 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The MSTeamsChannelSettings message. +type MSTeamsChannelSettings struct { + // The AccessProvisionedPreference message. + AccessProvisionedPreference *AccessProvisionedPreference `json:"accessProvisioned,omitempty"` + // The ApprovalNeededPreference message. + ApprovalNeededPreference *ApprovalNeededPreference `json:"approvalNeeded,omitempty"` + // The CommentOnRequestPreference message. + CommentOnRequestPreference *CommentOnRequestPreference `json:"commentOnRequest,omitempty"` + // The CompletionPreference message. + CompletionPreference *CompletionPreference `json:"completion,omitempty"` + // The ConnectorIssuesPreference message. + ConnectorIssuesPreference *ConnectorIssuesPreference `json:"connectorIssues,omitempty"` + // DigestPreference controls whether summary digest notifications are sent and how often. + DigestPreference *DigestPreference `json:"digest,omitempty"` + // The ExpiringAccessPreference message. + ExpiringAccessPreference *ExpiringAccessPreference `json:"expiringAccess,omitempty"` + // The ProvisioningRequestPreference message. + ProvisioningRequestPreference *ProvisioningRequestPreference `json:"provisioningRequest,omitempty"` + // The ReviewsPreference message. + ReviewsPreference *ReviewsPreference `json:"reviews,omitempty"` + // The TaskRemindersPreference message. + TaskRemindersPreference *TaskRemindersPreference `json:"taskReminders,omitempty"` + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The isConfigured field. + IsConfigured *bool `json:"isConfigured,omitempty"` +} + +func (m *MSTeamsChannelSettings) GetAccessProvisionedPreference() *AccessProvisionedPreference { + if m == nil { + return nil + } + return m.AccessProvisionedPreference +} + +func (m *MSTeamsChannelSettings) GetApprovalNeededPreference() *ApprovalNeededPreference { + if m == nil { + return nil + } + return m.ApprovalNeededPreference +} + +func (m *MSTeamsChannelSettings) GetCommentOnRequestPreference() *CommentOnRequestPreference { + if m == nil { + return nil + } + return m.CommentOnRequestPreference +} + +func (m *MSTeamsChannelSettings) GetCompletionPreference() *CompletionPreference { + if m == nil { + return nil + } + return m.CompletionPreference +} + +func (m *MSTeamsChannelSettings) GetConnectorIssuesPreference() *ConnectorIssuesPreference { + if m == nil { + return nil + } + return m.ConnectorIssuesPreference +} + +func (m *MSTeamsChannelSettings) GetDigestPreference() *DigestPreference { + if m == nil { + return nil + } + return m.DigestPreference +} + +func (m *MSTeamsChannelSettings) GetExpiringAccessPreference() *ExpiringAccessPreference { + if m == nil { + return nil + } + return m.ExpiringAccessPreference +} + +func (m *MSTeamsChannelSettings) GetProvisioningRequestPreference() *ProvisioningRequestPreference { + if m == nil { + return nil + } + return m.ProvisioningRequestPreference +} + +func (m *MSTeamsChannelSettings) GetReviewsPreference() *ReviewsPreference { + if m == nil { + return nil + } + return m.ReviewsPreference +} + +func (m *MSTeamsChannelSettings) GetTaskRemindersPreference() *TaskRemindersPreference { + if m == nil { + return nil + } + return m.TaskRemindersPreference +} + +func (m *MSTeamsChannelSettings) GetEnabled() *bool { + if m == nil { + return nil + } + return m.Enabled +} + +func (m *MSTeamsChannelSettings) GetIsConfigured() *bool { + if m == nil { + return nil + } + return m.IsConfigured +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/notificationconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/notificationconfig.go index 898bda0e..4b5d7124 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/notificationconfig.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/notificationconfig.go @@ -2,11 +2,13 @@ package shared -// The NotificationConfig message. +// NotificationConfig - Controls which email notifications are sent during the access review lifecycle. type NotificationConfig struct { - // The sendClose field. + // Whether to send a notification when the campaign is closed. SendClose *bool `json:"sendClose,omitempty"` - // The sendReminders field. + // Whether to send a notification when the campaign is started. + SendKickoff *bool `json:"sendKickoff,omitempty"` + // Whether to send periodic reminder emails to reviewers with outstanding tasks. SendReminders *bool `json:"sendReminders,omitempty"` } @@ -17,6 +19,13 @@ func (n *NotificationConfig) GetSendClose() *bool { return n.SendClose } +func (n *NotificationConfig) GetSendKickoff() *bool { + if n == nil { + return nil + } + return n.SendKickoff +} + func (n *NotificationConfig) GetSendReminders() *bool { if n == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/notificationconfig1.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/notificationconfig1.go deleted file mode 100644 index 9f358698..00000000 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/notificationconfig1.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -// NotificationConfig1 - The NotificationConfig message. -type NotificationConfig1 struct { - // The EmailNotifications message. - EmailNotifications *EmailNotifications `json:"emailNotifications,omitempty"` - // The SlackNotifications message. - SlackNotifications *SlackNotifications `json:"slackNotifications,omitempty"` -} - -func (n *NotificationConfig1) GetEmailNotifications() *EmailNotifications { - if n == nil { - return nil - } - return n.EmailNotifications -} - -func (n *NotificationConfig1) GetSlackNotifications() *SlackNotifications { - if n == nil { - return nil - } - return n.SlackNotifications -} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/notifyaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/notifyaction.go new file mode 100644 index 00000000..1424e5b0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/notifyaction.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The NotifyAction message. +type NotifyAction struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/numberfield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/numberfield.go index 5521fd98..4386e908 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/numberfield.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/numberfield.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // The NumberField message. type NumberField struct { // The maxValue field. @@ -12,6 +16,17 @@ type NumberField struct { Step *int64 `integer:"string" json:"step,omitempty"` } +func (n NumberField) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(n, "", false) +} + +func (n *NumberField) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &n, "", false, nil); err != nil { + return err + } + return nil +} + func (n *NumberField) GetMaxValue() *int64 { if n == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2authorizedas.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2authorizedas.go index 6e3d3e76..f456e9a6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2authorizedas.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2authorizedas.go @@ -38,3 +38,6 @@ func (o *OAuth2AuthorizedAs) GetAuthorizedAt() *time.Time { } return o.AuthorizedAt } + +// #region class-body-oauth2authorizedas +// #endregion class-body-oauth2authorizedas diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2authorizedasinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2authorizedasinput.go index 8c5b813f..573a1844 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2authorizedasinput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2authorizedasinput.go @@ -5,3 +5,6 @@ package shared // OAuth2AuthorizedAsInput - OAuth2AuthorizedAs tracks the user that OAuthed with the connector. type OAuth2AuthorizedAsInput struct { } + +// #region class-body-oauth2authorizedasinput +// #endregion class-body-oauth2authorizedasinput diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2field.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2field.go index 5d54e9a2..9f28b3dd 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2field.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2field.go @@ -5,3 +5,6 @@ package shared // The OAuth2Field message. type OAuth2Field struct { } + +// #region class-body-oauth2field +// #endregion class-body-oauth2field diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2field1.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2field1.go index 5dff2163..1e27e2f3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2field1.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2field1.go @@ -17,3 +17,6 @@ func (o *Oauth2Field1) GetOauth2FieldView() *Oauth2FieldView { } return o.Oauth2FieldView } + +// #region class-body-oauth2field1 +// #endregion class-body-oauth2field1 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2fieldview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2fieldview.go index 68193d5c..7bc70e29 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2fieldview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/oauth2fieldview.go @@ -5,3 +5,6 @@ package shared // The Oauth2FieldView message. type Oauth2FieldView struct { } + +// #region class-body-oauth2fieldview +// #endregion class-body-oauth2fieldview diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/onboardingorgcontext.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/onboardingorgcontext.go new file mode 100644 index 00000000..b3cc213e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/onboardingorgcontext.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The OnboardingOrgContext message. +type OnboardingOrgContext struct { + // The industry field. + Industry *string `json:"industry,omitempty"` + // The organizationSize field. + OrganizationSize *string `json:"organizationSize,omitempty"` +} + +func (o *OnboardingOrgContext) GetIndustry() *string { + if o == nil { + return nil + } + return o.Industry +} + +func (o *OnboardingOrgContext) GetOrganizationSize() *string { + if o == nil { + return nil + } + return o.OrganizationSize +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/orcheck.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/orcheck.go new file mode 100644 index 00000000..2f3a729a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/orcheck.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// OrCheck requires at least one check to pass. +type OrCheck struct { + // The checks field. + Checks []ValidationCheck `json:"checks,omitempty"` +} + +func (o *OrCheck) GetChecks() []ValidationCheck { + if o == nil { + return nil + } + return o.Checks +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/orgdomain.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/orgdomain.go index 3241c47d..33727711 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/orgdomain.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/orgdomain.go @@ -7,13 +7,13 @@ import ( "time" ) -// The OrgDomain message. +// OrgDomain represents a verified email domain associated with the tenant. type OrgDomain struct { CreatedAt *time.Time `json:"createdAt,omitempty"` DeletedAt *time.Time `json:"deletedAt,omitempty"` - // The domain field. + // The verified domain name (e.g., "example.com"). Domain *string `json:"domain,omitempty"` - // The id field. + // The unique identifier of the domain record. ID *string `json:"id,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/orgnotificationsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/orgnotificationsettings.go new file mode 100644 index 00000000..4e6e80a0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/orgnotificationsettings.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// OrgNotificationSettings contains organization-wide notification channel configurations and default preferences. +type OrgNotificationSettings struct { + // ChannelSettings groups notification preferences for all supported channels. + ChannelSettings *ChannelSettings `json:"channelSettings,omitempty"` +} + +func (o *OrgNotificationSettings) GetChannelSettings() *ChannelSettings { + if o == nil { + return nil + } + return o.ChannelSettings +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecret.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecret.go new file mode 100644 index 00000000..185ead82 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecret.go @@ -0,0 +1,320 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// InputFormat - The inputFormat field. +type InputFormat string + +const ( + InputFormatSecretInputFormatUnspecified InputFormat = "SECRET_INPUT_FORMAT_UNSPECIFIED" + InputFormatSecretInputFormatPlaintext InputFormat = "SECRET_INPUT_FORMAT_PLAINTEXT" + InputFormatSecretInputFormatJSON InputFormat = "SECRET_INPUT_FORMAT_JSON" + InputFormatSecretInputFormatYaml InputFormat = "SECRET_INPUT_FORMAT_YAML" + InputFormatSecretInputFormatKeyValue InputFormat = "SECRET_INPUT_FORMAT_KEY_VALUE" +) + +func (e InputFormat) ToPointer() *InputFormat { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *InputFormat) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_INPUT_FORMAT_UNSPECIFIED", "SECRET_INPUT_FORMAT_PLAINTEXT", "SECRET_INPUT_FORMAT_JSON", "SECRET_INPUT_FORMAT_YAML", "SECRET_INPUT_FORMAT_KEY_VALUE": + return true + } + } + return false +} + +// SecretType - The secretType field. +type SecretType string + +const ( + SecretTypeSecretTypeUnspecified SecretType = "SECRET_TYPE_UNSPECIFIED" + SecretTypeSecretTypeText SecretType = "SECRET_TYPE_TEXT" + SecretTypeSecretTypeFile SecretType = "SECRET_TYPE_FILE" +) + +func (e SecretType) ToPointer() *SecretType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SecretType) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_TYPE_UNSPECIFIED", "SECRET_TYPE_TEXT", "SECRET_TYPE_FILE": + return true + } + } + return false +} + +// SharingMode - From PaperVault +type SharingMode string + +const ( + SharingModePaperVaultSharingModeUnspecified SharingMode = "PAPER_VAULT_SHARING_MODE_UNSPECIFIED" + SharingModePaperVaultSharingModeInternal SharingMode = "PAPER_VAULT_SHARING_MODE_INTERNAL" + SharingModePaperVaultSharingModeExternal SharingMode = "PAPER_VAULT_SHARING_MODE_EXTERNAL" +) + +func (e SharingMode) ToPointer() *SharingMode { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SharingMode) IsExact() bool { + if e != nil { + switch *e { + case "PAPER_VAULT_SHARING_MODE_UNSPECIFIED", "PAPER_VAULT_SHARING_MODE_INTERNAL", "PAPER_VAULT_SHARING_MODE_EXTERNAL": + return true + } + } + return false +} + +// PaperSecretStatus - Computed status +type PaperSecretStatus string + +const ( + PaperSecretStatusSecretStatusUnspecified PaperSecretStatus = "SECRET_STATUS_UNSPECIFIED" + PaperSecretStatusSecretStatusActive PaperSecretStatus = "SECRET_STATUS_ACTIVE" + PaperSecretStatusSecretStatusExpired PaperSecretStatus = "SECRET_STATUS_EXPIRED" + PaperSecretStatusSecretStatusBurned PaperSecretStatus = "SECRET_STATUS_BURNED" + PaperSecretStatusSecretStatusRevoked PaperSecretStatus = "SECRET_STATUS_REVOKED" + PaperSecretStatusSecretStatusDataDeleted PaperSecretStatus = "SECRET_STATUS_DATA_DELETED" +) + +func (e PaperSecretStatus) ToPointer() *PaperSecretStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretStatus) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_STATUS_UNSPECIFIED", "SECRET_STATUS_ACTIVE", "SECRET_STATUS_EXPIRED", "SECRET_STATUS_BURNED", "SECRET_STATUS_REVOKED", "SECRET_STATUS_DATA_DELETED": + return true + } + } + return false +} + +// PaperSecret is the API view of a secret (combines Vault + PaperVault fields). +// +// The vault_id is the primary identifier (Vault.id). +type PaperSecret struct { + // The allowedEmails field. + AllowedEmails []string `json:"allowedEmails,omitempty"` + // Access control + AllowedUserIds []string `json:"allowedUserIds,omitempty"` + // The contentDeleted field. + ContentDeleted *bool `json:"contentDeleted,omitempty"` + ContentExpiresAt *time.Time `json:"contentExpiresAt,omitempty"` + // Whether content has been set (text uploaded or file uploaded) + ContentReady *bool `json:"contentReady,omitempty"` + // The contentType field. + ContentType *string `json:"contentType,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Creator + CreatorUserID *string `json:"creatorUserId,omitempty"` + // The currentViews field. + CurrentViews *int64 `json:"currentViews,omitempty"` + DeletedAt *time.Time `json:"deletedAt,omitempty"` + // From Vault + DisplayName *string `json:"displayName,omitempty"` + // File metadata + FileSize *int64 `integer:"string" json:"fileSize,omitempty"` + // For FILE secrets: original filename (sanitized) + Filename *string `json:"filename,omitempty"` + // The inputFormat field. + InputFormat *InputFormat `json:"inputFormat,omitempty"` + // View tracking + MaxViews *int64 `json:"maxViews,omitempty"` + // The secretType field. + SecretType *SecretType `json:"secretType,omitempty"` + // Human-friendly share code (XXXX-XXXX-XXXX) for shareable URLs + ShareCode *string `json:"shareCode,omitempty"` + // URL to share with recipients (populated when content_ready is true) + ShareURL *string `json:"shareUrl,omitempty"` + // From PaperVault + SharingMode *SharingMode `json:"sharingMode,omitempty"` + // Computed status + Status *PaperSecretStatus `json:"status,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + // Vault.id - primary identifier for the secret + VaultID *string `json:"vaultId,omitempty"` +} + +func (p PaperSecret) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PaperSecret) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (p *PaperSecret) GetAllowedEmails() []string { + if p == nil { + return nil + } + return p.AllowedEmails +} + +func (p *PaperSecret) GetAllowedUserIds() []string { + if p == nil { + return nil + } + return p.AllowedUserIds +} + +func (p *PaperSecret) GetContentDeleted() *bool { + if p == nil { + return nil + } + return p.ContentDeleted +} + +func (p *PaperSecret) GetContentExpiresAt() *time.Time { + if p == nil { + return nil + } + return p.ContentExpiresAt +} + +func (p *PaperSecret) GetContentReady() *bool { + if p == nil { + return nil + } + return p.ContentReady +} + +func (p *PaperSecret) GetContentType() *string { + if p == nil { + return nil + } + return p.ContentType +} + +func (p *PaperSecret) GetCreatedAt() *time.Time { + if p == nil { + return nil + } + return p.CreatedAt +} + +func (p *PaperSecret) GetCreatorUserID() *string { + if p == nil { + return nil + } + return p.CreatorUserID +} + +func (p *PaperSecret) GetCurrentViews() *int64 { + if p == nil { + return nil + } + return p.CurrentViews +} + +func (p *PaperSecret) GetDeletedAt() *time.Time { + if p == nil { + return nil + } + return p.DeletedAt +} + +func (p *PaperSecret) GetDisplayName() *string { + if p == nil { + return nil + } + return p.DisplayName +} + +func (p *PaperSecret) GetFileSize() *int64 { + if p == nil { + return nil + } + return p.FileSize +} + +func (p *PaperSecret) GetFilename() *string { + if p == nil { + return nil + } + return p.Filename +} + +func (p *PaperSecret) GetInputFormat() *InputFormat { + if p == nil { + return nil + } + return p.InputFormat +} + +func (p *PaperSecret) GetMaxViews() *int64 { + if p == nil { + return nil + } + return p.MaxViews +} + +func (p *PaperSecret) GetSecretType() *SecretType { + if p == nil { + return nil + } + return p.SecretType +} + +func (p *PaperSecret) GetShareCode() *string { + if p == nil { + return nil + } + return p.ShareCode +} + +func (p *PaperSecret) GetShareURL() *string { + if p == nil { + return nil + } + return p.ShareURL +} + +func (p *PaperSecret) GetSharingMode() *SharingMode { + if p == nil { + return nil + } + return p.SharingMode +} + +func (p *PaperSecret) GetStatus() *PaperSecretStatus { + if p == nil { + return nil + } + return p.Status +} + +func (p *PaperSecret) GetUpdatedAt() *time.Time { + if p == nil { + return nil + } + return p.UpdatedAt +} + +func (p *PaperSecret) GetVaultID() *string { + if p == nil { + return nil + } + return p.VaultID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicegetresponse.go new file mode 100644 index 00000000..124b8db8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicegetresponse.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretAdminServiceGetResponse message. +type PaperSecretAdminServiceGetResponse struct { + // PaperSecret is the API view of a secret (combines Vault + PaperVault fields). + // The vault_id is the primary identifier (Vault.id). + PaperSecret *PaperSecret `json:"secret,omitempty"` +} + +func (p *PaperSecretAdminServiceGetResponse) GetPaperSecret() *PaperSecret { + if p == nil { + return nil + } + return p.PaperSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicerevokerequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicerevokerequest.go new file mode 100644 index 00000000..359b78e4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicerevokerequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretAdminServiceRevokeRequest message. +type PaperSecretAdminServiceRevokeRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicerevokeresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicerevokeresponse.go new file mode 100644 index 00000000..aa582d9c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicerevokeresponse.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretAdminServiceRevokeResponse message. +type PaperSecretAdminServiceRevokeResponse struct { + // PaperSecret is the API view of a secret (combines Vault + PaperVault fields). + // The vault_id is the primary identifier (Vault.id). + PaperSecret *PaperSecret `json:"secret,omitempty"` +} + +func (p *PaperSecretAdminServiceRevokeResponse) GetPaperSecret() *PaperSecret { + if p == nil { + return nil + } + return p.PaperSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchauditeventsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchauditeventsrequest.go new file mode 100644 index 00000000..0360a726 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchauditeventsrequest.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretAdminServiceSearchAuditEventsRequest message. +type PaperSecretAdminServiceSearchAuditEventsRequest struct { + // Filter by external email (partial match via full-text search) + ActorEmail *string `json:"actorEmail,omitempty"` + // Filter by C1 user ID (internal users) + ActorUserID *string `json:"actorUserId,omitempty"` + // Filter by client IP (exact match) + ClientIP *string `json:"clientIp,omitempty"` + // The pageSize field. + PageSize *int `json:"pageSize,omitempty"` + // The pageToken field. + PageToken *string `json:"pageToken,omitempty"` + // Filter by specific vault + VaultID *string `json:"vaultId,omitempty"` +} + +func (p *PaperSecretAdminServiceSearchAuditEventsRequest) GetActorEmail() *string { + if p == nil { + return nil + } + return p.ActorEmail +} + +func (p *PaperSecretAdminServiceSearchAuditEventsRequest) GetActorUserID() *string { + if p == nil { + return nil + } + return p.ActorUserID +} + +func (p *PaperSecretAdminServiceSearchAuditEventsRequest) GetClientIP() *string { + if p == nil { + return nil + } + return p.ClientIP +} + +func (p *PaperSecretAdminServiceSearchAuditEventsRequest) GetPageSize() *int { + if p == nil { + return nil + } + return p.PageSize +} + +func (p *PaperSecretAdminServiceSearchAuditEventsRequest) GetPageToken() *string { + if p == nil { + return nil + } + return p.PageToken +} + +func (p *PaperSecretAdminServiceSearchAuditEventsRequest) GetVaultID() *string { + if p == nil { + return nil + } + return p.VaultID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchauditeventsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchauditeventsresponse.go new file mode 100644 index 00000000..c3993688 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchauditeventsresponse.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretAdminServiceSearchAuditEventsResponse message. +type PaperSecretAdminServiceSearchAuditEventsResponse struct { + // List contains OCSF events directly as JSON structs. + // Follows the same pattern as SystemLogServiceListEventsResponse. + List []map[string]any `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (p *PaperSecretAdminServiceSearchAuditEventsResponse) GetList() []map[string]any { + if p == nil { + return nil + } + return p.List +} + +func (p *PaperSecretAdminServiceSearchAuditEventsResponse) GetNextPageToken() *string { + if p == nil { + return nil + } + return p.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchrequest.go new file mode 100644 index 00000000..1be61482 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchrequest.go @@ -0,0 +1,220 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// PaperSecretAdminServiceSearchRequestSecretType - Filter by secret type (optional) +type PaperSecretAdminServiceSearchRequestSecretType string + +const ( + PaperSecretAdminServiceSearchRequestSecretTypeSecretTypeUnspecified PaperSecretAdminServiceSearchRequestSecretType = "SECRET_TYPE_UNSPECIFIED" + PaperSecretAdminServiceSearchRequestSecretTypeSecretTypeText PaperSecretAdminServiceSearchRequestSecretType = "SECRET_TYPE_TEXT" + PaperSecretAdminServiceSearchRequestSecretTypeSecretTypeFile PaperSecretAdminServiceSearchRequestSecretType = "SECRET_TYPE_FILE" +) + +func (e PaperSecretAdminServiceSearchRequestSecretType) ToPointer() *PaperSecretAdminServiceSearchRequestSecretType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretAdminServiceSearchRequestSecretType) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_TYPE_UNSPECIFIED", "SECRET_TYPE_TEXT", "SECRET_TYPE_FILE": + return true + } + } + return false +} + +// PaperSecretAdminServiceSearchRequestSharingMode - Filter by sharing mode (optional) +type PaperSecretAdminServiceSearchRequestSharingMode string + +const ( + PaperSecretAdminServiceSearchRequestSharingModePaperVaultSharingModeUnspecified PaperSecretAdminServiceSearchRequestSharingMode = "PAPER_VAULT_SHARING_MODE_UNSPECIFIED" + PaperSecretAdminServiceSearchRequestSharingModePaperVaultSharingModeInternal PaperSecretAdminServiceSearchRequestSharingMode = "PAPER_VAULT_SHARING_MODE_INTERNAL" + PaperSecretAdminServiceSearchRequestSharingModePaperVaultSharingModeExternal PaperSecretAdminServiceSearchRequestSharingMode = "PAPER_VAULT_SHARING_MODE_EXTERNAL" +) + +func (e PaperSecretAdminServiceSearchRequestSharingMode) ToPointer() *PaperSecretAdminServiceSearchRequestSharingMode { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretAdminServiceSearchRequestSharingMode) IsExact() bool { + if e != nil { + switch *e { + case "PAPER_VAULT_SHARING_MODE_UNSPECIFIED", "PAPER_VAULT_SHARING_MODE_INTERNAL", "PAPER_VAULT_SHARING_MODE_EXTERNAL": + return true + } + } + return false +} + +// SortBy - Sort order +type SortBy string + +const ( + SortBySearchSortByUnspecified SortBy = "SEARCH_SORT_BY_UNSPECIFIED" + SortBySearchSortByCreatedDesc SortBy = "SEARCH_SORT_BY_CREATED_DESC" + SortBySearchSortByCreatedAsc SortBy = "SEARCH_SORT_BY_CREATED_ASC" + SortBySearchSortByExpiresAsc SortBy = "SEARCH_SORT_BY_EXPIRES_ASC" + SortBySearchSortByNameAsc SortBy = "SEARCH_SORT_BY_NAME_ASC" +) + +func (e SortBy) ToPointer() *SortBy { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SortBy) IsExact() bool { + if e != nil { + switch *e { + case "SEARCH_SORT_BY_UNSPECIFIED", "SEARCH_SORT_BY_CREATED_DESC", "SEARCH_SORT_BY_CREATED_ASC", "SEARCH_SORT_BY_EXPIRES_ASC", "SEARCH_SORT_BY_NAME_ASC": + return true + } + } + return false +} + +type Statuses string + +const ( + StatusesSecretStatusUnspecified Statuses = "SECRET_STATUS_UNSPECIFIED" + StatusesSecretStatusActive Statuses = "SECRET_STATUS_ACTIVE" + StatusesSecretStatusExpired Statuses = "SECRET_STATUS_EXPIRED" + StatusesSecretStatusBurned Statuses = "SECRET_STATUS_BURNED" + StatusesSecretStatusRevoked Statuses = "SECRET_STATUS_REVOKED" + StatusesSecretStatusDataDeleted Statuses = "SECRET_STATUS_DATA_DELETED" +) + +func (e Statuses) ToPointer() *Statuses { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Statuses) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_STATUS_UNSPECIFIED", "SECRET_STATUS_ACTIVE", "SECRET_STATUS_EXPIRED", "SECRET_STATUS_BURNED", "SECRET_STATUS_REVOKED", "SECRET_STATUS_DATA_DELETED": + return true + } + } + return false +} + +// PaperSecretAdminServiceSearchRequest - Admin search request - can filter by any user's secrets. +type PaperSecretAdminServiceSearchRequest struct { + CreatedAfter *time.Time `json:"createdAfter,omitempty"` + CreatedBefore *time.Time `json:"createdBefore,omitempty"` + // Filter by creator user ID (admin can see all users' secrets) + CreatorUserIds []string `json:"creatorUserIds,omitempty"` + // Include deleted secrets + IncludeDeleted *bool `json:"includeDeleted,omitempty"` + // The pageSize field. + PageSize *int `json:"pageSize,omitempty"` + // The pageToken field. + PageToken *string `json:"pageToken,omitempty"` + // Fuzzy search by display name + Query *string `json:"query,omitempty"` + // Filter by secret type (optional) + SecretType *PaperSecretAdminServiceSearchRequestSecretType `json:"secretType,omitempty"` + // Filter by sharing mode (optional) + SharingMode *PaperSecretAdminServiceSearchRequestSharingMode `json:"sharingMode,omitempty"` + // Sort order + SortBy *SortBy `json:"sortBy,omitempty"` + // Filter by status (optional) + Statuses []Statuses `json:"statuses,omitempty"` +} + +func (p PaperSecretAdminServiceSearchRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PaperSecretAdminServiceSearchRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (p *PaperSecretAdminServiceSearchRequest) GetCreatedAfter() *time.Time { + if p == nil { + return nil + } + return p.CreatedAfter +} + +func (p *PaperSecretAdminServiceSearchRequest) GetCreatedBefore() *time.Time { + if p == nil { + return nil + } + return p.CreatedBefore +} + +func (p *PaperSecretAdminServiceSearchRequest) GetCreatorUserIds() []string { + if p == nil { + return nil + } + return p.CreatorUserIds +} + +func (p *PaperSecretAdminServiceSearchRequest) GetIncludeDeleted() *bool { + if p == nil { + return nil + } + return p.IncludeDeleted +} + +func (p *PaperSecretAdminServiceSearchRequest) GetPageSize() *int { + if p == nil { + return nil + } + return p.PageSize +} + +func (p *PaperSecretAdminServiceSearchRequest) GetPageToken() *string { + if p == nil { + return nil + } + return p.PageToken +} + +func (p *PaperSecretAdminServiceSearchRequest) GetQuery() *string { + if p == nil { + return nil + } + return p.Query +} + +func (p *PaperSecretAdminServiceSearchRequest) GetSecretType() *PaperSecretAdminServiceSearchRequestSecretType { + if p == nil { + return nil + } + return p.SecretType +} + +func (p *PaperSecretAdminServiceSearchRequest) GetSharingMode() *PaperSecretAdminServiceSearchRequestSharingMode { + if p == nil { + return nil + } + return p.SharingMode +} + +func (p *PaperSecretAdminServiceSearchRequest) GetSortBy() *SortBy { + if p == nil { + return nil + } + return p.SortBy +} + +func (p *PaperSecretAdminServiceSearchRequest) GetStatuses() []Statuses { + if p == nil { + return nil + } + return p.Statuses +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchresponse.go new file mode 100644 index 00000000..5f8cb096 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretadminservicesearchresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretAdminServiceSearchResponse message. +type PaperSecretAdminServiceSearchResponse struct { + // The list field. + List []PaperSecret `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (p *PaperSecretAdminServiceSearchResponse) GetList() []PaperSecret { + if p == nil { + return nil + } + return p.List +} + +func (p *PaperSecretAdminServiceSearchResponse) GetNextPageToken() *string { + if p == nil { + return nil + } + return p.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicecreateexternalrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicecreateexternalrequest.go new file mode 100644 index 00000000..4e9593b0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicecreateexternalrequest.go @@ -0,0 +1,162 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + +// PaperSecretServiceCreateExternalRequestInputFormat - For TEXT secrets: hint about the plaintext format (e.g., JSON, YAML, key-value). +// +// Used by the viewer UI for syntax highlighting. Does not affect encryption. +type PaperSecretServiceCreateExternalRequestInputFormat string + +const ( + PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatUnspecified PaperSecretServiceCreateExternalRequestInputFormat = "SECRET_INPUT_FORMAT_UNSPECIFIED" + PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatPlaintext PaperSecretServiceCreateExternalRequestInputFormat = "SECRET_INPUT_FORMAT_PLAINTEXT" + PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatJSON PaperSecretServiceCreateExternalRequestInputFormat = "SECRET_INPUT_FORMAT_JSON" + PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatYaml PaperSecretServiceCreateExternalRequestInputFormat = "SECRET_INPUT_FORMAT_YAML" + PaperSecretServiceCreateExternalRequestInputFormatSecretInputFormatKeyValue PaperSecretServiceCreateExternalRequestInputFormat = "SECRET_INPUT_FORMAT_KEY_VALUE" +) + +func (e PaperSecretServiceCreateExternalRequestInputFormat) ToPointer() *PaperSecretServiceCreateExternalRequestInputFormat { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceCreateExternalRequestInputFormat) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_INPUT_FORMAT_UNSPECIFIED", "SECRET_INPUT_FORMAT_PLAINTEXT", "SECRET_INPUT_FORMAT_JSON", "SECRET_INPUT_FORMAT_YAML", "SECRET_INPUT_FORMAT_KEY_VALUE": + return true + } + } + return false +} + +// PaperSecretServiceCreateExternalRequestSecretType - Secret type: TEXT or FILE. +// +// TEXT secrets use SetTextContent to upload encrypted content (max 64KB). +// FILE secrets use the upload_url from CreateResponse to upload encrypted content (max 1GB). +type PaperSecretServiceCreateExternalRequestSecretType string + +const ( + PaperSecretServiceCreateExternalRequestSecretTypeSecretTypeUnspecified PaperSecretServiceCreateExternalRequestSecretType = "SECRET_TYPE_UNSPECIFIED" + PaperSecretServiceCreateExternalRequestSecretTypeSecretTypeText PaperSecretServiceCreateExternalRequestSecretType = "SECRET_TYPE_TEXT" + PaperSecretServiceCreateExternalRequestSecretTypeSecretTypeFile PaperSecretServiceCreateExternalRequestSecretType = "SECRET_TYPE_FILE" +) + +func (e PaperSecretServiceCreateExternalRequestSecretType) ToPointer() *PaperSecretServiceCreateExternalRequestSecretType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceCreateExternalRequestSecretType) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_TYPE_UNSPECIFIED", "SECRET_TYPE_TEXT", "SECRET_TYPE_FILE": + return true + } + } + return false +} + +// The PaperSecretServiceCreateExternalRequest message. +type PaperSecretServiceCreateExternalRequest struct { + // External email addresses allowed to view this secret (1 to 64). + // Recipients authenticate via email magic link or Google OAuth. + AllowedEmails []string `json:"allowedEmails,omitempty"` + // For FILE secrets: MIME content type of the original file. Ignored for TEXT secrets. + ContentType *string `json:"contentType,omitempty"` + // Optional cleartext label visible to the creator in "My Secrets" view. + // Not encrypted — do not put sensitive data here. + DisplayName *string `json:"displayName,omitempty"` + ExpiresIn *string `json:"expiresIn,omitempty"` + // For FILE secrets: expected file size in bytes (max 1GB). Ignored for TEXT secrets. + FileSize *int64 `integer:"string" json:"fileSize,omitempty"` + // For FILE secrets: original filename (sanitized server-side). Ignored for TEXT secrets. + Filename *string `json:"filename,omitempty"` + // For TEXT secrets: hint about the plaintext format (e.g., JSON, YAML, key-value). + // Used by the viewer UI for syntax highlighting. Does not affect encryption. + InputFormat *PaperSecretServiceCreateExternalRequestInputFormat `json:"inputFormat,omitempty"` + // Maximum number of views before the secret is burned (0 = unlimited). + MaxViews *int64 `json:"maxViews,omitempty"` + // Secret type: TEXT or FILE. + // TEXT secrets use SetTextContent to upload encrypted content (max 64KB). + // FILE secrets use the upload_url from CreateResponse to upload encrypted content (max 1GB). + SecretType *PaperSecretServiceCreateExternalRequestSecretType `json:"secretType,omitempty"` +} + +func (p PaperSecretServiceCreateExternalRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PaperSecretServiceCreateExternalRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (p *PaperSecretServiceCreateExternalRequest) GetAllowedEmails() []string { + if p == nil { + return nil + } + return p.AllowedEmails +} + +func (p *PaperSecretServiceCreateExternalRequest) GetContentType() *string { + if p == nil { + return nil + } + return p.ContentType +} + +func (p *PaperSecretServiceCreateExternalRequest) GetDisplayName() *string { + if p == nil { + return nil + } + return p.DisplayName +} + +func (p *PaperSecretServiceCreateExternalRequest) GetExpiresIn() *string { + if p == nil { + return nil + } + return p.ExpiresIn +} + +func (p *PaperSecretServiceCreateExternalRequest) GetFileSize() *int64 { + if p == nil { + return nil + } + return p.FileSize +} + +func (p *PaperSecretServiceCreateExternalRequest) GetFilename() *string { + if p == nil { + return nil + } + return p.Filename +} + +func (p *PaperSecretServiceCreateExternalRequest) GetInputFormat() *PaperSecretServiceCreateExternalRequestInputFormat { + if p == nil { + return nil + } + return p.InputFormat +} + +func (p *PaperSecretServiceCreateExternalRequest) GetMaxViews() *int64 { + if p == nil { + return nil + } + return p.MaxViews +} + +func (p *PaperSecretServiceCreateExternalRequest) GetSecretType() *PaperSecretServiceCreateExternalRequestSecretType { + if p == nil { + return nil + } + return p.SecretType +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicecreateinternalrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicecreateinternalrequest.go new file mode 100644 index 00000000..6c11047b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicecreateinternalrequest.go @@ -0,0 +1,161 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + +// PaperSecretServiceCreateInternalRequestInputFormat - For TEXT secrets: hint about the plaintext format (e.g., JSON, YAML, key-value). +// +// Used by the viewer UI for syntax highlighting. Does not affect encryption. +type PaperSecretServiceCreateInternalRequestInputFormat string + +const ( + PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatUnspecified PaperSecretServiceCreateInternalRequestInputFormat = "SECRET_INPUT_FORMAT_UNSPECIFIED" + PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatPlaintext PaperSecretServiceCreateInternalRequestInputFormat = "SECRET_INPUT_FORMAT_PLAINTEXT" + PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatJSON PaperSecretServiceCreateInternalRequestInputFormat = "SECRET_INPUT_FORMAT_JSON" + PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatYaml PaperSecretServiceCreateInternalRequestInputFormat = "SECRET_INPUT_FORMAT_YAML" + PaperSecretServiceCreateInternalRequestInputFormatSecretInputFormatKeyValue PaperSecretServiceCreateInternalRequestInputFormat = "SECRET_INPUT_FORMAT_KEY_VALUE" +) + +func (e PaperSecretServiceCreateInternalRequestInputFormat) ToPointer() *PaperSecretServiceCreateInternalRequestInputFormat { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceCreateInternalRequestInputFormat) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_INPUT_FORMAT_UNSPECIFIED", "SECRET_INPUT_FORMAT_PLAINTEXT", "SECRET_INPUT_FORMAT_JSON", "SECRET_INPUT_FORMAT_YAML", "SECRET_INPUT_FORMAT_KEY_VALUE": + return true + } + } + return false +} + +// PaperSecretServiceCreateInternalRequestSecretType - Secret type: TEXT or FILE. +// +// TEXT secrets use SetTextContent to upload encrypted content (max 64KB). +// FILE secrets use the upload_url from CreateResponse to upload encrypted content (max 1GB). +type PaperSecretServiceCreateInternalRequestSecretType string + +const ( + PaperSecretServiceCreateInternalRequestSecretTypeSecretTypeUnspecified PaperSecretServiceCreateInternalRequestSecretType = "SECRET_TYPE_UNSPECIFIED" + PaperSecretServiceCreateInternalRequestSecretTypeSecretTypeText PaperSecretServiceCreateInternalRequestSecretType = "SECRET_TYPE_TEXT" + PaperSecretServiceCreateInternalRequestSecretTypeSecretTypeFile PaperSecretServiceCreateInternalRequestSecretType = "SECRET_TYPE_FILE" +) + +func (e PaperSecretServiceCreateInternalRequestSecretType) ToPointer() *PaperSecretServiceCreateInternalRequestSecretType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceCreateInternalRequestSecretType) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_TYPE_UNSPECIFIED", "SECRET_TYPE_TEXT", "SECRET_TYPE_FILE": + return true + } + } + return false +} + +// The PaperSecretServiceCreateInternalRequest message. +type PaperSecretServiceCreateInternalRequest struct { + // C1 User IDs allowed to view this secret (1 to 128). + AllowedUserIds []string `json:"allowedUserIds,omitempty"` + // For FILE secrets: MIME content type of the original file. Ignored for TEXT secrets. + ContentType *string `json:"contentType,omitempty"` + // Optional cleartext label visible to the creator in "My Secrets" view. + // Not encrypted — do not put sensitive data here. + DisplayName *string `json:"displayName,omitempty"` + ExpiresIn *string `json:"expiresIn,omitempty"` + // For FILE secrets: expected file size in bytes (max 1GB). Ignored for TEXT secrets. + FileSize *int64 `integer:"string" json:"fileSize,omitempty"` + // For FILE secrets: original filename (sanitized server-side). Ignored for TEXT secrets. + Filename *string `json:"filename,omitempty"` + // For TEXT secrets: hint about the plaintext format (e.g., JSON, YAML, key-value). + // Used by the viewer UI for syntax highlighting. Does not affect encryption. + InputFormat *PaperSecretServiceCreateInternalRequestInputFormat `json:"inputFormat,omitempty"` + // Maximum number of views before the secret is burned (0 = unlimited). + MaxViews *int64 `json:"maxViews,omitempty"` + // Secret type: TEXT or FILE. + // TEXT secrets use SetTextContent to upload encrypted content (max 64KB). + // FILE secrets use the upload_url from CreateResponse to upload encrypted content (max 1GB). + SecretType *PaperSecretServiceCreateInternalRequestSecretType `json:"secretType,omitempty"` +} + +func (p PaperSecretServiceCreateInternalRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PaperSecretServiceCreateInternalRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (p *PaperSecretServiceCreateInternalRequest) GetAllowedUserIds() []string { + if p == nil { + return nil + } + return p.AllowedUserIds +} + +func (p *PaperSecretServiceCreateInternalRequest) GetContentType() *string { + if p == nil { + return nil + } + return p.ContentType +} + +func (p *PaperSecretServiceCreateInternalRequest) GetDisplayName() *string { + if p == nil { + return nil + } + return p.DisplayName +} + +func (p *PaperSecretServiceCreateInternalRequest) GetExpiresIn() *string { + if p == nil { + return nil + } + return p.ExpiresIn +} + +func (p *PaperSecretServiceCreateInternalRequest) GetFileSize() *int64 { + if p == nil { + return nil + } + return p.FileSize +} + +func (p *PaperSecretServiceCreateInternalRequest) GetFilename() *string { + if p == nil { + return nil + } + return p.Filename +} + +func (p *PaperSecretServiceCreateInternalRequest) GetInputFormat() *PaperSecretServiceCreateInternalRequestInputFormat { + if p == nil { + return nil + } + return p.InputFormat +} + +func (p *PaperSecretServiceCreateInternalRequest) GetMaxViews() *int64 { + if p == nil { + return nil + } + return p.MaxViews +} + +func (p *PaperSecretServiceCreateInternalRequest) GetSecretType() *PaperSecretServiceCreateInternalRequestSecretType { + if p == nil { + return nil + } + return p.SecretType +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicecreateresponse.go new file mode 100644 index 00000000..fe913395 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicecreateresponse.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretServiceCreateResponse message. +type PaperSecretServiceCreateResponse struct { + // PaperSecret is the API view of a secret (combines Vault + PaperVault fields). + // The vault_id is the primary identifier (Vault.id). + PaperSecret *PaperSecret `json:"secret,omitempty"` + // Age X25519 recipient public key (format: "age1...") for client-side encryption. + // All content MUST be encrypted to this recipient using the Age encryption format + // before calling SetTextContent or uploading to upload_url. + // See: https://age-encryption.org + AgeRecipient *string `json:"ageRecipient,omitempty"` + // For FILE secrets: capability URL for uploading the Age-encrypted file. + // Send an HTTP PUT request with the Age-encrypted file bytes as the body + // and Content-Type: application/octet-stream. The payload MUST begin with + // the Age header "age-encryption.org/v1\n". Maximum file size: 1GB. + // Empty for TEXT secrets. + UploadURL *string `json:"uploadUrl,omitempty"` + // Vault ID - primary identifier for this secret. + VaultID *string `json:"vaultId,omitempty"` +} + +func (p *PaperSecretServiceCreateResponse) GetPaperSecret() *PaperSecret { + if p == nil { + return nil + } + return p.PaperSecret +} + +func (p *PaperSecretServiceCreateResponse) GetAgeRecipient() *string { + if p == nil { + return nil + } + return p.AgeRecipient +} + +func (p *PaperSecretServiceCreateResponse) GetUploadURL() *string { + if p == nil { + return nil + } + return p.UploadURL +} + +func (p *PaperSecretServiceCreateResponse) GetVaultID() *string { + if p == nil { + return nil + } + return p.VaultID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicegetcontentrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicegetcontentrequest.go new file mode 100644 index 00000000..833fe4d1 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicegetcontentrequest.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretServiceGetContentRequest message. +type PaperSecretServiceGetContentRequest struct { + // Client's ephemeral Age recipient (age1...) for re-encryption + // Server re-encrypts the content to this recipient + ReaderRecipient *string `json:"readerRecipient,omitempty"` +} + +func (p *PaperSecretServiceGetContentRequest) GetReaderRecipient() *string { + if p == nil { + return nil + } + return p.ReaderRecipient +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicegetcontentresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicegetcontentresponse.go new file mode 100644 index 00000000..6f310dba --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicegetcontentresponse.go @@ -0,0 +1,153 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// PaperSecretServiceGetContentResponseInputFormat - Input format hint for rendering (text secrets only) +type PaperSecretServiceGetContentResponseInputFormat string + +const ( + PaperSecretServiceGetContentResponseInputFormatSecretInputFormatUnspecified PaperSecretServiceGetContentResponseInputFormat = "SECRET_INPUT_FORMAT_UNSPECIFIED" + PaperSecretServiceGetContentResponseInputFormatSecretInputFormatPlaintext PaperSecretServiceGetContentResponseInputFormat = "SECRET_INPUT_FORMAT_PLAINTEXT" + PaperSecretServiceGetContentResponseInputFormatSecretInputFormatJSON PaperSecretServiceGetContentResponseInputFormat = "SECRET_INPUT_FORMAT_JSON" + PaperSecretServiceGetContentResponseInputFormatSecretInputFormatYaml PaperSecretServiceGetContentResponseInputFormat = "SECRET_INPUT_FORMAT_YAML" + PaperSecretServiceGetContentResponseInputFormatSecretInputFormatKeyValue PaperSecretServiceGetContentResponseInputFormat = "SECRET_INPUT_FORMAT_KEY_VALUE" +) + +func (e PaperSecretServiceGetContentResponseInputFormat) ToPointer() *PaperSecretServiceGetContentResponseInputFormat { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceGetContentResponseInputFormat) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_INPUT_FORMAT_UNSPECIFIED", "SECRET_INPUT_FORMAT_PLAINTEXT", "SECRET_INPUT_FORMAT_JSON", "SECRET_INPUT_FORMAT_YAML", "SECRET_INPUT_FORMAT_KEY_VALUE": + return true + } + } + return false +} + +// PaperSecretServiceGetContentResponseSecretType - Secret metadata +type PaperSecretServiceGetContentResponseSecretType string + +const ( + PaperSecretServiceGetContentResponseSecretTypeSecretTypeUnspecified PaperSecretServiceGetContentResponseSecretType = "SECRET_TYPE_UNSPECIFIED" + PaperSecretServiceGetContentResponseSecretTypeSecretTypeText PaperSecretServiceGetContentResponseSecretType = "SECRET_TYPE_TEXT" + PaperSecretServiceGetContentResponseSecretTypeSecretTypeFile PaperSecretServiceGetContentResponseSecretType = "SECRET_TYPE_FILE" +) + +func (e PaperSecretServiceGetContentResponseSecretType) ToPointer() *PaperSecretServiceGetContentResponseSecretType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceGetContentResponseSecretType) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_TYPE_UNSPECIFIED", "SECRET_TYPE_TEXT", "SECRET_TYPE_FILE": + return true + } + } + return false +} + +// The PaperSecretServiceGetContentResponse message. +// +// This message contains a oneof named content. Only a single field of the following list may be set at a time: +// - encryptedContent +// - downloadUrl +type PaperSecretServiceGetContentResponse struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The creatorUserId field. + CreatorUserID *string `json:"creatorUserId,omitempty"` + // For file secrets: presigned S3 download URL (5 minute expiry) + // File is still E2E encrypted - client must decrypt after download + // This field is part of the `content` oneof. + // See the documentation for `c1.api.secrets.v1.PaperSecretServiceGetContentResponse` for more details. + DownloadURL *string `json:"downloadUrl,omitempty"` + // For text secrets: Age-encrypted content (encrypted to reader's recipient) + // This field is part of the `content` oneof. + // See the documentation for `c1.api.secrets.v1.PaperSecretServiceGetContentResponse` for more details. + EncryptedContent *string `json:"encryptedContent,omitempty"` + // Original filename (file secrets only) + Filename *string `json:"filename,omitempty"` + // Input format hint for rendering (text secrets only) + InputFormat *PaperSecretServiceGetContentResponseInputFormat `json:"inputFormat,omitempty"` + // Secret metadata + SecretType *PaperSecretServiceGetContentResponseSecretType `json:"secretType,omitempty"` + // Views remaining after this view (-1 = unlimited) + ViewsRemaining *int `json:"viewsRemaining,omitempty"` +} + +func (p PaperSecretServiceGetContentResponse) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PaperSecretServiceGetContentResponse) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (p *PaperSecretServiceGetContentResponse) GetCreatedAt() *time.Time { + if p == nil { + return nil + } + return p.CreatedAt +} + +func (p *PaperSecretServiceGetContentResponse) GetCreatorUserID() *string { + if p == nil { + return nil + } + return p.CreatorUserID +} + +func (p *PaperSecretServiceGetContentResponse) GetDownloadURL() *string { + if p == nil { + return nil + } + return p.DownloadURL +} + +func (p *PaperSecretServiceGetContentResponse) GetEncryptedContent() *string { + if p == nil { + return nil + } + return p.EncryptedContent +} + +func (p *PaperSecretServiceGetContentResponse) GetFilename() *string { + if p == nil { + return nil + } + return p.Filename +} + +func (p *PaperSecretServiceGetContentResponse) GetInputFormat() *PaperSecretServiceGetContentResponseInputFormat { + if p == nil { + return nil + } + return p.InputFormat +} + +func (p *PaperSecretServiceGetContentResponse) GetSecretType() *PaperSecretServiceGetContentResponseSecretType { + if p == nil { + return nil + } + return p.SecretType +} + +func (p *PaperSecretServiceGetContentResponse) GetViewsRemaining() *int { + if p == nil { + return nil + } + return p.ViewsRemaining +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicegetresponse.go new file mode 100644 index 00000000..1de0d856 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicegetresponse.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretServiceGetResponse message. +type PaperSecretServiceGetResponse struct { + // PaperSecret is the API view of a secret (combines Vault + PaperVault fields). + // The vault_id is the primary identifier (Vault.id). + PaperSecret *PaperSecret `json:"secret,omitempty"` +} + +func (p *PaperSecretServiceGetResponse) GetPaperSecret() *PaperSecret { + if p == nil { + return nil + } + return p.PaperSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicerevokerequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicerevokerequest.go new file mode 100644 index 00000000..e285c868 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicerevokerequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretServiceRevokeRequest message. +type PaperSecretServiceRevokeRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicerevokeresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicerevokeresponse.go new file mode 100644 index 00000000..7a394a15 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicerevokeresponse.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretServiceRevokeResponse message. +type PaperSecretServiceRevokeResponse struct { + // PaperSecret is the API view of a secret (combines Vault + PaperVault fields). + // The vault_id is the primary identifier (Vault.id). + PaperSecret *PaperSecret `json:"secret,omitempty"` +} + +func (p *PaperSecretServiceRevokeResponse) GetPaperSecret() *PaperSecret { + if p == nil { + return nil + } + return p.PaperSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchauditeventsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchauditeventsrequest.go new file mode 100644 index 00000000..7c8f7458 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchauditeventsrequest.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// PaperSecretServiceSearchAuditEventsRequest searches audit events for a secret +// +// owned by the calling user. Only the secret creator may query events. Results +// are sanitized to include only time, event type, and actor information. +type PaperSecretServiceSearchAuditEventsRequest struct { + // Maximum number of results per page (0 uses server default, max 100). + PageSize *int `json:"pageSize,omitempty"` + // Pagination token from a previous response's next_page_token. + PageToken *string `json:"pageToken,omitempty"` + // Required. The vault ID of the secret whose audit events to retrieve. + VaultID *string `json:"vaultId,omitempty"` +} + +func (p *PaperSecretServiceSearchAuditEventsRequest) GetPageSize() *int { + if p == nil { + return nil + } + return p.PageSize +} + +func (p *PaperSecretServiceSearchAuditEventsRequest) GetPageToken() *string { + if p == nil { + return nil + } + return p.PageToken +} + +func (p *PaperSecretServiceSearchAuditEventsRequest) GetVaultID() *string { + if p == nil { + return nil + } + return p.VaultID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchauditeventsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchauditeventsresponse.go new file mode 100644 index 00000000..130e2325 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchauditeventsresponse.go @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// PaperSecretServiceSearchAuditEventsResponse contains a page of audit events +// +// for the requested secret. +type PaperSecretServiceSearchAuditEventsResponse struct { + // Sanitized OCSF events containing only time, event type, and actor fields. + // Sensitive fields such as IP addresses, messages, and raw payloads are removed. + List []map[string]any `json:"list,omitempty"` + // Token to retrieve the next page of results. Empty when no more pages exist. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (p *PaperSecretServiceSearchAuditEventsResponse) GetList() []map[string]any { + if p == nil { + return nil + } + return p.List +} + +func (p *PaperSecretServiceSearchAuditEventsResponse) GetNextPageToken() *string { + if p == nil { + return nil + } + return p.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchmysecretsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchmysecretsrequest.go new file mode 100644 index 00000000..19450e97 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchmysecretsrequest.go @@ -0,0 +1,172 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// PaperSecretServiceSearchMySecretsRequestSecretType - Filter by secret type (optional) +type PaperSecretServiceSearchMySecretsRequestSecretType string + +const ( + PaperSecretServiceSearchMySecretsRequestSecretTypeSecretTypeUnspecified PaperSecretServiceSearchMySecretsRequestSecretType = "SECRET_TYPE_UNSPECIFIED" + PaperSecretServiceSearchMySecretsRequestSecretTypeSecretTypeText PaperSecretServiceSearchMySecretsRequestSecretType = "SECRET_TYPE_TEXT" + PaperSecretServiceSearchMySecretsRequestSecretTypeSecretTypeFile PaperSecretServiceSearchMySecretsRequestSecretType = "SECRET_TYPE_FILE" +) + +func (e PaperSecretServiceSearchMySecretsRequestSecretType) ToPointer() *PaperSecretServiceSearchMySecretsRequestSecretType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceSearchMySecretsRequestSecretType) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_TYPE_UNSPECIFIED", "SECRET_TYPE_TEXT", "SECRET_TYPE_FILE": + return true + } + } + return false +} + +// PaperSecretServiceSearchMySecretsRequestSharingMode - Filter by sharing mode (optional) +type PaperSecretServiceSearchMySecretsRequestSharingMode string + +const ( + PaperSecretServiceSearchMySecretsRequestSharingModePaperVaultSharingModeUnspecified PaperSecretServiceSearchMySecretsRequestSharingMode = "PAPER_VAULT_SHARING_MODE_UNSPECIFIED" + PaperSecretServiceSearchMySecretsRequestSharingModePaperVaultSharingModeInternal PaperSecretServiceSearchMySecretsRequestSharingMode = "PAPER_VAULT_SHARING_MODE_INTERNAL" + PaperSecretServiceSearchMySecretsRequestSharingModePaperVaultSharingModeExternal PaperSecretServiceSearchMySecretsRequestSharingMode = "PAPER_VAULT_SHARING_MODE_EXTERNAL" +) + +func (e PaperSecretServiceSearchMySecretsRequestSharingMode) ToPointer() *PaperSecretServiceSearchMySecretsRequestSharingMode { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceSearchMySecretsRequestSharingMode) IsExact() bool { + if e != nil { + switch *e { + case "PAPER_VAULT_SHARING_MODE_UNSPECIFIED", "PAPER_VAULT_SHARING_MODE_INTERNAL", "PAPER_VAULT_SHARING_MODE_EXTERNAL": + return true + } + } + return false +} + +// PaperSecretServiceSearchMySecretsRequestSortBy - Sort order +type PaperSecretServiceSearchMySecretsRequestSortBy string + +const ( + PaperSecretServiceSearchMySecretsRequestSortBySearchSortByUnspecified PaperSecretServiceSearchMySecretsRequestSortBy = "SEARCH_SORT_BY_UNSPECIFIED" + PaperSecretServiceSearchMySecretsRequestSortBySearchSortByCreatedDesc PaperSecretServiceSearchMySecretsRequestSortBy = "SEARCH_SORT_BY_CREATED_DESC" + PaperSecretServiceSearchMySecretsRequestSortBySearchSortByCreatedAsc PaperSecretServiceSearchMySecretsRequestSortBy = "SEARCH_SORT_BY_CREATED_ASC" + PaperSecretServiceSearchMySecretsRequestSortBySearchSortByExpiresAsc PaperSecretServiceSearchMySecretsRequestSortBy = "SEARCH_SORT_BY_EXPIRES_ASC" + PaperSecretServiceSearchMySecretsRequestSortBySearchSortByNameAsc PaperSecretServiceSearchMySecretsRequestSortBy = "SEARCH_SORT_BY_NAME_ASC" +) + +func (e PaperSecretServiceSearchMySecretsRequestSortBy) ToPointer() *PaperSecretServiceSearchMySecretsRequestSortBy { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceSearchMySecretsRequestSortBy) IsExact() bool { + if e != nil { + switch *e { + case "SEARCH_SORT_BY_UNSPECIFIED", "SEARCH_SORT_BY_CREATED_DESC", "SEARCH_SORT_BY_CREATED_ASC", "SEARCH_SORT_BY_EXPIRES_ASC", "SEARCH_SORT_BY_NAME_ASC": + return true + } + } + return false +} + +type PaperSecretServiceSearchMySecretsRequestStatuses string + +const ( + PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusUnspecified PaperSecretServiceSearchMySecretsRequestStatuses = "SECRET_STATUS_UNSPECIFIED" + PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusActive PaperSecretServiceSearchMySecretsRequestStatuses = "SECRET_STATUS_ACTIVE" + PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusExpired PaperSecretServiceSearchMySecretsRequestStatuses = "SECRET_STATUS_EXPIRED" + PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusBurned PaperSecretServiceSearchMySecretsRequestStatuses = "SECRET_STATUS_BURNED" + PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusRevoked PaperSecretServiceSearchMySecretsRequestStatuses = "SECRET_STATUS_REVOKED" + PaperSecretServiceSearchMySecretsRequestStatusesSecretStatusDataDeleted PaperSecretServiceSearchMySecretsRequestStatuses = "SECRET_STATUS_DATA_DELETED" +) + +func (e PaperSecretServiceSearchMySecretsRequestStatuses) ToPointer() *PaperSecretServiceSearchMySecretsRequestStatuses { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceSearchMySecretsRequestStatuses) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_STATUS_UNSPECIFIED", "SECRET_STATUS_ACTIVE", "SECRET_STATUS_EXPIRED", "SECRET_STATUS_BURNED", "SECRET_STATUS_REVOKED", "SECRET_STATUS_DATA_DELETED": + return true + } + } + return false +} + +// PaperSecretServiceSearchMySecretsRequest - SearchMySecrets request - for end users viewing their own secrets. +// +// Automatically scoped to current user. +type PaperSecretServiceSearchMySecretsRequest struct { + // The pageSize field. + PageSize *int `json:"pageSize,omitempty"` + // The pageToken field. + PageToken *string `json:"pageToken,omitempty"` + // Fuzzy search by display name + Query *string `json:"query,omitempty"` + // Filter by secret type (optional) + SecretType *PaperSecretServiceSearchMySecretsRequestSecretType `json:"secretType,omitempty"` + // Filter by sharing mode (optional) + SharingMode *PaperSecretServiceSearchMySecretsRequestSharingMode `json:"sharingMode,omitempty"` + // Sort order + SortBy *PaperSecretServiceSearchMySecretsRequestSortBy `json:"sortBy,omitempty"` + // Filter by status (optional) + Statuses []PaperSecretServiceSearchMySecretsRequestStatuses `json:"statuses,omitempty"` +} + +func (p *PaperSecretServiceSearchMySecretsRequest) GetPageSize() *int { + if p == nil { + return nil + } + return p.PageSize +} + +func (p *PaperSecretServiceSearchMySecretsRequest) GetPageToken() *string { + if p == nil { + return nil + } + return p.PageToken +} + +func (p *PaperSecretServiceSearchMySecretsRequest) GetQuery() *string { + if p == nil { + return nil + } + return p.Query +} + +func (p *PaperSecretServiceSearchMySecretsRequest) GetSecretType() *PaperSecretServiceSearchMySecretsRequestSecretType { + if p == nil { + return nil + } + return p.SecretType +} + +func (p *PaperSecretServiceSearchMySecretsRequest) GetSharingMode() *PaperSecretServiceSearchMySecretsRequestSharingMode { + if p == nil { + return nil + } + return p.SharingMode +} + +func (p *PaperSecretServiceSearchMySecretsRequest) GetSortBy() *PaperSecretServiceSearchMySecretsRequestSortBy { + if p == nil { + return nil + } + return p.SortBy +} + +func (p *PaperSecretServiceSearchMySecretsRequest) GetStatuses() []PaperSecretServiceSearchMySecretsRequestStatuses { + if p == nil { + return nil + } + return p.Statuses +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchresponse.go new file mode 100644 index 00000000..6edbaad8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesearchresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// PaperSecretServiceSearchResponse - Search response for user's own secrets +type PaperSecretServiceSearchResponse struct { + // The list field. + List []PaperSecret `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (p *PaperSecretServiceSearchResponse) GetList() []PaperSecret { + if p == nil { + return nil + } + return p.List +} + +func (p *PaperSecretServiceSearchResponse) GetNextPageToken() *string { + if p == nil { + return nil + } + return p.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesettextcontentrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesettextcontentrequest.go new file mode 100644 index 00000000..1f999c6f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesettextcontentrequest.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// PaperSecretServiceSetTextContentRequestInputFormat - Input format hint for the viewer UI when the secret is decrypted. +// +// Does not affect encryption — this is metadata only. +type PaperSecretServiceSetTextContentRequestInputFormat string + +const ( + PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatUnspecified PaperSecretServiceSetTextContentRequestInputFormat = "SECRET_INPUT_FORMAT_UNSPECIFIED" + PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatPlaintext PaperSecretServiceSetTextContentRequestInputFormat = "SECRET_INPUT_FORMAT_PLAINTEXT" + PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatJSON PaperSecretServiceSetTextContentRequestInputFormat = "SECRET_INPUT_FORMAT_JSON" + PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatYaml PaperSecretServiceSetTextContentRequestInputFormat = "SECRET_INPUT_FORMAT_YAML" + PaperSecretServiceSetTextContentRequestInputFormatSecretInputFormatKeyValue PaperSecretServiceSetTextContentRequestInputFormat = "SECRET_INPUT_FORMAT_KEY_VALUE" +) + +func (e PaperSecretServiceSetTextContentRequestInputFormat) ToPointer() *PaperSecretServiceSetTextContentRequestInputFormat { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PaperSecretServiceSetTextContentRequestInputFormat) IsExact() bool { + if e != nil { + switch *e { + case "SECRET_INPUT_FORMAT_UNSPECIFIED", "SECRET_INPUT_FORMAT_PLAINTEXT", "SECRET_INPUT_FORMAT_JSON", "SECRET_INPUT_FORMAT_YAML", "SECRET_INPUT_FORMAT_KEY_VALUE": + return true + } + } + return false +} + +// The PaperSecretServiceSetTextContentRequest message. +type PaperSecretServiceSetTextContentRequest struct { + // Age-encrypted content bytes. The plaintext MUST be encrypted using the Age + // encryption format to the age_recipient returned by CreateInternal/CreateExternal. + // The resulting bytes begin with "age-encryption.org/v1\n" followed by the + // encrypted payload. Maximum 64KB after encryption — for larger content, create + // a FILE secret and use the upload_url instead. + EncryptedContent *string `json:"encryptedContent,omitempty"` + // Input format hint for the viewer UI when the secret is decrypted. + // Does not affect encryption — this is metadata only. + InputFormat *PaperSecretServiceSetTextContentRequestInputFormat `json:"inputFormat,omitempty"` +} + +func (p *PaperSecretServiceSetTextContentRequest) GetEncryptedContent() *string { + if p == nil { + return nil + } + return p.EncryptedContent +} + +func (p *PaperSecretServiceSetTextContentRequest) GetInputFormat() *PaperSecretServiceSetTextContentRequestInputFormat { + if p == nil { + return nil + } + return p.InputFormat +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesettextcontentresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesettextcontentresponse.go new file mode 100644 index 00000000..ab217828 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/papersecretservicesettextcontentresponse.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The PaperSecretServiceSetTextContentResponse message. +type PaperSecretServiceSetTextContentResponse struct { + // PaperSecret is the API view of a secret (combines Vault + PaperVault fields). + // The vault_id is the primary identifier (Vault.id). + PaperSecret *PaperSecret `json:"secret,omitempty"` +} + +func (p *PaperSecretServiceSetTextContentResponse) GetPaperSecret() *PaperSecret { + if p == nil { + return nil + } + return p.PaperSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pausesyncrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pausesyncrequest.go index 7658cec8..b072b754 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pausesyncrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pausesyncrequest.go @@ -2,6 +2,6 @@ package shared -// The PauseSyncRequest message. +// The PauseSyncRequest message contains the fields required to pause syncing for a connector. type PauseSyncRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pausesyncresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pausesyncresponse.go index 62b061f2..c9b52086 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pausesyncresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pausesyncresponse.go @@ -2,6 +2,6 @@ package shared -// The PauseSyncResponse message. +// PauseSyncResponse - Empty response body. Status code indicates success. type PauseSyncResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/payloadworkflowstep.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/payloadworkflowstep.go index 496af4b5..4eee3fa9 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/payloadworkflowstep.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/payloadworkflowstep.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // The PayloadWorkflowStep message. type PayloadWorkflowStep struct { Context map[string]any `json:"context,omitempty"` @@ -13,6 +17,17 @@ type PayloadWorkflowStep struct { WorkflowID *string `json:"workflowId,omitempty"` } +func (p PayloadWorkflowStep) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PayloadWorkflowStep) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + func (p *PayloadWorkflowStep) GetContext() map[string]any { if p == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclient.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclient.go index 1787ceb9..d740226c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclient.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclient.go @@ -10,6 +10,7 @@ import ( // The PersonalClient message contains information about a presonal client credential. type PersonalClient struct { // If set, only allows the CIDRs in the array to use the credential. + // Accepts IPv4 (e.g. 10.0.0.0/24) or IPv6 (e.g. 2001:db8::/32) CIDRs. AllowSourceCidr []string `json:"allowSourceCidr,omitempty"` // The clientID of the credential. ClientID *string `json:"clientId,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientinput.go index ede7b83f..0c12238a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientinput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientinput.go @@ -10,6 +10,7 @@ import ( // PersonalClientInput - The PersonalClient message contains information about a presonal client credential. type PersonalClientInput struct { // If set, only allows the CIDRs in the array to use the credential. + // Accepts IPv4 (e.g. 10.0.0.0/24) or IPv6 (e.g. 2001:db8::/32) CIDRs. AllowSourceCidr []string `json:"allowSourceCidr,omitempty"` // The display name of the personal client credential. DisplayName *string `json:"displayName,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientsearchservicesearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientsearchservicesearchrequest.go index e8533532..1ea083ca 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientsearchservicesearchrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientsearchservicesearchrequest.go @@ -4,13 +4,13 @@ package shared // The PersonalClientSearchServiceSearchRequest message. type PersonalClientSearchServiceSearchRequest struct { - // The pageSize field. + // The maximum number of results to return per page. PageSize *int `json:"pageSize,omitempty"` - // The pageToken field. + // A pagination token returned from a previous Search call. PageToken *string `json:"pageToken,omitempty"` - // The query field. + // A text query to filter personal clients by display name. Query *string `json:"query,omitempty"` - // The users field. + // Filter results to personal clients owned by the specified users. Users []UserRef `json:"users,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientsearchservicesearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientsearchservicesearchresponse.go index 6dc20f6d..a423ddf8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientsearchservicesearchresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientsearchservicesearchresponse.go @@ -4,9 +4,9 @@ package shared // The PersonalClientSearchServiceSearchResponse message. type PersonalClientSearchServiceSearchResponse struct { - // The list field. + // The list of personal client credentials matching the search criteria. List []PersonalClient `json:"list,omitempty"` - // The nextPageToken field. + // A token to retrieve the next page of results, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientservicecreaterequest.go index 0a07a084..2019ce85 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientservicecreaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientservicecreaterequest.go @@ -5,6 +5,7 @@ package shared // The PersonalClientServiceCreateRequest message contains the fields for creating a new personal client. type PersonalClientServiceCreateRequest struct { // A list of CIDRs to restrict this credential to. + // Accepts IPv4 (e.g. 10.0.0.0/24) or IPv6 (e.g. 2001:db8::/32) CIDRs. AllowSourceCidr []string `json:"allowSourceCidr,omitempty"` // The display name for the new personal client. DisplayName *string `json:"displayName,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientservicelistresponse.go index 283a490b..8f29ee47 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientservicelistresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/personalclientservicelistresponse.go @@ -4,9 +4,9 @@ package shared // The PersonalClientServiceListResponse message. type PersonalClientServiceListResponse struct { - // The list field. + // The list of personal client credentials owned by the calling user. List []PersonalClient `json:"list,omitempty"` - // The nextPageToken field. + // A token to retrieve the next page of results, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pickerfield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pickerfield.go index 7a6b0ea2..56e0af30 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pickerfield.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/pickerfield.go @@ -7,11 +7,15 @@ package shared // This message contains a oneof named type. Only a single field of the following list may be set at a time: // - appUserPicker // - resourcePicker +// - c1UserPicker type PickerField struct { // The AppResourceFilter message. AppResourceFilter *AppResourceFilter `json:"resourcePicker,omitempty"` // The AppUserFilter message. AppUserFilter *AppUserFilter `json:"appUserPicker,omitempty"` + // C1UserFilter is used to configure a picker for selecting ConductorOne users. + // This is distinct from AppUserFilter which selects accounts within a connected app. + C1UserFilter *C1UserFilter `json:"c1UserPicker,omitempty"` } func (p *PickerField) GetAppResourceFilter() *AppResourceFilter { @@ -27,3 +31,10 @@ func (p *PickerField) GetAppUserFilter() *AppUserFilter { } return p.AppUserFilter } + +func (p *PickerField) GetC1UserFilter() *C1UserFilter { + if p == nil { + return nil + } + return p.C1UserFilter +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/piiredactionconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/piiredactionconfig.go new file mode 100644 index 00000000..7bc117da --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/piiredactionconfig.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// PIIRedactionConfig configures post-tool-use redaction of sensitive fields. +type PIIRedactionConfig struct { + // The redactFields field. + RedactFields []string `json:"redactFields,omitempty"` + // The replacement field. + Replacement *string `json:"replacement,omitempty"` +} + +func (p *PIIRedactionConfig) GetRedactFields() []string { + if p == nil { + return nil + } + return p.RedactFields +} + +func (p *PIIRedactionConfig) GetReplacement() *string { + if p == nil { + return nil + } + return p.Replacement +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policy.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policy.go index 08e902ee..461dbec9 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policy.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policy.go @@ -7,7 +7,9 @@ import ( "time" ) -// PolicyPolicyType - Indicates the type of this policy. Can also be used to get the value from policySteps. +// PolicyPolicyType - The type of this policy (grant, revoke, or certify). The lowercased type +// +// name (e.g., "grant") is also the key for the baseline entry in policy_steps. type PolicyPolicyType string const ( @@ -34,7 +36,11 @@ func (e *PolicyPolicyType) IsExact() bool { return false } -// Policy - A policy describes the behavior of the ConductorOne system when processing a task. You can describe the type, approvers, fallback behavior, and escalation processes. +// Policy - A policy defines a workflow (sequence of steps) that runs when processing +// +// access requests, reviews, or revocations. Policies support conditional +// routing: different conditions can trigger different step sequences, with a +// baseline fallback. type Policy struct { CreatedAt *time.Time `json:"createdAt,omitempty"` DeletedAt *time.Time `json:"deletedAt,omitempty"` @@ -44,17 +50,24 @@ type Policy struct { DisplayName *string `json:"displayName,omitempty"` // The ID of the Policy. ID *string `json:"id,omitempty"` - // A map of string(policy type) to steps in a policy. This structure is leftover from a previous design, and should only ever have one key->value set. + // A map from string keys to step sequences. One entry is always the baseline, + // keyed by the lowercased policy_type (e.g., "grant", "revoke", "certify"). + // Additional entries have opaque keys (UUIDs) and are referenced by the rules + // array for conditional routing. If no conditional rules are configured, only + // the baseline entry exists. PolicySteps map[string]PolicySteps `json:"policySteps,omitempty"` - // Indicates the type of this policy. Can also be used to get the value from policySteps. + // The type of this policy (grant, revoke, or certify). The lowercased type + // name (e.g., "grant") is also the key for the baseline entry in policy_steps. PolicyType *PolicyPolicyType `json:"policyType,omitempty"` - // An array of actions (ordered) to take place after a policy completes processing. + // Ordered actions to execute after the policy completes processing. PostActions []PolicyPostActions `json:"postActions,omitempty"` - // Deprecated. Use setting in policy step instead + // This field is no longer used. Configure delegate reassignment in the policy step instead. // // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. ReassignTasksToDelegates *bool `json:"reassignTasksToDelegates,omitempty"` - // The rules field. + // Ordered conditional routing rules. Evaluated top-to-bottom; the first + // matching rule selects a step sequence from policy_steps. If no rule matches + // (or if this array is empty), the baseline entry in policy_steps is used. Rules []Rule `json:"rules,omitempty"` // Whether this policy is a builtin system policy. Builtin system policies cannot be edited. SystemBuiltin *bool `json:"systemBuiltin,omitempty"` @@ -156,23 +169,34 @@ func (p *Policy) GetUpdatedAt() *time.Time { return p.UpdatedAt } -// PolicyInput - A policy describes the behavior of the ConductorOne system when processing a task. You can describe the type, approvers, fallback behavior, and escalation processes. +// PolicyInput - A policy defines a workflow (sequence of steps) that runs when processing +// +// access requests, reviews, or revocations. Policies support conditional +// routing: different conditions can trigger different step sequences, with a +// baseline fallback. type PolicyInput struct { // The description of the Policy. Description *string `json:"description,omitempty"` // The display name of the Policy. DisplayName *string `json:"displayName,omitempty"` - // A map of string(policy type) to steps in a policy. This structure is leftover from a previous design, and should only ever have one key->value set. + // A map from string keys to step sequences. One entry is always the baseline, + // keyed by the lowercased policy_type (e.g., "grant", "revoke", "certify"). + // Additional entries have opaque keys (UUIDs) and are referenced by the rules + // array for conditional routing. If no conditional rules are configured, only + // the baseline entry exists. PolicySteps map[string]PolicyStepsInput `json:"policySteps,omitempty"` - // Indicates the type of this policy. Can also be used to get the value from policySteps. + // The type of this policy (grant, revoke, or certify). The lowercased type + // name (e.g., "grant") is also the key for the baseline entry in policy_steps. PolicyType *PolicyPolicyType `json:"policyType,omitempty"` - // An array of actions (ordered) to take place after a policy completes processing. + // Ordered actions to execute after the policy completes processing. PostActions []PolicyPostActions `json:"postActions,omitempty"` - // Deprecated. Use setting in policy step instead + // This field is no longer used. Configure delegate reassignment in the policy step instead. // // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. ReassignTasksToDelegates *bool `json:"reassignTasksToDelegates,omitempty"` - // The rules field. + // Ordered conditional routing rules. Evaluated top-to-bottom; the first + // matching rule selects a step sequence from policy_steps. If no rule matches + // (or if this array is empty), the baseline entry in policy_steps is used. Rules []Rule `json:"rules,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policyeditorvalidaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policyeditorvalidaterequest.go new file mode 100644 index 00000000..730a7009 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policyeditorvalidaterequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// PolicyEditorValidateRequest - The EditorValidateRequest message. +type PolicyEditorValidateRequest struct { + // The text field. + Text *string `json:"text,omitempty"` +} + +func (p *PolicyEditorValidateRequest) GetText() *string { + if p == nil { + return nil + } + return p.Text +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policyeditorvalidateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policyeditorvalidateresponse.go new file mode 100644 index 00000000..d0e86e74 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policyeditorvalidateresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// PolicyEditorValidateResponse - The EditorValidateResponse message. +type PolicyEditorValidateResponse struct { + // The markers field. + Markers []EditorMarker `json:"markers,omitempty"` +} + +func (p *PolicyEditorValidateResponse) GetMarkers() []EditorMarker { + if p == nil { + return nil + } + return p.Markers +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policyinstance.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policyinstance.go index 6e7bf5d9..46d6c630 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policyinstance.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policyinstance.go @@ -4,7 +4,10 @@ package shared // PolicyInstance - A policy instance is an object that contains a reference to the policy it was created from, the currently executing step, the next steps, and the history of previously completed steps. type PolicyInstance struct { - // A policy describes the behavior of the ConductorOne system when processing a task. You can describe the type, approvers, fallback behavior, and escalation processes. + // A policy defines a workflow (sequence of steps) that runs when processing + // access requests, reviews, or revocations. Policies support conditional + // routing: different conditions can trigger different step sequences, with a + // baseline fallback. Policy *Policy `json:"policy,omitempty"` // The policy step instance includes a reference to an instance of a policy step that tracks state and has a unique ID. // diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policypostactions.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policypostactions.go index 69ceed20..370b3f55 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policypostactions.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policypostactions.go @@ -2,13 +2,13 @@ package shared -// PolicyPostActions - These are actions to happen after a policy is complete. +// PolicyPostActions - Actions to execute after a policy finishes processing. // // This message contains a oneof named action. Only a single field of the following list may be set at a time: // - certifyRemediateImmediately type PolicyPostActions struct { - // ONLY valid when used in a CERTIFY Ticket Type: - // Causes any deprovision or change in a grant to be applied when Certify Ticket is closed. + // Only valid on certify policies. When true, any revocations resulting from + // the certification are applied immediately when the campaign task closes. // This field is part of the `action` oneof. // See the documentation for `c1.api.policy.v1.PolicyPostActions` for more details. CertifyRemediateImmediately *bool `json:"certifyRemediateImmediately,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystep.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystep.go index f6e4633a..91c5e593 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystep.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystep.go @@ -2,7 +2,7 @@ package shared -// The PolicyStep message. +// PolicyStep - A single step in a policy workflow. Exactly one step type is set. // // This message contains a oneof named step. Only a single field of the following list may be set at a time: // - approval @@ -19,6 +19,8 @@ type PolicyStep struct { // // This message contains a oneof named target. Only a single field of the following list may be set at a time: // - automation + // - batonResourceAction + // - clientIdApproval // Action *Action `json:"action,omitempty"` // The Approval message. diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepinput.go index a7e80bb9..f20bd1d4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepinput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepinput.go @@ -2,7 +2,7 @@ package shared -// PolicyStepInput - The PolicyStep message. +// PolicyStepInput - A single step in a policy workflow. Exactly one step type is set. // // This message contains a oneof named step. Only a single field of the following list may be set at a time: // - approval @@ -19,6 +19,8 @@ type PolicyStepInput struct { // // This message contains a oneof named target. Only a single field of the following list may be set at a time: // - automation + // - batonResourceAction + // - clientIdApproval // Action *Action `json:"action,omitempty"` // The Approval message. @@ -37,7 +39,7 @@ type PolicyStepInput struct { // Approval *ApprovalInput `json:"approval,omitempty"` // The Form message. - Form *FormInput1 `json:"form,omitempty"` + Form *FormInput `json:"form,omitempty"` // The provision step references a provision policy for this step. Provision *Provision `json:"provision,omitempty"` // This policy step indicates that a ticket should have a denied outcome. This is a terminal approval state and is used to explicitly define the end of approval steps. @@ -73,7 +75,7 @@ func (p *PolicyStepInput) GetApproval() *ApprovalInput { return p.Approval } -func (p *PolicyStepInput) GetForm() *FormInput1 { +func (p *PolicyStepInput) GetForm() *FormInput { if p == nil { return nil } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepinstance.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepinstance.go index d8bf4e45..70007a97 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepinstance.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepinstance.go @@ -44,6 +44,8 @@ type PolicyStepInstance struct { // // This message contains a oneof named target_instance. Only a single field of the following list may be set at a time: // - automation + // - batonResourceActionInstance + // - clientIdApprovalInstance // // // This message contains a oneof named outcome. Only a single field of the following list may be set at a time: diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policysteps.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policysteps.go index 05441963..9164db1d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policysteps.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policysteps.go @@ -2,9 +2,10 @@ package shared -// The PolicySteps message. +// PolicySteps - A named sequence of steps that execute in order within a policy. type PolicySteps struct { - // An array of policy steps indicating the processing flow of a policy. These steps are oneOfs, and only one property may be set for each array index at a time. + // Ordered array of steps. Each step is a oneof -- exactly one step type is + // set per entry. Steps execute sequentially. Steps []PolicyStep `json:"steps,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepsinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepsinput.go index 75303a65..8c889bce 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepsinput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/policystepsinput.go @@ -2,9 +2,10 @@ package shared -// PolicyStepsInput - The PolicySteps message. +// PolicyStepsInput - A named sequence of steps that execute in order within a policy. type PolicyStepsInput struct { - // An array of policy steps indicating the processing flow of a policy. These steps are oneOfs, and only one property may be set for each array index at a time. + // Ordered array of steps. Each step is a oneof -- exactly one step type is + // set per entry. Steps execute sequentially. Steps []PolicyStepInput `json:"steps,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/profilefilter.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/profilefilter.go new file mode 100644 index 00000000..417487b5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/profilefilter.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ProfileFilter defines a filter on a user profile attribute. +// +// Use GetOrgOverview to discover available attribute keys and their values. +type ProfileFilter struct { + // The attribute field. + Attribute *string `json:"attribute,omitempty"` + // The values field. + Values []string `json:"values,omitempty"` +} + +func (p *ProfileFilter) GetAttribute() *string { + if p == nil { + return nil + } + return p.Attribute +} + +func (p *ProfileFilter) GetValues() []string { + if p == nil { + return nil + } + return p.Values +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/progressbarcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/progressbarcomponent.go new file mode 100644 index 00000000..0cd159f7 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/progressbarcomponent.go @@ -0,0 +1,82 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ProgressBarComponent shows a read-only progress bar (label, value %, min/max). +type ProgressBarComponent struct { + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber *DynamicNumber `json:"max,omitempty"` + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber1 *DynamicNumber `json:"min,omitempty"` + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber2 *DynamicNumber `json:"step,omitempty"` + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber3 *DynamicNumber `json:"value,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"label,omitempty"` +} + +func (p *ProgressBarComponent) GetDynamicNumber() *DynamicNumber { + if p == nil { + return nil + } + return p.DynamicNumber +} + +func (p *ProgressBarComponent) GetDynamicNumber1() *DynamicNumber { + if p == nil { + return nil + } + return p.DynamicNumber1 +} + +func (p *ProgressBarComponent) GetDynamicNumber2() *DynamicNumber { + if p == nil { + return nil + } + return p.DynamicNumber2 +} + +func (p *ProgressBarComponent) GetDynamicNumber3() *DynamicNumber { + if p == nil { + return nil + } + return p.DynamicNumber3 +} + +func (p *ProgressBarComponent) GetDynamicString() *DynamicString { + if p == nil { + return nil + } + return p.DynamicString +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/provisionerassignment.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/provisionerassignment.go new file mode 100644 index 00000000..df476da9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/provisionerassignment.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ProvisionerAssignment defines how a provisioner is dynamically assigned. +// +// This message contains a oneof named typ. Only a single field of the following list may be set at a time: +// - users +// - appOwners +// - group +// - manager +// - expression +// - entitlementOwners +type ProvisionerAssignment struct { + // AppOwnerProvisioner resolves to app owners. + AppOwnerProvisioner *AppOwnerProvisioner `json:"appOwners,omitempty"` + // EntitlementOwnerProvisioner resolves to entitlement owners. + EntitlementOwnerProvisioner *EntitlementOwnerProvisioner `json:"entitlementOwners,omitempty"` + // ExpressionProvisioner evaluates CEL expressions to determine provisioners. + ExpressionProvisioner *ExpressionProvisioner `json:"expression,omitempty"` + // GroupProvisioner resolves to members of a specific group. + GroupProvisioner *GroupProvisioner `json:"group,omitempty"` + // ManagerProvisioner resolves to the user's manager. + ManagerProvisioner *ManagerProvisioner `json:"manager,omitempty"` + // UserProvisioner assigns specific users as provisioners. + UserProvisioner *UserProvisioner `json:"users,omitempty"` +} + +func (p *ProvisionerAssignment) GetAppOwnerProvisioner() *AppOwnerProvisioner { + if p == nil { + return nil + } + return p.AppOwnerProvisioner +} + +func (p *ProvisionerAssignment) GetEntitlementOwnerProvisioner() *EntitlementOwnerProvisioner { + if p == nil { + return nil + } + return p.EntitlementOwnerProvisioner +} + +func (p *ProvisionerAssignment) GetExpressionProvisioner() *ExpressionProvisioner { + if p == nil { + return nil + } + return p.ExpressionProvisioner +} + +func (p *ProvisionerAssignment) GetGroupProvisioner() *GroupProvisioner { + if p == nil { + return nil + } + return p.GroupProvisioner +} + +func (p *ProvisionerAssignment) GetManagerProvisioner() *ManagerProvisioner { + if p == nil { + return nil + } + return p.ManagerProvisioner +} + +func (p *ProvisionerAssignment) GetUserProvisioner() *UserProvisioner { + if p == nil { + return nil + } + return p.UserProvisioner +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/provisioningrequestpreference.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/provisioningrequestpreference.go new file mode 100644 index 00000000..cbd97bca --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/provisioningrequestpreference.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ProvisioningRequestPreference message. +type ProvisioningRequestPreference struct { + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The locked field. + Locked *bool `json:"locked,omitempty"` +} + +func (p *ProvisioningRequestPreference) GetEnabled() *bool { + if p == nil { + return nil + } + return p.Enabled +} + +func (p *ProvisioningRequestPreference) GetLocked() *bool { + if p == nil { + return nil + } + return p.Locked +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/queryscopelimitconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/queryscopelimitconfig.go new file mode 100644 index 00000000..b83da375 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/queryscopelimitconfig.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// QueryScopeLimitConfig caps numeric fields (e.g. limit, page_size) in tool +// +// input so callers cannot request unbounded data. +type QueryScopeLimitConfig struct { + // The fields field. + Fields []string `json:"fields,omitempty"` + // The maxLimit field. + MaxLimit *int `json:"maxLimit,omitempty"` +} + +func (q *QueryScopeLimitConfig) GetFields() []string { + if q == nil { + return nil + } + return q.Fields +} + +func (q *QueryScopeLimitConfig) GetMaxLimit() *int { + if q == nil { + return nil + } + return q.MaxLimit +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/recurrencerule.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/recurrencerule.go index 92e7874f..46a116ae 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/recurrencerule.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/recurrencerule.go @@ -7,24 +7,24 @@ import ( "time" ) -// Frequency - The frequency field. -type Frequency string +// RecurrenceRuleFrequency - The frequency field. +type RecurrenceRuleFrequency string const ( - FrequencyFrequencyUnspecified Frequency = "FREQUENCY_UNSPECIFIED" - FrequencyFrequencyNone Frequency = "FREQUENCY_NONE" - FrequencyFrequencyDaily Frequency = "FREQUENCY_DAILY" - FrequencyFrequencyWeekly Frequency = "FREQUENCY_WEEKLY" - FrequencyFrequencyMonthly Frequency = "FREQUENCY_MONTHLY" - FrequencyFrequencyYearly Frequency = "FREQUENCY_YEARLY" + RecurrenceRuleFrequencyFrequencyUnspecified RecurrenceRuleFrequency = "FREQUENCY_UNSPECIFIED" + RecurrenceRuleFrequencyFrequencyNone RecurrenceRuleFrequency = "FREQUENCY_NONE" + RecurrenceRuleFrequencyFrequencyDaily RecurrenceRuleFrequency = "FREQUENCY_DAILY" + RecurrenceRuleFrequencyFrequencyWeekly RecurrenceRuleFrequency = "FREQUENCY_WEEKLY" + RecurrenceRuleFrequencyFrequencyMonthly RecurrenceRuleFrequency = "FREQUENCY_MONTHLY" + RecurrenceRuleFrequencyFrequencyYearly RecurrenceRuleFrequency = "FREQUENCY_YEARLY" ) -func (e Frequency) ToPointer() *Frequency { +func (e RecurrenceRuleFrequency) ToPointer() *RecurrenceRuleFrequency { return &e } // IsExact returns true if the value matches a known enum value, false otherwise. -func (e *Frequency) IsExact() bool { +func (e *RecurrenceRuleFrequency) IsExact() bool { if e != nil { switch *e { case "FREQUENCY_UNSPECIFIED", "FREQUENCY_NONE", "FREQUENCY_DAILY", "FREQUENCY_WEEKLY", "FREQUENCY_MONTHLY", "FREQUENCY_YEARLY": @@ -42,7 +42,7 @@ func (e *Frequency) IsExact() bool { type RecurrenceRule struct { EndDate *time.Time `json:"endDate,omitempty"` // The frequency field. - Frequency *Frequency `json:"frequency,omitempty"` + Frequency *RecurrenceRuleFrequency `json:"frequency,omitempty"` // The interval field. Interval *int `json:"interval,omitempty"` // The occurrences field. @@ -70,7 +70,7 @@ func (r *RecurrenceRule) GetEndDate() *time.Time { return r.EndDate } -func (r *RecurrenceRule) GetFrequency() *Frequency { +func (r *RecurrenceRule) GetFrequency() *RecurrenceRuleFrequency { if r == nil { return nil } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeappresourceownerrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeappresourceownerrequest.go index 07620b75..49881f74 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeappresourceownerrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeappresourceownerrequest.go @@ -2,9 +2,9 @@ package shared -// The RemoveAppResourceOwnerRequest message. +// RemoveAppResourceOwnerRequest - The request message for removing an owner from an app resource. type RemoveAppResourceOwnerRequest struct { - // The userId field. + // The C1 user ID to remove as an owner. UserID *string `json:"userId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeappresourceownerresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeappresourceownerresponse.go index 32130e37..755f39a4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeappresourceownerresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeappresourceownerresponse.go @@ -2,6 +2,6 @@ package shared -// The RemoveAppResourceOwnerResponse message. +// RemoveAppResourceOwnerResponse - The empty response message for removing an owner from an app resource. type RemoveAppResourceOwnerResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeautomationexclusionrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeautomationexclusionrequest.go index 1e66bf76..e320ef95 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeautomationexclusionrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeautomationexclusionrequest.go @@ -4,7 +4,7 @@ package shared // The RemoveAutomationExclusionRequest message. type RemoveAutomationExclusionRequest struct { - // The userIds field. + // The IDs of users to remove from the automation exclusion list. UserIds []string `json:"userIds,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeentitlementmembershiprequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeentitlementmembershiprequest.go index 9f379c1a..dd5dc6b3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeentitlementmembershiprequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removeentitlementmembershiprequest.go @@ -4,7 +4,7 @@ package shared // The RemoveEntitlementMembershipRequest message. type RemoveEntitlementMembershipRequest struct { - // The appUserId field. + // The ID of the app user whose membership to remove. AppUserID *string `json:"appUserId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removegrantdurationrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removegrantdurationrequest.go index 932e0ead..aefc491a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removegrantdurationrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removegrantdurationrequest.go @@ -2,6 +2,6 @@ package shared -// The RemoveGrantDurationRequest message. +// RemoveGrantDurationRequest - The request message for removing the expiration time from a grant. type RemoveGrantDurationRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removegrantdurationresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removegrantdurationresponse.go index 7e01e37f..edca9d59 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removegrantdurationresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/removegrantdurationresponse.go @@ -2,7 +2,7 @@ package shared -// The RemoveGrantDurationResponse message. +// RemoveGrantDurationResponse - The response message for removing the expiration time from a grant. type RemoveGrantDurationResponse struct { // The AppEntitlementUserBinding represents the relationship that gives an app user access to an app entitlement AppEntitlementUserBinding *AppEntitlementUserBinding `json:"binding,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/reopenaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/reopenaction.go new file mode 100644 index 00000000..b3a72df6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/reopenaction.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ReopenAction parameters for UpdateFindingState. +type ReopenAction struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalog.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalog.go index 1cbf6927..265f9ce5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalog.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalog.go @@ -94,6 +94,9 @@ type RequestCatalog struct { DisplayName *string `json:"displayName,omitempty"` // Defines how to handle the request policies of the entitlements in the catalog during enrollment. EnrollmentBehavior *EnrollmentBehavior `json:"enrollmentBehavior,omitempty"` + // The ID of the policy to use for access requests in this catalog. + // This is different from the catalog AppEntitlement's grant_policy_id, which is used for catalog membership grants. + GrantPolicyID *string `json:"grantPolicyId,omitempty"` // The id of the request catalog. ID *string `json:"id,omitempty"` // Whether or not this catalog is published. @@ -169,6 +172,13 @@ func (r *RequestCatalog) GetEnrollmentBehavior() *EnrollmentBehavior { return r.EnrollmentBehavior } +func (r *RequestCatalog) GetGrantPolicyID() *string { + if r == nil { + return nil + } + return r.GrantPolicyID +} + func (r *RequestCatalog) GetID() *string { if r == nil { return nil @@ -230,6 +240,9 @@ type RequestCatalogInput struct { DisplayName *string `json:"displayName,omitempty"` // Defines how to handle the request policies of the entitlements in the catalog during enrollment. EnrollmentBehavior *EnrollmentBehavior `json:"enrollmentBehavior,omitempty"` + // The ID of the policy to use for access requests in this catalog. + // This is different from the catalog AppEntitlement's grant_policy_id, which is used for catalog membership grants. + GrantPolicyID *string `json:"grantPolicyId,omitempty"` // The id of the request catalog. ID *string `json:"id,omitempty"` // Whether or not this catalog is published. @@ -279,6 +292,13 @@ func (r *RequestCatalogInput) GetEnrollmentBehavior() *EnrollmentBehavior { return r.EnrollmentBehavior } +func (r *RequestCatalogInput) GetGrantPolicyID() *string { + if r == nil { + return nil + } + return r.GrantPolicyID +} + func (r *RequestCatalogInput) GetID() *string { if r == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogmanagementservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogmanagementservicecreaterequest.go index 5f655097..a87ce43f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogmanagementservicecreaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogmanagementservicecreaterequest.go @@ -85,6 +85,8 @@ type RequestCatalogManagementServiceCreateRequest struct { DisplayName string `json:"displayName"` // Defines how to handle the request policies of the entitlements in the catalog during enrollment. EnrollmentBehavior *RequestCatalogManagementServiceCreateRequestEnrollmentBehavior `json:"enrollmentBehavior,omitempty"` + // The ID of the grant policy for access requests in this catalog. + GrantPolicyID *string `json:"grantPolicyId,omitempty"` // Whether or not the new catalog should be created as published. Published *bool `json:"published,omitempty"` // Whether all the entitlements in the catalog can be requests at once. Your tenant must have the bundles feature to use this. @@ -125,6 +127,13 @@ func (r *RequestCatalogManagementServiceCreateRequest) GetEnrollmentBehavior() * return r.EnrollmentBehavior } +func (r *RequestCatalogManagementServiceCreateRequest) GetGrantPolicyID() *string { + if r == nil { + return nil + } + return r.GrantPolicyID +} + func (r *RequestCatalogManagementServiceCreateRequest) GetPublished() *bool { if r == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogmanagementservicelistallentitlementidspercatalogresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogmanagementservicelistallentitlementidspercatalogresponse.go index ed246c30..ba20bcfa 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogmanagementservicelistallentitlementidspercatalogresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogmanagementservicelistallentitlementidspercatalogresponse.go @@ -2,9 +2,9 @@ package shared -// The RequestCatalogManagementServiceListAllEntitlementIdsPerCatalogResponse message. +// RequestCatalogManagementServiceListAllEntitlementIdsPerCatalogResponse - The response message containing all requestable entitlement references in the catalog. type RequestCatalogManagementServiceListAllEntitlementIdsPerCatalogResponse struct { - // The refs field. + // The complete list of app entitlement references in this catalog. Refs []AppEntitlementRef `json:"refs,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogview.go index 364cfe44..0a969238 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestcatalogview.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // RequestCatalogView - The request catalog view contains the serialized request catalog and paths to objects referenced by the request catalog. type RequestCatalogView struct { // The RequestCatalog is used for managing which entitlements are requestable, and who can request them. @@ -14,6 +18,17 @@ type RequestCatalogView struct { MemberCount *int64 `integer:"string" json:"memberCount,omitempty"` } +func (r RequestCatalogView) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(r, "", false) +} + +func (r *RequestCatalogView) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &r, "", false, nil); err != nil { + return err + } + return nil +} + func (r *RequestCatalogView) GetRequestCatalog() *RequestCatalog { if r == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschema.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschema.go index 70d1b9dd..be047707 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschema.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschema.go @@ -7,7 +7,7 @@ import ( "time" ) -// JustificationVisibility - The justificationVisibility field. +// JustificationVisibility - Controls whether the justification field is shown or hidden on the request form. type JustificationVisibility string const ( @@ -31,15 +31,15 @@ func (e *JustificationVisibility) IsExact() bool { return false } -// The RequestSchema message. +// RequestSchema - A request schema defines a form template that users fill out when requesting access. type RequestSchema struct { // A form is a collection of fields to be filled out by a user - Form *FormInput `json:"form,omitempty"` - CreatedAt *time.Time `json:"createdAt,omitempty"` - DeletedAt *time.Time `json:"deletedAt,omitempty"` - // The id field. + RequestSchemaForm *RequestSchemaForm `json:"form,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + DeletedAt *time.Time `json:"deletedAt,omitempty"` + // The unique identifier of this request schema. ID *string `json:"id,omitempty"` - // The justificationVisibility field. + // Controls whether the justification field is shown or hidden on the request form. JustificationVisibility *JustificationVisibility `json:"justificationVisibility,omitempty"` ModifiedAt *time.Time `json:"modifiedAt,omitempty"` } @@ -55,11 +55,11 @@ func (r *RequestSchema) UnmarshalJSON(data []byte) error { return nil } -func (r *RequestSchema) GetForm() *FormInput { +func (r *RequestSchema) GetRequestSchemaForm() *RequestSchemaForm { if r == nil { return nil } - return r.Form + return r.RequestSchemaForm } func (r *RequestSchema) GetCreatedAt() *time.Time { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaform.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaform.go new file mode 100644 index 00000000..0d07e978 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaform.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// RequestSchemaForm - A form is a collection of fields to be filled out by a user +type RequestSchemaForm struct { + // The description field. + Description *string `json:"description,omitempty"` + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + // The fieldGroups field. + FieldGroups []FormFieldGroup `json:"fieldGroups,omitempty"` + // The fieldRelationships field. + FieldRelationships []FieldRelationship `json:"fieldRelationships,omitempty"` + // The fields field. + Fields []FormField `json:"fields,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` +} + +func (r *RequestSchemaForm) GetDescription() *string { + if r == nil { + return nil + } + return r.Description +} + +func (r *RequestSchemaForm) GetDisplayName() *string { + if r == nil { + return nil + } + return r.DisplayName +} + +func (r *RequestSchemaForm) GetFieldGroups() []FormFieldGroup { + if r == nil { + return nil + } + return r.FieldGroups +} + +func (r *RequestSchemaForm) GetFieldRelationships() []FieldRelationship { + if r == nil { + return nil + } + return r.FieldRelationships +} + +func (r *RequestSchemaForm) GetFields() []FormField { + if r == nil { + return nil + } + return r.Fields +} + +func (r *RequestSchemaForm) GetID() *string { + if r == nil { + return nil + } + return r.ID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateentitlementbindingrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateentitlementbindingrequest.go index 591f5fd4..cdd663a2 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateentitlementbindingrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateentitlementbindingrequest.go @@ -2,11 +2,11 @@ package shared -// The RequestSchemaServiceCreateEntitlementBindingRequest message. +// RequestSchemaServiceCreateEntitlementBindingRequest - The request message for creating a single entitlement binding on a request schema. type RequestSchemaServiceCreateEntitlementBindingRequest struct { // The AppEntitlementRef message. AppEntitlementRef *AppEntitlementRef `json:"entitlementRef,omitempty"` - // The requestSchemaId field. + // The unique identifier of the request schema to bind the entitlement to. RequestSchemaID *string `json:"requestSchemaId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateentitlementbindingresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateentitlementbindingresponse.go index e6f312eb..2c321238 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateentitlementbindingresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateentitlementbindingresponse.go @@ -2,11 +2,11 @@ package shared -// The RequestSchemaServiceCreateEntitlementBindingResponse message. +// RequestSchemaServiceCreateEntitlementBindingResponse - The response message for creating a single entitlement binding. type RequestSchemaServiceCreateEntitlementBindingResponse struct { // The AppEntitlementRef message. AppEntitlementRef *AppEntitlementRef `json:"entitlementRef,omitempty"` - // The requestSchemaId field. + // The unique identifier of the request schema the entitlement was bound to. RequestSchemaID *string `json:"requestSchemaId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreaterequest.go index f40549ee..6eb88bb8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreaterequest.go @@ -2,13 +2,43 @@ package shared -// The RequestSchemaServiceCreateRequest message. +// RequestSchemaServiceCreateRequestJustificationVisibility - Controls whether the justification field is shown or hidden on the request form. +type RequestSchemaServiceCreateRequestJustificationVisibility string + +const ( + RequestSchemaServiceCreateRequestJustificationVisibilityJustificationVisibilityUnspecified RequestSchemaServiceCreateRequestJustificationVisibility = "JUSTIFICATION_VISIBILITY_UNSPECIFIED" + RequestSchemaServiceCreateRequestJustificationVisibilityJustificationVisibilityShow RequestSchemaServiceCreateRequestJustificationVisibility = "JUSTIFICATION_VISIBILITY_SHOW" + RequestSchemaServiceCreateRequestJustificationVisibilityJustificationVisibilityHide RequestSchemaServiceCreateRequestJustificationVisibility = "JUSTIFICATION_VISIBILITY_HIDE" +) + +func (e RequestSchemaServiceCreateRequestJustificationVisibility) ToPointer() *RequestSchemaServiceCreateRequestJustificationVisibility { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *RequestSchemaServiceCreateRequestJustificationVisibility) IsExact() bool { + if e != nil { + switch *e { + case "JUSTIFICATION_VISIBILITY_UNSPECIFIED", "JUSTIFICATION_VISIBILITY_SHOW", "JUSTIFICATION_VISIBILITY_HIDE": + return true + } + } + return false +} + +// RequestSchemaServiceCreateRequest - The request message for creating a new request schema. type RequestSchemaServiceCreateRequest struct { - // The description field. + // An optional description of the request schema's purpose. Description *string `json:"description,omitempty"` - // The fields field. - Fields []FieldInput `json:"fields,omitempty"` - // The name field. + // Logical groupings of fields for display purposes. + FieldGroups []FormFieldGroup `json:"fieldGroups,omitempty"` + // Dependencies between fields that control conditional visibility or validation. + FieldRelationships []FieldRelationship `json:"fieldRelationships,omitempty"` + // The form fields that users must fill out when requesting access. + Fields []FormField `json:"fields,omitempty"` + // Controls whether the justification field is shown or hidden on the request form. + JustificationVisibility *RequestSchemaServiceCreateRequestJustificationVisibility `json:"justificationVisibility,omitempty"` + // The human-readable name for the request schema. Name *string `json:"name,omitempty"` } @@ -19,13 +49,34 @@ func (r *RequestSchemaServiceCreateRequest) GetDescription() *string { return r.Description } -func (r *RequestSchemaServiceCreateRequest) GetFields() []FieldInput { +func (r *RequestSchemaServiceCreateRequest) GetFieldGroups() []FormFieldGroup { + if r == nil { + return nil + } + return r.FieldGroups +} + +func (r *RequestSchemaServiceCreateRequest) GetFieldRelationships() []FieldRelationship { + if r == nil { + return nil + } + return r.FieldRelationships +} + +func (r *RequestSchemaServiceCreateRequest) GetFields() []FormField { if r == nil { return nil } return r.Fields } +func (r *RequestSchemaServiceCreateRequest) GetJustificationVisibility() *RequestSchemaServiceCreateRequestJustificationVisibility { + if r == nil { + return nil + } + return r.JustificationVisibility +} + func (r *RequestSchemaServiceCreateRequest) GetName() *string { if r == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateresponse.go index e31a3360..e609ad0f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicecreateresponse.go @@ -2,9 +2,9 @@ package shared -// The RequestSchemaServiceCreateResponse message. +// RequestSchemaServiceCreateResponse - The response message for creating a request schema. type RequestSchemaServiceCreateResponse struct { - // The RequestSchema message. + // A request schema defines a form template that users fill out when requesting access. RequestSchema *RequestSchema `json:"requestSchema,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicedeleterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicedeleterequest.go index ceb80d88..d7cf4566 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicedeleterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicedeleterequest.go @@ -2,6 +2,6 @@ package shared -// The RequestSchemaServiceDeleteRequest message. +// RequestSchemaServiceDeleteRequest - The request message for deleting a request schema. type RequestSchemaServiceDeleteRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicedeleteresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicedeleteresponse.go index e2a1f8cc..679933fe 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicedeleteresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicedeleteresponse.go @@ -2,6 +2,6 @@ package shared -// The RequestSchemaServiceDeleteResponse message. +// RequestSchemaServiceDeleteResponse - The response message for deleting a request schema. type RequestSchemaServiceDeleteResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicefindbindingforappentitlementrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicefindbindingforappentitlementrequest.go index 05e9e4f9..41677fa9 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicefindbindingforappentitlementrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicefindbindingforappentitlementrequest.go @@ -2,7 +2,7 @@ package shared -// The RequestSchemaServiceFindBindingForAppEntitlementRequest message. +// RequestSchemaServiceFindBindingForAppEntitlementRequest - The request message for finding which request schema is bound to a given app entitlement. type RequestSchemaServiceFindBindingForAppEntitlementRequest struct { // The AppEntitlementRef message. AppEntitlementRef *AppEntitlementRef `json:"entitlementRef,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicefindbindingforappentitlementresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicefindbindingforappentitlementresponse.go index 7b85eb2b..e63a7104 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicefindbindingforappentitlementresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicefindbindingforappentitlementresponse.go @@ -2,11 +2,11 @@ package shared -// The RequestSchemaServiceFindBindingForAppEntitlementResponse message. +// RequestSchemaServiceFindBindingForAppEntitlementResponse - The response message containing the binding for the specified app entitlement. type RequestSchemaServiceFindBindingForAppEntitlementResponse struct { // The AppEntitlementRef message. AppEntitlementRef *AppEntitlementRef `json:"entitlementRef,omitempty"` - // The requestSchemaId field. + // The unique identifier of the request schema bound to this entitlement, if any. RequestSchemaID *string `json:"requestSchemaId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicegetresponse.go index 00e7f4c4..317ab6e1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicegetresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaservicegetresponse.go @@ -2,9 +2,9 @@ package shared -// The RequestSchemaServiceGetResponse message. +// RequestSchemaServiceGetResponse - The response message for retrieving a request schema. type RequestSchemaServiceGetResponse struct { - // The RequestSchema message. + // A request schema defines a form template that users fill out when requesting access. RequestSchema *RequestSchema `json:"requestSchema,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceremoveentitlementbindingrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceremoveentitlementbindingrequest.go index e338a61f..1a7d021e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceremoveentitlementbindingrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceremoveentitlementbindingrequest.go @@ -2,11 +2,11 @@ package shared -// The RequestSchemaServiceRemoveEntitlementBindingRequest message. +// RequestSchemaServiceRemoveEntitlementBindingRequest - The request message for removing a single entitlement binding from a request schema. type RequestSchemaServiceRemoveEntitlementBindingRequest struct { // The AppEntitlementRef message. AppEntitlementRef *AppEntitlementRef `json:"entitlementRef,omitempty"` - // The requestSchemaId field. + // The unique identifier of the request schema to remove the binding from. RequestSchemaID *string `json:"requestSchemaId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceremoveentitlementbindingresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceremoveentitlementbindingresponse.go index d64ef213..e16e7427 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceremoveentitlementbindingresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceremoveentitlementbindingresponse.go @@ -2,6 +2,6 @@ package shared -// The RequestSchemaServiceRemoveEntitlementBindingResponse message. +// RequestSchemaServiceRemoveEntitlementBindingResponse - The response message for removing a single entitlement binding. type RequestSchemaServiceRemoveEntitlementBindingResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceupdaterequest.go index d5e86b8b..1496d770 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceupdaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceupdaterequest.go @@ -2,9 +2,9 @@ package shared -// The RequestSchemaServiceUpdateRequest message. +// RequestSchemaServiceUpdateRequest - The request message for updating an existing request schema. type RequestSchemaServiceUpdateRequest struct { - // The RequestSchema message. + // A request schema defines a form template that users fill out when requesting access. RequestSchema *RequestSchema `json:"requestSchema,omitempty"` UpdateMask *string `json:"updateMask,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceupdateresponse.go index ec43d7ac..6183adae 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceupdateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/requestschemaserviceupdateresponse.go @@ -2,9 +2,9 @@ package shared -// The RequestSchemaServiceUpdateResponse message. +// RequestSchemaServiceUpdateResponse - The response message for updating a request schema. type RequestSchemaServiceUpdateResponse struct { - // The RequestSchema message. + // A request schema defines a form template that users fill out when requesting access. RequestSchema *RequestSchema `json:"requestSchema,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resolveaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resolveaction.go new file mode 100644 index 00000000..68c1f594 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resolveaction.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ResolveAction parameters for UpdateFindingState (manual resolve). +type ResolveAction struct { + // The reason field. + Reason *string `json:"reason,omitempty"` +} + +func (r *ResolveAction) GetReason() *string { + if r == nil { + return nil + } + return r.Reason +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resolvepausedautomationexecutionsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resolvepausedautomationexecutionsrequest.go new file mode 100644 index 00000000..a82aa2bd --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resolvepausedautomationexecutionsrequest.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// Decision - Whether to run or cancel the paused executions. +type Decision string + +const ( + DecisionPausedExecutionDecisionUnspecified Decision = "PAUSED_EXECUTION_DECISION_UNSPECIFIED" + DecisionPausedExecutionDecisionRun Decision = "PAUSED_EXECUTION_DECISION_RUN" + DecisionPausedExecutionDecisionCancel Decision = "PAUSED_EXECUTION_DECISION_CANCEL" +) + +func (e Decision) ToPointer() *Decision { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Decision) IsExact() bool { + if e != nil { + switch *e { + case "PAUSED_EXECUTION_DECISION_UNSPECIFIED", "PAUSED_EXECUTION_DECISION_RUN", "PAUSED_EXECUTION_DECISION_CANCEL": + return true + } + } + return false +} + +// The ResolvePausedAutomationExecutionsRequest message. +type ResolvePausedAutomationExecutionsRequest struct { + // Whether to run or cancel the paused executions. + Decision *Decision `json:"decision,omitempty"` + // Optional human-readable reason for the resolution decision. Stored on + // the audit row (paused_run / paused_cancelled events) for post-mortem + // and compliance use. Surfaced in the FE as a required field on CANCEL + // so admins capture why bulk-cancellation happened. Up to 1024 bytes. + Reason *string `json:"reason,omitempty"` +} + +func (r *ResolvePausedAutomationExecutionsRequest) GetDecision() *Decision { + if r == nil { + return nil + } + return r.Decision +} + +func (r *ResolvePausedAutomationExecutionsRequest) GetReason() *string { + if r == nil { + return nil + } + return r.Reason +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resolvepausedautomationexecutionsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resolvepausedautomationexecutionsresponse.go new file mode 100644 index 00000000..b9bcb5b5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resolvepausedautomationexecutionsresponse.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ResolvePausedAutomationExecutionsResponse message. +type ResolvePausedAutomationExecutionsResponse struct { + // The number of paused executions that were attempted but failed to + // resolve (e.g., a transient Dynamo error during the per-execution + // mutate). Per-execution failures do not abort the run — the loop + // continues, the failures are recorded on the audit row, and the + // affected executions remain in PAUSED_BY_CIRCUIT_BREAKER state so a + // subsequent call can retry them. Always 0 in the happy path. + ErroredCount *int64 `json:"erroredCount,omitempty"` + // The number of paused executions successfully resolved by this call + // (transitioned to PENDING for RUN, TERMINATE for CANCEL). Paused + // executions are processed inline, paginated server-side. For very large + // paused sets (10K+) this RPC may take seconds to minutes; callers should + // treat the request as long-running. + PausedCount *int64 `json:"pausedCount,omitempty"` +} + +func (r *ResolvePausedAutomationExecutionsResponse) GetErroredCount() *int64 { + if r == nil { + return nil + } + return r.ErroredCount +} + +func (r *ResolvePausedAutomationExecutionsResponse) GetPausedCount() *int64 { + if r == nil { + return nil + } + return r.PausedCount +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resourceselectionscope.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resourceselectionscope.go new file mode 100644 index 00000000..87321885 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resourceselectionscope.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ResourceSelectionScope message. +type ResourceSelectionScope struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resourcetypeidref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resourcetypeidref.go new file mode 100644 index 00000000..6d57c9a9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resourcetypeidref.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ResourceTypeIDRef - A reference to a resource type within an application. +type ResourceTypeIDRef struct { + // The ID of the application that owns the resource type. + AppID *string `json:"appId,omitempty"` + // The ID of the resource type. + ResourceTypeID *string `json:"resourceTypeId,omitempty"` +} + +func (r *ResourceTypeIDRef) GetAppID() *string { + if r == nil { + return nil + } + return r.AppID +} + +func (r *ResourceTypeIDRef) GetResourceTypeID() *string { + if r == nil { + return nil + } + return r.ResourceTypeID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumepausedbundleautomationrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumepausedbundleautomationrequest.go index 0d421364..b6051dc8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumepausedbundleautomationrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumepausedbundleautomationrequest.go @@ -2,6 +2,6 @@ package shared -// The ResumePausedBundleAutomationRequest message. +// ResumePausedBundleAutomationRequest - The request message for resuming a paused bundle automation. type ResumePausedBundleAutomationRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumepausedbundleautomationresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumepausedbundleautomationresponse.go index 08f6f387..3098302b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumepausedbundleautomationresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumepausedbundleautomationresponse.go @@ -2,6 +2,6 @@ package shared -// The ResumePausedBundleAutomationResponse message. +// ResumePausedBundleAutomationResponse - The response message for resuming a paused bundle automation. type ResumePausedBundleAutomationResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumesyncrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumesyncrequest.go index 73d679c8..2eac7fbd 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumesyncrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumesyncrequest.go @@ -2,6 +2,6 @@ package shared -// The ResumeSyncRequest message. +// The ResumeSyncRequest message contains the fields required to resume syncing for a connector. type ResumeSyncRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumesyncresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumesyncresponse.go index c3f156a6..d3209efe 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumesyncresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/resumesyncresponse.go @@ -2,6 +2,6 @@ package shared -// The ResumeSyncResponse message. +// ResumeSyncResponse - Empty response body. Status code indicates success. type ResumeSyncResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/reviewspreference.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/reviewspreference.go new file mode 100644 index 00000000..849391b6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/reviewspreference.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ReviewsPreference message. +type ReviewsPreference struct { + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The locked field. + Locked *bool `json:"locked,omitempty"` +} + +func (r *ReviewsPreference) GetEnabled() *bool { + if r == nil { + return nil + } + return r.Enabled +} + +func (r *ReviewsPreference) GetLocked() *bool { + if r == nil { + return nil + } + return r.Locked +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingattributevalue.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingattributevalue.go new file mode 100644 index 00000000..f2843365 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingattributevalue.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// RoleMiningAttributeValue - AttributeValue represents a single value within a facet. +type RoleMiningAttributeValue struct { + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + // The userCount field. + UserCount *int `json:"userCount,omitempty"` + // The value field. + Value *string `json:"value,omitempty"` +} + +func (r *RoleMiningAttributeValue) GetDisplayName() *string { + if r == nil { + return nil + } + return r.DisplayName +} + +func (r *RoleMiningAttributeValue) GetUserCount() *int { + if r == nil { + return nil + } + return r.UserCount +} + +func (r *RoleMiningAttributeValue) GetValue() *string { + if r == nil { + return nil + } + return r.Value +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingmanagementconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingmanagementconfig.go new file mode 100644 index 00000000..9d08b154 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingmanagementconfig.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The RoleMiningManagementConfig message. +type RoleMiningManagementConfig struct { + // Configured cohort hints that guide which user attributes the analysis prioritizes. + CohortHints []CohortHintView `json:"cohortHints,omitempty"` + // Maximum number of suggestions the analysis will produce per run. + MaxSuggestions *int `json:"maxSuggestions,omitempty"` + // Minimum number of users a cohort must contain to generate a suggestion. + MinCohortSize *int `json:"minCohortSize,omitempty"` +} + +func (r *RoleMiningManagementConfig) GetCohortHints() []CohortHintView { + if r == nil { + return nil + } + return r.CohortHints +} + +func (r *RoleMiningManagementConfig) GetMaxSuggestions() *int { + if r == nil { + return nil + } + return r.MaxSuggestions +} + +func (r *RoleMiningManagementConfig) GetMinCohortSize() *int { + if r == nil { + return nil + } + return r.MinCohortSize +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingmanagementrun.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingmanagementrun.go new file mode 100644 index 00000000..222065af --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingmanagementrun.go @@ -0,0 +1,170 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// RoleMiningManagementRunStatus - Current execution status of this run (e.g., running, completed, failed). +type RoleMiningManagementRunStatus string + +const ( + RoleMiningManagementRunStatusRunStatusUnspecified RoleMiningManagementRunStatus = "RUN_STATUS_UNSPECIFIED" + RoleMiningManagementRunStatusRunStatusRunning RoleMiningManagementRunStatus = "RUN_STATUS_RUNNING" + RoleMiningManagementRunStatusRunStatusCompleted RoleMiningManagementRunStatus = "RUN_STATUS_COMPLETED" + RoleMiningManagementRunStatusRunStatusFailed RoleMiningManagementRunStatus = "RUN_STATUS_FAILED" +) + +func (e RoleMiningManagementRunStatus) ToPointer() *RoleMiningManagementRunStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *RoleMiningManagementRunStatus) IsExact() bool { + if e != nil { + switch *e { + case "RUN_STATUS_UNSPECIFIED", "RUN_STATUS_RUNNING", "RUN_STATUS_COMPLETED", "RUN_STATUS_FAILED": + return true + } + } + return false +} + +// TriggerType - How this run was initiated (e.g., manual, scheduled). +type TriggerType string + +const ( + TriggerTypeTriggerTypeUnspecified TriggerType = "TRIGGER_TYPE_UNSPECIFIED" + TriggerTypeTriggerTypeManual TriggerType = "TRIGGER_TYPE_MANUAL" + TriggerTypeTriggerTypeUpliftCompletion TriggerType = "TRIGGER_TYPE_UPLIFT_COMPLETION" + TriggerTypeTriggerTypeScheduled TriggerType = "TRIGGER_TYPE_SCHEDULED" + TriggerTypeTriggerTypeDirectoryMerge TriggerType = "TRIGGER_TYPE_DIRECTORY_MERGE" +) + +func (e TriggerType) ToPointer() *TriggerType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *TriggerType) IsExact() bool { + if e != nil { + switch *e { + case "TRIGGER_TYPE_UNSPECIFIED", "TRIGGER_TYPE_MANUAL", "TRIGGER_TYPE_UPLIFT_COMPLETION", "TRIGGER_TYPE_SCHEDULED", "TRIGGER_TYPE_DIRECTORY_MERGE": + return true + } + } + return false +} + +// The RoleMiningManagementRun message. +type RoleMiningManagementRun struct { + // Number of user cohorts evaluated during the analysis. + CohortsAnalyzed *int `json:"cohortsAnalyzed,omitempty"` + CompletedAt *time.Time `json:"completedAt,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Error message if the run failed, empty on success. + ErrorMessage *string `json:"errorMessage,omitempty"` + // Unique identifier for this analysis run. + ID *string `json:"id,omitempty"` + // Current execution status of this run (e.g., running, completed, failed). + Status *RoleMiningManagementRunStatus `json:"status,omitempty"` + // Number of role suggestions produced by this run. + SuggestionsGenerated *int `json:"suggestionsGenerated,omitempty"` + // Total number of users evaluated during the analysis. + TotalUsers *int `json:"totalUsers,omitempty"` + // Additional detail about the trigger, such as the user or schedule that initiated the run. + TriggerDetail *string `json:"triggerDetail,omitempty"` + // How this run was initiated (e.g., manual, scheduled). + TriggerType *TriggerType `json:"triggerType,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (r RoleMiningManagementRun) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(r, "", false) +} + +func (r *RoleMiningManagementRun) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &r, "", false, nil); err != nil { + return err + } + return nil +} + +func (r *RoleMiningManagementRun) GetCohortsAnalyzed() *int { + if r == nil { + return nil + } + return r.CohortsAnalyzed +} + +func (r *RoleMiningManagementRun) GetCompletedAt() *time.Time { + if r == nil { + return nil + } + return r.CompletedAt +} + +func (r *RoleMiningManagementRun) GetCreatedAt() *time.Time { + if r == nil { + return nil + } + return r.CreatedAt +} + +func (r *RoleMiningManagementRun) GetErrorMessage() *string { + if r == nil { + return nil + } + return r.ErrorMessage +} + +func (r *RoleMiningManagementRun) GetID() *string { + if r == nil { + return nil + } + return r.ID +} + +func (r *RoleMiningManagementRun) GetStatus() *RoleMiningManagementRunStatus { + if r == nil { + return nil + } + return r.Status +} + +func (r *RoleMiningManagementRun) GetSuggestionsGenerated() *int { + if r == nil { + return nil + } + return r.SuggestionsGenerated +} + +func (r *RoleMiningManagementRun) GetTotalUsers() *int { + if r == nil { + return nil + } + return r.TotalUsers +} + +func (r *RoleMiningManagementRun) GetTriggerDetail() *string { + if r == nil { + return nil + } + return r.TriggerDetail +} + +func (r *RoleMiningManagementRun) GetTriggerType() *TriggerType { + if r == nil { + return nil + } + return r.TriggerType +} + +func (r *RoleMiningManagementRun) GetUpdatedAt() *time.Time { + if r == nil { + return nil + } + return r.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingmanagementsuggestion.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingmanagementsuggestion.go new file mode 100644 index 00000000..ba826a35 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingmanagementsuggestion.go @@ -0,0 +1,207 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// SuggestionState - Current workflow state of this suggestion (e.g., pending, accepted, dismissed). +type SuggestionState string + +const ( + SuggestionStateSuggestionStateUnspecified SuggestionState = "SUGGESTION_STATE_UNSPECIFIED" + SuggestionStateSuggestionStateNew SuggestionState = "SUGGESTION_STATE_NEW" + SuggestionStateSuggestionStateDismissed SuggestionState = "SUGGESTION_STATE_DISMISSED" + SuggestionStateSuggestionStateAccepted SuggestionState = "SUGGESTION_STATE_ACCEPTED" +) + +func (e SuggestionState) ToPointer() *SuggestionState { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SuggestionState) IsExact() bool { + if e != nil { + switch *e { + case "SUGGESTION_STATE_UNSPECIFIED", "SUGGESTION_STATE_NEW", "SUGGESTION_STATE_DISMISSED", "SUGGESTION_STATE_ACCEPTED": + return true + } + } + return false +} + +// The RoleMiningManagementSuggestion message. +type RoleMiningManagementSuggestion struct { + // Average fraction of suggested entitlements held by each user in the cohort. + AvgCoverage *float64 `json:"avgCoverage,omitempty"` + // The profile filters that define which users belong to this cohort. + CohortFilters []ProfileFilter `json:"cohortFilters,omitempty"` + // Total number of users in the cohort matching the profile filters. + CohortSize *int `json:"cohortSize,omitempty"` + // Overall confidence score for this suggestion, from 0.0 to 1.0. + Confidence *float64 `json:"confidence,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The ID of the access profile created when this suggestion was accepted, empty if not yet accepted. + CreatedCatalogID *string `json:"createdCatalogId,omitempty"` + // A human-readable description of the proposed role and the cohort it serves. + Description *string `json:"description,omitempty"` + // Number of distinct attribute dimensions used to define the cohort. + DimensionCount *int `json:"dimensionCount,omitempty"` + // The entitlements that are commonly held by users in this cohort. + Entitlements []CohortEntitlement `json:"entitlements,omitempty"` + // Existing access profiles that overlap with this suggestion. + ExistingProfileMatches []AccessProfileMatch `json:"existingProfileMatches,omitempty"` + // Unique identifier for this suggestion. + ID *string `json:"id,omitempty"` + // Human-readable insights explaining why this role was suggested. + Insights []string `json:"insights,omitempty"` + LastGeneratedAt *time.Time `json:"lastGeneratedAt,omitempty"` + // The ID of the analysis run that produced this suggestion. + RunID *string `json:"runId,omitempty"` + // The suggested display name for the proposed role. + SuggestedName *string `json:"suggestedName,omitempty"` + // Current workflow state of this suggestion (e.g., pending, accepted, dismissed). + SuggestionState *SuggestionState `json:"suggestionState,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + // Number of users in the cohort that hold all of the suggested entitlements. + UsersWithAll *int `json:"usersWithAll,omitempty"` +} + +func (r RoleMiningManagementSuggestion) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(r, "", false) +} + +func (r *RoleMiningManagementSuggestion) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &r, "", false, nil); err != nil { + return err + } + return nil +} + +func (r *RoleMiningManagementSuggestion) GetAvgCoverage() *float64 { + if r == nil { + return nil + } + return r.AvgCoverage +} + +func (r *RoleMiningManagementSuggestion) GetCohortFilters() []ProfileFilter { + if r == nil { + return nil + } + return r.CohortFilters +} + +func (r *RoleMiningManagementSuggestion) GetCohortSize() *int { + if r == nil { + return nil + } + return r.CohortSize +} + +func (r *RoleMiningManagementSuggestion) GetConfidence() *float64 { + if r == nil { + return nil + } + return r.Confidence +} + +func (r *RoleMiningManagementSuggestion) GetCreatedAt() *time.Time { + if r == nil { + return nil + } + return r.CreatedAt +} + +func (r *RoleMiningManagementSuggestion) GetCreatedCatalogID() *string { + if r == nil { + return nil + } + return r.CreatedCatalogID +} + +func (r *RoleMiningManagementSuggestion) GetDescription() *string { + if r == nil { + return nil + } + return r.Description +} + +func (r *RoleMiningManagementSuggestion) GetDimensionCount() *int { + if r == nil { + return nil + } + return r.DimensionCount +} + +func (r *RoleMiningManagementSuggestion) GetEntitlements() []CohortEntitlement { + if r == nil { + return nil + } + return r.Entitlements +} + +func (r *RoleMiningManagementSuggestion) GetExistingProfileMatches() []AccessProfileMatch { + if r == nil { + return nil + } + return r.ExistingProfileMatches +} + +func (r *RoleMiningManagementSuggestion) GetID() *string { + if r == nil { + return nil + } + return r.ID +} + +func (r *RoleMiningManagementSuggestion) GetInsights() []string { + if r == nil { + return nil + } + return r.Insights +} + +func (r *RoleMiningManagementSuggestion) GetLastGeneratedAt() *time.Time { + if r == nil { + return nil + } + return r.LastGeneratedAt +} + +func (r *RoleMiningManagementSuggestion) GetRunID() *string { + if r == nil { + return nil + } + return r.RunID +} + +func (r *RoleMiningManagementSuggestion) GetSuggestedName() *string { + if r == nil { + return nil + } + return r.SuggestedName +} + +func (r *RoleMiningManagementSuggestion) GetSuggestionState() *SuggestionState { + if r == nil { + return nil + } + return r.SuggestionState +} + +func (r *RoleMiningManagementSuggestion) GetUpdatedAt() *time.Time { + if r == nil { + return nil + } + return r.UpdatedAt +} + +func (r *RoleMiningManagementSuggestion) GetUsersWithAll() *int { + if r == nil { + return nil + } + return r.UsersWithAll +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingsearchsuggestionsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingsearchsuggestionsrequest.go new file mode 100644 index 00000000..18f2758c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingsearchsuggestionsrequest.go @@ -0,0 +1,109 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type MatchTypes string + +const ( + MatchTypesAccessProfileMatchTypeUnspecified MatchTypes = "ACCESS_PROFILE_MATCH_TYPE_UNSPECIFIED" + MatchTypesAccessProfileMatchTypeExact MatchTypes = "ACCESS_PROFILE_MATCH_TYPE_EXACT" + MatchTypesAccessProfileMatchTypeSuperset MatchTypes = "ACCESS_PROFILE_MATCH_TYPE_SUPERSET" + MatchTypesAccessProfileMatchTypePartial MatchTypes = "ACCESS_PROFILE_MATCH_TYPE_PARTIAL" +) + +func (e MatchTypes) ToPointer() *MatchTypes { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *MatchTypes) IsExact() bool { + if e != nil { + switch *e { + case "ACCESS_PROFILE_MATCH_TYPE_UNSPECIFIED", "ACCESS_PROFILE_MATCH_TYPE_EXACT", "ACCESS_PROFILE_MATCH_TYPE_SUPERSET", "ACCESS_PROFILE_MATCH_TYPE_PARTIAL": + return true + } + } + return false +} + +type RoleMiningSearchSuggestionsRequestStates string + +const ( + RoleMiningSearchSuggestionsRequestStatesSuggestionStateUnspecified RoleMiningSearchSuggestionsRequestStates = "SUGGESTION_STATE_UNSPECIFIED" + RoleMiningSearchSuggestionsRequestStatesSuggestionStateNew RoleMiningSearchSuggestionsRequestStates = "SUGGESTION_STATE_NEW" + RoleMiningSearchSuggestionsRequestStatesSuggestionStateDismissed RoleMiningSearchSuggestionsRequestStates = "SUGGESTION_STATE_DISMISSED" + RoleMiningSearchSuggestionsRequestStatesSuggestionStateAccepted RoleMiningSearchSuggestionsRequestStates = "SUGGESTION_STATE_ACCEPTED" +) + +func (e RoleMiningSearchSuggestionsRequestStates) ToPointer() *RoleMiningSearchSuggestionsRequestStates { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *RoleMiningSearchSuggestionsRequestStates) IsExact() bool { + if e != nil { + switch *e { + case "SUGGESTION_STATE_UNSPECIFIED", "SUGGESTION_STATE_NEW", "SUGGESTION_STATE_DISMISSED", "SUGGESTION_STATE_ACCEPTED": + return true + } + } + return false +} + +// The RoleMiningSearchSuggestionsRequest message. +type RoleMiningSearchSuggestionsRequest struct { + // Filter by cohort type (e.g. "department", "job_title", "manager"). + CohortTypes []string `json:"cohortTypes,omitempty"` + // Filter by match type against existing access profiles. + MatchTypes []MatchTypes `json:"matchTypes,omitempty"` + // Maximum number of suggestions to return per page. + PageSize *int `json:"pageSize,omitempty"` + // Pagination token from a previous response. + PageToken *string `json:"pageToken,omitempty"` + // Text search — matches against suggested_name, description, and cohort filter values. + Query *string `json:"query,omitempty"` + // Filter by suggestion state. + States []RoleMiningSearchSuggestionsRequestStates `json:"states,omitempty"` +} + +func (r *RoleMiningSearchSuggestionsRequest) GetCohortTypes() []string { + if r == nil { + return nil + } + return r.CohortTypes +} + +func (r *RoleMiningSearchSuggestionsRequest) GetMatchTypes() []MatchTypes { + if r == nil { + return nil + } + return r.MatchTypes +} + +func (r *RoleMiningSearchSuggestionsRequest) GetPageSize() *int { + if r == nil { + return nil + } + return r.PageSize +} + +func (r *RoleMiningSearchSuggestionsRequest) GetPageToken() *string { + if r == nil { + return nil + } + return r.PageToken +} + +func (r *RoleMiningSearchSuggestionsRequest) GetQuery() *string { + if r == nil { + return nil + } + return r.Query +} + +func (r *RoleMiningSearchSuggestionsRequest) GetStates() []RoleMiningSearchSuggestionsRequestStates { + if r == nil { + return nil + } + return r.States +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingsearchsuggestionsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingsearchsuggestionsresponse.go new file mode 100644 index 00000000..540e1059 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/roleminingsearchsuggestionsresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The RoleMiningSearchSuggestionsResponse message. +type RoleMiningSearchSuggestionsResponse struct { + // The list of matching role mining suggestions. + List []RoleMiningManagementSuggestion `json:"list,omitempty"` + // Token to retrieve the next page of results, empty if no more results. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (r *RoleMiningSearchSuggestionsResponse) GetList() []RoleMiningManagementSuggestion { + if r == nil { + return nil + } + return r.List +} + +func (r *RoleMiningSearchSuggestionsResponse) GetNextPageToken() *string { + if r == nil { + return nil + } + return r.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/rowcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/rowcomponent.go new file mode 100644 index 00000000..f637a2c0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/rowcomponent.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// RowComponent arranges children horizontally. +type RowComponent struct { + // ChildList contains references to child component IDs. + ChildList *ChildList `json:"children,omitempty"` + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber *DynamicNumber `json:"gap,omitempty"` + // The alignment field. + Alignment *string `json:"alignment,omitempty"` + // The distribution field. + Distribution *string `json:"distribution,omitempty"` +} + +func (r *RowComponent) GetChildList() *ChildList { + if r == nil { + return nil + } + return r.ChildList +} + +func (r *RowComponent) GetDynamicNumber() *DynamicNumber { + if r == nil { + return nil + } + return r.DynamicNumber +} + +func (r *RowComponent) GetAlignment() *string { + if r == nil { + return nil + } + return r.Alignment +} + +func (r *RowComponent) GetDistribution() *string { + if r == nil { + return nil + } + return r.Distribution +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/rule.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/rule.go index 26644efa..89efdd51 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/rule.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/rule.go @@ -2,11 +2,17 @@ package shared -// The Rule message. +// Rule - A conditional routing rule that maps a CEL expression to a step sequence. +// +// Rules are evaluated top-to-bottom; the first matching rule's policy_key +// selects the step sequence from the policy's policy_steps map. If no rule +// matches, the baseline entry is used. type Rule struct { - // The condition field. + // A CEL expression that is evaluated against the request context. If it + // returns true, the step sequence identified by policy_key is used. Condition *string `json:"condition,omitempty"` - // This is a reference to a list of policy steps from `policy_steps` + // A key into the policy's policy_steps map identifying which step sequence + // to execute when this rule's condition matches. PolicyKey *string `json:"policyKey,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/scheduletriggernouser.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/scheduletriggernouser.go new file mode 100644 index 00000000..1e8645b2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/scheduletriggernouser.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// ScheduleTriggerNoUser fires on a cron schedule with no subject user (e.g. reports, syncs, orchestration). +// +// Minimum cron interval is enforced at 1 hour in validation. +type ScheduleTriggerNoUser struct { + // The advanced field. + Advanced *bool `json:"advanced,omitempty"` + // The cronSpec field. + CronSpec *string `json:"cronSpec,omitempty"` + Start *time.Time `json:"start,omitempty"` + // The timezone field. + Timezone *string `json:"timezone,omitempty"` +} + +func (s ScheduleTriggerNoUser) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *ScheduleTriggerNoUser) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *ScheduleTriggerNoUser) GetAdvanced() *bool { + if s == nil { + return nil + } + return s.Advanced +} + +func (s *ScheduleTriggerNoUser) GetCronSpec() *string { + if s == nil { + return nil + } + return s.CronSpec +} + +func (s *ScheduleTriggerNoUser) GetStart() *time.Time { + if s == nil { + return nil + } + return s.Start +} + +func (s *ScheduleTriggerNoUser) GetTimezone() *string { + if s == nil { + return nil + } + return s.Timezone +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/scoperole.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/scoperole.go new file mode 100644 index 00000000..01d5390b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/scoperole.go @@ -0,0 +1,63 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ScopeRole - Scope-role variant of TaskTypeAction.target_object. The UI uses the +// +// embedded identifiers to build links and title strings without a separate +// Action fetch. +type ScopeRole struct { + // The IaaS/sparse-ACL app the (scope, role) pair lives on. + AppID *string `json:"appId,omitempty"` + GrantDuration *string `json:"grantDuration,omitempty"` + // The roleResourceId field. + RoleResourceID *string `json:"roleResourceId,omitempty"` + // The roleResourceTypeId field. + RoleResourceTypeID *string `json:"roleResourceTypeId,omitempty"` + // The scopeResourceId field. + ScopeResourceID *string `json:"scopeResourceId,omitempty"` + // The scopeResourceTypeId field. + ScopeResourceTypeID *string `json:"scopeResourceTypeId,omitempty"` +} + +func (s *ScopeRole) GetAppID() *string { + if s == nil { + return nil + } + return s.AppID +} + +func (s *ScopeRole) GetGrantDuration() *string { + if s == nil { + return nil + } + return s.GrantDuration +} + +func (s *ScopeRole) GetRoleResourceID() *string { + if s == nil { + return nil + } + return s.RoleResourceID +} + +func (s *ScopeRole) GetRoleResourceTypeID() *string { + if s == nil { + return nil + } + return s.RoleResourceTypeID +} + +func (s *ScopeRole) GetScopeResourceID() *string { + if s == nil { + return nil + } + return s.ScopeResourceID +} + +func (s *ScopeRole) GetScopeResourceTypeID() *string { + if s == nil { + return nil + } + return s.ScopeResourceTypeID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/scoperoleinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/scoperoleinput.go new file mode 100644 index 00000000..b74fef5e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/scoperoleinput.go @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ScopeRoleInput - Scope-role variant of TaskTypeAction.target_object. The UI uses the +// +// embedded identifiers to build links and title strings without a separate +// Action fetch. +type ScopeRoleInput struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchallautomationexecutionsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchallautomationexecutionsrequest.go new file mode 100644 index 00000000..72c35b2d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchallautomationexecutionsrequest.go @@ -0,0 +1,100 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type ExecutionStates string + +const ( + ExecutionStatesAutomationExecutionStateUnspecified ExecutionStates = "AUTOMATION_EXECUTION_STATE_UNSPECIFIED" + ExecutionStatesAutomationExecutionStatePending ExecutionStates = "AUTOMATION_EXECUTION_STATE_PENDING" + ExecutionStatesAutomationExecutionStateCreating ExecutionStates = "AUTOMATION_EXECUTION_STATE_CREATING" + ExecutionStatesAutomationExecutionStateGetStep ExecutionStates = "AUTOMATION_EXECUTION_STATE_GET_STEP" + ExecutionStatesAutomationExecutionStateProcessStep ExecutionStates = "AUTOMATION_EXECUTION_STATE_PROCESS_STEP" + ExecutionStatesAutomationExecutionStateCompleteStep ExecutionStates = "AUTOMATION_EXECUTION_STATE_COMPLETE_STEP" + ExecutionStatesAutomationExecutionStateDone ExecutionStates = "AUTOMATION_EXECUTION_STATE_DONE" + ExecutionStatesAutomationExecutionStateError ExecutionStates = "AUTOMATION_EXECUTION_STATE_ERROR" + ExecutionStatesAutomationExecutionStateTerminate ExecutionStates = "AUTOMATION_EXECUTION_STATE_TERMINATE" + ExecutionStatesAutomationExecutionStateWaiting ExecutionStates = "AUTOMATION_EXECUTION_STATE_WAITING" +) + +func (e ExecutionStates) ToPointer() *ExecutionStates { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *ExecutionStates) IsExact() bool { + if e != nil { + switch *e { + case "AUTOMATION_EXECUTION_STATE_UNSPECIFIED", "AUTOMATION_EXECUTION_STATE_PENDING", "AUTOMATION_EXECUTION_STATE_CREATING", "AUTOMATION_EXECUTION_STATE_GET_STEP", "AUTOMATION_EXECUTION_STATE_PROCESS_STEP", "AUTOMATION_EXECUTION_STATE_COMPLETE_STEP", "AUTOMATION_EXECUTION_STATE_DONE", "AUTOMATION_EXECUTION_STATE_ERROR", "AUTOMATION_EXECUTION_STATE_TERMINATE", "AUTOMATION_EXECUTION_STATE_WAITING": + return true + } + } + return false +} + +// The SearchAllAutomationExecutionsRequest message. +type SearchAllAutomationExecutionsRequest struct { + // The AutomationExecutionExpandMask message. + AutomationExecutionExpandMask *AutomationExecutionExpandMask `json:"expandMask,omitempty"` + // Filter to executions associated with one or more apps. + AppIds []string `json:"appIds,omitempty"` + // Filter to one or more specific automation templates. + AutomationTemplateIds []string `json:"automationTemplateIds,omitempty"` + // Filter by execution state (e.g. DONE, ERROR). + ExecutionStates []ExecutionStates `json:"executionStates,omitempty"` + // Maximum number of results to return per page. + PageSize *int `json:"pageSize,omitempty"` + // Pagination token from a previous SearchAllAutomationExecutionsResponse. + PageToken *string `json:"pageToken,omitempty"` + // Filter to executions where one or more C1 users are subjects. + SubjectUserIds []string `json:"subjectUserIds,omitempty"` +} + +func (s *SearchAllAutomationExecutionsRequest) GetAutomationExecutionExpandMask() *AutomationExecutionExpandMask { + if s == nil { + return nil + } + return s.AutomationExecutionExpandMask +} + +func (s *SearchAllAutomationExecutionsRequest) GetAppIds() []string { + if s == nil { + return nil + } + return s.AppIds +} + +func (s *SearchAllAutomationExecutionsRequest) GetAutomationTemplateIds() []string { + if s == nil { + return nil + } + return s.AutomationTemplateIds +} + +func (s *SearchAllAutomationExecutionsRequest) GetExecutionStates() []ExecutionStates { + if s == nil { + return nil + } + return s.ExecutionStates +} + +func (s *SearchAllAutomationExecutionsRequest) GetPageSize() *int { + if s == nil { + return nil + } + return s.PageSize +} + +func (s *SearchAllAutomationExecutionsRequest) GetPageToken() *string { + if s == nil { + return nil + } + return s.PageToken +} + +func (s *SearchAllAutomationExecutionsRequest) GetSubjectUserIds() []string { + if s == nil { + return nil + } + return s.SubjectUserIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchallautomationexecutionsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchallautomationexecutionsresponse.go new file mode 100644 index 00000000..5a1ebfdf --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchallautomationexecutionsresponse.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + +// SearchAllAutomationExecutionsResponseExpanded - Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. +type SearchAllAutomationExecutionsResponseExpanded struct { + // The type of the serialized message. + AtType *string `json:"@type,omitempty"` + AdditionalProperties map[string]any `additionalProperties:"true" json:"-"` +} + +func (s SearchAllAutomationExecutionsResponseExpanded) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SearchAllAutomationExecutionsResponseExpanded) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *SearchAllAutomationExecutionsResponseExpanded) GetAtType() *string { + if s == nil { + return nil + } + return s.AtType +} + +func (s *SearchAllAutomationExecutionsResponseExpanded) GetAdditionalProperties() map[string]any { + if s == nil { + return nil + } + return s.AdditionalProperties +} + +// The SearchAllAutomationExecutionsResponse message. +type SearchAllAutomationExecutionsResponse struct { + // Related objects requested via the expand mask. + Expanded []SearchAllAutomationExecutionsResponseExpanded `json:"expanded,omitempty"` + // The page of execution views matching the search criteria. + List []AutomationExecutionView `json:"list,omitempty"` + // Token to retrieve the next page of results, empty when no more results exist. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SearchAllAutomationExecutionsResponse) GetExpanded() []SearchAllAutomationExecutionsResponseExpanded { + if s == nil { + return nil + } + return s.Expanded +} + +func (s *SearchAllAutomationExecutionsResponse) GetList() []AutomationExecutionView { + if s == nil { + return nil + } + return s.List +} + +func (s *SearchAllAutomationExecutionsResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappentitlemententitlementownersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappentitlemententitlementownersresponse.go new file mode 100644 index 00000000..0bbfb0b7 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappentitlemententitlementownersresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SearchAppEntitlementEntitlementOwnersResponse is the response for searching entitlement ownership sources on an entitlement. +type SearchAppEntitlementEntitlementOwnersResponse struct { + // The list field. + List []AppEntitlementOwnerEntitlement `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SearchAppEntitlementEntitlementOwnersResponse) GetList() []AppEntitlementOwnerEntitlement { + if s == nil { + return nil + } + return s.List +} + +func (s *SearchAppEntitlementEntitlementOwnersResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappentitlementuserownersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappentitlementuserownersresponse.go new file mode 100644 index 00000000..a8e642f6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappentitlementuserownersresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SearchAppEntitlementUserOwnersResponse is the response for searching user ownership sources on an entitlement. +type SearchAppEntitlementUserOwnersResponse struct { + // The list field. + List []AppEntitlementOwnerUser `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SearchAppEntitlementUserOwnersResponse) GetList() []AppEntitlementOwnerUser { + if s == nil { + return nil + } + return s.List +} + +func (s *SearchAppEntitlementUserOwnersResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappresourcesrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappresourcesrequest.go index 91a2cabe..bbb84045 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappresourcesrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappresourcesrequest.go @@ -2,33 +2,33 @@ package shared -// The SearchAppResourcesRequest message. +// SearchAppResourcesRequest - Search app resources based on filters specified in the request body. type SearchAppResourcesRequest struct { - // The appId field. + // The app ID to restrict the search to. AppID *string `json:"appId,omitempty"` - // The appUserIds field. + // A list of app user IDs to restrict the search by. AppUserIds []string `json:"appUserIds,omitempty"` - // The excludeDeletedResourceBindings field. + // If true, exclude resources whose bindings have been deleted. ExcludeDeletedResourceBindings *bool `json:"excludeDeletedResourceBindings,omitempty"` - // The excludeResourceIds field. + // A list of resource IDs to exclude from the search results. ExcludeResourceIds []string `json:"excludeResourceIds,omitempty"` - // The excludeResourceTypeTraitIds field. + // A list of resource type trait IDs to exclude from the search. ExcludeResourceTypeTraitIds []string `json:"excludeResourceTypeTraitIds,omitempty"` - // The ownerUserIds field. + // A list of C1 user IDs to filter resources by ownership. OwnerUserIds []string `json:"ownerUserIds,omitempty"` - // The pageSize field. + // The maximum number of results to return per page. PageSize *int `json:"pageSize,omitempty"` - // The pageToken field. + // The token for fetching the next page of results. PageToken *string `json:"pageToken,omitempty"` - // The query field. + // Fuzzy search the display name of resources. Query *string `json:"query,omitempty"` - // The refs field. + // A list of specific app resource references to restrict the search to. Refs []AppResourceRef `json:"refs,omitempty"` - // The resourceIds field. + // A list of resource IDs to restrict the search to. ResourceIds []string `json:"resourceIds,omitempty"` - // The resourceTypeIds field. + // A list of resource type IDs to restrict the search by. ResourceTypeIds []string `json:"resourceTypeIds,omitempty"` - // The resourceTypeTraitIds field. + // A list of resource type trait IDs to restrict the search by. ResourceTypeTraitIds []string `json:"resourceTypeTraitIds,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappresourcesresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappresourcesresponse.go index 69936b53..6869bda0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappresourcesresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchappresourcesresponse.go @@ -38,13 +38,13 @@ func (s *SearchAppResourcesResponseExpanded) GetAdditionalProperties() map[strin return s.AdditionalProperties } -// The SearchAppResourcesResponse message. +// The SearchAppResourcesResponse message contains a list of results and a nextPageToken if applicable. type SearchAppResourcesResponse struct { - // The expanded field. + // List of serialized related objects. Expanded []SearchAppResourcesResponseExpanded `json:"expanded,omitempty"` - // The list field. + // The list of app resource results. List []AppResourceView `json:"list,omitempty"` - // The nextPageToken field. + // The token for fetching the next page of results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationexecutionsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationexecutionsrequest.go index 92f44897..28d23747 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationexecutionsrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationexecutionsrequest.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + type ExecutionStepStates string const ( @@ -36,22 +40,33 @@ func (e *ExecutionStepStates) IsExact() bool { type SearchAutomationExecutionsRequest struct { // The AutomationExecutionExpandMask message. AutomationExecutionExpandMask *AutomationExecutionExpandMask `json:"expandMask,omitempty"` - // The automationTemplateId field. + // Filter results to executions of this automation template. AutomationTemplateID *string `json:"automationTemplateId,omitempty"` - // The executionId field. + // Filter results to a specific execution by its numeric identifier. ExecutionID *int64 `integer:"string" json:"executionId,omitempty"` - // The executionStepStates field. + // Filter results to executions in any of the specified states. ExecutionStepStates []ExecutionStepStates `json:"executionStepStates,omitempty"` - // The pageSize field. + // Maximum number of results to return per page. PageSize *int `json:"pageSize,omitempty"` - // The pageToken field. + // Pagination token from a previous SearchAutomationExecutionsResponse. PageToken *string `json:"pageToken,omitempty"` - // The query field. + // Free-text search query to filter executions. Query *string `json:"query,omitempty"` - // The refs field. + // Restrict results to specific execution references. Refs []AutomationExecutionRef `json:"refs,omitempty"` } +func (s SearchAutomationExecutionsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SearchAutomationExecutionsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + func (s *SearchAutomationExecutionsRequest) GetAutomationExecutionExpandMask() *AutomationExecutionExpandMask { if s == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationexecutionsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationexecutionsresponse.go index 7edd037e..532e5afb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationexecutionsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationexecutionsresponse.go @@ -40,11 +40,11 @@ func (s *SearchAutomationExecutionsResponseExpanded) GetAdditionalProperties() m // The SearchAutomationExecutionsResponse message. type SearchAutomationExecutionsResponse struct { - // The expanded field. + // Related objects requested via the expand mask. Expanded []SearchAutomationExecutionsResponseExpanded `json:"expanded,omitempty"` - // The list field. + // The page of execution views matching the search criteria. List []AutomationExecutionView `json:"list,omitempty"` - // The nextPageToken field. + // Token to retrieve the next page of results, empty when no more results exist. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationsrequest.go index 5236675f..32c39c9e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationsrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationsrequest.go @@ -2,6 +2,83 @@ package shared +// Direction to sort in. Unspecified falls back to ASC when sort_field is set; +// +// when sort_field is also unspecified, the server default order (created_at +// DESC) applies. +type Direction string + +const ( + DirectionSortDirectionUnspecified Direction = "SORT_DIRECTION_UNSPECIFIED" + DirectionSortDirectionAsc Direction = "SORT_DIRECTION_ASC" + DirectionSortDirectionDesc Direction = "SORT_DIRECTION_DESC" +) + +func (e Direction) ToPointer() *Direction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Direction) IsExact() bool { + if e != nil { + switch *e { + case "SORT_DIRECTION_UNSPECIFIED", "SORT_DIRECTION_ASC", "SORT_DIRECTION_DESC": + return true + } + } + return false +} + +// SortField - Column to sort by. Unspecified (0) means sort by created_at desc (server default). +type SortField string + +const ( + SortFieldAutomationSortFieldUnspecified SortField = "AUTOMATION_SORT_FIELD_UNSPECIFIED" + SortFieldAutomationSortFieldDisplayName SortField = "AUTOMATION_SORT_FIELD_DISPLAY_NAME" + SortFieldAutomationSortFieldCreatedAt SortField = "AUTOMATION_SORT_FIELD_CREATED_AT" + SortFieldAutomationSortFieldLastExecutedAt SortField = "AUTOMATION_SORT_FIELD_LAST_EXECUTED_AT" + SortFieldAutomationSortFieldEnabled SortField = "AUTOMATION_SORT_FIELD_ENABLED" + SortFieldAutomationSortFieldPrimaryTriggerType SortField = "AUTOMATION_SORT_FIELD_PRIMARY_TRIGGER_TYPE" +) + +func (e SortField) ToPointer() *SortField { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SortField) IsExact() bool { + if e != nil { + switch *e { + case "AUTOMATION_SORT_FIELD_UNSPECIFIED", "AUTOMATION_SORT_FIELD_DISPLAY_NAME", "AUTOMATION_SORT_FIELD_CREATED_AT", "AUTOMATION_SORT_FIELD_LAST_EXECUTED_AT", "AUTOMATION_SORT_FIELD_ENABLED", "AUTOMATION_SORT_FIELD_PRIMARY_TRIGGER_TYPE": + return true + } + } + return false +} + +type SearchAutomationsRequestStatuses string + +const ( + SearchAutomationsRequestStatusesAutomationStatusFilterUnspecified SearchAutomationsRequestStatuses = "AUTOMATION_STATUS_FILTER_UNSPECIFIED" + SearchAutomationsRequestStatusesAutomationStatusFilterOn SearchAutomationsRequestStatuses = "AUTOMATION_STATUS_FILTER_ON" + SearchAutomationsRequestStatusesAutomationStatusFilterOff SearchAutomationsRequestStatuses = "AUTOMATION_STATUS_FILTER_OFF" +) + +func (e SearchAutomationsRequestStatuses) ToPointer() *SearchAutomationsRequestStatuses { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SearchAutomationsRequestStatuses) IsExact() bool { + if e != nil { + switch *e { + case "AUTOMATION_STATUS_FILTER_UNSPECIFIED", "AUTOMATION_STATUS_FILTER_ON", "AUTOMATION_STATUS_FILTER_OFF": + return true + } + } + return false +} + type TriggerTypes string const ( @@ -18,6 +95,7 @@ const ( TriggerTypesTriggerTypeForm TriggerTypes = "TRIGGER_TYPE_FORM" TriggerTypesTriggerTypeScheduleAppUser TriggerTypes = "TRIGGER_TYPE_SCHEDULE_APP_USER" TriggerTypesTriggerTypeAccessConflict TriggerTypes = "TRIGGER_TYPE_ACCESS_CONFLICT" + TriggerTypesTriggerTypeScheduleNoUser TriggerTypes = "TRIGGER_TYPE_SCHEDULE_NO_USER" ) func (e TriggerTypes) ToPointer() *TriggerTypes { @@ -28,7 +106,7 @@ func (e TriggerTypes) ToPointer() *TriggerTypes { func (e *TriggerTypes) IsExact() bool { if e != nil { switch *e { - case "TRIGGER_TYPE_UNSPECIFIED", "TRIGGER_TYPE_USER_PROFILE_CHANGE", "TRIGGER_TYPE_APP_USER_CREATE", "TRIGGER_TYPE_APP_USER_UPDATE", "TRIGGER_TYPE_UNUSED_ACCESS", "TRIGGER_TYPE_USER_CREATED", "TRIGGER_TYPE_GRANT_FOUND", "TRIGGER_TYPE_GRANT_DELETED", "TRIGGER_TYPE_WEBHOOK", "TRIGGER_TYPE_SCHEDULE", "TRIGGER_TYPE_FORM", "TRIGGER_TYPE_SCHEDULE_APP_USER", "TRIGGER_TYPE_ACCESS_CONFLICT": + case "TRIGGER_TYPE_UNSPECIFIED", "TRIGGER_TYPE_USER_PROFILE_CHANGE", "TRIGGER_TYPE_APP_USER_CREATE", "TRIGGER_TYPE_APP_USER_UPDATE", "TRIGGER_TYPE_UNUSED_ACCESS", "TRIGGER_TYPE_USER_CREATED", "TRIGGER_TYPE_GRANT_FOUND", "TRIGGER_TYPE_GRANT_DELETED", "TRIGGER_TYPE_WEBHOOK", "TRIGGER_TYPE_SCHEDULE", "TRIGGER_TYPE_FORM", "TRIGGER_TYPE_SCHEDULE_APP_USER", "TRIGGER_TYPE_ACCESS_CONFLICT", "TRIGGER_TYPE_SCHEDULE_NO_USER": return true } } @@ -37,17 +115,33 @@ func (e *TriggerTypes) IsExact() bool { // The SearchAutomationsRequest message. type SearchAutomationsRequest struct { - // The appId field. + // Filter results to automations belonging to this application. AppID *string `json:"appId,omitempty"` - // The pageSize field. + // Filter results to automations belonging to any of the specified apps. + // Supersedes the singular `app_id` field when non-empty; when empty, the + // server falls back to `app_id` for backward compatibility. + AppIds []string `json:"appIds,omitempty"` + // Direction to sort in. Unspecified falls back to ASC when sort_field is set; + // when sort_field is also unspecified, the server default order (created_at + // DESC) applies. + Direction *Direction `json:"direction,omitempty"` + // Tri-state draft filter. Unset = include both drafts and published; + // `true` = drafts only; `false` = published only. + IsDraft *bool `json:"isDraft,omitempty"` + // Maximum number of results to return per page. PageSize *int `json:"pageSize,omitempty"` - // The pageToken field. + // Pagination token from a previous SearchAutomationsResponse. PageToken *string `json:"pageToken,omitempty"` - // The query field. + // Free-text search query to filter automations by name or description. Query *string `json:"query,omitempty"` - // The refs field. + // Restrict results to automations matching these template references. Refs []*AutomationTemplateRef `json:"refs,omitempty"` - // The triggerTypes field. + // Column to sort by. Unspecified (0) means sort by created_at desc (server default). + SortField *SortField `json:"sortField,omitempty"` + // Filter results by automation status. Empty or containing both ON and OFF + // applies no status filter. + Statuses []SearchAutomationsRequestStatuses `json:"statuses,omitempty"` + // Filter results to automations with any of the specified trigger types. TriggerTypes []TriggerTypes `json:"triggerTypes,omitempty"` } @@ -58,6 +152,27 @@ func (s *SearchAutomationsRequest) GetAppID() *string { return s.AppID } +func (s *SearchAutomationsRequest) GetAppIds() []string { + if s == nil { + return nil + } + return s.AppIds +} + +func (s *SearchAutomationsRequest) GetDirection() *Direction { + if s == nil { + return nil + } + return s.Direction +} + +func (s *SearchAutomationsRequest) GetIsDraft() *bool { + if s == nil { + return nil + } + return s.IsDraft +} + func (s *SearchAutomationsRequest) GetPageSize() *int { if s == nil { return nil @@ -86,6 +201,20 @@ func (s *SearchAutomationsRequest) GetRefs() []*AutomationTemplateRef { return s.Refs } +func (s *SearchAutomationsRequest) GetSortField() *SortField { + if s == nil { + return nil + } + return s.SortField +} + +func (s *SearchAutomationsRequest) GetStatuses() []SearchAutomationsRequestStatuses { + if s == nil { + return nil + } + return s.Statuses +} + func (s *SearchAutomationsRequest) GetTriggerTypes() []TriggerTypes { if s == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationsresponse.go index 411c0ec4..2ba89c84 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationsresponse.go @@ -4,9 +4,9 @@ package shared // The SearchAutomationsResponse message. type SearchAutomationsResponse struct { - // The list field. + // The page of automations matching the search criteria. List []Automation `json:"list,omitempty"` - // The nextPageToken field. + // Token to retrieve the next page of results, empty when no more results exist. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationtemplateversionsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationtemplateversionsrequest.go index ec07e6fc..d6980575 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationtemplateversionsrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationtemplateversionsrequest.go @@ -4,11 +4,11 @@ package shared // The SearchAutomationTemplateVersionsRequest message. type SearchAutomationTemplateVersionsRequest struct { - // The automationTemplateId field. + // The automation template whose version history to search. AutomationTemplateID *string `json:"automationTemplateId,omitempty"` - // The pageSize field. + // Maximum number of results to return per page. PageSize *int `json:"pageSize,omitempty"` - // The pageToken field. + // Pagination token from a previous SearchAutomationTemplateVersionsResponse. PageToken *string `json:"pageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationtemplateversionsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationtemplateversionsresponse.go index 275583bd..0346b8a6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationtemplateversionsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchautomationtemplateversionsresponse.go @@ -4,9 +4,9 @@ package shared // The SearchAutomationTemplateVersionsResponse message. type SearchAutomationTemplateVersionsResponse struct { - // The list field. + // The page of template versions matching the search criteria. List []AutomationTemplateVersion `json:"list,omitempty"` - // The nextPageToken field. + // Token to retrieve the next page of results, empty when no more results exist. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchcohortusersrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchcohortusersrequest.go new file mode 100644 index 00000000..ef0e2fe8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchcohortusersrequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The SearchCohortUsersRequest message. +type SearchCohortUsersRequest struct { + // Maximum number of users to return per page. + PageSize *int `json:"pageSize,omitempty"` + // Pagination token from a previous response. + PageToken *string `json:"pageToken,omitempty"` + // Additional profile filters to narrow the cohort user search. + ProfileFilters []ProfileFilter `json:"profileFilters,omitempty"` +} + +func (s *SearchCohortUsersRequest) GetPageSize() *int { + if s == nil { + return nil + } + return s.PageSize +} + +func (s *SearchCohortUsersRequest) GetPageToken() *string { + if s == nil { + return nil + } + return s.PageToken +} + +func (s *SearchCohortUsersRequest) GetProfileFilters() []ProfileFilter { + if s == nil { + return nil + } + return s.ProfileFilters +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchcohortusersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchcohortusersresponse.go new file mode 100644 index 00000000..95839b60 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchcohortusersresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The SearchCohortUsersResponse message. +type SearchCohortUsersResponse struct { + // The list of users matching the cohort and optional filters. + List []User `json:"list,omitempty"` + // Token to retrieve the next page of results, empty if no more results. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SearchCohortUsersResponse) GetList() []User { + if s == nil { + return nil + } + return s.List +} + +func (s *SearchCohortUsersResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchconnectorentitlementownersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchconnectorentitlementownersresponse.go new file mode 100644 index 00000000..2b9f1435 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchconnectorentitlementownersresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SearchConnectorEntitlementOwnersResponse is the response for searching entitlement ownership sources on a connector. +type SearchConnectorEntitlementOwnersResponse struct { + // The list field. + List []ConnectorOwnerEntitlement `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SearchConnectorEntitlementOwnersResponse) GetList() []ConnectorOwnerEntitlement { + if s == nil { + return nil + } + return s.List +} + +func (s *SearchConnectorEntitlementOwnersResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchconnectoruserownersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchconnectoruserownersresponse.go new file mode 100644 index 00000000..1e34d904 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchconnectoruserownersresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SearchConnectorUserOwnersResponse is the response for searching user ownership sources on a connector. +type SearchConnectorUserOwnersResponse struct { + // The list field. + List []ConnectorOwnerUser `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SearchConnectorUserOwnersResponse) GetList() []ConnectorOwnerUser { + if s == nil { + return nil + } + return s.List +} + +func (s *SearchConnectorUserOwnersResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchemailauditeventsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchemailauditeventsrequest.go new file mode 100644 index 00000000..648d61a3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchemailauditeventsrequest.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The SearchEmailAuditEventsRequest message. +type SearchEmailAuditEventsRequest struct { + // Maximum results per page (0 = server default, max 100). + PageSize *int `json:"pageSize,omitempty"` + // Pagination token from previous response. + PageToken *string `json:"pageToken,omitempty"` +} + +func (s *SearchEmailAuditEventsRequest) GetPageSize() *int { + if s == nil { + return nil + } + return s.PageSize +} + +func (s *SearchEmailAuditEventsRequest) GetPageToken() *string { + if s == nil { + return nil + } + return s.PageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchemailauditeventsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchemailauditeventsresponse.go new file mode 100644 index 00000000..cd349b43 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchemailauditeventsresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The SearchEmailAuditEventsResponse message. +type SearchEmailAuditEventsResponse struct { + // OCSF EmailActivity events as Struct for frontend rendering. + List []map[string]any `json:"list,omitempty"` + // Token for next page. Empty when no more pages. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SearchEmailAuditEventsResponse) GetList() []map[string]any { + if s == nil { + return nil + } + return s.List +} + +func (s *SearchEmailAuditEventsResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchentitlementownersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchentitlementownersresponse.go new file mode 100644 index 00000000..b4625e23 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchentitlementownersresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SearchEntitlementOwnersResponse is the response for searching entitlement ownership sources. +type SearchEntitlementOwnersResponse struct { + // The list field. + List []AppOwnerEntitlement `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SearchEntitlementOwnersResponse) GetList() []AppOwnerEntitlement { + if s == nil { + return nil + } + return s.List +} + +func (s *SearchEntitlementOwnersResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchpastgrantsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchpastgrantsrequest.go index 6c72d4a1..4f6f70ea 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchpastgrantsrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchpastgrantsrequest.go @@ -2,19 +2,19 @@ package shared -// The SearchPastGrantsRequest message. +// SearchPastGrantsRequest - The request message for searching historical grants. type SearchPastGrantsRequest struct { // The AppEntitlementUserBindingExpandHistoryMask message. AppEntitlementUserBindingExpandHistoryMask *AppEntitlementUserBindingExpandHistoryMask `json:"expandMask,omitempty"` - // The appEntitlementRefs field. + // A list of entitlement references to restrict the search to. AppEntitlementRefs []AppEntitlementRef `json:"appEntitlementRefs,omitempty"` - // The appIds field. + // A list of app IDs to restrict the search to. AppIds []string `json:"appIds,omitempty"` - // The appUserRefs field. + // A list of app user references to restrict the search to. AppUserRefs []AppUserRef `json:"appUserRefs,omitempty"` - // The pageSize field. + // The maximum number of results to return per page. PageSize *int `json:"pageSize,omitempty"` - // The pageToken field. + // The token for fetching the next page of results. PageToken *string `json:"pageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchstepupprovidersrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchstepupprovidersrequest.go index 4d2b0e51..4ea2ef58 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchstepupprovidersrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchstepupprovidersrequest.go @@ -36,7 +36,7 @@ type SearchStepUpProvidersRequest struct { ProviderType *ProviderType `json:"providerType,omitempty"` // Filter by name (partial match) Query *string `json:"query,omitempty"` - // The refs field. + // Filter to specific providers by their references. Refs []StepUpProviderRef `json:"refs,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchuserownershiprequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchuserownershiprequest.go new file mode 100644 index 00000000..3d1f111e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchuserownershiprequest.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type OwnershipTypes string + +const ( + OwnershipTypesUserOwnershipTypeUnspecified OwnershipTypes = "USER_OWNERSHIP_TYPE_UNSPECIFIED" + OwnershipTypesUserOwnershipTypeApp OwnershipTypes = "USER_OWNERSHIP_TYPE_APP" + OwnershipTypesUserOwnershipTypeResource OwnershipTypes = "USER_OWNERSHIP_TYPE_RESOURCE" + OwnershipTypesUserOwnershipTypeEntitlement OwnershipTypes = "USER_OWNERSHIP_TYPE_ENTITLEMENT" +) + +func (e OwnershipTypes) ToPointer() *OwnershipTypes { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *OwnershipTypes) IsExact() bool { + if e != nil { + switch *e { + case "USER_OWNERSHIP_TYPE_UNSPECIFIED", "USER_OWNERSHIP_TYPE_APP", "USER_OWNERSHIP_TYPE_RESOURCE", "USER_OWNERSHIP_TYPE_ENTITLEMENT": + return true + } + } + return false +} + +// SearchUserOwnershipRequest - Search for all ownership assignments for a given user. Returns apps, resources, and +// +// entitlements the user owns, each tagged with a UserOwnershipType discriminator. +// Filter by ownership_types to restrict results to specific kinds of ownership. +type SearchUserOwnershipRequest struct { + // Filter results to only include these ownership types. If empty, all types are returned. + OwnershipTypes []OwnershipTypes `json:"ownershipTypes,omitempty"` + // Maximum number of results to return per page. + PageSize *int `json:"pageSize,omitempty"` + // Pagination token from a previous response. + PageToken *string `json:"pageToken,omitempty"` + // The ID of the ConductorOne user whose ownership to search. + UserID *string `json:"userId,omitempty"` +} + +func (s *SearchUserOwnershipRequest) GetOwnershipTypes() []OwnershipTypes { + if s == nil { + return nil + } + return s.OwnershipTypes +} + +func (s *SearchUserOwnershipRequest) GetPageSize() *int { + if s == nil { + return nil + } + return s.PageSize +} + +func (s *SearchUserOwnershipRequest) GetPageToken() *string { + if s == nil { + return nil + } + return s.PageToken +} + +func (s *SearchUserOwnershipRequest) GetUserID() *string { + if s == nil { + return nil + } + return s.UserID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchuserownershipresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchuserownershipresponse.go new file mode 100644 index 00000000..32338d07 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchuserownershipresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The SearchUserOwnershipResponse message contains a paginated list of ownership entries. +type SearchUserOwnershipResponse struct { + // The list of ownership entries for the requested user. + List []UserOwnershipEntry `json:"list,omitempty"` + // Pagination token for the next page of results. Empty when there are no more results. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SearchUserOwnershipResponse) GetList() []UserOwnershipEntry { + if s == nil { + return nil + } + return s.List +} + +func (s *SearchUserOwnershipResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchuserownersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchuserownersresponse.go new file mode 100644 index 00000000..dffbf79a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchuserownersresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SearchUserOwnersResponse is the response for searching user ownership sources. +type SearchUserOwnersResponse struct { + // The list field. + List []AppOwnerUser `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SearchUserOwnersResponse) GetList() []AppOwnerUser { + if s == nil { + return nil + } + return s.List +} + +func (s *SearchUserOwnersResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchusersrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchusersrequest.go index 69526f5b..03552d2d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchusersrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/searchusersrequest.go @@ -2,6 +2,54 @@ package shared +// DelegateStatus - Filter for users based on their delegate status. +type DelegateStatus string + +const ( + DelegateStatusDelegateStatusUnspecified DelegateStatus = "DELEGATE_STATUS_UNSPECIFIED" + DelegateStatusDelegateStatusHasDelegate DelegateStatus = "DELEGATE_STATUS_HAS_DELEGATE" + DelegateStatusDelegateStatusNoDelegate DelegateStatus = "DELEGATE_STATUS_NO_DELEGATE" +) + +func (e DelegateStatus) ToPointer() *DelegateStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *DelegateStatus) IsExact() bool { + if e != nil { + switch *e { + case "DELEGATE_STATUS_UNSPECIFIED", "DELEGATE_STATUS_HAS_DELEGATE", "DELEGATE_STATUS_NO_DELEGATE": + return true + } + } + return false +} + +type ExcludeOrigins string + +const ( + ExcludeOriginsUserOriginUnspecified ExcludeOrigins = "USER_ORIGIN_UNSPECIFIED" + ExcludeOriginsUserOriginDirectory ExcludeOrigins = "USER_ORIGIN_DIRECTORY" + ExcludeOriginsUserOriginLocal ExcludeOrigins = "USER_ORIGIN_LOCAL" + ExcludeOriginsUserOriginSystem ExcludeOrigins = "USER_ORIGIN_SYSTEM" +) + +func (e ExcludeOrigins) ToPointer() *ExcludeOrigins { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *ExcludeOrigins) IsExact() bool { + if e != nil { + switch *e { + case "USER_ORIGIN_UNSPECIFIED", "USER_ORIGIN_DIRECTORY", "USER_ORIGIN_LOCAL", "USER_ORIGIN_SYSTEM": + return true + } + } + return false +} + type ExcludeTypes string const ( @@ -27,6 +75,30 @@ func (e *ExcludeTypes) IsExact() bool { return false } +type Origins string + +const ( + OriginsUserOriginUnspecified Origins = "USER_ORIGIN_UNSPECIFIED" + OriginsUserOriginDirectory Origins = "USER_ORIGIN_DIRECTORY" + OriginsUserOriginLocal Origins = "USER_ORIGIN_LOCAL" + OriginsUserOriginSystem Origins = "USER_ORIGIN_SYSTEM" +) + +func (e Origins) ToPointer() *Origins { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Origins) IsExact() bool { + if e != nil { + switch *e { + case "USER_ORIGIN_UNSPECIFIED", "USER_ORIGIN_DIRECTORY", "USER_ORIGIN_LOCAL", "USER_ORIGIN_SYSTEM": + return true + } + } + return false +} + type SearchUsersRequestUserStatuses string const ( @@ -56,20 +128,30 @@ type SearchUsersRequest struct { // The user expand mask is used to indicate which related objects should be expanded in the response. // The supported paths are 'role_ids', 'manager_ids', 'delegated_user_id', 'directory_ids', and '*'. UserExpandMask *UserExpandMask `json:"expandMask,omitempty"` + // Filter for users based on their delegate status. + DelegateStatus *DelegateStatus `json:"delegateStatus,omitempty"` + // Filter for users that have any of the delegated user IDs on this list. + DelegatedUserIds []string `json:"delegatedUserIds,omitempty"` // Search for users that have any of the departments on this list. Departments []string `json:"departments,omitempty"` // Search for users based on their email (exact match). Email *string `json:"email,omitempty"` // An array of users IDs to exclude from the results. ExcludeIds []string `json:"excludeIds,omitempty"` + // Filter to exclude users with these origins. + ExcludeOrigins []ExcludeOrigins `json:"excludeOrigins,omitempty"` // An array of types to exclude from the results. ExcludeTypes []ExcludeTypes `json:"excludeTypes,omitempty"` // Deprecated. Use refs array instead. Ids []string `json:"ids,omitempty"` + // Filter for users who are delegates of at least one other user. + IsDelegate *bool `json:"isDelegate,omitempty"` // Search for users that have any of the job titles on this list. JobTitles []string `json:"jobTitles,omitempty"` // Search for users that have any of the manager IDs on this list. ManagerIds []string `json:"managerIds,omitempty"` + // Filter to include only users with these origins. + Origins []Origins `json:"origins,omitempty"` // The pageSize where 0 <= pageSize <= 100. Values < 10 will be set to 10. A value of 0 returns the default page size (currently 25) PageSize *int `json:"pageSize,omitempty"` // The pageToken field. @@ -91,6 +173,20 @@ func (s *SearchUsersRequest) GetUserExpandMask() *UserExpandMask { return s.UserExpandMask } +func (s *SearchUsersRequest) GetDelegateStatus() *DelegateStatus { + if s == nil { + return nil + } + return s.DelegateStatus +} + +func (s *SearchUsersRequest) GetDelegatedUserIds() []string { + if s == nil { + return nil + } + return s.DelegatedUserIds +} + func (s *SearchUsersRequest) GetDepartments() []string { if s == nil { return nil @@ -112,6 +208,13 @@ func (s *SearchUsersRequest) GetExcludeIds() []string { return s.ExcludeIds } +func (s *SearchUsersRequest) GetExcludeOrigins() []ExcludeOrigins { + if s == nil { + return nil + } + return s.ExcludeOrigins +} + func (s *SearchUsersRequest) GetExcludeTypes() []ExcludeTypes { if s == nil { return nil @@ -126,6 +229,13 @@ func (s *SearchUsersRequest) GetIds() []string { return s.Ids } +func (s *SearchUsersRequest) GetIsDelegate() *bool { + if s == nil { + return nil + } + return s.IsDelegate +} + func (s *SearchUsersRequest) GetJobTitles() []string { if s == nil { return nil @@ -140,6 +250,13 @@ func (s *SearchUsersRequest) GetManagerIds() []string { return s.ManagerIds } +func (s *SearchUsersRequest) GetOrigins() []Origins { + if s == nil { + return nil + } + return s.Origins +} + func (s *SearchUsersRequest) GetPageSize() *int { if s == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/security.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/security.go index 94dfe069..4a421507 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/security.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/security.go @@ -3,8 +3,8 @@ package shared type Security struct { - BearerAuth string `security:"scheme,type=http,subtype=bearer,name=Authorization"` - Oauth string `security:"scheme,type=oauth2,name=Authorization"` + BearerAuth string `security:"scheme,type=http,subtype=bearer,composite,name=Authorization"` + Oauth string `security:"scheme,type=oauth2,composite,name=Authorization"` } func (s *Security) GetBearerAuth() string { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendemail.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendemail.go index 6846f14d..10fba140 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendemail.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendemail.go @@ -6,6 +6,17 @@ package shared type SendEmail struct { // The body field. Body *string `json:"body,omitempty"` + // Deprecated: use email_cel instead. Static email field shipped behind FF 541 (SKU_MANUAL) + // with zero tenant enablement. CEL subsumes static: '"ops@example.com"' is valid CEL. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + Email *string `json:"email,omitempty"` + // CEL expression resolving to one or more email addresses (string or list). + // Evaluated against the workflow execution context (trigger + completed steps). + // Static emails work too: '"ops@example.com"' is valid CEL. + // Supports list for multiple recipients: '["a@x.com", "b@x.com"]'. + // Requires the tenant to have a TenantEmailProvider configured. + EmailCel *string `json:"emailCel,omitempty"` // The subject field. Subject *string `json:"subject,omitempty"` // The title field. @@ -25,6 +36,20 @@ func (s *SendEmail) GetBody() *string { return s.Body } +func (s *SendEmail) GetEmail() *string { + if s == nil { + return nil + } + return s.Email +} + +func (s *SendEmail) GetEmailCel() *string { + if s == nil { + return nil + } + return s.EmailCel +} + func (s *SendEmail) GetSubject() *string { if s == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendgridproviderconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendgridproviderconfig.go new file mode 100644 index 00000000..dc72ce10 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendgridproviderconfig.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SendGridProviderConfig configures sending via a customer's SendGrid account. +type SendGridProviderConfig struct { + // Customer's SendGrid API key. Write-only: accepted on create/update, never returned in Get. + // Empty on update means "keep existing key". + APIKey *string `json:"apiKey,omitempty"` +} + +func (s *SendGridProviderConfig) GetAPIKey() *string { + if s == nil { + return nil + } + return s.APIKey +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendslackmessage.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendslackmessage.go index dc22fe5d..413ef282 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendslackmessage.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sendslackmessage.go @@ -2,7 +2,11 @@ package shared -// The SendSlackMessage message. +// SendSlackMessage posts to a channel or DMs one or more users. Delivery mode is +// +// inferred from which fields are populated: DM if any user field is set +// (use_subject_user, user_ids_cel, user_refs), otherwise channel. Priority for DM +// recipient resolution: use_subject_user > user_ids_cel > user_refs. // // This message contains a oneof named channel. Only a single field of the following list may be set at a time: // - channelName @@ -18,6 +22,12 @@ type SendSlackMessage struct { // This field is part of the `channel` oneof. // See the documentation for `c1.api.automations.v1.SendSlackMessage` for more details. ChannelNameCel *string `json:"channelNameCel,omitempty"` + // The useSubjectUser field. + UseSubjectUser *bool `json:"useSubjectUser,omitempty"` + // The userIdsCel field. + UserIdsCel *string `json:"userIdsCel,omitempty"` + // The userRefs field. + UserRefs []UserRef `json:"userRefs,omitempty"` } func (s *SendSlackMessage) GetBody() *string { @@ -40,3 +50,24 @@ func (s *SendSlackMessage) GetChannelNameCel() *string { } return s.ChannelNameCel } + +func (s *SendSlackMessage) GetUseSubjectUser() *bool { + if s == nil { + return nil + } + return s.UseSubjectUser +} + +func (s *SendSlackMessage) GetUserIdsCel() *string { + if s == nil { + return nil + } + return s.UserIdsCel +} + +func (s *SendSlackMessage) GetUserRefs() []UserRef { + if s == nil { + return nil + } + return s.UserRefs +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sensitivefileguardconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sensitivefileguardconfig.go new file mode 100644 index 00000000..f4989702 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sensitivefileguardconfig.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SensitiveFileGuardConfig blocks tool calls that reference sensitive file +// +// paths or directories. +type SensitiveFileGuardConfig struct { + // The blockedDirectories field. + BlockedDirectories []string `json:"blockedDirectories,omitempty"` + // The blockedPatterns field. + BlockedPatterns []string `json:"blockedPatterns,omitempty"` +} + +func (s *SensitiveFileGuardConfig) GetBlockedDirectories() []string { + if s == nil { + return nil + } + return s.BlockedDirectories +} + +func (s *SensitiveFileGuardConfig) GetBlockedPatterns() []string { + if s == nil { + return nil + } + return s.BlockedPatterns +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serverevent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serverevent.go new file mode 100644 index 00000000..387d614b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serverevent.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ServerEvent triggers a server-side action. +type ServerEvent struct { + // The context field. + Context map[string]string `json:"context,omitempty"` + // The name field. + Name *string `json:"name,omitempty"` +} + +func (s *ServerEvent) GetContext() map[string]string { + if s == nil { + return nil + } + return s.Context +} + +func (s *ServerEvent) GetName() *string { + if s == nil { + return nil + } + return s.Name +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceaccountmisclassificationevidence.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceaccountmisclassificationevidence.go new file mode 100644 index 00000000..dc0db8d8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceaccountmisclassificationevidence.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServiceAccountMisclassificationEvidence message. +type ServiceAccountMisclassificationEvidence struct { + // The detectionReason field. + DetectionReason *string `json:"detectionReason,omitempty"` +} + +func (s *ServiceAccountMisclassificationEvidence) GetDetectionReason() *string { + if s == nil { + return nil + } + return s.DetectionReason +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceaccountmisclassificationtype.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceaccountmisclassificationtype.go new file mode 100644 index 00000000..673fd989 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceaccountmisclassificationtype.go @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// CurrentAccountType - The currentAccountType field. +type CurrentAccountType string + +const ( + CurrentAccountTypeAppUserTypeUnspecified CurrentAccountType = "APP_USER_TYPE_UNSPECIFIED" + CurrentAccountTypeAppUserTypeUser CurrentAccountType = "APP_USER_TYPE_USER" + CurrentAccountTypeAppUserTypeServiceAccount CurrentAccountType = "APP_USER_TYPE_SERVICE_ACCOUNT" + CurrentAccountTypeAppUserTypeSystemAccount CurrentAccountType = "APP_USER_TYPE_SYSTEM_ACCOUNT" +) + +func (e CurrentAccountType) ToPointer() *CurrentAccountType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *CurrentAccountType) IsExact() bool { + if e != nil { + switch *e { + case "APP_USER_TYPE_UNSPECIFIED", "APP_USER_TYPE_USER", "APP_USER_TYPE_SERVICE_ACCOUNT", "APP_USER_TYPE_SYSTEM_ACCOUNT": + return true + } + } + return false +} + +// DetectedAccountType - The detectedAccountType field. +type DetectedAccountType string + +const ( + DetectedAccountTypeAppUserTypeUnspecified DetectedAccountType = "APP_USER_TYPE_UNSPECIFIED" + DetectedAccountTypeAppUserTypeUser DetectedAccountType = "APP_USER_TYPE_USER" + DetectedAccountTypeAppUserTypeServiceAccount DetectedAccountType = "APP_USER_TYPE_SERVICE_ACCOUNT" + DetectedAccountTypeAppUserTypeSystemAccount DetectedAccountType = "APP_USER_TYPE_SYSTEM_ACCOUNT" +) + +func (e DetectedAccountType) ToPointer() *DetectedAccountType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *DetectedAccountType) IsExact() bool { + if e != nil { + switch *e { + case "APP_USER_TYPE_UNSPECIFIED", "APP_USER_TYPE_USER", "APP_USER_TYPE_SERVICE_ACCOUNT", "APP_USER_TYPE_SYSTEM_ACCOUNT": + return true + } + } + return false +} + +// The ServiceAccountMisclassificationType message. +type ServiceAccountMisclassificationType struct { + // The currentAccountType field. + CurrentAccountType *CurrentAccountType `json:"currentAccountType,omitempty"` + // The detectedAccountType field. + DetectedAccountType *DetectedAccountType `json:"detectedAccountType,omitempty"` +} + +func (s *ServiceAccountMisclassificationType) GetCurrentAccountType() *CurrentAccountType { + if s == nil { + return nil + } + return s.CurrentAccountType +} + +func (s *ServiceAccountMisclassificationType) GetDetectedAccountType() *DetectedAccountType { + if s == nil { + return nil + } + return s.DetectedAccountType +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipal.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipal.go new file mode 100644 index 00000000..a2e80865 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipal.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// ServicePrincipal represents a tenant-managed non-human identity. +type ServicePrincipal struct { + // The User object provides all of the details for an user, as well as some configuration. + User *User `json:"user,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The display name of the service principal. + DisplayName *string `json:"displayName,omitempty"` + // The unique user ID of the service principal. + ID *string `json:"id,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (s ServicePrincipal) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *ServicePrincipal) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *ServicePrincipal) GetUser() *User { + if s == nil { + return nil + } + return s.User +} + +func (s *ServicePrincipal) GetCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.CreatedAt +} + +func (s *ServicePrincipal) GetDisplayName() *string { + if s == nil { + return nil + } + return s.DisplayName +} + +func (s *ServicePrincipal) GetID() *string { + if s == nil { + return nil + } + return s.ID +} + +func (s *ServicePrincipal) GetUpdatedAt() *time.Time { + if s == nil { + return nil + } + return s.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalbinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalbinding.go new file mode 100644 index 00000000..613d6d49 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalbinding.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// ServicePrincipalBinding is one row in the binding store, naming a +// +// subject's link to a single service principal. +type ServicePrincipalBinding struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The servicePrincipalId field. + ServicePrincipalID *string `json:"servicePrincipalId,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (s ServicePrincipalBinding) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *ServicePrincipalBinding) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *ServicePrincipalBinding) GetCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.CreatedAt +} + +func (s *ServicePrincipalBinding) GetServicePrincipalID() *string { + if s == nil { + return nil + } + return s.ServicePrincipalID +} + +func (s *ServicePrincipalBinding) GetUpdatedAt() *time.Time { + if s == nil { + return nil + } + return s.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalbindingsubject.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalbindingsubject.go new file mode 100644 index 00000000..bf85749d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalbindingsubject.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ServicePrincipalBindingSubject identifies the entity that is bound to a +// +// service principal. Open-ended oneof so future subject kinds (workflows, +// connectors, etc.) can be added without changing the RPC shape. +// +// This message contains a oneof named kind. Only a single field of the following list may be set at a time: +// - functionId +type ServicePrincipalBindingSubject struct { + // Function ID. The function authenticates outbound c1-api calls as + // user: instead of function:. + // This field is part of the `kind` oneof. + // See the documentation for `c1.api.service_principal.v1.ServicePrincipalBindingSubject` for more details. + FunctionID *string `json:"functionId,omitempty"` +} + +func (s *ServicePrincipalBindingSubject) GetFunctionID() *string { + if s == nil { + return nil + } + return s.FunctionID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalcredential.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalcredential.go new file mode 100644 index 00000000..b2d00065 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalcredential.go @@ -0,0 +1,110 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// ServicePrincipalCredential represents a client credential for a service principal. +type ServicePrincipalCredential struct { + // CIDR restrictions for this credential. + AllowSourceCidrs []string `json:"allowSourceCidrs,omitempty"` + // The full client ID in format: ${cutename}@${tenant}.${installation}/spc + ClientID *string `json:"clientId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The display name of the credential. + DisplayName *string `json:"displayName,omitempty"` + ExpiresAt *time.Time `json:"expiresAt,omitempty"` + // The unique ID of the credential (cutename format). + ID *string `json:"id,omitempty"` + LastUsedAt *time.Time `json:"lastUsedAt,omitempty"` + // Whether DPoP proof-of-possession is required for this credential. + RequireDpop *bool `json:"requireDpop,omitempty"` + // Scoped role IDs for this credential (intersection with SP roles at token issuance). + ScopedRoleIds []string `json:"scopedRoleIds,omitempty"` + // The service principal user ID this credential belongs to. + ServicePrincipalID *string `json:"servicePrincipalId,omitempty"` +} + +func (s ServicePrincipalCredential) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *ServicePrincipalCredential) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *ServicePrincipalCredential) GetAllowSourceCidrs() []string { + if s == nil { + return nil + } + return s.AllowSourceCidrs +} + +func (s *ServicePrincipalCredential) GetClientID() *string { + if s == nil { + return nil + } + return s.ClientID +} + +func (s *ServicePrincipalCredential) GetCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.CreatedAt +} + +func (s *ServicePrincipalCredential) GetDisplayName() *string { + if s == nil { + return nil + } + return s.DisplayName +} + +func (s *ServicePrincipalCredential) GetExpiresAt() *time.Time { + if s == nil { + return nil + } + return s.ExpiresAt +} + +func (s *ServicePrincipalCredential) GetID() *string { + if s == nil { + return nil + } + return s.ID +} + +func (s *ServicePrincipalCredential) GetLastUsedAt() *time.Time { + if s == nil { + return nil + } + return s.LastUsedAt +} + +func (s *ServicePrincipalCredential) GetRequireDpop() *bool { + if s == nil { + return nil + } + return s.RequireDpop +} + +func (s *ServicePrincipalCredential) GetScopedRoleIds() []string { + if s == nil { + return nil + } + return s.ScopedRoleIds +} + +func (s *ServicePrincipalCredential) GetServicePrincipalID() *string { + if s == nil { + return nil + } + return s.ServicePrincipalID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalcredentialinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalcredentialinput.go new file mode 100644 index 00000000..de77165f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalcredentialinput.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ServicePrincipalCredentialInput - ServicePrincipalCredential represents a client credential for a service principal. +type ServicePrincipalCredentialInput struct { + // The display name of the credential. + DisplayName *string `json:"displayName,omitempty"` +} + +func (s *ServicePrincipalCredentialInput) GetDisplayName() *string { + if s == nil { + return nil + } + return s.DisplayName +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalinput.go new file mode 100644 index 00000000..849b26a5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalinput.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ServicePrincipalInput - ServicePrincipal represents a tenant-managed non-human identity. +type ServicePrincipalInput struct { + // The User object provides all of the details for an user, as well as some configuration. + User *UserInput `json:"user,omitempty"` + // The display name of the service principal. + DisplayName *string `json:"displayName,omitempty"` +} + +func (s *ServicePrincipalInput) GetUser() *UserInput { + if s == nil { + return nil + } + return s.User +} + +func (s *ServicePrincipalInput) GetDisplayName() *string { + if s == nil { + return nil + } + return s.DisplayName +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceaddbindingrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceaddbindingrequest.go new file mode 100644 index 00000000..e28d21e9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceaddbindingrequest.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceAddBindingRequest message. +type ServicePrincipalServiceAddBindingRequest struct { + // ServicePrincipalBindingSubject identifies the entity that is bound to a + // service principal. Open-ended oneof so future subject kinds (workflows, + // connectors, etc.) can be added without changing the RPC shape. + // + // This message contains a oneof named kind. Only a single field of the following list may be set at a time: + // - functionId + // + ServicePrincipalBindingSubject *ServicePrincipalBindingSubject `json:"subject,omitempty"` + // The servicePrincipalId field. + ServicePrincipalID *string `json:"servicePrincipalId,omitempty"` +} + +func (s *ServicePrincipalServiceAddBindingRequest) GetServicePrincipalBindingSubject() *ServicePrincipalBindingSubject { + if s == nil { + return nil + } + return s.ServicePrincipalBindingSubject +} + +func (s *ServicePrincipalServiceAddBindingRequest) GetServicePrincipalID() *string { + if s == nil { + return nil + } + return s.ServicePrincipalID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceaddbindingresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceaddbindingresponse.go new file mode 100644 index 00000000..ec5ac0db --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceaddbindingresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceAddBindingResponse message. +type ServicePrincipalServiceAddBindingResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreatecredentialrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreatecredentialrequest.go new file mode 100644 index 00000000..215882d5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreatecredentialrequest.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceCreateCredentialRequest message. +type ServicePrincipalServiceCreateCredentialRequest struct { + // A list of CIDRs to restrict this credential to. + // Accepts IPv4 (e.g. 10.0.0.0/24) or IPv6 (e.g. 2001:db8::/32) CIDRs. + AllowSourceCidrs []string `json:"allowSourceCidrs,omitempty"` + // The display name for the new credential. + DisplayName *string `json:"displayName,omitempty"` + Expires *string `json:"expires,omitempty"` + // If true, requires DPoP proof-of-possession for token exchange using this credential. + RequireDpop *bool `json:"requireDpop,omitempty"` + // The list of roles to restrict the credential to. + ScopedRoles []string `json:"scopedRoles,omitempty"` +} + +func (s *ServicePrincipalServiceCreateCredentialRequest) GetAllowSourceCidrs() []string { + if s == nil { + return nil + } + return s.AllowSourceCidrs +} + +func (s *ServicePrincipalServiceCreateCredentialRequest) GetDisplayName() *string { + if s == nil { + return nil + } + return s.DisplayName +} + +func (s *ServicePrincipalServiceCreateCredentialRequest) GetExpires() *string { + if s == nil { + return nil + } + return s.Expires +} + +func (s *ServicePrincipalServiceCreateCredentialRequest) GetRequireDpop() *bool { + if s == nil { + return nil + } + return s.RequireDpop +} + +func (s *ServicePrincipalServiceCreateCredentialRequest) GetScopedRoles() []string { + if s == nil { + return nil + } + return s.ScopedRoles +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreatecredentialresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreatecredentialresponse.go new file mode 100644 index 00000000..5c041b8a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreatecredentialresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceCreateCredentialResponse message. +type ServicePrincipalServiceCreateCredentialResponse struct { + // ServicePrincipalCredential represents a client credential for a service principal. + ServicePrincipalCredential *ServicePrincipalCredential `json:"credential,omitempty"` + // The client secret. Shown exactly once at creation -- cannot be retrieved again. + ClientSecret *string `json:"clientSecret,omitempty"` +} + +func (s *ServicePrincipalServiceCreateCredentialResponse) GetServicePrincipalCredential() *ServicePrincipalCredential { + if s == nil { + return nil + } + return s.ServicePrincipalCredential +} + +func (s *ServicePrincipalServiceCreateCredentialResponse) GetClientSecret() *string { + if s == nil { + return nil + } + return s.ClientSecret +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreaterequest.go new file mode 100644 index 00000000..6d0aac85 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreaterequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceCreateRequest message. +type ServicePrincipalServiceCreateRequest struct { + // The display name for the new service principal. + DisplayName *string `json:"displayName,omitempty"` +} + +func (s *ServicePrincipalServiceCreateRequest) GetDisplayName() *string { + if s == nil { + return nil + } + return s.DisplayName +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreateresponse.go new file mode 100644 index 00000000..d2066b9a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicecreateresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceCreateResponse message. +type ServicePrincipalServiceCreateResponse struct { + // ServicePrincipal represents a tenant-managed non-human identity. + ServicePrincipal *ServicePrincipal `json:"servicePrincipal,omitempty"` +} + +func (s *ServicePrincipalServiceCreateResponse) GetServicePrincipal() *ServicePrincipal { + if s == nil { + return nil + } + return s.ServicePrincipal +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeletebindingrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeletebindingrequest.go new file mode 100644 index 00000000..59f85a23 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeletebindingrequest.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceDeleteBindingRequest message. +type ServicePrincipalServiceDeleteBindingRequest struct { + // ServicePrincipalBindingSubject identifies the entity that is bound to a + // service principal. Open-ended oneof so future subject kinds (workflows, + // connectors, etc.) can be added without changing the RPC shape. + // + // This message contains a oneof named kind. Only a single field of the following list may be set at a time: + // - functionId + // + ServicePrincipalBindingSubject *ServicePrincipalBindingSubject `json:"subject,omitempty"` + // The servicePrincipalId field. + ServicePrincipalID *string `json:"servicePrincipalId,omitempty"` +} + +func (s *ServicePrincipalServiceDeleteBindingRequest) GetServicePrincipalBindingSubject() *ServicePrincipalBindingSubject { + if s == nil { + return nil + } + return s.ServicePrincipalBindingSubject +} + +func (s *ServicePrincipalServiceDeleteBindingRequest) GetServicePrincipalID() *string { + if s == nil { + return nil + } + return s.ServicePrincipalID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeletebindingresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeletebindingresponse.go new file mode 100644 index 00000000..4127b02c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeletebindingresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceDeleteBindingResponse message. +type ServicePrincipalServiceDeleteBindingResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeleterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeleterequest.go new file mode 100644 index 00000000..8f6584cb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeleterequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceDeleteRequest message. +type ServicePrincipalServiceDeleteRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeleteresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeleteresponse.go new file mode 100644 index 00000000..e8430a03 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicedeleteresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceDeleteResponse message. +type ServicePrincipalServiceDeleteResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicegetcredentialresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicegetcredentialresponse.go new file mode 100644 index 00000000..db711577 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicegetcredentialresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceGetCredentialResponse message. +type ServicePrincipalServiceGetCredentialResponse struct { + // ServicePrincipalCredential represents a client credential for a service principal. + ServicePrincipalCredential *ServicePrincipalCredential `json:"credential,omitempty"` +} + +func (s *ServicePrincipalServiceGetCredentialResponse) GetServicePrincipalCredential() *ServicePrincipalCredential { + if s == nil { + return nil + } + return s.ServicePrincipalCredential +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicegetresponse.go new file mode 100644 index 00000000..3f464508 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicegetresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceGetResponse message. +type ServicePrincipalServiceGetResponse struct { + // ServicePrincipal represents a tenant-managed non-human identity. + ServicePrincipal *ServicePrincipal `json:"servicePrincipal,omitempty"` +} + +func (s *ServicePrincipalServiceGetResponse) GetServicePrincipal() *ServicePrincipal { + if s == nil { + return nil + } + return s.ServicePrincipal +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistbindingsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistbindingsrequest.go new file mode 100644 index 00000000..1c1b4801 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistbindingsrequest.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceListBindingsRequest message. +type ServicePrincipalServiceListBindingsRequest struct { + // ServicePrincipalBindingSubject identifies the entity that is bound to a + // service principal. Open-ended oneof so future subject kinds (workflows, + // connectors, etc.) can be added without changing the RPC shape. + // + // This message contains a oneof named kind. Only a single field of the following list may be set at a time: + // - functionId + // + ServicePrincipalBindingSubject *ServicePrincipalBindingSubject `json:"subject,omitempty"` + // The pageSize field. + PageSize *int `json:"pageSize,omitempty"` + // The pageToken field. + PageToken *string `json:"pageToken,omitempty"` +} + +func (s *ServicePrincipalServiceListBindingsRequest) GetServicePrincipalBindingSubject() *ServicePrincipalBindingSubject { + if s == nil { + return nil + } + return s.ServicePrincipalBindingSubject +} + +func (s *ServicePrincipalServiceListBindingsRequest) GetPageSize() *int { + if s == nil { + return nil + } + return s.PageSize +} + +func (s *ServicePrincipalServiceListBindingsRequest) GetPageToken() *string { + if s == nil { + return nil + } + return s.PageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistbindingsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistbindingsresponse.go new file mode 100644 index 00000000..c8ea5755 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistbindingsresponse.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceListBindingsResponse message. +type ServicePrincipalServiceListBindingsResponse struct { + // Active bindings held by the subject in this page. Empty when the + // subject is unbound. Order is unspecified. + Bindings []ServicePrincipalBinding `json:"bindings,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *ServicePrincipalServiceListBindingsResponse) GetBindings() []ServicePrincipalBinding { + if s == nil { + return nil + } + return s.Bindings +} + +func (s *ServicePrincipalServiceListBindingsResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistcredentialsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistcredentialsresponse.go new file mode 100644 index 00000000..3c206e33 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistcredentialsresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceListCredentialsResponse message. +type ServicePrincipalServiceListCredentialsResponse struct { + // The list field. + List []ServicePrincipalCredential `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *ServicePrincipalServiceListCredentialsResponse) GetList() []ServicePrincipalCredential { + if s == nil { + return nil + } + return s.List +} + +func (s *ServicePrincipalServiceListCredentialsResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistresponse.go new file mode 100644 index 00000000..8c5ed128 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicelistresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceListResponse message. +type ServicePrincipalServiceListResponse struct { + // The list field. + List []ServicePrincipal `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *ServicePrincipalServiceListResponse) GetList() []ServicePrincipal { + if s == nil { + return nil + } + return s.List +} + +func (s *ServicePrincipalServiceListResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicerevokecredentialrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicerevokecredentialrequest.go new file mode 100644 index 00000000..098a26cd --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicerevokecredentialrequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceRevokeCredentialRequest message. +type ServicePrincipalServiceRevokeCredentialRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicerevokecredentialresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicerevokecredentialresponse.go new file mode 100644 index 00000000..bf3aa0ee --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalservicerevokecredentialresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceRevokeCredentialResponse message. +type ServicePrincipalServiceRevokeCredentialResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdatecredentialrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdatecredentialrequest.go new file mode 100644 index 00000000..0319adfb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdatecredentialrequest.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceUpdateCredentialRequest message. +type ServicePrincipalServiceUpdateCredentialRequest struct { + // ServicePrincipalCredential represents a client credential for a service principal. + ServicePrincipalCredential *ServicePrincipalCredentialInput `json:"credential,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` +} + +func (s *ServicePrincipalServiceUpdateCredentialRequest) GetServicePrincipalCredential() *ServicePrincipalCredentialInput { + if s == nil { + return nil + } + return s.ServicePrincipalCredential +} + +func (s *ServicePrincipalServiceUpdateCredentialRequest) GetUpdateMask() *string { + if s == nil { + return nil + } + return s.UpdateMask +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdatecredentialresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdatecredentialresponse.go new file mode 100644 index 00000000..ffe71ac5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdatecredentialresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceUpdateCredentialResponse message. +type ServicePrincipalServiceUpdateCredentialResponse struct { + // ServicePrincipalCredential represents a client credential for a service principal. + ServicePrincipalCredential *ServicePrincipalCredential `json:"credential,omitempty"` +} + +func (s *ServicePrincipalServiceUpdateCredentialResponse) GetServicePrincipalCredential() *ServicePrincipalCredential { + if s == nil { + return nil + } + return s.ServicePrincipalCredential +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdaterequest.go new file mode 100644 index 00000000..e8abbee2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdaterequest.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceUpdateRequest message. +type ServicePrincipalServiceUpdateRequest struct { + // ServicePrincipal represents a tenant-managed non-human identity. + ServicePrincipal *ServicePrincipalInput `json:"servicePrincipal,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` +} + +func (s *ServicePrincipalServiceUpdateRequest) GetServicePrincipal() *ServicePrincipalInput { + if s == nil { + return nil + } + return s.ServicePrincipal +} + +func (s *ServicePrincipalServiceUpdateRequest) GetUpdateMask() *string { + if s == nil { + return nil + } + return s.UpdateMask +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdateresponse.go new file mode 100644 index 00000000..9d5f1fb1 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/serviceprincipalserviceupdateresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The ServicePrincipalServiceUpdateResponse message. +type ServicePrincipalServiceUpdateResponse struct { + // ServicePrincipal represents a tenant-managed non-human identity. + ServicePrincipal *ServicePrincipal `json:"servicePrincipal,omitempty"` +} + +func (s *ServicePrincipalServiceUpdateResponse) GetServicePrincipal() *ServicePrincipal { + if s == nil { + return nil + } + return s.ServicePrincipal +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sessionsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sessionsettings.go index b1178d92..a9d6f539 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sessionsettings.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sessionsettings.go @@ -2,19 +2,53 @@ package shared -// The SessionSettings message. +// ClientIDMetadataDocumentPolicy - Policy for metadata document client_id URLs. +type ClientIDMetadataDocumentPolicy string + +const ( + ClientIDMetadataDocumentPolicyClientIDMetadataDocumentPolicyUnspecified ClientIDMetadataDocumentPolicy = "CLIENT_ID_METADATA_DOCUMENT_POLICY_UNSPECIFIED" + ClientIDMetadataDocumentPolicyClientIDMetadataDocumentPolicyAllowAll ClientIDMetadataDocumentPolicy = "CLIENT_ID_METADATA_DOCUMENT_POLICY_ALLOW_ALL" + ClientIDMetadataDocumentPolicyClientIDMetadataDocumentPolicyRequestable ClientIDMetadataDocumentPolicy = "CLIENT_ID_METADATA_DOCUMENT_POLICY_REQUESTABLE" + ClientIDMetadataDocumentPolicyClientIDMetadataDocumentPolicyAllowlistOnly ClientIDMetadataDocumentPolicy = "CLIENT_ID_METADATA_DOCUMENT_POLICY_ALLOWLIST_ONLY" +) + +func (e ClientIDMetadataDocumentPolicy) ToPointer() *ClientIDMetadataDocumentPolicy { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *ClientIDMetadataDocumentPolicy) IsExact() bool { + if e != nil { + switch *e { + case "CLIENT_ID_METADATA_DOCUMENT_POLICY_UNSPECIFIED", "CLIENT_ID_METADATA_DOCUMENT_POLICY_ALLOW_ALL", "CLIENT_ID_METADATA_DOCUMENT_POLICY_REQUESTABLE", "CLIENT_ID_METADATA_DOCUMENT_POLICY_ALLOWLIST_ONLY": + return true + } + } + return false +} + +// SessionSettings configures session security for the tenant, including timeouts and per-role IP restrictions. type SessionSettings struct { - // The CIDRRestriction message. + // CIDRRestriction defines an IP-based access restriction with an enable toggle and a list of allowed CIDRs. CIDRRestriction *CIDRRestriction `json:"connectorSource,omitempty"` - // The CIDRRestriction message. - CIDRRestriction1 *CIDRRestriction `json:"pccAdminSource,omitempty"` - // The CIDRRestriction message. - CIDRRestriction2 *CIDRRestriction `json:"pccUserSource,omitempty"` - // The CIDRRestriction message. - CIDRRestriction3 *CIDRRestriction `json:"ssoAdminSource,omitempty"` - // The CIDRRestriction message. - CIDRRestriction4 *CIDRRestriction `json:"ssoUserSource,omitempty"` - MaxSessionLength *string `json:"maxSessionLength,omitempty"` + // CIDRRestriction defines an IP-based access restriction with an enable toggle and a list of allowed CIDRs. + CIDRRestriction1 *CIDRRestriction `json:"externalClientSource,omitempty"` + // CIDRRestriction defines an IP-based access restriction with an enable toggle and a list of allowed CIDRs. + CIDRRestriction2 *CIDRRestriction `json:"pccAdminSource,omitempty"` + // CIDRRestriction defines an IP-based access restriction with an enable toggle and a list of allowed CIDRs. + CIDRRestriction3 *CIDRRestriction `json:"pccUserSource,omitempty"` + // CIDRRestriction defines an IP-based access restriction with an enable toggle and a list of allowed CIDRs. + CIDRRestriction4 *CIDRRestriction `json:"ssoAdminSource,omitempty"` + // CIDRRestriction defines an IP-based access restriction with an enable toggle and a list of allowed CIDRs. + CIDRRestriction5 *CIDRRestriction `json:"ssoUserSource,omitempty"` + // Policy ID for REQUESTABLE mode approval routing. + ClientIDApprovalRequestPolicyID *string `json:"clientIdApprovalRequestPolicyId,omitempty"` + // Policy for metadata document client_id URLs. + ClientIDMetadataDocumentPolicy *ClientIDMetadataDocumentPolicy `json:"clientIdMetadataDocumentPolicy,omitempty"` + // Enable external client registration (OAuth 2.0 DCR) for MCP clients + // like Claude Desktop, Cursor, and other AI assistants. + ExternalClientsEnabled *bool `json:"externalClientsEnabled,omitempty"` + MaxSessionLength *string `json:"maxSessionLength,omitempty"` } func (s *SessionSettings) GetCIDRRestriction() *CIDRRestriction { @@ -52,6 +86,34 @@ func (s *SessionSettings) GetCIDRRestriction4() *CIDRRestriction { return s.CIDRRestriction4 } +func (s *SessionSettings) GetCIDRRestriction5() *CIDRRestriction { + if s == nil { + return nil + } + return s.CIDRRestriction5 +} + +func (s *SessionSettings) GetClientIDApprovalRequestPolicyID() *string { + if s == nil { + return nil + } + return s.ClientIDApprovalRequestPolicyID +} + +func (s *SessionSettings) GetClientIDMetadataDocumentPolicy() *ClientIDMetadataDocumentPolicy { + if s == nil { + return nil + } + return s.ClientIDMetadataDocumentPolicy +} + +func (s *SessionSettings) GetExternalClientsEnabled() *bool { + if s == nil { + return nil + } + return s.ExternalClientsEnabled +} + func (s *SessionSettings) GetMaxSessionLength() *string { if s == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappentitlementownersv2request.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappentitlementownersv2request.go new file mode 100644 index 00000000..7e931bfb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappentitlementownersv2request.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SetAppEntitlementOwnersV2Request is the request for setting the owners of an app entitlement for a given role. +type SetAppEntitlementOwnersV2Request struct { + // The appEntitlementRefs field. + AppEntitlementRefs []AppEntitlementRef `json:"appEntitlementRefs,omitempty"` + // Empty defaults to the "primary" role on the server side. + RoleSlug *string `json:"roleSlug,omitempty"` + // The userRefs field. + UserRefs []UserRef `json:"userRefs,omitempty"` +} + +func (s *SetAppEntitlementOwnersV2Request) GetAppEntitlementRefs() []AppEntitlementRef { + if s == nil { + return nil + } + return s.AppEntitlementRefs +} + +func (s *SetAppEntitlementOwnersV2Request) GetRoleSlug() *string { + if s == nil { + return nil + } + return s.RoleSlug +} + +func (s *SetAppEntitlementOwnersV2Request) GetUserRefs() []UserRef { + if s == nil { + return nil + } + return s.UserRefs +} + +// #region class-body-setappentitlementownersv2request +// #endregion class-body-setappentitlementownersv2request diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappentitlementownersv2response.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappentitlementownersv2response.go new file mode 100644 index 00000000..3540ba0b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappentitlementownersv2response.go @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SetAppEntitlementOwnersV2Response is the empty response for setting app entitlement owners. +type SetAppEntitlementOwnersV2Response struct { +} + +// #region class-body-setappentitlementownersv2response +// #endregion class-body-setappentitlementownersv2response diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappownersrequestv2.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappownersrequestv2.go new file mode 100644 index 00000000..e4001a1d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappownersrequestv2.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SetAppOwnersRequestV2 - SetAppOwnersRequest is the request for setting user owners for an app and role. +type SetAppOwnersRequestV2 struct { + // The appEntitlementRefs field. + AppEntitlementRefs []AppEntitlementRef `json:"appEntitlementRefs,omitempty"` + // The roleSlug field. + RoleSlug *string `json:"roleSlug,omitempty"` + // The userRefs field. + UserRefs []UserRef `json:"userRefs,omitempty"` +} + +func (s *SetAppOwnersRequestV2) GetAppEntitlementRefs() []AppEntitlementRef { + if s == nil { + return nil + } + return s.AppEntitlementRefs +} + +func (s *SetAppOwnersRequestV2) GetRoleSlug() *string { + if s == nil { + return nil + } + return s.RoleSlug +} + +func (s *SetAppOwnersRequestV2) GetUserRefs() []UserRef { + if s == nil { + return nil + } + return s.UserRefs +} + +// #region class-body-setappownersrequestv2 +// #endregion class-body-setappownersrequestv2 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappownersresponsev2.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappownersresponsev2.go new file mode 100644 index 00000000..590e92ae --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setappownersresponsev2.go @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SetAppOwnersResponseV2 - SetAppOwnersResponse is the empty response for setting app owners. +type SetAppOwnersResponseV2 struct { +} + +// #region class-body-setappownersresponsev2 +// #endregion class-body-setappownersresponsev2 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setbundleautomationrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setbundleautomationrequest.go index 022f0bfd..eed979ea 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setbundleautomationrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setbundleautomationrequest.go @@ -2,21 +2,31 @@ package shared -// The SetBundleAutomationRequest message. +// SetBundleAutomationRequest - The request message for creating or updating a bundle automation rule on a catalog. // // This message contains a oneof named conditions. Only a single field of the following list may be set at a time: // - entitlements +// - cel type SetBundleAutomationRequest struct { + // The BundleAutomationRuleCEL message. + BundleAutomationRuleCEL *BundleAutomationRuleCEL `json:"cel,omitempty"` // The BundleAutomationRuleEntitlement message. BundleAutomationRuleEntitlement *BundleAutomationRuleEntitlement `json:"entitlements,omitempty"` - // The createTasks field. + // Whether to create access request tasks for matched users instead of granting directly. CreateTasks *bool `json:"createTasks,omitempty"` - // The disableCircuitBreaker field. + // Whether to disable the circuit breaker that pauses the automation when excessive membership changes are detected. DisableCircuitBreaker *bool `json:"disableCircuitBreaker,omitempty"` - // The enabled field. + // Whether the automation should actively run on its schedule. Enabled *bool `json:"enabled,omitempty"` } +func (s *SetBundleAutomationRequest) GetBundleAutomationRuleCEL() *BundleAutomationRuleCEL { + if s == nil { + return nil + } + return s.BundleAutomationRuleCEL +} + func (s *SetBundleAutomationRequest) GetBundleAutomationRuleEntitlement() *BundleAutomationRuleEntitlement { if s == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setconnectorownersv2request.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setconnectorownersv2request.go new file mode 100644 index 00000000..3c4019ad --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setconnectorownersv2request.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SetConnectorOwnersV2Request is the request for setting the owners of a connector for a given role. +type SetConnectorOwnersV2Request struct { + // The appEntitlementRefs field. + AppEntitlementRefs []AppEntitlementRef `json:"appEntitlementRefs,omitempty"` + // The role slug for this ownership grant. Required. + RoleSlug *string `json:"roleSlug,omitempty"` + // The userRefs field. + UserRefs []UserRef `json:"userRefs,omitempty"` +} + +func (s *SetConnectorOwnersV2Request) GetAppEntitlementRefs() []AppEntitlementRef { + if s == nil { + return nil + } + return s.AppEntitlementRefs +} + +func (s *SetConnectorOwnersV2Request) GetRoleSlug() *string { + if s == nil { + return nil + } + return s.RoleSlug +} + +func (s *SetConnectorOwnersV2Request) GetUserRefs() []UserRef { + if s == nil { + return nil + } + return s.UserRefs +} + +// #region class-body-setconnectorownersv2request +// #endregion class-body-setconnectorownersv2request diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setconnectorownersv2response.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setconnectorownersv2response.go new file mode 100644 index 00000000..d894128a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setconnectorownersv2response.go @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SetConnectorOwnersV2Response is the empty response for setting connector owners. +type SetConnectorOwnersV2Response struct { +} + +// #region class-body-setconnectorownersv2response +// #endregion class-body-setconnectorownersv2response diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setcredential.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setcredential.go new file mode 100644 index 00000000..5f81c852 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setcredential.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SetCredential submits a RotateCredentials baton task to the target connector, +// +// re-encrypting the given password CEL expression with the connector's public JWK. +// +// This message contains a oneof named connector_identifier. Only a single field of the following list may be set at a time: +// - connectorRef +type SetCredential struct { + // The ConnectorRef message. + ConnectorRef *ConnectorRef `json:"connectorRef,omitempty"` + // The accountIdCel field. + AccountIDCel *string `json:"accountIdCel,omitempty"` + // The passwordCel field. + PasswordCel *string `json:"passwordCel,omitempty"` +} + +func (s *SetCredential) GetConnectorRef() *ConnectorRef { + if s == nil { + return nil + } + return s.ConnectorRef +} + +func (s *SetCredential) GetAccountIDCel() *string { + if s == nil { + return nil + } + return s.AccountIDCel +} + +func (s *SetCredential) GetPasswordCel() *string { + if s == nil { + return nil + } + return s.PasswordCel +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setexpiringuserdelegationbindingbyadminrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setexpiringuserdelegationbindingbyadminrequest.go index f432abb4..f4588d49 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setexpiringuserdelegationbindingbyadminrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setexpiringuserdelegationbindingbyadminrequest.go @@ -7,9 +7,9 @@ import ( "time" ) -// The SetExpiringUserDelegationBindingByAdminRequest message. +// SetExpiringUserDelegationBindingByAdminRequest is the request for an admin to set a temporary delegation binding for a user. type SetExpiringUserDelegationBindingByAdminRequest struct { - // The delegatedUserId field. + // The ID of the user who will act as delegate. Empty string removes the delegation. DelegatedUserID *string `json:"delegatedUserId,omitempty"` DelegationExpireAt *time.Time `json:"delegationExpireAt,omitempty"` DelegationStartAt *time.Time `json:"delegationStartAt,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setexpiringuserdelegationbindingbyadminresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setexpiringuserdelegationbindingbyadminresponse.go index 43611eac..de3d9138 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setexpiringuserdelegationbindingbyadminresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/setexpiringuserdelegationbindingbyadminresponse.go @@ -2,7 +2,7 @@ package shared -// The SetExpiringUserDelegationBindingByAdminResponse message. +// SetExpiringUserDelegationBindingByAdminResponse is the response containing the created or updated delegation binding. type SetExpiringUserDelegationBindingByAdminResponse struct { // The ExpiringUserDelegationBinding message. ExpiringUserDelegationBinding *ExpiringUserDelegationBinding `json:"item,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sfixed32rules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sfixed32rules.go index caf68caa..831a6ec5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sfixed32rules.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sfixed32rules.go @@ -86,3 +86,6 @@ func (s *SFixed32Rules) GetNotIn() []int { } return s.NotIn } + +// #region class-body-sfixed32rules +// #endregion class-body-sfixed32rules diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sfixed64rules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sfixed64rules.go index 5d9f651c..7a7355f2 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sfixed64rules.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sfixed64rules.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // SFixed64Rules describes the constraints applied to `sfixed64` values type SFixed64Rules struct { // Const specifies that this field must be exactly the specified value @@ -31,6 +35,17 @@ type SFixed64Rules struct { NotIn []int64 `integer:"string" json:"notIn,omitempty"` } +func (s SFixed64Rules) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SFixed64Rules) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + func (s *SFixed64Rules) GetConst() *int64 { if s == nil { return nil @@ -86,3 +101,6 @@ func (s *SFixed64Rules) GetNotIn() []int64 { } return s.NotIn } + +// #region class-body-sfixed64rules +// #endregion class-body-sfixed64rules diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/similarusernamematchevidence.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/similarusernamematchevidence.go new file mode 100644 index 00000000..f96692ba --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/similarusernamematchevidence.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The SimilarUsernameMatchEvidence message. +type SimilarUsernameMatchEvidence struct { + // The appUsername field. + AppUsername *string `json:"appUsername,omitempty"` + // The identityUsername field. + IdentityUsername *string `json:"identityUsername,omitempty"` + // The similarityScore field. + SimilarityScore *float64 `json:"similarityScore,omitempty"` +} + +func (s *SimilarUsernameMatchEvidence) GetAppUsername() *string { + if s == nil { + return nil + } + return s.AppUsername +} + +func (s *SimilarUsernameMatchEvidence) GetIdentityUsername() *string { + if s == nil { + return nil + } + return s.IdentityUsername +} + +func (s *SimilarUsernameMatchEvidence) GetSimilarityScore() *float64 { + if s == nil { + return nil + } + return s.SimilarityScore +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/similarusernamematchtype.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/similarusernamematchtype.go new file mode 100644 index 00000000..22d6d7d3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/similarusernamematchtype.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The SimilarUsernameMatchType message. +type SimilarUsernameMatchType struct { + // The proposedIdentityUserId field. + ProposedIdentityUserID *string `json:"proposedIdentityUserId,omitempty"` +} + +func (s *SimilarUsernameMatchType) GetProposedIdentityUserID() *string { + if s == nil { + return nil + } + return s.ProposedIdentityUserID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sint32rules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sint32rules.go index e61026e2..19dd8d8f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sint32rules.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sint32rules.go @@ -86,3 +86,6 @@ func (s *SInt32Rules) GetNotIn() []int { } return s.NotIn } + +// #region class-body-sint32rules +// #endregion class-body-sint32rules diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sint64rules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sint64rules.go index b5892c77..7e410805 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sint64rules.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/sint64rules.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // SInt64Rules describes the constraints applied to `sint64` values type SInt64Rules struct { // Const specifies that this field must be exactly the specified value @@ -31,6 +35,17 @@ type SInt64Rules struct { NotIn []int64 `integer:"string" json:"notIn,omitempty"` } +func (s SInt64Rules) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SInt64Rules) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + func (s *SInt64Rules) GetConst() *int64 { if s == nil { return nil @@ -86,3 +101,6 @@ func (s *SInt64Rules) GetNotIn() []int64 { } return s.NotIn } + +// #region class-body-sint64rules +// #endregion class-body-sint64rules diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/slackchannelsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/slackchannelsettings.go new file mode 100644 index 00000000..51e08f65 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/slackchannelsettings.go @@ -0,0 +1,115 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The SlackChannelSettings message. +type SlackChannelSettings struct { + // The AccessProvisionedPreference message. + AccessProvisionedPreference *AccessProvisionedPreference `json:"accessProvisioned,omitempty"` + // The ApprovalNeededPreference message. + ApprovalNeededPreference *ApprovalNeededPreference `json:"approvalNeeded,omitempty"` + // The CommentOnRequestPreference message. + CommentOnRequestPreference *CommentOnRequestPreference `json:"commentOnRequest,omitempty"` + // The CompletionPreference message. + CompletionPreference *CompletionPreference `json:"completion,omitempty"` + // The ConnectorIssuesPreference message. + ConnectorIssuesPreference *ConnectorIssuesPreference `json:"connectorIssues,omitempty"` + // DigestPreference controls whether summary digest notifications are sent and how often. + DigestPreference *DigestPreference `json:"digest,omitempty"` + // The ExpiringAccessPreference message. + ExpiringAccessPreference *ExpiringAccessPreference `json:"expiringAccess,omitempty"` + // The ProvisioningRequestPreference message. + ProvisioningRequestPreference *ProvisioningRequestPreference `json:"provisioningRequest,omitempty"` + // The ReviewsPreference message. + ReviewsPreference *ReviewsPreference `json:"reviews,omitempty"` + // The TaskRemindersPreference message. + TaskRemindersPreference *TaskRemindersPreference `json:"taskReminders,omitempty"` + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The isConfigured field. + IsConfigured *bool `json:"isConfigured,omitempty"` +} + +func (s *SlackChannelSettings) GetAccessProvisionedPreference() *AccessProvisionedPreference { + if s == nil { + return nil + } + return s.AccessProvisionedPreference +} + +func (s *SlackChannelSettings) GetApprovalNeededPreference() *ApprovalNeededPreference { + if s == nil { + return nil + } + return s.ApprovalNeededPreference +} + +func (s *SlackChannelSettings) GetCommentOnRequestPreference() *CommentOnRequestPreference { + if s == nil { + return nil + } + return s.CommentOnRequestPreference +} + +func (s *SlackChannelSettings) GetCompletionPreference() *CompletionPreference { + if s == nil { + return nil + } + return s.CompletionPreference +} + +func (s *SlackChannelSettings) GetConnectorIssuesPreference() *ConnectorIssuesPreference { + if s == nil { + return nil + } + return s.ConnectorIssuesPreference +} + +func (s *SlackChannelSettings) GetDigestPreference() *DigestPreference { + if s == nil { + return nil + } + return s.DigestPreference +} + +func (s *SlackChannelSettings) GetExpiringAccessPreference() *ExpiringAccessPreference { + if s == nil { + return nil + } + return s.ExpiringAccessPreference +} + +func (s *SlackChannelSettings) GetProvisioningRequestPreference() *ProvisioningRequestPreference { + if s == nil { + return nil + } + return s.ProvisioningRequestPreference +} + +func (s *SlackChannelSettings) GetReviewsPreference() *ReviewsPreference { + if s == nil { + return nil + } + return s.ReviewsPreference +} + +func (s *SlackChannelSettings) GetTaskRemindersPreference() *TaskRemindersPreference { + if s == nil { + return nil + } + return s.TaskRemindersPreference +} + +func (s *SlackChannelSettings) GetEnabled() *bool { + if s == nil { + return nil + } + return s.Enabled +} + +func (s *SlackChannelSettings) GetIsConfigured() *bool { + if s == nil { + return nil + } + return s.IsConfigured +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/slidercomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/slidercomponent.go new file mode 100644 index 00000000..2798709f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/slidercomponent.go @@ -0,0 +1,82 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SliderComponent is an interactive numeric range input (e.g. for forms). +type SliderComponent struct { + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber *DynamicNumber `json:"max,omitempty"` + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber1 *DynamicNumber `json:"min,omitempty"` + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber2 *DynamicNumber `json:"step,omitempty"` + // DynamicNumber can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicNumber3 *DynamicNumber `json:"value,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"label,omitempty"` +} + +func (s *SliderComponent) GetDynamicNumber() *DynamicNumber { + if s == nil { + return nil + } + return s.DynamicNumber +} + +func (s *SliderComponent) GetDynamicNumber1() *DynamicNumber { + if s == nil { + return nil + } + return s.DynamicNumber1 +} + +func (s *SliderComponent) GetDynamicNumber2() *DynamicNumber { + if s == nil { + return nil + } + return s.DynamicNumber2 +} + +func (s *SliderComponent) GetDynamicNumber3() *DynamicNumber { + if s == nil { + return nil + } + return s.DynamicNumber3 +} + +func (s *SliderComponent) GetDynamicString() *DynamicString { + if s == nil { + return nil + } + return s.DynamicString +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/snoozeaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/snoozeaction.go new file mode 100644 index 00000000..ccfb6d23 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/snoozeaction.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// SnoozeAction parameters for UpdateFindingState. +type SnoozeAction struct { + // The reason field. + Reason *string `json:"reason,omitempty"` + SnoozeUntil *time.Time `json:"snoozeUntil,omitempty"` +} + +func (s SnoozeAction) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SnoozeAction) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *SnoozeAction) GetReason() *string { + if s == nil { + return nil + } + return s.Reason +} + +func (s *SnoozeAction) GetSnoozeUntil() *time.Time { + if s == nil { + return nil + } + return s.SnoozeUntil +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfoutboundauthbearer.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfoutboundauthbearer.go new file mode 100644 index 00000000..63dc6ad8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfoutboundauthbearer.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFOutboundAuthBearer is a static bearer token for outbound auth. +// +// Token is write-only: accepted on create/update, never returned. +type SSFOutboundAuthBearer struct { + // The token field. + Token *string `json:"token,omitempty"` +} + +func (s *SSFOutboundAuthBearer) GetToken() *string { + if s == nil { + return nil + } + return s.Token +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfoutboundauthoauth2.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfoutboundauthoauth2.go new file mode 100644 index 00000000..f188191b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfoutboundauthoauth2.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFOutboundAuthOAuth2 uses OAuth2 client credentials for outbound auth. +// +// client_secret is write-only: accepted on create/update, never returned. +type SSFOutboundAuthOAuth2 struct { + // The clientId field. + ClientID *string `json:"clientId,omitempty"` + // The clientSecret field. + ClientSecret *string `json:"clientSecret,omitempty"` + // The scopes field. + Scopes []string `json:"scopes,omitempty"` + // The tokenUrl field. + TokenURL *string `json:"tokenUrl,omitempty"` +} + +func (s *SSFOutboundAuthOAuth2) GetClientID() *string { + if s == nil { + return nil + } + return s.ClientID +} + +func (s *SSFOutboundAuthOAuth2) GetClientSecret() *string { + if s == nil { + return nil + } + return s.ClientSecret +} + +func (s *SSFOutboundAuthOAuth2) GetScopes() []string { + if s == nil { + return nil + } + return s.Scopes +} + +func (s *SSFOutboundAuthOAuth2) GetTokenURL() *string { + if s == nil { + return nil + } + return s.TokenURL +} + +// #region class-body-ssfoutboundauthoauth2 +// #endregion class-body-ssfoutboundauthoauth2 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverevent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverevent.go new file mode 100644 index 00000000..fe2aed83 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverevent.go @@ -0,0 +1,264 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// CanonicalType - C1 canonical outcome (what C1 understood and did). +// +// The normalized event type after mapping from the wire event type. +type CanonicalType string + +const ( + CanonicalTypeSsfCanonicalEventTypeUnspecified CanonicalType = "SSF_CANONICAL_EVENT_TYPE_UNSPECIFIED" + CanonicalTypeSsfCanonicalEventTypeUnrecognized CanonicalType = "SSF_CANONICAL_EVENT_TYPE_UNRECOGNIZED" + CanonicalTypeSsfCanonicalEventTypeSessionRevoked CanonicalType = "SSF_CANONICAL_EVENT_TYPE_SESSION_REVOKED" + CanonicalTypeSsfCanonicalEventTypeCredentialChanged CanonicalType = "SSF_CANONICAL_EVENT_TYPE_CREDENTIAL_CHANGED" + CanonicalTypeSsfCanonicalEventTypeTokenClaimsChanged CanonicalType = "SSF_CANONICAL_EVENT_TYPE_TOKEN_CLAIMS_CHANGED" + CanonicalTypeSsfCanonicalEventTypeAssuranceLevelChanged CanonicalType = "SSF_CANONICAL_EVENT_TYPE_ASSURANCE_LEVEL_CHANGED" + CanonicalTypeSsfCanonicalEventTypeDeviceComplianceChanged CanonicalType = "SSF_CANONICAL_EVENT_TYPE_DEVICE_COMPLIANCE_CHANGED" + CanonicalTypeSsfCanonicalEventTypeRiskLevelChanged CanonicalType = "SSF_CANONICAL_EVENT_TYPE_RISK_LEVEL_CHANGED" + CanonicalTypeSsfCanonicalEventTypeSessionEstablished CanonicalType = "SSF_CANONICAL_EVENT_TYPE_SESSION_ESTABLISHED" + CanonicalTypeSsfCanonicalEventTypeSessionPresented CanonicalType = "SSF_CANONICAL_EVENT_TYPE_SESSION_PRESENTED" + CanonicalTypeSsfCanonicalEventTypeAccountDisabled CanonicalType = "SSF_CANONICAL_EVENT_TYPE_ACCOUNT_DISABLED" + CanonicalTypeSsfCanonicalEventTypeAccountEnabled CanonicalType = "SSF_CANONICAL_EVENT_TYPE_ACCOUNT_ENABLED" + CanonicalTypeSsfCanonicalEventTypeAccountPurged CanonicalType = "SSF_CANONICAL_EVENT_TYPE_ACCOUNT_PURGED" + CanonicalTypeSsfCanonicalEventTypeCredentialCompromise CanonicalType = "SSF_CANONICAL_EVENT_TYPE_CREDENTIAL_COMPROMISE" + CanonicalTypeSsfCanonicalEventTypeRecoveryActivated CanonicalType = "SSF_CANONICAL_EVENT_TYPE_RECOVERY_ACTIVATED" + CanonicalTypeSsfCanonicalEventTypeIdentifierChanged CanonicalType = "SSF_CANONICAL_EVENT_TYPE_IDENTIFIER_CHANGED" + CanonicalTypeSsfCanonicalEventTypeVerification CanonicalType = "SSF_CANONICAL_EVENT_TYPE_VERIFICATION" + CanonicalTypeSsfCanonicalEventTypeStreamUpdated CanonicalType = "SSF_CANONICAL_EVENT_TYPE_STREAM_UPDATED" +) + +func (e CanonicalType) ToPointer() *CanonicalType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *CanonicalType) IsExact() bool { + if e != nil { + switch *e { + case "SSF_CANONICAL_EVENT_TYPE_UNSPECIFIED", "SSF_CANONICAL_EVENT_TYPE_UNRECOGNIZED", "SSF_CANONICAL_EVENT_TYPE_SESSION_REVOKED", "SSF_CANONICAL_EVENT_TYPE_CREDENTIAL_CHANGED", "SSF_CANONICAL_EVENT_TYPE_TOKEN_CLAIMS_CHANGED", "SSF_CANONICAL_EVENT_TYPE_ASSURANCE_LEVEL_CHANGED", "SSF_CANONICAL_EVENT_TYPE_DEVICE_COMPLIANCE_CHANGED", "SSF_CANONICAL_EVENT_TYPE_RISK_LEVEL_CHANGED", "SSF_CANONICAL_EVENT_TYPE_SESSION_ESTABLISHED", "SSF_CANONICAL_EVENT_TYPE_SESSION_PRESENTED", "SSF_CANONICAL_EVENT_TYPE_ACCOUNT_DISABLED", "SSF_CANONICAL_EVENT_TYPE_ACCOUNT_ENABLED", "SSF_CANONICAL_EVENT_TYPE_ACCOUNT_PURGED", "SSF_CANONICAL_EVENT_TYPE_CREDENTIAL_COMPROMISE", "SSF_CANONICAL_EVENT_TYPE_RECOVERY_ACTIVATED", "SSF_CANONICAL_EVENT_TYPE_IDENTIFIER_CHANGED", "SSF_CANONICAL_EVENT_TYPE_VERIFICATION", "SSF_CANONICAL_EVENT_TYPE_STREAM_UPDATED": + return true + } + } + return false +} + +// MatchMethod - How the upstream subject was resolved to a ConductorOne user. +type MatchMethod string + +const ( + MatchMethodSsfSubjectMatchMethodUnspecified MatchMethod = "SSF_SUBJECT_MATCH_METHOD_UNSPECIFIED" + MatchMethodSsfSubjectMatchMethodIdpUser MatchMethod = "SSF_SUBJECT_MATCH_METHOD_IDP_USER" + MatchMethodSsfSubjectMatchMethodEmail MatchMethod = "SSF_SUBJECT_MATCH_METHOD_EMAIL" + MatchMethodSsfSubjectMatchMethodNotFound MatchMethod = "SSF_SUBJECT_MATCH_METHOD_NOT_FOUND" + MatchMethodSsfSubjectMatchMethodNotApplicable MatchMethod = "SSF_SUBJECT_MATCH_METHOD_NOT_APPLICABLE" +) + +func (e MatchMethod) ToPointer() *MatchMethod { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *MatchMethod) IsExact() bool { + if e != nil { + switch *e { + case "SSF_SUBJECT_MATCH_METHOD_UNSPECIFIED", "SSF_SUBJECT_MATCH_METHOD_IDP_USER", "SSF_SUBJECT_MATCH_METHOD_EMAIL", "SSF_SUBJECT_MATCH_METHOD_NOT_FOUND", "SSF_SUBJECT_MATCH_METHOD_NOT_APPLICABLE": + return true + } + } + return false +} + +// Outcome - The action ConductorOne took in response to this event. +type Outcome string + +const ( + OutcomeSsfEventOutcomeUnspecified Outcome = "SSF_EVENT_OUTCOME_UNSPECIFIED" + OutcomeSsfEventOutcomeSessionsRevoked Outcome = "SSF_EVENT_OUTCOME_SESSIONS_REVOKED" + OutcomeSsfEventOutcomeLogged Outcome = "SSF_EVENT_OUTCOME_LOGGED" + OutcomeSsfEventOutcomePrincipalNotFound Outcome = "SSF_EVENT_OUTCOME_PRINCIPAL_NOT_FOUND" + OutcomeSsfEventOutcomeVerified Outcome = "SSF_EVENT_OUTCOME_VERIFIED" + OutcomeSsfEventOutcomeStreamStatusUpdated Outcome = "SSF_EVENT_OUTCOME_STREAM_STATUS_UPDATED" + OutcomeSsfEventOutcomeUnrecognized Outcome = "SSF_EVENT_OUTCOME_UNRECOGNIZED" + OutcomeSsfEventOutcomeError Outcome = "SSF_EVENT_OUTCOME_ERROR" +) + +func (e Outcome) ToPointer() *Outcome { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *Outcome) IsExact() bool { + if e != nil { + switch *e { + case "SSF_EVENT_OUTCOME_UNSPECIFIED", "SSF_EVENT_OUTCOME_SESSIONS_REVOKED", "SSF_EVENT_OUTCOME_LOGGED", "SSF_EVENT_OUTCOME_PRINCIPAL_NOT_FOUND", "SSF_EVENT_OUTCOME_VERIFIED", "SSF_EVENT_OUTCOME_STREAM_STATUS_UPDATED", "SSF_EVENT_OUTCOME_UNRECOGNIZED", "SSF_EVENT_OUTCOME_ERROR": + return true + } + } + return false +} + +// SSFReceiverEvent shows both wire-level data and C1 canonical outcome. +type SSFReceiverEvent struct { + // C1 canonical outcome (what C1 understood and did). + // The normalized event type after mapping from the wire event type. + CanonicalType *CanonicalType `json:"canonicalType,omitempty"` + // The unique identifier of this event. + ID *string `json:"id,omitempty"` + // How the upstream subject was resolved to a ConductorOne user. + MatchMethod *MatchMethod `json:"matchMethod,omitempty"` + // The ConductorOne user ID that the event subject was resolved to, if any. + MatchedUserID *string `json:"matchedUserId,omitempty"` + // The action ConductorOne took in response to this event. + Outcome *Outcome `json:"outcome,omitempty"` + // Human-readable details about the outcome (e.g., error message or revocation summary). + OutcomeDetail *string `json:"outcomeDetail,omitempty"` + ReceivedAt *time.Time `json:"receivedAt,omitempty"` + // Number of sessions that were revoked as a result of this event. + SessionsRevoked *int `json:"sessionsRevoked,omitempty"` + // Wire-level data (what the transmitter sent). + // The SET (Security Event Token) JWT ID claim, uniquely identifying the token. + SetJti *string `json:"setJti,omitempty"` + // The SSF receiver stream that received this event. + StreamID *string `json:"streamId,omitempty"` + // The event profile URI from the SET, if present. + WireEventProfile *string `json:"wireEventProfile,omitempty"` + // The raw event type URI from the SET (e.g., "https://schemas.openid.net/secevent/caep/event-type/session-revoked"). + WireEventType *string `json:"wireEventType,omitempty"` + // The entity that initiated the event, as reported by the transmitter. + WireInitiatingEntity *string `json:"wireInitiatingEntity,omitempty"` + // The admin-facing reason string from the SET, if provided by the transmitter. + WireReasonAdmin *string `json:"wireReasonAdmin,omitempty"` + // The subject identifier format from the SET (e.g., "email", "iss_sub"). + WireSubjectFormat *string `json:"wireSubjectFormat,omitempty"` + // The raw subject identifier value from the SET. + WireSubjectIdentifier *string `json:"wireSubjectIdentifier,omitempty"` +} + +func (s SSFReceiverEvent) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SSFReceiverEvent) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *SSFReceiverEvent) GetCanonicalType() *CanonicalType { + if s == nil { + return nil + } + return s.CanonicalType +} + +func (s *SSFReceiverEvent) GetID() *string { + if s == nil { + return nil + } + return s.ID +} + +func (s *SSFReceiverEvent) GetMatchMethod() *MatchMethod { + if s == nil { + return nil + } + return s.MatchMethod +} + +func (s *SSFReceiverEvent) GetMatchedUserID() *string { + if s == nil { + return nil + } + return s.MatchedUserID +} + +func (s *SSFReceiverEvent) GetOutcome() *Outcome { + if s == nil { + return nil + } + return s.Outcome +} + +func (s *SSFReceiverEvent) GetOutcomeDetail() *string { + if s == nil { + return nil + } + return s.OutcomeDetail +} + +func (s *SSFReceiverEvent) GetReceivedAt() *time.Time { + if s == nil { + return nil + } + return s.ReceivedAt +} + +func (s *SSFReceiverEvent) GetSessionsRevoked() *int { + if s == nil { + return nil + } + return s.SessionsRevoked +} + +func (s *SSFReceiverEvent) GetSetJti() *string { + if s == nil { + return nil + } + return s.SetJti +} + +func (s *SSFReceiverEvent) GetStreamID() *string { + if s == nil { + return nil + } + return s.StreamID +} + +func (s *SSFReceiverEvent) GetWireEventProfile() *string { + if s == nil { + return nil + } + return s.WireEventProfile +} + +func (s *SSFReceiverEvent) GetWireEventType() *string { + if s == nil { + return nil + } + return s.WireEventType +} + +func (s *SSFReceiverEvent) GetWireInitiatingEntity() *string { + if s == nil { + return nil + } + return s.WireInitiatingEntity +} + +func (s *SSFReceiverEvent) GetWireReasonAdmin() *string { + if s == nil { + return nil + } + return s.WireReasonAdmin +} + +func (s *SSFReceiverEvent) GetWireSubjectFormat() *string { + if s == nil { + return nil + } + return s.WireSubjectFormat +} + +func (s *SSFReceiverEvent) GetWireSubjectIdentifier() *string { + if s == nil { + return nil + } + return s.WireSubjectIdentifier +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceivereventsearchservicesearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceivereventsearchservicesearchrequest.go new file mode 100644 index 00000000..9810f725 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceivereventsearchservicesearchrequest.go @@ -0,0 +1,99 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverEventSearchServiceSearchRequestOutcome - Restricts results to events with this processing outcome. Optional. +type SSFReceiverEventSearchServiceSearchRequestOutcome string + +const ( + SSFReceiverEventSearchServiceSearchRequestOutcomeSsfEventOutcomeUnspecified SSFReceiverEventSearchServiceSearchRequestOutcome = "SSF_EVENT_OUTCOME_UNSPECIFIED" + SSFReceiverEventSearchServiceSearchRequestOutcomeSsfEventOutcomeSessionsRevoked SSFReceiverEventSearchServiceSearchRequestOutcome = "SSF_EVENT_OUTCOME_SESSIONS_REVOKED" + SSFReceiverEventSearchServiceSearchRequestOutcomeSsfEventOutcomeLogged SSFReceiverEventSearchServiceSearchRequestOutcome = "SSF_EVENT_OUTCOME_LOGGED" + SSFReceiverEventSearchServiceSearchRequestOutcomeSsfEventOutcomePrincipalNotFound SSFReceiverEventSearchServiceSearchRequestOutcome = "SSF_EVENT_OUTCOME_PRINCIPAL_NOT_FOUND" + SSFReceiverEventSearchServiceSearchRequestOutcomeSsfEventOutcomeVerified SSFReceiverEventSearchServiceSearchRequestOutcome = "SSF_EVENT_OUTCOME_VERIFIED" + SSFReceiverEventSearchServiceSearchRequestOutcomeSsfEventOutcomeStreamStatusUpdated SSFReceiverEventSearchServiceSearchRequestOutcome = "SSF_EVENT_OUTCOME_STREAM_STATUS_UPDATED" + SSFReceiverEventSearchServiceSearchRequestOutcomeSsfEventOutcomeUnrecognized SSFReceiverEventSearchServiceSearchRequestOutcome = "SSF_EVENT_OUTCOME_UNRECOGNIZED" + SSFReceiverEventSearchServiceSearchRequestOutcomeSsfEventOutcomeError SSFReceiverEventSearchServiceSearchRequestOutcome = "SSF_EVENT_OUTCOME_ERROR" +) + +func (e SSFReceiverEventSearchServiceSearchRequestOutcome) ToPointer() *SSFReceiverEventSearchServiceSearchRequestOutcome { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SSFReceiverEventSearchServiceSearchRequestOutcome) IsExact() bool { + if e != nil { + switch *e { + case "SSF_EVENT_OUTCOME_UNSPECIFIED", "SSF_EVENT_OUTCOME_SESSIONS_REVOKED", "SSF_EVENT_OUTCOME_LOGGED", "SSF_EVENT_OUTCOME_PRINCIPAL_NOT_FOUND", "SSF_EVENT_OUTCOME_VERIFIED", "SSF_EVENT_OUTCOME_STREAM_STATUS_UPDATED", "SSF_EVENT_OUTCOME_UNRECOGNIZED", "SSF_EVENT_OUTCOME_ERROR": + return true + } + } + return false +} + +// SSFReceiverEventSearchServiceSearchRequest carries the search query and optional filters for narrowing results. +type SSFReceiverEventSearchServiceSearchRequest struct { + // Restricts results to events matching this wire event type URI. Optional. + EventType *string `json:"eventType,omitempty"` + // Restricts results to events matched to this ConductorOne user ID. Optional. + MatchedUserID *string `json:"matchedUserId,omitempty"` + // Restricts results to events with this processing outcome. Optional. + Outcome *SSFReceiverEventSearchServiceSearchRequestOutcome `json:"outcome,omitempty"` + // Maximum number of events to return per page. + PageSize *int `json:"pageSize,omitempty"` + // Token from a previous SearchResponse to fetch the next page of results. + PageToken *string `json:"pageToken,omitempty"` + // Full-text search query matched against event fields. + Query *string `json:"query,omitempty"` + // Restricts results to events from this SSF receiver stream. Optional. + StreamID *string `json:"streamId,omitempty"` +} + +func (s *SSFReceiverEventSearchServiceSearchRequest) GetEventType() *string { + if s == nil { + return nil + } + return s.EventType +} + +func (s *SSFReceiverEventSearchServiceSearchRequest) GetMatchedUserID() *string { + if s == nil { + return nil + } + return s.MatchedUserID +} + +func (s *SSFReceiverEventSearchServiceSearchRequest) GetOutcome() *SSFReceiverEventSearchServiceSearchRequestOutcome { + if s == nil { + return nil + } + return s.Outcome +} + +func (s *SSFReceiverEventSearchServiceSearchRequest) GetPageSize() *int { + if s == nil { + return nil + } + return s.PageSize +} + +func (s *SSFReceiverEventSearchServiceSearchRequest) GetPageToken() *string { + if s == nil { + return nil + } + return s.PageToken +} + +func (s *SSFReceiverEventSearchServiceSearchRequest) GetQuery() *string { + if s == nil { + return nil + } + return s.Query +} + +func (s *SSFReceiverEventSearchServiceSearchRequest) GetStreamID() *string { + if s == nil { + return nil + } + return s.StreamID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceivereventsearchservicesearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceivereventsearchservicesearchresponse.go new file mode 100644 index 00000000..15b92641 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceivereventsearchservicesearchresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverEventSearchServiceSearchResponse contains the matching events and a pagination token. +type SSFReceiverEventSearchServiceSearchResponse struct { + // The SSF events matching the search criteria. + List []SSFReceiverEvent `json:"list,omitempty"` + // Token to retrieve the next page. Empty when there are no more results. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SSFReceiverEventSearchServiceSearchResponse) GetList() []SSFReceiverEvent { + if s == nil { + return nil + } + return s.List +} + +func (s *SSFReceiverEventSearchServiceSearchResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceivereventservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceivereventservicelistresponse.go new file mode 100644 index 00000000..b3ca5dad --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceivereventservicelistresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverEventServiceListResponse contains a page of received SSF events. +type SSFReceiverEventServiceListResponse struct { + // The SSF events in the current page. + List []SSFReceiverEvent `json:"list,omitempty"` + // Token to retrieve the next page. Empty when there are no more results. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SSFReceiverEventServiceListResponse) GetList() []SSFReceiverEvent { + if s == nil { + return nil + } + return s.List +} + +func (s *SSFReceiverEventServiceListResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstream.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstream.go new file mode 100644 index 00000000..3d7d7eeb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstream.go @@ -0,0 +1,586 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// AccountDisabledAction - Action to take when an account-disabled event is received. +type AccountDisabledAction string + +const ( + AccountDisabledActionSsfRevocationActionUnspecified AccountDisabledAction = "SSF_REVOCATION_ACTION_UNSPECIFIED" + AccountDisabledActionSsfRevocationActionRevokeAll AccountDisabledAction = "SSF_REVOCATION_ACTION_REVOKE_ALL" + AccountDisabledActionSsfRevocationActionLogOnly AccountDisabledAction = "SSF_REVOCATION_ACTION_LOG_ONLY" +) + +func (e AccountDisabledAction) ToPointer() *AccountDisabledAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AccountDisabledAction) IsExact() bool { + if e != nil { + switch *e { + case "SSF_REVOCATION_ACTION_UNSPECIFIED", "SSF_REVOCATION_ACTION_REVOKE_ALL", "SSF_REVOCATION_ACTION_LOG_ONLY": + return true + } + } + return false +} + +// CredentialChangeAction - Action to take when a credential-change event is received. +type CredentialChangeAction string + +const ( + CredentialChangeActionSsfRevocationActionUnspecified CredentialChangeAction = "SSF_REVOCATION_ACTION_UNSPECIFIED" + CredentialChangeActionSsfRevocationActionRevokeAll CredentialChangeAction = "SSF_REVOCATION_ACTION_REVOKE_ALL" + CredentialChangeActionSsfRevocationActionLogOnly CredentialChangeAction = "SSF_REVOCATION_ACTION_LOG_ONLY" +) + +func (e CredentialChangeAction) ToPointer() *CredentialChangeAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *CredentialChangeAction) IsExact() bool { + if e != nil { + switch *e { + case "SSF_REVOCATION_ACTION_UNSPECIFIED", "SSF_REVOCATION_ACTION_REVOKE_ALL", "SSF_REVOCATION_ACTION_LOG_ONLY": + return true + } + } + return false +} + +// CredentialCompromiseAction - Action to take when a credential-compromise event is received. +type CredentialCompromiseAction string + +const ( + CredentialCompromiseActionSsfRevocationActionUnspecified CredentialCompromiseAction = "SSF_REVOCATION_ACTION_UNSPECIFIED" + CredentialCompromiseActionSsfRevocationActionRevokeAll CredentialCompromiseAction = "SSF_REVOCATION_ACTION_REVOKE_ALL" + CredentialCompromiseActionSsfRevocationActionLogOnly CredentialCompromiseAction = "SSF_REVOCATION_ACTION_LOG_ONLY" +) + +func (e CredentialCompromiseAction) ToPointer() *CredentialCompromiseAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *CredentialCompromiseAction) IsExact() bool { + if e != nil { + switch *e { + case "SSF_REVOCATION_ACTION_UNSPECIFIED", "SSF_REVOCATION_ACTION_REVOKE_ALL", "SSF_REVOCATION_ACTION_LOG_ONLY": + return true + } + } + return false +} + +// DeliveryMethod - Controls whether events are received via push (transmitter POSTs to C1) or poll (C1 fetches from transmitter). +type DeliveryMethod string + +const ( + DeliveryMethodSsfDeliveryMethodUnspecified DeliveryMethod = "SSF_DELIVERY_METHOD_UNSPECIFIED" + DeliveryMethodSsfDeliveryMethodPush DeliveryMethod = "SSF_DELIVERY_METHOD_PUSH" + DeliveryMethodSsfDeliveryMethodPoll DeliveryMethod = "SSF_DELIVERY_METHOD_POLL" +) + +func (e DeliveryMethod) ToPointer() *DeliveryMethod { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *DeliveryMethod) IsExact() bool { + if e != nil { + switch *e { + case "SSF_DELIVERY_METHOD_UNSPECIFIED", "SSF_DELIVERY_METHOD_PUSH", "SSF_DELIVERY_METHOD_POLL": + return true + } + } + return false +} + +// SessionRevokedAction - Per-canonical-type action configuration. +// +// Event types without a config here default to LOG_ONLY. +// Action to take when a session-revoked event is received. +type SessionRevokedAction string + +const ( + SessionRevokedActionSsfRevocationActionUnspecified SessionRevokedAction = "SSF_REVOCATION_ACTION_UNSPECIFIED" + SessionRevokedActionSsfRevocationActionRevokeAll SessionRevokedAction = "SSF_REVOCATION_ACTION_REVOKE_ALL" + SessionRevokedActionSsfRevocationActionLogOnly SessionRevokedAction = "SSF_REVOCATION_ACTION_LOG_ONLY" +) + +func (e SessionRevokedAction) ToPointer() *SessionRevokedAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SessionRevokedAction) IsExact() bool { + if e != nil { + switch *e { + case "SSF_REVOCATION_ACTION_UNSPECIFIED", "SSF_REVOCATION_ACTION_REVOKE_ALL", "SSF_REVOCATION_ACTION_LOG_ONLY": + return true + } + } + return false +} + +// SSFReceiverStream is the public API representation. +// +// Secrets (push_auth_token, outbound credentials) are write-only. +// +// This message contains a oneof named outbound_auth. Only a single field of the following list may be set at a time: +// - outboundAuthBearer +// - outboundAuthOauth2 +type SSFReceiverStream struct { + // SSFOutboundAuthBearer is a static bearer token for outbound auth. + // Token is write-only: accepted on create/update, never returned. + SSFOutboundAuthBearer *SSFOutboundAuthBearer `json:"outboundAuthBearer,omitempty"` + // SSFOutboundAuthOAuth2 uses OAuth2 client credentials for outbound auth. + // client_secret is write-only: accepted on create/update, never returned. + SSFOutboundAuthOAuth2 *SSFOutboundAuthOAuth2 `json:"outboundAuthOauth2,omitempty"` + // Action to take when an account-disabled event is received. + AccountDisabledAction *AccountDisabledAction `json:"accountDisabledAction,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Action to take when a credential-change event is received. + CredentialChangeAction *CredentialChangeAction `json:"credentialChangeAction,omitempty"` + // Action to take when a credential-compromise event is received. + CredentialCompromiseAction *CredentialCompromiseAction `json:"credentialCompromiseAction,omitempty"` + DeletedAt *time.Time `json:"deletedAt,omitempty"` + // Controls whether events are received via push (transmitter POSTs to C1) or poll (C1 fetches from transmitter). + DeliveryMethod *DeliveryMethod `json:"deliveryMethod,omitempty"` + // Optional description of the stream's purpose or source. + Description *string `json:"description,omitempty"` + // Human-readable name for the stream shown in the UI. + DisplayName *string `json:"displayName,omitempty"` + // Controls whether this stream actively processes incoming events. When false, events are ignored. + Enabled *bool `json:"enabled,omitempty"` + // SSF/CAEP/RISC event type URIs that this stream is configured to accept. + EventTypesEnabled []string `json:"eventTypesEnabled,omitempty"` + // Expected audience (aud) claim in incoming SETs. Optional. + ExpectedAudience *string `json:"expectedAudience,omitempty"` + // The unique identifier of this SSF receiver stream. + ID *string `json:"id,omitempty"` + // Upstream IdP identification. + IssuerURL *string `json:"issuerUrl,omitempty"` + // The jwksUrl field. + JwksURL *string `json:"jwksUrl,omitempty"` + LastErrorAt *time.Time `json:"lastErrorAt,omitempty"` + // The lastErrorMessage field. + LastErrorMessage *string `json:"lastErrorMessage,omitempty"` + LastVerifiedAt *time.Time `json:"lastVerifiedAt,omitempty"` + // URL of the transmitter's poll endpoint where C1 fetches events from. + PollEndpointURL *string `json:"pollEndpointUrl,omitempty"` + PollInterval *string `json:"pollInterval,omitempty"` + // Push auth token: write-only. Accepted on create, never returned in get/list. + PushAuthToken *string `json:"pushAuthToken,omitempty"` + // Push delivery: C1 generates a unique endpoint URL. + PushEndpointURL *string `json:"pushEndpointUrl,omitempty"` + // Per-canonical-type action configuration. + // Event types without a config here default to LOG_ONLY. + // Action to take when a session-revoked event is received. + SessionRevokedAction *SessionRevokedAction `json:"sessionRevokedAction,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (s SSFReceiverStream) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SSFReceiverStream) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *SSFReceiverStream) GetSSFOutboundAuthBearer() *SSFOutboundAuthBearer { + if s == nil { + return nil + } + return s.SSFOutboundAuthBearer +} + +func (s *SSFReceiverStream) GetSSFOutboundAuthOAuth2() *SSFOutboundAuthOAuth2 { + if s == nil { + return nil + } + return s.SSFOutboundAuthOAuth2 +} + +func (s *SSFReceiverStream) GetAccountDisabledAction() *AccountDisabledAction { + if s == nil { + return nil + } + return s.AccountDisabledAction +} + +func (s *SSFReceiverStream) GetCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.CreatedAt +} + +func (s *SSFReceiverStream) GetCredentialChangeAction() *CredentialChangeAction { + if s == nil { + return nil + } + return s.CredentialChangeAction +} + +func (s *SSFReceiverStream) GetCredentialCompromiseAction() *CredentialCompromiseAction { + if s == nil { + return nil + } + return s.CredentialCompromiseAction +} + +func (s *SSFReceiverStream) GetDeletedAt() *time.Time { + if s == nil { + return nil + } + return s.DeletedAt +} + +func (s *SSFReceiverStream) GetDeliveryMethod() *DeliveryMethod { + if s == nil { + return nil + } + return s.DeliveryMethod +} + +func (s *SSFReceiverStream) GetDescription() *string { + if s == nil { + return nil + } + return s.Description +} + +func (s *SSFReceiverStream) GetDisplayName() *string { + if s == nil { + return nil + } + return s.DisplayName +} + +func (s *SSFReceiverStream) GetEnabled() *bool { + if s == nil { + return nil + } + return s.Enabled +} + +func (s *SSFReceiverStream) GetEventTypesEnabled() []string { + if s == nil { + return nil + } + return s.EventTypesEnabled +} + +func (s *SSFReceiverStream) GetExpectedAudience() *string { + if s == nil { + return nil + } + return s.ExpectedAudience +} + +func (s *SSFReceiverStream) GetID() *string { + if s == nil { + return nil + } + return s.ID +} + +func (s *SSFReceiverStream) GetIssuerURL() *string { + if s == nil { + return nil + } + return s.IssuerURL +} + +func (s *SSFReceiverStream) GetJwksURL() *string { + if s == nil { + return nil + } + return s.JwksURL +} + +func (s *SSFReceiverStream) GetLastErrorAt() *time.Time { + if s == nil { + return nil + } + return s.LastErrorAt +} + +func (s *SSFReceiverStream) GetLastErrorMessage() *string { + if s == nil { + return nil + } + return s.LastErrorMessage +} + +func (s *SSFReceiverStream) GetLastVerifiedAt() *time.Time { + if s == nil { + return nil + } + return s.LastVerifiedAt +} + +func (s *SSFReceiverStream) GetPollEndpointURL() *string { + if s == nil { + return nil + } + return s.PollEndpointURL +} + +func (s *SSFReceiverStream) GetPollInterval() *string { + if s == nil { + return nil + } + return s.PollInterval +} + +func (s *SSFReceiverStream) GetPushAuthToken() *string { + if s == nil { + return nil + } + return s.PushAuthToken +} + +func (s *SSFReceiverStream) GetPushEndpointURL() *string { + if s == nil { + return nil + } + return s.PushEndpointURL +} + +func (s *SSFReceiverStream) GetSessionRevokedAction() *SessionRevokedAction { + if s == nil { + return nil + } + return s.SessionRevokedAction +} + +func (s *SSFReceiverStream) GetUpdatedAt() *time.Time { + if s == nil { + return nil + } + return s.UpdatedAt +} + +// SSFReceiverStreamInput - SSFReceiverStream is the public API representation. +// +// Secrets (push_auth_token, outbound credentials) are write-only. +// +// This message contains a oneof named outbound_auth. Only a single field of the following list may be set at a time: +// - outboundAuthBearer +// - outboundAuthOauth2 +type SSFReceiverStreamInput struct { + // SSFOutboundAuthBearer is a static bearer token for outbound auth. + // Token is write-only: accepted on create/update, never returned. + SSFOutboundAuthBearer *SSFOutboundAuthBearer `json:"outboundAuthBearer,omitempty"` + // SSFOutboundAuthOAuth2 uses OAuth2 client credentials for outbound auth. + // client_secret is write-only: accepted on create/update, never returned. + SSFOutboundAuthOAuth2 *SSFOutboundAuthOAuth2 `json:"outboundAuthOauth2,omitempty"` + // Action to take when an account-disabled event is received. + AccountDisabledAction *AccountDisabledAction `json:"accountDisabledAction,omitempty"` + // Action to take when a credential-change event is received. + CredentialChangeAction *CredentialChangeAction `json:"credentialChangeAction,omitempty"` + // Action to take when a credential-compromise event is received. + CredentialCompromiseAction *CredentialCompromiseAction `json:"credentialCompromiseAction,omitempty"` + // Controls whether events are received via push (transmitter POSTs to C1) or poll (C1 fetches from transmitter). + DeliveryMethod *DeliveryMethod `json:"deliveryMethod,omitempty"` + // Optional description of the stream's purpose or source. + Description *string `json:"description,omitempty"` + // Human-readable name for the stream shown in the UI. + DisplayName *string `json:"displayName,omitempty"` + // Controls whether this stream actively processes incoming events. When false, events are ignored. + Enabled *bool `json:"enabled,omitempty"` + // SSF/CAEP/RISC event type URIs that this stream is configured to accept. + EventTypesEnabled []string `json:"eventTypesEnabled,omitempty"` + // Expected audience (aud) claim in incoming SETs. Optional. + ExpectedAudience *string `json:"expectedAudience,omitempty"` + // The unique identifier of this SSF receiver stream. + ID *string `json:"id,omitempty"` + // Upstream IdP identification. + IssuerURL *string `json:"issuerUrl,omitempty"` + // The jwksUrl field. + JwksURL *string `json:"jwksUrl,omitempty"` + LastErrorAt *time.Time `json:"lastErrorAt,omitempty"` + // The lastErrorMessage field. + LastErrorMessage *string `json:"lastErrorMessage,omitempty"` + LastVerifiedAt *time.Time `json:"lastVerifiedAt,omitempty"` + // URL of the transmitter's poll endpoint where C1 fetches events from. + PollEndpointURL *string `json:"pollEndpointUrl,omitempty"` + PollInterval *string `json:"pollInterval,omitempty"` + // Push auth token: write-only. Accepted on create, never returned in get/list. + PushAuthToken *string `json:"pushAuthToken,omitempty"` + // Per-canonical-type action configuration. + // Event types without a config here default to LOG_ONLY. + // Action to take when a session-revoked event is received. + SessionRevokedAction *SessionRevokedAction `json:"sessionRevokedAction,omitempty"` +} + +func (s SSFReceiverStreamInput) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SSFReceiverStreamInput) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *SSFReceiverStreamInput) GetSSFOutboundAuthBearer() *SSFOutboundAuthBearer { + if s == nil { + return nil + } + return s.SSFOutboundAuthBearer +} + +func (s *SSFReceiverStreamInput) GetSSFOutboundAuthOAuth2() *SSFOutboundAuthOAuth2 { + if s == nil { + return nil + } + return s.SSFOutboundAuthOAuth2 +} + +func (s *SSFReceiverStreamInput) GetAccountDisabledAction() *AccountDisabledAction { + if s == nil { + return nil + } + return s.AccountDisabledAction +} + +func (s *SSFReceiverStreamInput) GetCredentialChangeAction() *CredentialChangeAction { + if s == nil { + return nil + } + return s.CredentialChangeAction +} + +func (s *SSFReceiverStreamInput) GetCredentialCompromiseAction() *CredentialCompromiseAction { + if s == nil { + return nil + } + return s.CredentialCompromiseAction +} + +func (s *SSFReceiverStreamInput) GetDeliveryMethod() *DeliveryMethod { + if s == nil { + return nil + } + return s.DeliveryMethod +} + +func (s *SSFReceiverStreamInput) GetDescription() *string { + if s == nil { + return nil + } + return s.Description +} + +func (s *SSFReceiverStreamInput) GetDisplayName() *string { + if s == nil { + return nil + } + return s.DisplayName +} + +func (s *SSFReceiverStreamInput) GetEnabled() *bool { + if s == nil { + return nil + } + return s.Enabled +} + +func (s *SSFReceiverStreamInput) GetEventTypesEnabled() []string { + if s == nil { + return nil + } + return s.EventTypesEnabled +} + +func (s *SSFReceiverStreamInput) GetExpectedAudience() *string { + if s == nil { + return nil + } + return s.ExpectedAudience +} + +func (s *SSFReceiverStreamInput) GetID() *string { + if s == nil { + return nil + } + return s.ID +} + +func (s *SSFReceiverStreamInput) GetIssuerURL() *string { + if s == nil { + return nil + } + return s.IssuerURL +} + +func (s *SSFReceiverStreamInput) GetJwksURL() *string { + if s == nil { + return nil + } + return s.JwksURL +} + +func (s *SSFReceiverStreamInput) GetLastErrorAt() *time.Time { + if s == nil { + return nil + } + return s.LastErrorAt +} + +func (s *SSFReceiverStreamInput) GetLastErrorMessage() *string { + if s == nil { + return nil + } + return s.LastErrorMessage +} + +func (s *SSFReceiverStreamInput) GetLastVerifiedAt() *time.Time { + if s == nil { + return nil + } + return s.LastVerifiedAt +} + +func (s *SSFReceiverStreamInput) GetPollEndpointURL() *string { + if s == nil { + return nil + } + return s.PollEndpointURL +} + +func (s *SSFReceiverStreamInput) GetPollInterval() *string { + if s == nil { + return nil + } + return s.PollInterval +} + +func (s *SSFReceiverStreamInput) GetPushAuthToken() *string { + if s == nil { + return nil + } + return s.PushAuthToken +} + +func (s *SSFReceiverStreamInput) GetSessionRevokedAction() *SessionRevokedAction { + if s == nil { + return nil + } + return s.SessionRevokedAction +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicecreaterequest.go new file mode 100644 index 00000000..797e1b31 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicecreaterequest.go @@ -0,0 +1,246 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverStreamServiceCreateRequestAccountDisabledAction - Action to take when an account-disabled event is received. +type SSFReceiverStreamServiceCreateRequestAccountDisabledAction string + +const ( + SSFReceiverStreamServiceCreateRequestAccountDisabledActionSsfRevocationActionUnspecified SSFReceiverStreamServiceCreateRequestAccountDisabledAction = "SSF_REVOCATION_ACTION_UNSPECIFIED" + SSFReceiverStreamServiceCreateRequestAccountDisabledActionSsfRevocationActionRevokeAll SSFReceiverStreamServiceCreateRequestAccountDisabledAction = "SSF_REVOCATION_ACTION_REVOKE_ALL" + SSFReceiverStreamServiceCreateRequestAccountDisabledActionSsfRevocationActionLogOnly SSFReceiverStreamServiceCreateRequestAccountDisabledAction = "SSF_REVOCATION_ACTION_LOG_ONLY" +) + +func (e SSFReceiverStreamServiceCreateRequestAccountDisabledAction) ToPointer() *SSFReceiverStreamServiceCreateRequestAccountDisabledAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SSFReceiverStreamServiceCreateRequestAccountDisabledAction) IsExact() bool { + if e != nil { + switch *e { + case "SSF_REVOCATION_ACTION_UNSPECIFIED", "SSF_REVOCATION_ACTION_REVOKE_ALL", "SSF_REVOCATION_ACTION_LOG_ONLY": + return true + } + } + return false +} + +// SSFReceiverStreamServiceCreateRequestCredentialChangeAction - Action to take when a credential-change event is received. +type SSFReceiverStreamServiceCreateRequestCredentialChangeAction string + +const ( + SSFReceiverStreamServiceCreateRequestCredentialChangeActionSsfRevocationActionUnspecified SSFReceiverStreamServiceCreateRequestCredentialChangeAction = "SSF_REVOCATION_ACTION_UNSPECIFIED" + SSFReceiverStreamServiceCreateRequestCredentialChangeActionSsfRevocationActionRevokeAll SSFReceiverStreamServiceCreateRequestCredentialChangeAction = "SSF_REVOCATION_ACTION_REVOKE_ALL" + SSFReceiverStreamServiceCreateRequestCredentialChangeActionSsfRevocationActionLogOnly SSFReceiverStreamServiceCreateRequestCredentialChangeAction = "SSF_REVOCATION_ACTION_LOG_ONLY" +) + +func (e SSFReceiverStreamServiceCreateRequestCredentialChangeAction) ToPointer() *SSFReceiverStreamServiceCreateRequestCredentialChangeAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SSFReceiverStreamServiceCreateRequestCredentialChangeAction) IsExact() bool { + if e != nil { + switch *e { + case "SSF_REVOCATION_ACTION_UNSPECIFIED", "SSF_REVOCATION_ACTION_REVOKE_ALL", "SSF_REVOCATION_ACTION_LOG_ONLY": + return true + } + } + return false +} + +// SSFReceiverStreamServiceCreateRequestCredentialCompromiseAction - Action to take when a credential-compromise event is received. +type SSFReceiverStreamServiceCreateRequestCredentialCompromiseAction string + +const ( + SSFReceiverStreamServiceCreateRequestCredentialCompromiseActionSsfRevocationActionUnspecified SSFReceiverStreamServiceCreateRequestCredentialCompromiseAction = "SSF_REVOCATION_ACTION_UNSPECIFIED" + SSFReceiverStreamServiceCreateRequestCredentialCompromiseActionSsfRevocationActionRevokeAll SSFReceiverStreamServiceCreateRequestCredentialCompromiseAction = "SSF_REVOCATION_ACTION_REVOKE_ALL" + SSFReceiverStreamServiceCreateRequestCredentialCompromiseActionSsfRevocationActionLogOnly SSFReceiverStreamServiceCreateRequestCredentialCompromiseAction = "SSF_REVOCATION_ACTION_LOG_ONLY" +) + +func (e SSFReceiverStreamServiceCreateRequestCredentialCompromiseAction) ToPointer() *SSFReceiverStreamServiceCreateRequestCredentialCompromiseAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SSFReceiverStreamServiceCreateRequestCredentialCompromiseAction) IsExact() bool { + if e != nil { + switch *e { + case "SSF_REVOCATION_ACTION_UNSPECIFIED", "SSF_REVOCATION_ACTION_REVOKE_ALL", "SSF_REVOCATION_ACTION_LOG_ONLY": + return true + } + } + return false +} + +// SSFReceiverStreamServiceCreateRequestDeliveryMethod - Controls whether events are received via push or poll delivery. +type SSFReceiverStreamServiceCreateRequestDeliveryMethod string + +const ( + SSFReceiverStreamServiceCreateRequestDeliveryMethodSsfDeliveryMethodUnspecified SSFReceiverStreamServiceCreateRequestDeliveryMethod = "SSF_DELIVERY_METHOD_UNSPECIFIED" + SSFReceiverStreamServiceCreateRequestDeliveryMethodSsfDeliveryMethodPush SSFReceiverStreamServiceCreateRequestDeliveryMethod = "SSF_DELIVERY_METHOD_PUSH" + SSFReceiverStreamServiceCreateRequestDeliveryMethodSsfDeliveryMethodPoll SSFReceiverStreamServiceCreateRequestDeliveryMethod = "SSF_DELIVERY_METHOD_POLL" +) + +func (e SSFReceiverStreamServiceCreateRequestDeliveryMethod) ToPointer() *SSFReceiverStreamServiceCreateRequestDeliveryMethod { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SSFReceiverStreamServiceCreateRequestDeliveryMethod) IsExact() bool { + if e != nil { + switch *e { + case "SSF_DELIVERY_METHOD_UNSPECIFIED", "SSF_DELIVERY_METHOD_PUSH", "SSF_DELIVERY_METHOD_POLL": + return true + } + } + return false +} + +// SSFReceiverStreamServiceCreateRequestSessionRevokedAction - Per-event-type action configuration. +// +// Action to take when a session-revoked event is received. +type SSFReceiverStreamServiceCreateRequestSessionRevokedAction string + +const ( + SSFReceiverStreamServiceCreateRequestSessionRevokedActionSsfRevocationActionUnspecified SSFReceiverStreamServiceCreateRequestSessionRevokedAction = "SSF_REVOCATION_ACTION_UNSPECIFIED" + SSFReceiverStreamServiceCreateRequestSessionRevokedActionSsfRevocationActionRevokeAll SSFReceiverStreamServiceCreateRequestSessionRevokedAction = "SSF_REVOCATION_ACTION_REVOKE_ALL" + SSFReceiverStreamServiceCreateRequestSessionRevokedActionSsfRevocationActionLogOnly SSFReceiverStreamServiceCreateRequestSessionRevokedAction = "SSF_REVOCATION_ACTION_LOG_ONLY" +) + +func (e SSFReceiverStreamServiceCreateRequestSessionRevokedAction) ToPointer() *SSFReceiverStreamServiceCreateRequestSessionRevokedAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *SSFReceiverStreamServiceCreateRequestSessionRevokedAction) IsExact() bool { + if e != nil { + switch *e { + case "SSF_REVOCATION_ACTION_UNSPECIFIED", "SSF_REVOCATION_ACTION_REVOKE_ALL", "SSF_REVOCATION_ACTION_LOG_ONLY": + return true + } + } + return false +} + +// SSFReceiverStreamServiceCreateRequest contains the configuration for a new SSF receiver stream. +type SSFReceiverStreamServiceCreateRequest struct { + // Action to take when an account-disabled event is received. + AccountDisabledAction *SSFReceiverStreamServiceCreateRequestAccountDisabledAction `json:"accountDisabledAction,omitempty"` + // Action to take when a credential-change event is received. + CredentialChangeAction *SSFReceiverStreamServiceCreateRequestCredentialChangeAction `json:"credentialChangeAction,omitempty"` + // Action to take when a credential-compromise event is received. + CredentialCompromiseAction *SSFReceiverStreamServiceCreateRequestCredentialCompromiseAction `json:"credentialCompromiseAction,omitempty"` + // Controls whether events are received via push or poll delivery. + DeliveryMethod *SSFReceiverStreamServiceCreateRequestDeliveryMethod `json:"deliveryMethod,omitempty"` + // Optional description of the stream's purpose or source. + Description *string `json:"description,omitempty"` + // Human-readable name for the stream. + DisplayName string `json:"displayName"` + // Controls whether the stream starts processing events immediately after creation. + Enabled *bool `json:"enabled,omitempty"` + // Expected audience claim in incoming SETs. If set, SETs with a different audience are rejected. + ExpectedAudience *string `json:"expectedAudience,omitempty"` + // The issuer URL of the upstream SSF transmitter, used for token validation. + IssuerURL string `json:"issuerUrl"` + // URL to fetch the transmitter's JSON Web Key Set for SET signature verification. + JwksURL *string `json:"jwksUrl,omitempty"` + // URL of the transmitter's poll endpoint. Required when delivery_method is POLL. + PollEndpointURL *string `json:"pollEndpointUrl,omitempty"` + PollInterval *string `json:"pollInterval,omitempty"` + // Per-event-type action configuration. + // Action to take when a session-revoked event is received. + SessionRevokedAction *SSFReceiverStreamServiceCreateRequestSessionRevokedAction `json:"sessionRevokedAction,omitempty"` +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetAccountDisabledAction() *SSFReceiverStreamServiceCreateRequestAccountDisabledAction { + if s == nil { + return nil + } + return s.AccountDisabledAction +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetCredentialChangeAction() *SSFReceiverStreamServiceCreateRequestCredentialChangeAction { + if s == nil { + return nil + } + return s.CredentialChangeAction +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetCredentialCompromiseAction() *SSFReceiverStreamServiceCreateRequestCredentialCompromiseAction { + if s == nil { + return nil + } + return s.CredentialCompromiseAction +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetDeliveryMethod() *SSFReceiverStreamServiceCreateRequestDeliveryMethod { + if s == nil { + return nil + } + return s.DeliveryMethod +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetDescription() *string { + if s == nil { + return nil + } + return s.Description +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetDisplayName() string { + if s == nil { + return "" + } + return s.DisplayName +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetEnabled() *bool { + if s == nil { + return nil + } + return s.Enabled +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetExpectedAudience() *string { + if s == nil { + return nil + } + return s.ExpectedAudience +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetIssuerURL() string { + if s == nil { + return "" + } + return s.IssuerURL +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetJwksURL() *string { + if s == nil { + return nil + } + return s.JwksURL +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetPollEndpointURL() *string { + if s == nil { + return nil + } + return s.PollEndpointURL +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetPollInterval() *string { + if s == nil { + return nil + } + return s.PollInterval +} + +func (s *SSFReceiverStreamServiceCreateRequest) GetSessionRevokedAction() *SSFReceiverStreamServiceCreateRequestSessionRevokedAction { + if s == nil { + return nil + } + return s.SessionRevokedAction +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicecreateresponse.go new file mode 100644 index 00000000..729b3ca5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicecreateresponse.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverStreamServiceCreateResponse returns the created stream and the push auth token in plaintext. +type SSFReceiverStreamServiceCreateResponse struct { + // SSFReceiverStream is the public API representation. + // Secrets (push_auth_token, outbound credentials) are write-only. + // + // This message contains a oneof named outbound_auth. Only a single field of the following list may be set at a time: + // - outboundAuthBearer + // - outboundAuthOauth2 + // + SSFReceiverStream *SSFReceiverStream `json:"ssfReceiverStream,omitempty"` + // Push auth token returned in plaintext ONLY on create. + PushAuthTokenPlaintext *string `json:"pushAuthTokenPlaintext,omitempty"` +} + +func (s *SSFReceiverStreamServiceCreateResponse) GetSSFReceiverStream() *SSFReceiverStream { + if s == nil { + return nil + } + return s.SSFReceiverStream +} + +func (s *SSFReceiverStreamServiceCreateResponse) GetPushAuthTokenPlaintext() *string { + if s == nil { + return nil + } + return s.PushAuthTokenPlaintext +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicedeleterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicedeleterequest.go new file mode 100644 index 00000000..3906663b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicedeleterequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverStreamServiceDeleteRequest identifies the SSF receiver stream to delete. +type SSFReceiverStreamServiceDeleteRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicedeleteresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicedeleteresponse.go new file mode 100644 index 00000000..70b26cee --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicedeleteresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverStreamServiceDeleteResponse is empty on success. +type SSFReceiverStreamServiceDeleteResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicegetresponse.go new file mode 100644 index 00000000..02b77c4c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicegetresponse.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverStreamServiceGetResponse contains the requested SSF receiver stream. +type SSFReceiverStreamServiceGetResponse struct { + // SSFReceiverStream is the public API representation. + // Secrets (push_auth_token, outbound credentials) are write-only. + // + // This message contains a oneof named outbound_auth. Only a single field of the following list may be set at a time: + // - outboundAuthBearer + // - outboundAuthOauth2 + // + SSFReceiverStream *SSFReceiverStream `json:"ssfReceiverStream,omitempty"` +} + +func (s *SSFReceiverStreamServiceGetResponse) GetSSFReceiverStream() *SSFReceiverStream { + if s == nil { + return nil + } + return s.SSFReceiverStream +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicegetstatsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicegetstatsresponse.go new file mode 100644 index 00000000..aff4579d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicegetstatsresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverStreamServiceGetStatsResponse contains the event processing statistics for the stream. +type SSFReceiverStreamServiceGetStatsResponse struct { + // SSFReceiverStreamStats is a lightweight read-only stats object. + SSFReceiverStreamStats *SSFReceiverStreamStats `json:"stats,omitempty"` +} + +func (s *SSFReceiverStreamServiceGetStatsResponse) GetSSFReceiverStreamStats() *SSFReceiverStreamStats { + if s == nil { + return nil + } + return s.SSFReceiverStreamStats +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicelistresponse.go new file mode 100644 index 00000000..3ca22a98 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicelistresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverStreamServiceListResponse contains a page of SSF receiver streams. +type SSFReceiverStreamServiceListResponse struct { + // The SSF receiver streams in the current page. + List []SSFReceiverStream `json:"list,omitempty"` + // Token to retrieve the next page. Empty when there are no more results. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (s *SSFReceiverStreamServiceListResponse) GetList() []SSFReceiverStream { + if s == nil { + return nil + } + return s.List +} + +func (s *SSFReceiverStreamServiceListResponse) GetNextPageToken() *string { + if s == nil { + return nil + } + return s.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicetestrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicetestrequest.go new file mode 100644 index 00000000..3e85a90b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicetestrequest.go @@ -0,0 +1,20 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverStreamServiceTestRequest identifies the stream to test and an optional subject for identity resolution validation. +type SSFReceiverStreamServiceTestRequest struct { + // The upstream identifier to test resolution with. Typically an email address + // (e.g., "alice@company.com") — the same value the IdP would send in a SET subject. + // The Test RPC runs resolveSubject on this to verify the identity mapping works. + // Optional: upstream identifier (email) to test identity resolution. + // If empty, only JWKS reachability is tested. + TestSubject *string `json:"testSubject,omitempty"` +} + +func (s *SSFReceiverStreamServiceTestRequest) GetTestSubject() *string { + if s == nil { + return nil + } + return s.TestSubject +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicetestresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicetestresponse.go new file mode 100644 index 00000000..44b5e4b8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamservicetestresponse.go @@ -0,0 +1,127 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ConfiguredSessionRevokedAction - Step 3: Action preview. +// +// The action configured for session-revoked events on this stream. +type ConfiguredSessionRevokedAction string + +const ( + ConfiguredSessionRevokedActionSsfRevocationActionUnspecified ConfiguredSessionRevokedAction = "SSF_REVOCATION_ACTION_UNSPECIFIED" + ConfiguredSessionRevokedActionSsfRevocationActionRevokeAll ConfiguredSessionRevokedAction = "SSF_REVOCATION_ACTION_REVOKE_ALL" + ConfiguredSessionRevokedActionSsfRevocationActionLogOnly ConfiguredSessionRevokedAction = "SSF_REVOCATION_ACTION_LOG_ONLY" +) + +func (e ConfiguredSessionRevokedAction) ToPointer() *ConfiguredSessionRevokedAction { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *ConfiguredSessionRevokedAction) IsExact() bool { + if e != nil { + switch *e { + case "SSF_REVOCATION_ACTION_UNSPECIFIED", "SSF_REVOCATION_ACTION_REVOKE_ALL", "SSF_REVOCATION_ACTION_LOG_ONLY": + return true + } + } + return false +} + +// SSFReceiverStreamServiceTestResponse reports the results of the stream configuration test across JWKS, identity, and action readiness checks. +type SSFReceiverStreamServiceTestResponse struct { + // Number of active refresh tokens for the matched user that would be affected. + ActiveRefreshTokenCount *int `json:"activeRefreshTokenCount,omitempty"` + // Number of active sessions for the matched user that would be affected. + ActiveSessionCount *int `json:"activeSessionCount,omitempty"` + // Step 3: Action preview. + // The action configured for session-revoked events on this stream. + ConfiguredSessionRevokedAction *ConfiguredSessionRevokedAction `json:"configuredSessionRevokedAction,omitempty"` + // Step 2: Identity mapping. + // Whether the test subject was resolved to a ConductorOne user. + IdentityLinkFound *bool `json:"identityLinkFound,omitempty"` + // Error message if the JWKS endpoint could not be reached or returned invalid data. + JwksError *string `json:"jwksError,omitempty"` + // Number of signing keys found at the JWKS endpoint. + JwksKeyCount *int `json:"jwksKeyCount,omitempty"` + // Step 1: JWKS reachability. + // Whether the JWKS endpoint was reachable and returned valid keys. + JwksReachable *bool `json:"jwksReachable,omitempty"` + // The ConductorOne user ID the test subject maps to, if an identity link was found. + MatchedUserID *string `json:"matchedUserId,omitempty"` + // Overall readiness. + // Whether the stream passed all test checks and is ready to process events. + Ready *bool `json:"ready,omitempty"` + // The upstream IdP subject identifier (e.g., Okta user ID "00u1234") resolved from the test subject. + UpstreamSubject *string `json:"upstreamSubject,omitempty"` +} + +func (s *SSFReceiverStreamServiceTestResponse) GetActiveRefreshTokenCount() *int { + if s == nil { + return nil + } + return s.ActiveRefreshTokenCount +} + +func (s *SSFReceiverStreamServiceTestResponse) GetActiveSessionCount() *int { + if s == nil { + return nil + } + return s.ActiveSessionCount +} + +func (s *SSFReceiverStreamServiceTestResponse) GetConfiguredSessionRevokedAction() *ConfiguredSessionRevokedAction { + if s == nil { + return nil + } + return s.ConfiguredSessionRevokedAction +} + +func (s *SSFReceiverStreamServiceTestResponse) GetIdentityLinkFound() *bool { + if s == nil { + return nil + } + return s.IdentityLinkFound +} + +func (s *SSFReceiverStreamServiceTestResponse) GetJwksError() *string { + if s == nil { + return nil + } + return s.JwksError +} + +func (s *SSFReceiverStreamServiceTestResponse) GetJwksKeyCount() *int { + if s == nil { + return nil + } + return s.JwksKeyCount +} + +func (s *SSFReceiverStreamServiceTestResponse) GetJwksReachable() *bool { + if s == nil { + return nil + } + return s.JwksReachable +} + +func (s *SSFReceiverStreamServiceTestResponse) GetMatchedUserID() *string { + if s == nil { + return nil + } + return s.MatchedUserID +} + +func (s *SSFReceiverStreamServiceTestResponse) GetReady() *bool { + if s == nil { + return nil + } + return s.Ready +} + +func (s *SSFReceiverStreamServiceTestResponse) GetUpstreamSubject() *string { + if s == nil { + return nil + } + return s.UpstreamSubject +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamserviceupdaterequest.go new file mode 100644 index 00000000..63516629 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamserviceupdaterequest.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverStreamServiceUpdateRequest carries the stream to update and the mask of fields to modify. +type SSFReceiverStreamServiceUpdateRequest struct { + // SSFReceiverStream is the public API representation. + // Secrets (push_auth_token, outbound credentials) are write-only. + // + // This message contains a oneof named outbound_auth. Only a single field of the following list may be set at a time: + // - outboundAuthBearer + // - outboundAuthOauth2 + // + SSFReceiverStream *SSFReceiverStreamInput `json:"ssfReceiverStream,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` +} + +func (s *SSFReceiverStreamServiceUpdateRequest) GetSSFReceiverStream() *SSFReceiverStreamInput { + if s == nil { + return nil + } + return s.SSFReceiverStream +} + +func (s *SSFReceiverStreamServiceUpdateRequest) GetUpdateMask() *string { + if s == nil { + return nil + } + return s.UpdateMask +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamserviceupdateresponse.go new file mode 100644 index 00000000..845bd9eb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamserviceupdateresponse.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SSFReceiverStreamServiceUpdateResponse contains the updated SSF receiver stream. +type SSFReceiverStreamServiceUpdateResponse struct { + // SSFReceiverStream is the public API representation. + // Secrets (push_auth_token, outbound credentials) are write-only. + // + // This message contains a oneof named outbound_auth. Only a single field of the following list may be set at a time: + // - outboundAuthBearer + // - outboundAuthOauth2 + // + SSFReceiverStream *SSFReceiverStream `json:"ssfReceiverStream,omitempty"` +} + +func (s *SSFReceiverStreamServiceUpdateResponse) GetSSFReceiverStream() *SSFReceiverStream { + if s == nil { + return nil + } + return s.SSFReceiverStream +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamstats.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamstats.go new file mode 100644 index 00000000..633ca324 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/ssfreceiverstreamstats.go @@ -0,0 +1,110 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// SSFReceiverStreamStats is a lightweight read-only stats object. +type SSFReceiverStreamStats struct { + // Number of events that triggered an action (e.g., session revocation). + EventsActedOnCount *int64 `integer:"string" json:"eventsActedOnCount,omitempty"` + // Number of events that failed processing. + EventsFailedCount *int64 `integer:"string" json:"eventsFailedCount,omitempty"` + // Total number of events received on this stream. + EventsReceivedCount *int64 `integer:"string" json:"eventsReceivedCount,omitempty"` + LastErrorAt *time.Time `json:"lastErrorAt,omitempty"` + // Human-readable description of the most recent processing error. + LastErrorMessage *string `json:"lastErrorMessage,omitempty"` + LastEventReceivedAt *time.Time `json:"lastEventReceivedAt,omitempty"` + LastVerifiedAt *time.Time `json:"lastVerifiedAt,omitempty"` + // The SSF receiver stream these stats belong to. + StreamID *string `json:"streamId,omitempty"` + // Current status reported by the transmitter (e.g., "enabled", "paused"). + TransmitterStatus *string `json:"transmitterStatus,omitempty"` + // Reason provided by the transmitter for its current status. + TransmitterStatusReason *string `json:"transmitterStatusReason,omitempty"` +} + +func (s SSFReceiverStreamStats) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SSFReceiverStreamStats) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *SSFReceiverStreamStats) GetEventsActedOnCount() *int64 { + if s == nil { + return nil + } + return s.EventsActedOnCount +} + +func (s *SSFReceiverStreamStats) GetEventsFailedCount() *int64 { + if s == nil { + return nil + } + return s.EventsFailedCount +} + +func (s *SSFReceiverStreamStats) GetEventsReceivedCount() *int64 { + if s == nil { + return nil + } + return s.EventsReceivedCount +} + +func (s *SSFReceiverStreamStats) GetLastErrorAt() *time.Time { + if s == nil { + return nil + } + return s.LastErrorAt +} + +func (s *SSFReceiverStreamStats) GetLastErrorMessage() *string { + if s == nil { + return nil + } + return s.LastErrorMessage +} + +func (s *SSFReceiverStreamStats) GetLastEventReceivedAt() *time.Time { + if s == nil { + return nil + } + return s.LastEventReceivedAt +} + +func (s *SSFReceiverStreamStats) GetLastVerifiedAt() *time.Time { + if s == nil { + return nil + } + return s.LastVerifiedAt +} + +func (s *SSFReceiverStreamStats) GetStreamID() *string { + if s == nil { + return nil + } + return s.StreamID +} + +func (s *SSFReceiverStreamStats) GetTransmitterStatus() *string { + if s == nil { + return nil + } + return s.TransmitterStatus +} + +func (s *SSFReceiverStreamStats) GetTransmitterStatusReason() *string { + if s == nil { + return nil + } + return s.TransmitterStatusReason +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupmicrosoftsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupmicrosoftsettings.go index f1681853..23728f2c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupmicrosoftsettings.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupmicrosoftsettings.go @@ -2,12 +2,38 @@ package shared -// StepUpMicrosoftSettings represents a Microsoft Entra Provider using Conditional Access Policies to enforce step-up authentication. +// ValidationMode - Validation approach. See MicrosoftValidationMode for details on each mode. +type ValidationMode string + +const ( + ValidationModeMicrosoftValidationModeUnspecified ValidationMode = "MICROSOFT_VALIDATION_MODE_UNSPECIFIED" + ValidationModeMicrosoftValidationModeAcrs ValidationMode = "MICROSOFT_VALIDATION_MODE_ACRS" + ValidationModeMicrosoftValidationModeOidc ValidationMode = "MICROSOFT_VALIDATION_MODE_OIDC" +) + +func (e ValidationMode) ToPointer() *ValidationMode { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *ValidationMode) IsExact() bool { + if e != nil { + switch *e { + case "MICROSOFT_VALIDATION_MODE_UNSPECIFIED", "MICROSOFT_VALIDATION_MODE_ACRS", "MICROSOFT_VALIDATION_MODE_OIDC": + return true + } + } + return false +} + +// StepUpMicrosoftSettings configures a Microsoft Entra step-up provider using Conditional Access. type StepUpMicrosoftSettings struct { - // The conditionalAccessIds field. + // Authentication context IDs (C1-C99). Required for ACRS mode; ignored for OIDC mode. ConditionalAccessIds []string `json:"conditionalAccessIds,omitempty"` - // The tenant field. + // Microsoft Entra tenant ID (GUID or domain). Used for response validation. Tenant *string `json:"tenant,omitempty"` + // Validation approach. See MicrosoftValidationMode for details on each mode. + ValidationMode *ValidationMode `json:"validationMode,omitempty"` } func (s *StepUpMicrosoftSettings) GetConditionalAccessIds() []string { @@ -23,3 +49,10 @@ func (s *StepUpMicrosoftSettings) GetTenant() *string { } return s.Tenant } + +func (s *StepUpMicrosoftSettings) GetValidationMode() *ValidationMode { + if s == nil { + return nil + } + return s.ValidationMode +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupoauth2settings.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupoauth2settings.go index 7ee1e8a5..5212cb24 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupoauth2settings.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupoauth2settings.go @@ -22,3 +22,6 @@ func (s *StepUpOAuth2Settings) GetAcrValues() []string { } return s.AcrValues } + +// #region class-body-stepupoauth2settings +// #endregion class-body-stepupoauth2settings diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupprovider.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupprovider.go index d3c1d83d..a896fe9b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupprovider.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupprovider.go @@ -7,13 +7,13 @@ import ( "time" ) -// The StepUpProvider message. +// StepUpProvider represents a configured step-up authentication integration (e.g., Duo, custom OIDC). // // This message contains a oneof named settings. Only a single field of the following list may be set at a time: // - oauth2 // - microsoft type StepUpProvider struct { - // StepUpMicrosoftSettings represents a Microsoft Entra Provider using Conditional Access Policies to enforce step-up authentication. + // StepUpMicrosoftSettings configures a Microsoft Entra step-up provider using Conditional Access. StepUpMicrosoftSettings *StepUpMicrosoftSettings `json:"microsoft,omitempty"` // StepUpOAuth2Settings repersents an OAuth2 provider that supports RFC 9470 // @@ -25,16 +25,16 @@ type StepUpProvider struct { // - "phr" (okta) // - "phrh" (okta) StepUpOAuth2Settings *StepUpOAuth2Settings `json:"oauth2,omitempty"` - // The clientId field. + // The OAuth2 client ID used to authenticate with the step-up provider. ClientID *string `json:"clientId,omitempty"` CreatedAt *time.Time `json:"createdAt,omitempty"` - // The displayName field. + // The human-readable name of the step-up provider. DisplayName *string `json:"displayName,omitempty"` - // The enabled field. + // Whether the step-up provider is active and available for use. Enabled *bool `json:"enabled,omitempty"` - // The id field. + // The unique identifier of the step-up provider. ID *string `json:"id,omitempty"` - // The issuerUrl field. + // The OIDC issuer URL for the step-up provider. IssuerURL *string `json:"issuerUrl,omitempty"` LastTestedAt *time.Time `json:"lastTestedAt,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupproviderinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupproviderinput.go index 51058639..529ceb9e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupproviderinput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupproviderinput.go @@ -2,13 +2,13 @@ package shared -// StepUpProviderInput - The StepUpProvider message. +// StepUpProviderInput - StepUpProvider represents a configured step-up authentication integration (e.g., Duo, custom OIDC). // // This message contains a oneof named settings. Only a single field of the following list may be set at a time: // - oauth2 // - microsoft type StepUpProviderInput struct { - // StepUpMicrosoftSettings represents a Microsoft Entra Provider using Conditional Access Policies to enforce step-up authentication. + // StepUpMicrosoftSettings configures a Microsoft Entra step-up provider using Conditional Access. StepUpMicrosoftSettings *StepUpMicrosoftSettings `json:"microsoft,omitempty"` // StepUpOAuth2Settings repersents an OAuth2 provider that supports RFC 9470 // @@ -20,13 +20,13 @@ type StepUpProviderInput struct { // - "phr" (okta) // - "phrh" (okta) StepUpOAuth2Settings *StepUpOAuth2Settings `json:"oauth2,omitempty"` - // The clientId field. + // The OAuth2 client ID used to authenticate with the step-up provider. ClientID *string `json:"clientId,omitempty"` - // The displayName field. + // The human-readable name of the step-up provider. DisplayName *string `json:"displayName,omitempty"` - // The enabled field. + // Whether the step-up provider is active and available for use. Enabled *bool `json:"enabled,omitempty"` - // The issuerUrl field. + // The OIDC issuer URL for the step-up provider. IssuerURL *string `json:"issuerUrl,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupproviderref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupproviderref.go index 873191b0..42320779 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupproviderref.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stepupproviderref.go @@ -2,9 +2,9 @@ package shared -// The StepUpProviderRef message. +// StepUpProviderRef is a lightweight reference to a step-up authentication provider. type StepUpProviderRef struct { - // The id field. + // The unique identifier of the step-up provider. ID *string `json:"id,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/storecredential.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/storecredential.go new file mode 100644 index 00000000..711226df --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/storecredential.go @@ -0,0 +1,145 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// AuthType - Authentication type for the paper vault recipient (Paper Vault only) +type AuthType string + +const ( + AuthTypeStoreCredentialAuthTypeUnspecified AuthType = "STORE_CREDENTIAL_AUTH_TYPE_UNSPECIFIED" + AuthTypeStoreCredentialAuthTypeSsoInternal AuthType = "STORE_CREDENTIAL_AUTH_TYPE_SSO_INTERNAL" + AuthTypeStoreCredentialAuthTypeVerifyEmail AuthType = "STORE_CREDENTIAL_AUTH_TYPE_VERIFY_EMAIL" +) + +func (e AuthType) ToPointer() *AuthType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *AuthType) IsExact() bool { + if e != nil { + switch *e { + case "STORE_CREDENTIAL_AUTH_TYPE_UNSPECIFIED", "STORE_CREDENTIAL_AUTH_TYPE_SSO_INTERNAL", "STORE_CREDENTIAL_AUTH_TYPE_VERIFY_EMAIL": + return true + } + } + return false +} + +// VaultType - Vault type selector (default: PAPER_VAULT for backward compatibility) +type VaultType string + +const ( + VaultTypeStoreCredentialVaultTypeUnspecified VaultType = "STORE_CREDENTIAL_VAULT_TYPE_UNSPECIFIED" + VaultTypeStoreCredentialVaultTypePaperVault VaultType = "STORE_CREDENTIAL_VAULT_TYPE_PAPER_VAULT" + VaultTypeStoreCredentialVaultTypeAppVault VaultType = "STORE_CREDENTIAL_VAULT_TYPE_APP_VAULT" +) + +func (e VaultType) ToPointer() *VaultType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *VaultType) IsExact() bool { + if e != nil { + switch *e { + case "STORE_CREDENTIAL_VAULT_TYPE_UNSPECIFIED", "STORE_CREDENTIAL_VAULT_TYPE_PAPER_VAULT", "STORE_CREDENTIAL_VAULT_TYPE_APP_VAULT": + return true + } + } + return false +} + +// StoreCredential stores a credential from GeneratePassword in a vault. +// +// Supports Paper Vault (SSO/email) and App Vault (entitlement-bound). +type StoreCredential struct { + // CEL expression that resolves to app ID (App Vault only) + AppIDCel *string `json:"appIdCel,omitempty"` + // Authentication type for the paper vault recipient (Paper Vault only) + AuthType *AuthType `json:"authType,omitempty"` + // CEL expression that resolves to the encrypted credential from GeneratePassword + CredentialCel *string `json:"credentialCel,omitempty"` + Expiry *string `json:"expiry,omitempty"` + // Optional display label for the vault + LabelCel *string `json:"labelCel,omitempty"` + // Maximum number of views (0 = unlimited, default 1) (Paper Vault only) + MaxViews *int64 `json:"maxViews,omitempty"` + // CEL expression resolving to the C1 user ID of the recipient (SSO_INTERNAL / App Vault) + RecipientCel *string `json:"recipientCel,omitempty"` + // CEL expression resolving to a recipient email address (Paper Vault + VERIFY_EMAIL only) + RecipientEmailCel *string `json:"recipientEmailCel,omitempty"` + TTL *string `json:"ttl,omitempty"` + // Vault type selector (default: PAPER_VAULT for backward compatibility) + VaultType *VaultType `json:"vaultType,omitempty"` +} + +func (s *StoreCredential) GetAppIDCel() *string { + if s == nil { + return nil + } + return s.AppIDCel +} + +func (s *StoreCredential) GetAuthType() *AuthType { + if s == nil { + return nil + } + return s.AuthType +} + +func (s *StoreCredential) GetCredentialCel() *string { + if s == nil { + return nil + } + return s.CredentialCel +} + +func (s *StoreCredential) GetExpiry() *string { + if s == nil { + return nil + } + return s.Expiry +} + +func (s *StoreCredential) GetLabelCel() *string { + if s == nil { + return nil + } + return s.LabelCel +} + +func (s *StoreCredential) GetMaxViews() *int64 { + if s == nil { + return nil + } + return s.MaxViews +} + +func (s *StoreCredential) GetRecipientCel() *string { + if s == nil { + return nil + } + return s.RecipientCel +} + +func (s *StoreCredential) GetRecipientEmailCel() *string { + if s == nil { + return nil + } + return s.RecipientEmailCel +} + +func (s *StoreCredential) GetTTL() *string { + if s == nil { + return nil + } + return s.TTL +} + +func (s *StoreCredential) GetVaultType() *VaultType { + if s == nil { + return nil + } + return s.VaultType +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringfield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringfield.go index defa0d79..596a85eb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringfield.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringfield.go @@ -3,27 +3,7 @@ package shared // The StringField message. -// -// This message contains a oneof named view. Only a single field of the following list may be set at a time: -// - textField -// - passwordField -// - selectField -// - pickerField -// -// This message contains a oneof named _rules. Only a single field of the following list may be set at a time: -// - rules type StringField struct { - // The PasswordField message. - PasswordField *PasswordField `json:"passwordField,omitempty"` - // The PickerField message. - // - // This message contains a oneof named type. Only a single field of the following list may be set at a time: - // - appUserPicker - // - resourcePicker - // - PickerField *PickerField `json:"pickerField,omitempty"` - // The SelectField message. - SelectField *SelectField `json:"selectField,omitempty"` // StringRules describe the constraints applied to `string` values // // This message contains a oneof named well_known. Only a single field of the following list may be set at a time: @@ -38,34 +18,9 @@ type StringField struct { // - uuid // - wellKnownRegex // - StringRules *StringRules `json:"rules,omitempty"` - // The TextField message. - TextField *TextField `json:"textField,omitempty"` - // The defaultValue field. - DefaultValue *string `json:"defaultValue,omitempty"` - // The placeholder field. - Placeholder *string `json:"placeholder,omitempty"` -} - -func (s *StringField) GetPasswordField() *PasswordField { - if s == nil { - return nil - } - return s.PasswordField -} - -func (s *StringField) GetPickerField() *PickerField { - if s == nil { - return nil - } - return s.PickerField -} - -func (s *StringField) GetSelectField() *SelectField { - if s == nil { - return nil - } - return s.SelectField + StringRules *StringRules `json:"valueValidator,omitempty"` + // If secret, value is write-only in UI and a password-type form is used. + Secret *bool `json:"secret,omitempty"` } func (s *StringField) GetStringRules() *StringRules { @@ -75,23 +30,9 @@ func (s *StringField) GetStringRules() *StringRules { return s.StringRules } -func (s *StringField) GetTextField() *TextField { - if s == nil { - return nil - } - return s.TextField -} - -func (s *StringField) GetDefaultValue() *string { - if s == nil { - return nil - } - return s.DefaultValue -} - -func (s *StringField) GetPlaceholder() *string { +func (s *StringField) GetSecret() *bool { if s == nil { return nil } - return s.Placeholder + return s.Secret } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringmaprules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringmaprules.go new file mode 100644 index 00000000..35fc93dc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringmaprules.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The StringMapRules message. +type StringMapRules struct { + // The isRequired field. + IsRequired *bool `json:"isRequired,omitempty"` + // The validateEmpty field. + ValidateEmpty *bool `json:"validateEmpty,omitempty"` +} + +func (s *StringMapRules) GetIsRequired() *bool { + if s == nil { + return nil + } + return s.IsRequired +} + +func (s *StringMapRules) GetValidateEmpty() *bool { + if s == nil { + return nil + } + return s.ValidateEmpty +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringslicefield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringslicefield.go index ceb8afad..2898f862 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringslicefield.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/stringslicefield.go @@ -7,9 +7,6 @@ package shared // This message contains a oneof named view. Only a single field of the following list may be set at a time: // - chipsField // - pickerField -// -// This message contains a oneof named _rules. Only a single field of the following list may be set at a time: -// - rules type StringSliceField struct { // The ChipsField message. ChipsField *ChipsField `json:"chipsField,omitempty"` @@ -18,6 +15,7 @@ type StringSliceField struct { // This message contains a oneof named type. Only a single field of the following list may be set at a time: // - appUserPicker // - resourcePicker + // - c1UserPicker // PickerField *PickerField `json:"pickerField,omitempty"` // RepeatedRules describe the constraints applied to `repeated` values diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskaction1.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/submittedtaskaction.go similarity index 78% rename from vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskaction1.go rename to vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/submittedtaskaction.go index fc4a3de1..d00f9ae8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskaction1.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/submittedtaskaction.go @@ -7,7 +7,7 @@ import ( "time" ) -// ActionType - The actionType field. +// ActionType - The type of action that was performed. type ActionType string const ( @@ -55,86 +55,86 @@ func (e *ActionType) IsExact() bool { return false } -// TaskAction1 - The TaskAction message. -type TaskAction1 struct { - // The actionType field. +// SubmittedTaskAction - Represents a single action that was performed on a task. +type SubmittedTaskAction struct { + // The type of action that was performed. ActionType *ActionType `json:"actionType,omitempty"` - // The bulkActionId field. + // The ID of the bulk action this action belongs to, if it was part of a bulk operation. BulkActionID *string `json:"bulkActionId,omitempty"` CreatedAt *time.Time `json:"createdAt,omitempty"` DeletedAt *time.Time `json:"deletedAt,omitempty"` - // The id field. + // The unique ID of this action. ID *string `json:"id,omitempty"` - // The policyStepId field. + // The ID of the policy step this action was performed on. PolicyStepID *string `json:"policyStepId,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` - // The userId field. + // The ID of the user who performed the action. UserID *string `json:"userId,omitempty"` } -func (t TaskAction1) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(t, "", false) +func (s SubmittedTaskAction) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) } -func (t *TaskAction1) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil { +func (s *SubmittedTaskAction) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { return err } return nil } -func (t *TaskAction1) GetActionType() *ActionType { - if t == nil { +func (s *SubmittedTaskAction) GetActionType() *ActionType { + if s == nil { return nil } - return t.ActionType + return s.ActionType } -func (t *TaskAction1) GetBulkActionID() *string { - if t == nil { +func (s *SubmittedTaskAction) GetBulkActionID() *string { + if s == nil { return nil } - return t.BulkActionID + return s.BulkActionID } -func (t *TaskAction1) GetCreatedAt() *time.Time { - if t == nil { +func (s *SubmittedTaskAction) GetCreatedAt() *time.Time { + if s == nil { return nil } - return t.CreatedAt + return s.CreatedAt } -func (t *TaskAction1) GetDeletedAt() *time.Time { - if t == nil { +func (s *SubmittedTaskAction) GetDeletedAt() *time.Time { + if s == nil { return nil } - return t.DeletedAt + return s.DeletedAt } -func (t *TaskAction1) GetID() *string { - if t == nil { +func (s *SubmittedTaskAction) GetID() *string { + if s == nil { return nil } - return t.ID + return s.ID } -func (t *TaskAction1) GetPolicyStepID() *string { - if t == nil { +func (s *SubmittedTaskAction) GetPolicyStepID() *string { + if s == nil { return nil } - return t.PolicyStepID + return s.PolicyStepID } -func (t *TaskAction1) GetUpdatedAt() *time.Time { - if t == nil { +func (s *SubmittedTaskAction) GetUpdatedAt() *time.Time { + if s == nil { return nil } - return t.UpdatedAt + return s.UpdatedAt } -func (t *TaskAction1) GetUserID() *string { - if t == nil { +func (s *SubmittedTaskAction) GetUserID() *string { + if s == nil { return nil } - return t.UserID + return s.UserID } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/suppressroutingaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/suppressroutingaction.go new file mode 100644 index 00000000..ffd53c14 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/suppressroutingaction.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The SuppressRoutingAction message. +type SuppressRoutingAction struct { + // The reason field. + Reason *string `json:"reason,omitempty"` +} + +func (s *SuppressRoutingAction) GetReason() *string { + if s == nil { + return nil + } + return s.Reason +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/suppressstateaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/suppressstateaction.go new file mode 100644 index 00000000..2f50b58b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/suppressstateaction.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// SuppressStateAction parameters for UpdateFindingState. +type SuppressStateAction struct { + // The reason field. + Reason *string `json:"reason,omitempty"` +} + +func (s *SuppressStateAction) GetReason() *string { + if s == nil { + return nil + } + return s.Reason +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/systemlogservicelisteventsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/systemlogservicelisteventsrequest.go index d00f62f8..6f9cad80 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/systemlogservicelisteventsrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/systemlogservicelisteventsrequest.go @@ -43,6 +43,8 @@ type SystemLogServiceListEventsRequest struct { // The sortDirection field. SortDirection *SortDirection `json:"sortDirection,omitempty"` Until *time.Time `json:"until,omitempty"` + // The untilEventUid field. + UntilEventUID *string `json:"untilEventUid,omitempty"` } func (s SystemLogServiceListEventsRequest) MarshalJSON() ([]byte, error) { @@ -97,3 +99,10 @@ func (s *SystemLogServiceListEventsRequest) GetUntil() *time.Time { } return s.Until } + +func (s *SystemLogServiceListEventsRequest) GetUntilEventUID() *string { + if s == nil { + return nil + } + return s.UntilEventUID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/task.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/task.go index 867cb78c..6582b929 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/task.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/task.go @@ -103,6 +103,7 @@ const ( OriginTaskOriginProfileMembership Origin = "TASK_ORIGIN_PROFILE_MEMBERSHIP" OriginTaskOriginAutomation Origin = "TASK_ORIGIN_AUTOMATION" OriginTaskOriginAccessReview Origin = "TASK_ORIGIN_ACCESS_REVIEW" + OriginTaskOriginCascadeDelete Origin = "TASK_ORIGIN_CASCADE_DELETE" ) func (e Origin) ToPointer() *Origin { @@ -113,7 +114,7 @@ func (e Origin) ToPointer() *Origin { func (e *Origin) IsExact() bool { if e != nil { switch *e { - case "TASK_ORIGIN_UNSPECIFIED", "TASK_ORIGIN_PROFILE_MEMBERSHIP_AUTOMATION", "TASK_ORIGIN_SLACK", "TASK_ORIGIN_API", "TASK_ORIGIN_JIRA", "TASK_ORIGIN_COPILOT", "TASK_ORIGIN_WEBAPP", "TASK_ORIGIN_TIME_REVOKE", "TASK_ORIGIN_NON_USAGE_REVOKE", "TASK_ORIGIN_PROFILE_MEMBERSHIP_MANUAL", "TASK_ORIGIN_PROFILE_MEMBERSHIP", "TASK_ORIGIN_AUTOMATION", "TASK_ORIGIN_ACCESS_REVIEW": + case "TASK_ORIGIN_UNSPECIFIED", "TASK_ORIGIN_PROFILE_MEMBERSHIP_AUTOMATION", "TASK_ORIGIN_SLACK", "TASK_ORIGIN_API", "TASK_ORIGIN_JIRA", "TASK_ORIGIN_COPILOT", "TASK_ORIGIN_WEBAPP", "TASK_ORIGIN_TIME_REVOKE", "TASK_ORIGIN_NON_USAGE_REVOKE", "TASK_ORIGIN_PROFILE_MEMBERSHIP_MANUAL", "TASK_ORIGIN_PROFILE_MEMBERSHIP", "TASK_ORIGIN_AUTOMATION", "TASK_ORIGIN_ACCESS_REVIEW", "TASK_ORIGIN_CASCADE_DELETE": return true } } @@ -196,10 +197,10 @@ func (e *TaskState) IsExact() bool { // Task - A fully-fleged task object. Includes its policy, references to external apps, its type, its processing history, and more. type Task struct { - // A form is a collection of fields to be filled out by a user - Form *FormInput `json:"form,omitempty"` // A policy instance is an object that contains a reference to the policy it was created from, the currently executing step, the next steps, and the history of previously completed steps. PolicyInstance *PolicyInstance `json:"policy,omitempty"` + // A form is a collection of fields to be filled out by a user + RequestSchemaForm *RequestSchemaForm `json:"form,omitempty"` // Task Type provides configuration for the type of task: certify, grant, or revoke // // This message contains a oneof named task_type. Only a single field of the following list may be set at a time: @@ -208,6 +209,7 @@ type Task struct { // - certify // - offboarding // - action + // - finding // TaskType *TaskType `json:"type,omitempty"` // The actions that can be performed on the task by the current user. @@ -216,6 +218,8 @@ type Task struct { AnalysisID *string `json:"analysisId,omitempty"` // An array of `google.protobuf.Any` annotations with various base64-encoded data. Annotations []Annotations `json:"annotations,omitempty"` + // An array of IDs belonging to Identity Users that have approved or denied any step in this task. + ApproverIds []string `json:"approverIds,omitempty"` // The count of comments. CommentCount *int `json:"commentCount,omitempty"` CreatedAt *time.Time `json:"createdAt,omitempty"` @@ -245,6 +249,9 @@ type Task struct { Processing *Processing `json:"processing,omitempty"` // The recommendation field. Recommendation *Recommendation `json:"recommendation,omitempty"` + // Ancestor entitlements that will also be revoked when this revoke task is approved. + // Populated at ticket creation time for inherited grant revocations. + RevocationTargets []TaskRevocationTarget `json:"revocationTargets,omitempty"` // The current state of the task as defined by the `state_enum` State *TaskState `json:"state,omitempty"` // An array of IDs belonging to Identity Users that are allowed to review this step in a task. @@ -265,18 +272,18 @@ func (t *Task) UnmarshalJSON(data []byte) error { return nil } -func (t *Task) GetForm() *FormInput { +func (t *Task) GetPolicyInstance() *PolicyInstance { if t == nil { return nil } - return t.Form + return t.PolicyInstance } -func (t *Task) GetPolicyInstance() *PolicyInstance { +func (t *Task) GetRequestSchemaForm() *RequestSchemaForm { if t == nil { return nil } - return t.PolicyInstance + return t.RequestSchemaForm } func (t *Task) GetTaskType() *TaskType { @@ -307,6 +314,13 @@ func (t *Task) GetAnnotations() []Annotations { return t.Annotations } +func (t *Task) GetApproverIds() []string { + if t == nil { + return nil + } + return t.ApproverIds +} + func (t *Task) GetCommentCount() *int { if t == nil { return nil @@ -419,6 +433,13 @@ func (t *Task) GetRecommendation() *Recommendation { return t.Recommendation } +func (t *Task) GetRevocationTargets() []TaskRevocationTarget { + if t == nil { + return nil + } + return t.RevocationTargets +} + func (t *Task) GetState() *TaskState { if t == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactioninstance.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactioninstance.go new file mode 100644 index 00000000..614ad63d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactioninstance.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// TaskActionInstance - ActionInstance is the API mirror of the internal immutable snapshot of an +// +// Action captured on a TaskTypeAction at ticket-creation time. +// +// This message contains a oneof named target_ref. Only a single field of the following list may be set at a time: +// - connectorActionRef +type TaskActionInstance struct { + // ConnectorActionRef describes dispatch through a connector's built-in + // GrantManagerService Grant / Revoke RPC — i.e. the default connector + // operation, used for synthesized tickets like scope-role requests. + ConnectorActionRef *ConnectorActionRef `json:"connectorActionRef,omitempty"` + // Display label at ticket-creation time. Same value as + // TaskTypeAction.display_name; repeated here so clients that walk the + // instance see a self-contained view. + DisplayName *string `json:"displayName,omitempty"` +} + +func (t *TaskActionInstance) GetConnectorActionRef() *ConnectorActionRef { + if t == nil { + return nil + } + return t.ConnectorActionRef +} + +func (t *TaskActionInstance) GetDisplayName() *string { + if t == nil { + return nil + } + return t.DisplayName +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactioninstanceinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactioninstanceinput.go new file mode 100644 index 00000000..57a47f6d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactioninstanceinput.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// TaskActionInstanceInput - ActionInstance is the API mirror of the internal immutable snapshot of an +// +// Action captured on a TaskTypeAction at ticket-creation time. +// +// This message contains a oneof named target_ref. Only a single field of the following list may be set at a time: +// - connectorActionRef +type TaskActionInstanceInput struct { + // ConnectorActionRef describes dispatch through a connector's built-in + // GrantManagerService Grant / Revoke RPC — i.e. the default connector + // operation, used for synthesized tickets like scope-role requests. + ConnectorActionRef *ConnectorActionRefInput `json:"connectorActionRef,omitempty"` +} + +func (t *TaskActionInstanceInput) GetConnectorActionRef() *ConnectorActionRefInput { + if t == nil { + return nil + } + return t.ConnectorActionRef +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceapproveresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceapproveresponse.go index a2e79b52..e613c4c1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceapproveresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceapproveresponse.go @@ -44,7 +44,7 @@ type TaskActionsServiceApproveResponse struct { TaskView *TaskView `json:"taskView,omitempty"` // List of serialized related objects. Expanded []TaskActionsServiceApproveResponseExpanded `json:"expanded,omitempty"` - // The ID of the ticket (task) approve action created by this request. + // The ID of the task approve action created by this request. TicketActionID *string `json:"ticketActionId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceapprovewithstepupresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceapprovewithstepupresponse.go index e55fb0e8..25072565 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceapprovewithstepupresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceapprovewithstepupresponse.go @@ -46,7 +46,7 @@ type TaskActionsServiceApproveWithStepUpResponse struct { Expanded []TaskActionsServiceApproveWithStepUpResponseExpanded `json:"expanded,omitempty"` // The redirect URL the client must visit to complete the step-up authentication. RedirectURL *string `json:"redirectUrl,omitempty"` - // The ID of the ticket (task) approve action created by this request. + // The ID of the task approve action created by this request. TicketActionID *string `json:"ticketActionId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicecloserequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicecloserequest.go index f26907a1..8a9c9f42 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicecloserequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicecloserequest.go @@ -6,7 +6,7 @@ package shared type TaskActionsServiceCloseRequest struct { // The task expand mask is an array of strings that specifes the related objects the requester wishes to have returned when making a request where the expand mask is part of the input. Use '*' to view all possible responses. TaskExpandMask *TaskExpandMask `json:"expandMask,omitempty"` - // The comment field. + // An optional comment attached to the close action. Comment *string `json:"comment,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicecommentrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicecommentrequest.go index 57a0e21b..ceccf374 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicecommentrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicecommentrequest.go @@ -6,7 +6,7 @@ package shared type TaskActionsServiceCommentRequest struct { // The task expand mask is an array of strings that specifes the related objects the requester wishes to have returned when making a request where the expand mask is part of the input. Use '*' to view all possible responses. TaskExpandMask *TaskExpandMask `json:"expandMask,omitempty"` - // The comment to be posted to the ticket + // The comment to be posted to the task. Comment *string `json:"comment,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicedenyrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicedenyrequest.go index 50184223..396bc506 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicedenyrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicedenyrequest.go @@ -8,7 +8,7 @@ type TaskActionsServiceDenyRequest struct { TaskExpandMask *TaskExpandMask `json:"expandMask,omitempty"` // The comment attached to the request. Comment *string `json:"comment,omitempty"` - // The ID of the currently policy step. This is the step you want to deny. + // The ID of the current policy step. This is the step you want to deny. PolicyStepID *string `json:"policyStepId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicedenyresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicedenyresponse.go index 32f21a76..17ab8d5c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicedenyresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicedenyresponse.go @@ -44,7 +44,7 @@ type TaskActionsServiceDenyResponse struct { TaskView *TaskView `json:"taskView,omitempty"` // List of serialized related objects. Expanded []TaskActionsServiceDenyResponseExpanded `json:"expanded,omitempty"` - // The ID of the ticket (task) deny action created by this request. + // The ID of the task deny action created by this request. TicketActionID *string `json:"ticketActionId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceescalatetoemergencyaccessrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceescalatetoemergencyaccessrequest.go index 278b1c1c..5e063912 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceescalatetoemergencyaccessrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceescalatetoemergencyaccessrequest.go @@ -2,13 +2,13 @@ package shared -// The TaskActionsServiceEscalateToEmergencyAccessRequest message. +// The TaskActionsServiceEscalateToEmergencyAccessRequest object lets you escalate a task to the emergency access workflow. type TaskActionsServiceEscalateToEmergencyAccessRequest struct { // The task expand mask is an array of strings that specifes the related objects the requester wishes to have returned when making a request where the expand mask is part of the input. Use '*' to view all possible responses. TaskExpandMask *TaskExpandMask `json:"expandMask,omitempty"` - // The comment field. + // An optional comment attached to the escalation. Comment *string `json:"comment,omitempty"` - // The policyStepId field. + // The ID of the current policy step being escalated from. PolicyStepID *string `json:"policyStepId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicehardresetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicehardresetresponse.go index caa391d2..0e3e266b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicehardresetresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicehardresetresponse.go @@ -38,13 +38,13 @@ func (t *TaskActionsServiceHardResetResponseExpanded) GetAdditionalProperties() return t.AdditionalProperties } -// The TaskActionsServiceHardResetResponse message. +// The TaskActionsServiceHardResetResponse returns the updated task after a hard reset. type TaskActionsServiceHardResetResponse struct { // Contains a task and JSONPATH expressions that describe where in the expanded array related objects are located. This view can be used to display a fully-detailed dashboard of task information. TaskView *TaskView `json:"taskView,omitempty"` - // The expanded field. + // List of serialized related objects. Expanded []TaskActionsServiceHardResetResponseExpanded `json:"expanded,omitempty"` - // The ticketActionId field. + // The ID of the task reset action created by this request. TicketActionID *string `json:"ticketActionId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceprocessnowresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceprocessnowresponse.go index 65580bd9..cc8ed004 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceprocessnowresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceprocessnowresponse.go @@ -38,11 +38,11 @@ func (t *TaskActionsServiceProcessNowResponseExpanded) GetAdditionalProperties() return t.AdditionalProperties } -// The TaskActionsServiceProcessNowResponse message. +// The TaskActionsServiceProcessNowResponse returns the task view after triggering immediate processing. type TaskActionsServiceProcessNowResponse struct { // Contains a task and JSONPATH expressions that describe where in the expanded array related objects are located. This view can be used to display a fully-detailed dashboard of task information. TaskView *TaskView `json:"taskView,omitempty"` - // The expanded field. + // List of serialized related objects. Expanded []TaskActionsServiceProcessNowResponseExpanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicereassignrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicereassignrequest.go index 639c4bd7..0ad4a4c6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicereassignrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicereassignrequest.go @@ -2,15 +2,15 @@ package shared -// The TaskActionsServiceReassignRequest message. +// The TaskActionsServiceReassignRequest object lets you reassign a task's current policy step to different users. type TaskActionsServiceReassignRequest struct { // The task expand mask is an array of strings that specifes the related objects the requester wishes to have returned when making a request where the expand mask is part of the input. Use '*' to view all possible responses. TaskExpandMask *TaskExpandMask `json:"expandMask,omitempty"` - // The comment field. + // An optional comment attached to the reassignment. Comment *string `json:"comment,omitempty"` - // The newStepUserIds field. + // The IDs of the users to reassign the current policy step to. Must be from the allowed reassignees list. NewStepUserIds []string `json:"newStepUserIds,omitempty"` - // The policyStepId field. + // The ID of the current policy step to reassign. Must match the task's active step. PolicyStepID *string `json:"policyStepId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicereassignresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicereassignresponse.go index 06c79902..2f9e1bf0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicereassignresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicereassignresponse.go @@ -44,7 +44,7 @@ type TaskActionsServiceReassignResponse struct { TaskView *TaskView `json:"taskView,omitempty"` // List of serialized related objects. Expanded []TaskActionsServiceReassignResponseExpanded `json:"expanded,omitempty"` - // The ID of the ticket (task) deny action created by this request. + // The ID of the task reassign action created by this request. TicketActionID *string `json:"ticketActionId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicerestartrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicerestartrequest.go index 72aecd85..3d8fbc19 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicerestartrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicerestartrequest.go @@ -8,7 +8,7 @@ type TaskActionsServiceRestartRequest struct { TaskExpandMask *TaskExpandMask `json:"expandMask,omitempty"` // The comment attached to the request. Comment *string `json:"comment,omitempty"` - // The ID of the policy step on the given task to restart. + // Deprecated. This field is accepted but does not affect behavior. PolicyStepID *string `json:"policyStepId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicerestartresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicerestartresponse.go index 9de0497a..c5572dba 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicerestartresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsservicerestartresponse.go @@ -38,13 +38,13 @@ func (t *TaskActionsServiceRestartResponseExpanded) GetAdditionalProperties() ma return t.AdditionalProperties } -// The TaskActionsServiceRestartResponse message. +// The TaskActionsServiceRestartResponse returns the updated task after restarting. type TaskActionsServiceRestartResponse struct { // Contains a task and JSONPATH expressions that describe where in the expanded array related objects are located. This view can be used to display a fully-detailed dashboard of task information. TaskView *TaskView `json:"taskView,omitempty"` - // The expanded field. + // List of serialized related objects. Expanded []TaskActionsServiceRestartResponseExpanded `json:"expanded,omitempty"` - // The ticketActionId field. + // The ID of the task restart action created by this request. TicketActionID *string `json:"ticketActionId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceupdategrantdurationrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceupdategrantdurationrequest.go index fce87653..a1867b70 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceupdategrantdurationrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceupdategrantdurationrequest.go @@ -2,7 +2,7 @@ package shared -// The TaskActionsServiceUpdateGrantDurationRequest message. +// The TaskActionsServiceUpdateGrantDurationRequest object lets you change the grant duration on a grant task. type TaskActionsServiceUpdateGrantDurationRequest struct { // The task expand mask is an array of strings that specifes the related objects the requester wishes to have returned when making a request where the expand mask is part of the input. Use '*' to view all possible responses. TaskExpandMask *TaskExpandMask `json:"expandMask,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceupdaterequestdatarequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceupdaterequestdatarequest.go index edf71991..f139f727 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceupdaterequestdatarequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskactionsserviceupdaterequestdatarequest.go @@ -2,7 +2,7 @@ package shared -// The TaskActionsServiceUpdateRequestDataRequest message. +// The TaskActionsServiceUpdateRequestDataRequest object lets you submit form data for a task that is in a form policy step. type TaskActionsServiceUpdateRequestDataRequest struct { // The task expand mask is an array of strings that specifes the related objects the requester wishes to have returned when making a request where the expand mask is part of the input. Use '*' to view all possible responses. TaskExpandMask *TaskExpandMask `json:"expandMask,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditaccessrequestoutcome.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditaccessrequestoutcome.go index b4873ea5..877e83f1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditaccessrequestoutcome.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditaccessrequestoutcome.go @@ -2,23 +2,23 @@ package shared -// Outcome - The outcome field. -type Outcome string +// TaskAuditAccessRequestOutcomeOutcome - The outcome field. +type TaskAuditAccessRequestOutcomeOutcome string const ( - OutcomeAccessRequestOutcomeUnspecified Outcome = "ACCESS_REQUEST_OUTCOME_UNSPECIFIED" - OutcomeAccessRequestOutcomeApproved Outcome = "ACCESS_REQUEST_OUTCOME_APPROVED" - OutcomeAccessRequestOutcomeDenied Outcome = "ACCESS_REQUEST_OUTCOME_DENIED" - OutcomeAccessRequestOutcomeError Outcome = "ACCESS_REQUEST_OUTCOME_ERROR" - OutcomeAccessRequestOutcomeCancelled Outcome = "ACCESS_REQUEST_OUTCOME_CANCELLED" + TaskAuditAccessRequestOutcomeOutcomeAccessRequestOutcomeUnspecified TaskAuditAccessRequestOutcomeOutcome = "ACCESS_REQUEST_OUTCOME_UNSPECIFIED" + TaskAuditAccessRequestOutcomeOutcomeAccessRequestOutcomeApproved TaskAuditAccessRequestOutcomeOutcome = "ACCESS_REQUEST_OUTCOME_APPROVED" + TaskAuditAccessRequestOutcomeOutcomeAccessRequestOutcomeDenied TaskAuditAccessRequestOutcomeOutcome = "ACCESS_REQUEST_OUTCOME_DENIED" + TaskAuditAccessRequestOutcomeOutcomeAccessRequestOutcomeError TaskAuditAccessRequestOutcomeOutcome = "ACCESS_REQUEST_OUTCOME_ERROR" + TaskAuditAccessRequestOutcomeOutcomeAccessRequestOutcomeCancelled TaskAuditAccessRequestOutcomeOutcome = "ACCESS_REQUEST_OUTCOME_CANCELLED" ) -func (e Outcome) ToPointer() *Outcome { +func (e TaskAuditAccessRequestOutcomeOutcome) ToPointer() *TaskAuditAccessRequestOutcomeOutcome { return &e } // IsExact returns true if the value matches a known enum value, false otherwise. -func (e *Outcome) IsExact() bool { +func (e *TaskAuditAccessRequestOutcomeOutcome) IsExact() bool { if e != nil { switch *e { case "ACCESS_REQUEST_OUTCOME_UNSPECIFIED", "ACCESS_REQUEST_OUTCOME_APPROVED", "ACCESS_REQUEST_OUTCOME_DENIED", "ACCESS_REQUEST_OUTCOME_ERROR", "ACCESS_REQUEST_OUTCOME_CANCELLED": @@ -31,10 +31,10 @@ func (e *Outcome) IsExact() bool { // The TaskAuditAccessRequestOutcome message. type TaskAuditAccessRequestOutcome struct { // The outcome field. - Outcome *Outcome `json:"outcome,omitempty"` + Outcome *TaskAuditAccessRequestOutcomeOutcome `json:"outcome,omitempty"` } -func (t *TaskAuditAccessRequestOutcome) GetOutcome() *Outcome { +func (t *TaskAuditAccessRequestOutcome) GetOutcome() *TaskAuditAccessRequestOutcomeOutcome { if t == nil { return nil } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancecreated.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancecreated.go index 86344056..2d8b5c7b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancecreated.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancecreated.go @@ -8,6 +8,8 @@ type TaskAuditActionInstanceCreated struct { // // This message contains a oneof named target_instance. Only a single field of the following list may be set at a time: // - automation + // - batonResourceActionInstance + // - clientIdApprovalInstance // // // This message contains a oneof named outcome. Only a single field of the following list may be set at a time: diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancefailed.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancefailed.go index e1f8e628..2ef8a464 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancefailed.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancefailed.go @@ -8,6 +8,8 @@ type TaskAuditActionInstanceFailed struct { // // This message contains a oneof named target_instance. Only a single field of the following list may be set at a time: // - automation + // - batonResourceActionInstance + // - clientIdApprovalInstance // // // This message contains a oneof named outcome. Only a single field of the following list may be set at a time: diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancesucceeded.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancesucceeded.go index f04faf4d..6bc4e61c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancesucceeded.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactioninstancesucceeded.go @@ -8,6 +8,8 @@ type TaskAuditActionInstanceSucceeded struct { // // This message contains a oneof named target_instance. Only a single field of the following list may be set at a time: // - automation + // - batonResourceActionInstance + // - clientIdApprovalInstance // // // This message contains a oneof named outcome. Only a single field of the following list may be set at a time: diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactionsubmitted.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactionsubmitted.go index fbc0ebb1..987444d0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactionsubmitted.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditactionsubmitted.go @@ -4,13 +4,13 @@ package shared // The TaskAuditActionSubmitted message. type TaskAuditActionSubmitted struct { - // The TaskAction message. - TaskAction *TaskAction1 `json:"action,omitempty"` + // Represents a single action that was performed on a task. + SubmittedTaskAction *SubmittedTaskAction `json:"action,omitempty"` } -func (t *TaskAuditActionSubmitted) GetTaskAction() *TaskAction1 { +func (t *TaskAuditActionSubmitted) GetSubmittedTaskAction() *SubmittedTaskAction { if t == nil { return nil } - return t.TaskAction + return t.SubmittedTaskAction } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditcancelledresult.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditcancelledresult.go index d354d5bd..e051bd28 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditcancelledresult.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditcancelledresult.go @@ -4,4 +4,15 @@ package shared // The TaskAuditCancelledResult message. type TaskAuditCancelledResult struct { + // Human-readable reason the action was cancelled. Already populated on the + // model-side CanceledResult (e.g., "action is invalid - ticket is closed"); + // this surfaces it to the UI. + CancelReason *string `json:"cancelReason,omitempty"` +} + +func (t *TaskAuditCancelledResult) GetCancelReason() *string { + if t == nil { + return nil + } + return t.CancelReason } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditconnectoractionresult.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditconnectoractionresult.go index 86c1e4fb..16c443f7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditconnectoractionresult.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditconnectoractionresult.go @@ -8,11 +8,14 @@ package shared // - success // - error // - cancelled +// - pending type TaskAuditConnectorActionResult struct { // The TaskAuditCancelledResult message. TaskAuditCancelledResult *TaskAuditCancelledResult `json:"cancelled,omitempty"` // The TaskAuditErrorResult message. TaskAuditErrorResult *TaskAuditErrorResult `json:"error,omitempty"` + // The TaskAuditPendingResult message. + TaskAuditPendingResult *TaskAuditPendingResult `json:"pending,omitempty"` // The TaskAuditSuccessResult message. TaskAuditSuccessResult *TaskAuditSuccessResult `json:"success,omitempty"` // The appEntitlementId field. @@ -39,6 +42,13 @@ func (t *TaskAuditConnectorActionResult) GetTaskAuditErrorResult() *TaskAuditErr return t.TaskAuditErrorResult } +func (t *TaskAuditConnectorActionResult) GetTaskAuditPendingResult() *TaskAuditPendingResult { + if t == nil { + return nil + } + return t.TaskAuditPendingResult +} + func (t *TaskAuditConnectorActionResult) GetTaskAuditSuccessResult() *TaskAuditSuccessResult { if t == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditcreatedreplacementextensiongranttask.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditcreatedreplacementextensiongranttask.go new file mode 100644 index 00000000..39b9d820 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditcreatedreplacementextensiongranttask.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + +// TaskAuditCreatedReplacementExtensionGrantTask is used when a replacement extension grant task is created +// +// (e.g. when an extension grant task is cancelled due to app user deletion). +type TaskAuditCreatedReplacementExtensionGrantTask struct { + // The ID of the newly created replacement task + NewTaskID *string `json:"newTaskId,omitempty"` + // The numeric ID of the newly created replacement task (for display) + NewTaskNumericID *int64 `integer:"string" json:"newTaskNumericId,omitempty"` +} + +func (t TaskAuditCreatedReplacementExtensionGrantTask) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TaskAuditCreatedReplacementExtensionGrantTask) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil { + return err + } + return nil +} + +func (t *TaskAuditCreatedReplacementExtensionGrantTask) GetNewTaskID() *string { + if t == nil { + return nil + } + return t.NewTaskID +} + +func (t *TaskAuditCreatedReplacementExtensionGrantTask) GetNewTaskNumericID() *int64 { + if t == nil { + return nil + } + return t.NewTaskNumericID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditerrorresult.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditerrorresult.go index 5c5fe004..30f2e3f7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditerrorresult.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditerrorresult.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // The TaskAuditErrorResult message. type TaskAuditErrorResult struct { // TODO(pquerna): expand @@ -10,6 +14,17 @@ type TaskAuditErrorResult struct { ErrorReason *string `json:"errorReason,omitempty"` } +func (t TaskAuditErrorResult) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TaskAuditErrorResult) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil { + return err + } + return nil +} + func (t *TaskAuditErrorResult) GetErrorCount() *int64 { if t == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditlistrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditlistrequest.go index ad51e90e..8e0a4055 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditlistrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditlistrequest.go @@ -4,13 +4,13 @@ package shared // The TaskAuditListRequest message. type TaskAuditListRequest struct { - // The pageSize field. + // The maximum number of audit events to return per page. PageSize *int `json:"pageSize,omitempty"` - // The pageToken field. + // A pagination token from a previous response to retrieve the next page. PageToken *string `json:"pageToken,omitempty"` - // The refs field. + // References to specific audit events to retrieve. If provided, only these events are returned. Refs []TaskAuditViewRef `json:"refs,omitempty"` - // The taskId field. + // The ID of the task to list audit events for. TaskID *string `json:"taskId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditlistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditlistresponse.go index b3150741..eef51213 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditlistresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditlistresponse.go @@ -4,9 +4,9 @@ package shared // The TaskAuditListResponse message. type TaskAuditListResponse struct { - // The list field. + // The list of audit events for the task. List []TaskAuditView `json:"list,omitempty"` - // The nextPageToken field. + // A pagination token to retrieve the next page of results. NextPageToken *string `json:"nextPageToken,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditnewtaskcreatedfrom.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditnewtaskcreatedfrom.go new file mode 100644 index 00000000..331c1179 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditnewtaskcreatedfrom.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + +// TaskAuditNewTaskCreatedFrom is used when a task is created from another task +// +// (e.g. when a replacement extension grant task is created after the original is cancelled). +// This is set on the NEW task to indicate its origin. +type TaskAuditNewTaskCreatedFrom struct { + // The originalTaskId field. + OriginalTaskID *string `json:"originalTaskId,omitempty"` + // The originalTaskNumericId field. + OriginalTaskNumericID *int64 `integer:"string" json:"originalTaskNumericId,omitempty"` + // The task type of the original task (e.g. "grant", "revoke", "certify"). + OriginalTaskType *string `json:"originalTaskType,omitempty"` +} + +func (t TaskAuditNewTaskCreatedFrom) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TaskAuditNewTaskCreatedFrom) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil { + return err + } + return nil +} + +func (t *TaskAuditNewTaskCreatedFrom) GetOriginalTaskID() *string { + if t == nil { + return nil + } + return t.OriginalTaskID +} + +func (t *TaskAuditNewTaskCreatedFrom) GetOriginalTaskNumericID() *int64 { + if t == nil { + return nil + } + return t.OriginalTaskNumericID +} + +func (t *TaskAuditNewTaskCreatedFrom) GetOriginalTaskType() *string { + if t == nil { + return nil + } + return t.OriginalTaskType +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditpendingresult.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditpendingresult.go new file mode 100644 index 00000000..7cba6d9b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditpendingresult.go @@ -0,0 +1,20 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TaskAuditPendingResult message. +type TaskAuditPendingResult struct { + // Human-readable explanation of why the action is pending. Rendered in the + // ticket audit log so admins can see what the action is waiting on (e.g., + // "GitHub org invite sent. User must accept the invitation before team + // membership can be granted."). Naming mirrors TaskAuditErrorResult.error_reason + // and TaskAuditCancelledResult.cancel_reason for consistency. + PendingReason *string `json:"pendingReason,omitempty"` +} + +func (t *TaskAuditPendingResult) GetPendingReason() *string { + if t == nil { + return nil + } + return t.PendingReason +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditreassignmentfallbacktoadmin.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditreassignmentfallbacktoadmin.go new file mode 100644 index 00000000..dcbef913 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditreassignmentfallbacktoadmin.go @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// TaskAuditReassignmentFallbackToAdmin is used when no eligible reviewers are found +// +// from the policy configuration and the task falls back to system administrators +// without creating a new policy step. This prevents reassignment loops. +type TaskAuditReassignmentFallbackToAdmin struct { + // The IDs of the system administrator users that the task is being assigned to + AdminUserIds []string `json:"adminUserIds,omitempty"` + // The system administrator users (populated for display) + AdminUsers []User `json:"adminUsers,omitempty"` +} + +func (t *TaskAuditReassignmentFallbackToAdmin) GetAdminUserIds() []string { + if t == nil { + return nil + } + return t.AdminUserIds +} + +func (t *TaskAuditReassignmentFallbackToAdmin) GetAdminUsers() []User { + if t == nil { + return nil + } + return t.AdminUsers +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditsuccessresult.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditsuccessresult.go index b8ad04be..7cc66056 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditsuccessresult.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditsuccessresult.go @@ -42,6 +42,12 @@ func (t *TaskAuditSuccessResultAnnotations) GetAdditionalProperties() map[string type TaskAuditSuccessResult struct { // The annotations field. Annotations []TaskAuditSuccessResultAnnotations `json:"annotations,omitempty"` + // Optional human-readable note about the successful action. Rendered in + // the ticket audit log when present (e.g., "Account already existed; no + // change made." for the AlreadyExistsResult path). Naming mirrors + // TaskAuditErrorResult.error_reason and TaskAuditCancelledResult.cancel_reason + // for consistency. + SuccessReason *string `json:"successReason,omitempty"` } func (t *TaskAuditSuccessResult) GetAnnotations() []TaskAuditSuccessResultAnnotations { @@ -50,3 +56,10 @@ func (t *TaskAuditSuccessResult) GetAnnotations() []TaskAuditSuccessResultAnnota } return t.Annotations } + +func (t *TaskAuditSuccessResult) GetSuccessReason() *string { + if t == nil { + return nil + } + return t.SuccessReason +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditview.go index f856b14e..a56212c1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditview.go @@ -142,6 +142,9 @@ func (e *Source) IsExact() bool { // - actionInstanceCreated // - actionInstanceSucceeded // - actionInstanceFailed +// - createdReplacementExtensionGrantTask +// - taskCreatedFrom +// - reassignmentFallbackToAdmin type TaskAuditView struct { // The TaskAuditAccessRequestOutcome message. TaskAuditAccessRequestOutcome *TaskAuditAccessRequestOutcome `json:"accessRequestOutcome,omitempty"` @@ -179,8 +182,12 @@ type TaskAuditView struct { // - success // - error // - cancelled + // - pending // TaskAuditConnectorActionResult *TaskAuditConnectorActionResult `json:"actionResult,omitempty"` + // TaskAuditCreatedReplacementExtensionGrantTask is used when a replacement extension grant task is created + // (e.g. when an extension grant task is cancelled due to app user deletion). + TaskAuditCreatedReplacementExtensionGrantTask *TaskAuditCreatedReplacementExtensionGrantTask `json:"createdReplacementExtensionGrantTask,omitempty"` // The TaskAuditEscalateToEmergencyAccess message. TaskAuditEscalateToEmergencyAccess *TaskAuditEscalateToEmergencyAccess `json:"taskEscalated,omitempty"` // The TaskAuditExpressionPolicyStepError message. @@ -207,6 +214,10 @@ type TaskAuditView struct { TaskAuditMetaData *TaskAuditMetaData `json:"metadata,omitempty"` // The TaskAuditNewTask message. TaskAuditNewTask *TaskAuditNewTask `json:"taskCreated,omitempty"` + // TaskAuditNewTaskCreatedFrom is used when a task is created from another task + // (e.g. when a replacement extension grant task is created after the original is cancelled). + // This is set on the NEW task to indicate its origin. + TaskAuditNewTaskCreatedFrom *TaskAuditNewTaskCreatedFrom `json:"taskCreatedFrom,omitempty"` // The TaskAuditPolicyApprovalReassigned message. TaskAuditPolicyApprovalReassigned *TaskAuditPolicyApprovalReassigned `json:"approvalReassigned,omitempty"` // The TaskAuditPolicyChanged message. @@ -221,6 +232,10 @@ type TaskAuditView struct { TaskAuditPolicyProvisionReassigned *TaskAuditPolicyProvisionReassigned `json:"provisionReassigned,omitempty"` // The TaskAuditReassignedToDelegate message. TaskAuditReassignedToDelegate *TaskAuditReassignedToDelegate `json:"reassignedToDelegate,omitempty"` + // TaskAuditReassignmentFallbackToAdmin is used when no eligible reviewers are found + // from the policy configuration and the task falls back to system administrators + // without creating a new policy step. This prevents reassignment loops. + TaskAuditReassignmentFallbackToAdmin *TaskAuditReassignmentFallbackToAdmin `json:"reassignmentFallbackToAdmin,omitempty"` // The TaskAuditReassignmentListError message. TaskAuditReassignmentListError *TaskAuditReassignmentListError `json:"reassignmentListError,omitempty"` // The TaskAuditRestart message. @@ -407,6 +422,13 @@ func (t *TaskAuditView) GetTaskAuditConnectorActionResult() *TaskAuditConnectorA return t.TaskAuditConnectorActionResult } +func (t *TaskAuditView) GetTaskAuditCreatedReplacementExtensionGrantTask() *TaskAuditCreatedReplacementExtensionGrantTask { + if t == nil { + return nil + } + return t.TaskAuditCreatedReplacementExtensionGrantTask +} + func (t *TaskAuditView) GetTaskAuditEscalateToEmergencyAccess() *TaskAuditEscalateToEmergencyAccess { if t == nil { return nil @@ -498,6 +520,13 @@ func (t *TaskAuditView) GetTaskAuditNewTask() *TaskAuditNewTask { return t.TaskAuditNewTask } +func (t *TaskAuditView) GetTaskAuditNewTaskCreatedFrom() *TaskAuditNewTaskCreatedFrom { + if t == nil { + return nil + } + return t.TaskAuditNewTaskCreatedFrom +} + func (t *TaskAuditView) GetTaskAuditPolicyApprovalReassigned() *TaskAuditPolicyApprovalReassigned { if t == nil { return nil @@ -547,6 +576,13 @@ func (t *TaskAuditView) GetTaskAuditReassignedToDelegate() *TaskAuditReassignedT return t.TaskAuditReassignedToDelegate } +func (t *TaskAuditView) GetTaskAuditReassignmentFallbackToAdmin() *TaskAuditReassignmentFallbackToAdmin { + if t == nil { + return nil + } + return t.TaskAuditReassignmentFallbackToAdmin +} + func (t *TaskAuditView) GetTaskAuditReassignmentListError() *TaskAuditReassignmentListError { if t == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditviewref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditviewref.go index 95f0e2fd..122499b8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditviewref.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskauditviewref.go @@ -4,7 +4,7 @@ package shared // The TaskAuditViewRef message. type TaskAuditViewRef struct { - // The id field. + // The ID of the audit event. ID *string `json:"id,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskexpandmask.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskexpandmask.go index a9469df7..f3109ade 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskexpandmask.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskexpandmask.go @@ -4,7 +4,7 @@ package shared // TaskExpandMask - The task expand mask is an array of strings that specifes the related objects the requester wishes to have returned when making a request where the expand mask is part of the input. Use '*' to view all possible responses. type TaskExpandMask struct { - // A list of paths to expand in the response. May be any combination of "*", "access_review_id", "user_id", "created_by_user_id", "app_id", "app_user_id", "app_entitlement_ids", "step_approver_ids", "identity_user_id", "insight_ids", and "app_user_last_usage". + // A list of paths to expand in the response. May be any combination of "*", "access_review_id", "user_id", "created_by_user_id", "app_id", "app_user_id", "app_entitlement_ids", "step_approver_ids", "approver_ids", "identity_user_id", "insight_ids", "app_user_last_usage", "entitlement_scope_bindings", and "scope_role_resources". Paths []string `json:"paths,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskgrantsource.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskgrantsource.go index 0be0a407..e3369ef7 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskgrantsource.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskgrantsource.go @@ -10,6 +10,8 @@ type TaskGrantSource struct { ExternalURL *string `json:"externalUrl,omitempty"` // The integration id for the source of tickets. IntegrationID *string `json:"integrationId,omitempty"` + // Whether the grant task is an extension task. + IsExtension *bool `json:"isExtension,omitempty"` // the request id for the grant ticket if the source is external RequestID *string `json:"requestId,omitempty"` } @@ -35,6 +37,13 @@ func (t *TaskGrantSource) GetIntegrationID() *string { return t.IntegrationID } +func (t *TaskGrantSource) GetIsExtension() *bool { + if t == nil { + return nil + } + return t.IsExtension +} + func (t *TaskGrantSource) GetRequestID() *string { if t == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskreminderspreference.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskreminderspreference.go new file mode 100644 index 00000000..550a2af9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskreminderspreference.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TaskRemindersPreference message. +type TaskRemindersPreference struct { + // The enabled field. + Enabled *bool `json:"enabled,omitempty"` + // The locked field. + Locked *bool `json:"locked,omitempty"` +} + +func (t *TaskRemindersPreference) GetEnabled() *bool { + if t == nil { + return nil + } + return t.Enabled +} + +func (t *TaskRemindersPreference) GetLocked() *bool { + if t == nil { + return nil + } + return t.Locked +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskrevocationtarget.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskrevocationtarget.go new file mode 100644 index 00000000..92475c22 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskrevocationtarget.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// TaskRevocationTarget - An ancestor entitlement that will be revoked as part of an inheritance revocation. +type TaskRevocationTarget struct { + // The AppEntitlementRef message. + AppEntitlementRef *AppEntitlementRef `json:"entitlementRef,omitempty"` +} + +func (t *TaskRevocationTarget) GetAppEntitlementRef() *AppEntitlementRef { + if t == nil { + return nil + } + return t.AppEntitlementRef +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasksearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasksearchrequest.go index 9519fea6..93790fde 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasksearchrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasksearchrequest.go @@ -132,6 +132,32 @@ func (e *GrantOutcomes) IsExact() bool { return false } +// PendingActionFilter - Filter tasks by pending action status. Only applies when exactly one access_review_id is specified. +// +// Requires the REVIEWS_PENDING_ACTIONS feature flag to be enabled. +type PendingActionFilter string + +const ( + PendingActionFilterPendingActionFilterUnspecified PendingActionFilter = "PENDING_ACTION_FILTER_UNSPECIFIED" + PendingActionFilterPendingActionFilterWithPending PendingActionFilter = "PENDING_ACTION_FILTER_WITH_PENDING" + PendingActionFilterPendingActionFilterWithoutPending PendingActionFilter = "PENDING_ACTION_FILTER_WITHOUT_PENDING" +) + +func (e PendingActionFilter) ToPointer() *PendingActionFilter { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PendingActionFilter) IsExact() bool { + if e != nil { + switch *e { + case "PENDING_ACTION_FILTER_UNSPECIFIED", "PENDING_ACTION_FILTER_WITH_PENDING", "PENDING_ACTION_FILTER_WITHOUT_PENDING": + return true + } + } + return false +} + type RevokeOutcomes string const ( @@ -158,27 +184,27 @@ func (e *RevokeOutcomes) IsExact() bool { return false } -// SortBy - Sort tasks in a specific order. -type SortBy string +// TaskSearchRequestSortBy - Sort tasks in a specific order. +type TaskSearchRequestSortBy string const ( - SortByTaskSearchSortByUnspecified SortBy = "TASK_SEARCH_SORT_BY_UNSPECIFIED" - SortByTaskSearchSortByAccount SortBy = "TASK_SEARCH_SORT_BY_ACCOUNT" - SortByTaskSearchSortByResource SortBy = "TASK_SEARCH_SORT_BY_RESOURCE" - SortByTaskSearchSortByAccountOwner SortBy = "TASK_SEARCH_SORT_BY_ACCOUNT_OWNER" - SortByTaskSearchSortByReverseTicketID SortBy = "TASK_SEARCH_SORT_BY_REVERSE_TICKET_ID" - SortByTaskSearchSortByTicketID SortBy = "TASK_SEARCH_SORT_BY_TICKET_ID" - SortByTaskSearchSortByCreatedAt SortBy = "TASK_SEARCH_SORT_BY_CREATED_AT" - SortByTaskSearchSortByReverseCreatedAt SortBy = "TASK_SEARCH_SORT_BY_REVERSE_CREATED_AT" - SortByTaskSearchSortByAppResourceIDAndAppEntitlement SortBy = "TASK_SEARCH_SORT_BY_APP_RESOURCE_ID_AND_APP_ENTITLEMENT" + TaskSearchRequestSortByTaskSearchSortByUnspecified TaskSearchRequestSortBy = "TASK_SEARCH_SORT_BY_UNSPECIFIED" + TaskSearchRequestSortByTaskSearchSortByAccount TaskSearchRequestSortBy = "TASK_SEARCH_SORT_BY_ACCOUNT" + TaskSearchRequestSortByTaskSearchSortByResource TaskSearchRequestSortBy = "TASK_SEARCH_SORT_BY_RESOURCE" + TaskSearchRequestSortByTaskSearchSortByAccountOwner TaskSearchRequestSortBy = "TASK_SEARCH_SORT_BY_ACCOUNT_OWNER" + TaskSearchRequestSortByTaskSearchSortByReverseTicketID TaskSearchRequestSortBy = "TASK_SEARCH_SORT_BY_REVERSE_TICKET_ID" + TaskSearchRequestSortByTaskSearchSortByTicketID TaskSearchRequestSortBy = "TASK_SEARCH_SORT_BY_TICKET_ID" + TaskSearchRequestSortByTaskSearchSortByCreatedAt TaskSearchRequestSortBy = "TASK_SEARCH_SORT_BY_CREATED_AT" + TaskSearchRequestSortByTaskSearchSortByReverseCreatedAt TaskSearchRequestSortBy = "TASK_SEARCH_SORT_BY_REVERSE_CREATED_AT" + TaskSearchRequestSortByTaskSearchSortByAppResourceIDAndAppEntitlement TaskSearchRequestSortBy = "TASK_SEARCH_SORT_BY_APP_RESOURCE_ID_AND_APP_ENTITLEMENT" ) -func (e SortBy) ToPointer() *SortBy { +func (e TaskSearchRequestSortBy) ToPointer() *TaskSearchRequestSortBy { return &e } // IsExact returns true if the value matches a known enum value, false otherwise. -func (e *SortBy) IsExact() bool { +func (e *TaskSearchRequestSortBy) IsExact() bool { if e != nil { switch *e { case "TASK_SEARCH_SORT_BY_UNSPECIFIED", "TASK_SEARCH_SORT_BY_ACCOUNT", "TASK_SEARCH_SORT_BY_RESOURCE", "TASK_SEARCH_SORT_BY_ACCOUNT_OWNER", "TASK_SEARCH_SORT_BY_REVERSE_TICKET_ID", "TASK_SEARCH_SORT_BY_TICKET_ID", "TASK_SEARCH_SORT_BY_CREATED_AT", "TASK_SEARCH_SORT_BY_REVERSE_CREATED_AT", "TASK_SEARCH_SORT_BY_APP_RESOURCE_ID_AND_APP_ENTITLEMENT": @@ -280,6 +306,8 @@ type TaskSearchRequest struct { ExcludeAppEntitlementIds []string `json:"excludeAppEntitlementIds,omitempty"` // Search tasks that do not have any of these app resource type IDs. ExcludeAppResourceTypeIds []string `json:"excludeAppResourceTypeIds,omitempty"` + // Search tasks that do NOT have any of these apps as targets. + ExcludeApplicationIds []string `json:"excludeApplicationIds,omitempty"` // Exclude Specific TaskIDs from this serach result. ExcludeIds []string `json:"excludeIds,omitempty"` // Search tasks by grant outcome @@ -300,16 +328,23 @@ type TaskSearchRequest struct { PageSize *int `json:"pageSize,omitempty"` // The pageToken field. PageToken *string `json:"pageToken,omitempty"` + // Filter tasks by pending action status. Only applies when exactly one access_review_id is specified. + // Requires the REVIEWS_PENDING_ACTIONS feature flag to be enabled. + PendingActionFilter *PendingActionFilter `json:"pendingActionFilter,omitempty"` // Search tasks that were acted on by any of these users. PreviouslyActedOnIds []string `json:"previouslyActedOnIds,omitempty"` // Fuzzy search tasks by display name, description, or ID. Query *string `json:"query,omitempty"` // Query tasks by display name, description, or numeric ID. Refs []TaskRef `json:"refs,omitempty"` + // Filter tasks where the current approval step requires an approval reason. + RequireApprovalReason *bool `json:"requireApprovalReason,omitempty"` + // Filter tasks where the current approval step requires a denial reason. + RequireDenialReason *bool `json:"requireDenialReason,omitempty"` // Search tasks by revoke outcome RevokeOutcomes []RevokeOutcomes `json:"revokeOutcomes,omitempty"` // Sort tasks in a specific order. - SortBy *SortBy `json:"sortBy,omitempty"` + SortBy *TaskSearchRequestSortBy `json:"sortBy,omitempty"` // Search tasks that have a current policy step of this type StepApprovalTypes []StepApprovalTypes `json:"stepApprovalTypes,omitempty"` // Search tasks where these users are the subject. @@ -466,6 +501,13 @@ func (t *TaskSearchRequest) GetExcludeAppResourceTypeIds() []string { return t.ExcludeAppResourceTypeIds } +func (t *TaskSearchRequest) GetExcludeApplicationIds() []string { + if t == nil { + return nil + } + return t.ExcludeApplicationIds +} + func (t *TaskSearchRequest) GetExcludeIds() []string { if t == nil { return nil @@ -550,6 +592,13 @@ func (t *TaskSearchRequest) GetPageToken() *string { return t.PageToken } +func (t *TaskSearchRequest) GetPendingActionFilter() *PendingActionFilter { + if t == nil { + return nil + } + return t.PendingActionFilter +} + func (t *TaskSearchRequest) GetPreviouslyActedOnIds() []string { if t == nil { return nil @@ -571,6 +620,20 @@ func (t *TaskSearchRequest) GetRefs() []TaskRef { return t.Refs } +func (t *TaskSearchRequest) GetRequireApprovalReason() *bool { + if t == nil { + return nil + } + return t.RequireApprovalReason +} + +func (t *TaskSearchRequest) GetRequireDenialReason() *bool { + if t == nil { + return nil + } + return t.RequireDenialReason +} + func (t *TaskSearchRequest) GetRevokeOutcomes() []RevokeOutcomes { if t == nil { return nil @@ -578,7 +641,7 @@ func (t *TaskSearchRequest) GetRevokeOutcomes() []RevokeOutcomes { return t.RevokeOutcomes } -func (t *TaskSearchRequest) GetSortBy() *SortBy { +func (t *TaskSearchRequest) GetSortBy() *TaskSearchRequestSortBy { if t == nil { return nil } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskserviceactionresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskserviceactionresponse.go index 3099df18..8c84a399 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskserviceactionresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskserviceactionresponse.go @@ -38,13 +38,13 @@ func (t *TaskServiceActionResponseExpanded) GetAdditionalProperties() map[string return t.AdditionalProperties } -// The TaskServiceActionResponse message. +// TaskServiceActionResponse - A generic response for task action endpoints, containing the updated task and the ID of the action that was created. type TaskServiceActionResponse struct { // Contains a task and JSONPATH expressions that describe where in the expanded array related objects are located. This view can be used to display a fully-detailed dashboard of task information. TaskView *TaskView `json:"taskView,omitempty"` - // The expanded field. + // List of serialized related objects. Expanded []TaskServiceActionResponseExpanded `json:"expanded,omitempty"` - // The ticketActionId field. + // The ID of the task action created by this request. TicketActionID *string `json:"ticketActionId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskservicecreateoffboardingrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskservicecreateoffboardingrequest.go index 45eae200..187491a4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskservicecreateoffboardingrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskservicecreateoffboardingrequest.go @@ -2,13 +2,13 @@ package shared -// The TaskServiceCreateOffboardingRequest message. +// TaskServiceCreateOffboardingRequest - Create an offboarding task. type TaskServiceCreateOffboardingRequest struct { // The task expand mask is an array of strings that specifes the related objects the requester wishes to have returned when making a request where the expand mask is part of the input. Use '*' to view all possible responses. TaskExpandMask *TaskExpandMask `json:"expandMask,omitempty"` - // The description field. + // The description of the offboarding request. Description *string `json:"description,omitempty"` - // The subjectUserId field. + // The ID of the user to offboard. SubjectUserID *string `json:"subjectUserId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskservicecreateoffboardingresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskservicecreateoffboardingresponse.go index a46e8f3f..a8b6df00 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskservicecreateoffboardingresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskservicecreateoffboardingresponse.go @@ -38,11 +38,11 @@ func (t *TaskServiceCreateOffboardingResponseExpanded) GetAdditionalProperties() return t.AdditionalProperties } -// The TaskServiceCreateOffboardingResponse message. +// The TaskServiceCreateOffboardingResponse returns the created offboarding task with optional expanded related objects. type TaskServiceCreateOffboardingResponse struct { // Contains a task and JSONPATH expressions that describe where in the expanded array related objects are located. This view can be used to display a fully-detailed dashboard of task information. TaskView *TaskView `json:"taskView,omitempty"` - // The expanded field. + // List of serialized related objects. Expanded []TaskServiceCreateOffboardingResponseExpanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktype.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktype.go index 49a213f7..71934f0c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktype.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktype.go @@ -10,11 +10,18 @@ package shared // - certify // - offboarding // - action +// - finding type TaskType struct { // The TaskTypeAction message. + // + // This message contains a oneof named target_object. Only a single field of the following list may be set at a time: + // - scopeRole + // TaskTypeAction *TaskTypeAction `json:"action,omitempty"` // The TaskTypeCertify message indicates that a task is a certify task and all related details. TaskTypeCertify *TaskTypeCertify `json:"certify,omitempty"` + // The TaskTypeFinding message. + TaskTypeFinding *TaskTypeFinding `json:"finding,omitempty"` // The TaskTypeGrant message indicates that a task is a grant task and all related details. TaskTypeGrant *TaskTypeGrant `json:"grant,omitempty"` // The TaskTypeOffboarding message. @@ -37,6 +44,13 @@ func (t *TaskType) GetTaskTypeCertify() *TaskTypeCertify { return t.TaskTypeCertify } +func (t *TaskType) GetTaskTypeFinding() *TaskTypeFinding { + if t == nil { + return nil + } + return t.TaskTypeFinding +} + func (t *TaskType) GetTaskTypeGrant() *TaskTypeGrant { if t == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeaction.go index 72af1f75..6e534e3f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeaction.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeaction.go @@ -33,14 +33,65 @@ func (e *TaskTypeActionOutcome) IsExact() bool { return false } +// TaskTypeActionType - Flavor of action the ticket represents — mirrors the snapshot's +// +// target_ref variant. +type TaskTypeActionType string + +const ( + TaskTypeActionTypeTypeUnspecified TaskTypeActionType = "TYPE_UNSPECIFIED" + TaskTypeActionTypeTypeGrant TaskTypeActionType = "TYPE_GRANT" + TaskTypeActionTypeTypeWorkflow TaskTypeActionType = "TYPE_WORKFLOW" + TaskTypeActionTypeTypeResourceAction TaskTypeActionType = "TYPE_RESOURCE_ACTION" +) + +func (e TaskTypeActionType) ToPointer() *TaskTypeActionType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *TaskTypeActionType) IsExact() bool { + if e != nil { + switch *e { + case "TYPE_UNSPECIFIED", "TYPE_GRANT", "TYPE_WORKFLOW", "TYPE_RESOURCE_ACTION": + return true + } + } + return false +} + // The TaskTypeAction message. +// +// This message contains a oneof named target_object. Only a single field of the following list may be set at a time: +// - scopeRole type TaskTypeAction struct { - // The ID of the action to execute. - ActionID *string `json:"actionId,omitempty"` - FormValues map[string]any `json:"formValues,omitempty"` + // Scope-role variant of TaskTypeAction.target_object. The UI uses the + // embedded identifiers to build links and title strings without a separate + // Action fetch. + ScopeRole *ScopeRole `json:"scopeRole,omitempty"` + // ActionInstance is the API mirror of the internal immutable snapshot of an + // Action captured on a TaskTypeAction at ticket-creation time. + // + // This message contains a oneof named target_ref. Only a single field of the following list may be set at a time: + // - connectorActionRef + // + TaskActionInstance *TaskActionInstance `json:"actionInstance,omitempty"` + // The ID of the admin-authored action to execute. Empty for synthesized + // action tickets (e.g. scope-role grants) — those carry dispatch + // configuration on action_instance and target_object instead. + ActionID *string `json:"actionId,omitempty"` + // Display label captured on the action snapshot at ticket-creation time. + // Stable under admin renames to a referenced Action row and populated for + // synthesized tickets that have no Action row at all. UI reads this to + // render the task title without an Action fetch. + DisplayName *string `json:"displayName,omitempty"` + FormValues map[string]any `json:"formValues,omitempty"` // The outcome field. Outcome *TaskTypeActionOutcome `json:"outcome,omitempty"` OutcomeTime *time.Time `json:"outcomeTime,omitempty"` + // Flavor of action the ticket represents — mirrors the snapshot's + // target_ref variant. + Type *TaskTypeActionType `json:"type,omitempty"` } func (t TaskTypeAction) MarshalJSON() ([]byte, error) { @@ -54,6 +105,20 @@ func (t *TaskTypeAction) UnmarshalJSON(data []byte) error { return nil } +func (t *TaskTypeAction) GetScopeRole() *ScopeRole { + if t == nil { + return nil + } + return t.ScopeRole +} + +func (t *TaskTypeAction) GetTaskActionInstance() *TaskActionInstance { + if t == nil { + return nil + } + return t.TaskActionInstance +} + func (t *TaskTypeAction) GetActionID() *string { if t == nil { return nil @@ -61,6 +126,13 @@ func (t *TaskTypeAction) GetActionID() *string { return t.ActionID } +func (t *TaskTypeAction) GetDisplayName() *string { + if t == nil { + return nil + } + return t.DisplayName +} + func (t *TaskTypeAction) GetFormValues() map[string]any { if t == nil { return nil @@ -81,3 +153,10 @@ func (t *TaskTypeAction) GetOutcomeTime() *time.Time { } return t.OutcomeTime } + +func (t *TaskTypeAction) GetType() *TaskTypeActionType { + if t == nil { + return nil + } + return t.Type +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeactioninput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeactioninput.go index fee89c96..d130703b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeactioninput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeactioninput.go @@ -3,5 +3,33 @@ package shared // TaskTypeActionInput - The TaskTypeAction message. +// +// This message contains a oneof named target_object. Only a single field of the following list may be set at a time: +// - scopeRole type TaskTypeActionInput struct { + // Scope-role variant of TaskTypeAction.target_object. The UI uses the + // embedded identifiers to build links and title strings without a separate + // Action fetch. + ScopeRole *ScopeRoleInput `json:"scopeRole,omitempty"` + // ActionInstance is the API mirror of the internal immutable snapshot of an + // Action captured on a TaskTypeAction at ticket-creation time. + // + // This message contains a oneof named target_ref. Only a single field of the following list may be set at a time: + // - connectorActionRef + // + TaskActionInstance *TaskActionInstanceInput `json:"actionInstance,omitempty"` +} + +func (t *TaskTypeActionInput) GetScopeRole() *ScopeRoleInput { + if t == nil { + return nil + } + return t.ScopeRole +} + +func (t *TaskTypeActionInput) GetTaskActionInstance() *TaskActionInstanceInput { + if t == nil { + return nil + } + return t.TaskActionInstance } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypefinding.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypefinding.go new file mode 100644 index 00000000..37a002d5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypefinding.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// TaskTypeFindingOutcome - The outcome field. +type TaskTypeFindingOutcome string + +const ( + TaskTypeFindingOutcomeFindingTaskOutcomeUnspecified TaskTypeFindingOutcome = "FINDING_TASK_OUTCOME_UNSPECIFIED" + TaskTypeFindingOutcomeFindingTaskOutcomeRemediated TaskTypeFindingOutcome = "FINDING_TASK_OUTCOME_REMEDIATED" + TaskTypeFindingOutcomeFindingTaskOutcomeRiskAccepted TaskTypeFindingOutcome = "FINDING_TASK_OUTCOME_RISK_ACCEPTED" + TaskTypeFindingOutcomeFindingTaskOutcomeCancelled TaskTypeFindingOutcome = "FINDING_TASK_OUTCOME_CANCELLED" +) + +func (e TaskTypeFindingOutcome) ToPointer() *TaskTypeFindingOutcome { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *TaskTypeFindingOutcome) IsExact() bool { + if e != nil { + switch *e { + case "FINDING_TASK_OUTCOME_UNSPECIFIED", "FINDING_TASK_OUTCOME_REMEDIATED", "FINDING_TASK_OUTCOME_RISK_ACCEPTED", "FINDING_TASK_OUTCOME_CANCELLED": + return true + } + } + return false +} + +// The TaskTypeFinding message. +type TaskTypeFinding struct { + // Reference to the source finding. + FindingID *string `json:"findingId,omitempty"` + // The finding type discriminator. + FindingType *string `json:"findingType,omitempty"` + // The outcome field. + Outcome *TaskTypeFindingOutcome `json:"outcome,omitempty"` + OutcomeTime *time.Time `json:"outcomeTime,omitempty"` +} + +func (t TaskTypeFinding) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TaskTypeFinding) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil { + return err + } + return nil +} + +func (t *TaskTypeFinding) GetFindingID() *string { + if t == nil { + return nil + } + return t.FindingID +} + +func (t *TaskTypeFinding) GetFindingType() *string { + if t == nil { + return nil + } + return t.FindingType +} + +func (t *TaskTypeFinding) GetOutcome() *TaskTypeFindingOutcome { + if t == nil { + return nil + } + return t.Outcome +} + +func (t *TaskTypeFinding) GetOutcomeTime() *time.Time { + if t == nil { + return nil + } + return t.OutcomeTime +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypefindinginput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypefindinginput.go new file mode 100644 index 00000000..3d5c8b46 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypefindinginput.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// TaskTypeFindingInput - The TaskTypeFinding message. +type TaskTypeFindingInput struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeinput.go index 4884fd88..35259cd0 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeinput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tasktypeinput.go @@ -10,11 +10,18 @@ package shared // - certify // - offboarding // - action +// - finding type TaskTypeInput struct { // The TaskTypeAction message. + // + // This message contains a oneof named target_object. Only a single field of the following list may be set at a time: + // - scopeRole + // TaskTypeAction *TaskTypeActionInput `json:"action,omitempty"` // The TaskTypeCertify message indicates that a task is a certify task and all related details. TaskTypeCertify *TaskTypeCertifyInput `json:"certify,omitempty"` + // The TaskTypeFinding message. + TaskTypeFinding *TaskTypeFindingInput `json:"finding,omitempty"` // The TaskTypeGrant message indicates that a task is a grant task and all related details. TaskTypeGrant *TaskTypeGrantInput `json:"grant,omitempty"` // The TaskTypeOffboarding message. @@ -37,6 +44,13 @@ func (t *TaskTypeInput) GetTaskTypeCertify() *TaskTypeCertifyInput { return t.TaskTypeCertify } +func (t *TaskTypeInput) GetTaskTypeFinding() *TaskTypeFindingInput { + if t == nil { + return nil + } + return t.TaskTypeFinding +} + func (t *TaskTypeInput) GetTaskTypeGrant() *TaskTypeGrantInput { if t == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskview.go index 057d0b0f..5f28b1e1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/taskview.go @@ -14,6 +14,8 @@ type TaskView struct { AppUserLastUsagePath *string `json:"appUserLastUsagePath,omitempty"` // JSONPATH expression indicating the location of the AppUser object in the expanded array AppUserPath *string `json:"appUserPath,omitempty"` + // JSONPATH expression indicating the location of the ApproverUsers objects in the expanded array. These are the users who have approved or denied this task. + ApproversPath *string `json:"approversPath,omitempty"` // JSONPATH expression indicating the location of the object of the User that created the ticket in the expanded array CreatedByUserPath *string `json:"createdByUserPath,omitempty"` // JSONPATH expression indicating the location of the Entitlements objects in the expanded array @@ -22,6 +24,12 @@ type TaskView struct { IdentityUserPath *string `json:"identityUserPath,omitempty"` // JSONPATH expression indicating the location of the Insights objects in the expanded array InsightsPath *string `json:"insightsPath,omitempty"` + // JSONPATH expression indicating the location of the EntitlementScopeBindingList object in the expanded array. + ResourceBindingsPath *string `json:"resourceBindingsPath,omitempty"` + // JSONPATH expression indicating the location of the role AppResource for a scope-role action task in the expanded array. + RoleResourcePath *string `json:"roleResourcePath,omitempty"` + // JSONPATH expression indicating the location of the scope AppResource for a scope-role action task in the expanded array. + ScopeResourcePath *string `json:"scopeResourcePath,omitempty"` // JSONPATH expression indicating the location of the StepApproverUsers objects in the expanded array StepApproversPath *string `json:"stepApproversPath,omitempty"` // JSONPATH expression indicating the location of the User object in the expanded array. This is the user that is a direct target of the ticket without a specific relationship to a potentially non-existent app user. @@ -63,6 +71,13 @@ func (t *TaskView) GetAppUserPath() *string { return t.AppUserPath } +func (t *TaskView) GetApproversPath() *string { + if t == nil { + return nil + } + return t.ApproversPath +} + func (t *TaskView) GetCreatedByUserPath() *string { if t == nil { return nil @@ -91,6 +106,27 @@ func (t *TaskView) GetInsightsPath() *string { return t.InsightsPath } +func (t *TaskView) GetResourceBindingsPath() *string { + if t == nil { + return nil + } + return t.ResourceBindingsPath +} + +func (t *TaskView) GetRoleResourcePath() *string { + if t == nil { + return nil + } + return t.RoleResourcePath +} + +func (t *TaskView) GetScopeResourcePath() *string { + if t == nil { + return nil + } + return t.ScopeResourcePath +} + func (t *TaskView) GetStepApproversPath() *string { if t == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfig.go new file mode 100644 index 00000000..3624cf86 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfig.go @@ -0,0 +1,406 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// TenantAuthConfigProviderType - Provider type (read-only after creation — provider config determines type). +type TenantAuthConfigProviderType string + +const ( + TenantAuthConfigProviderTypeAuthConfigProviderTypeUnspecified TenantAuthConfigProviderType = "AUTH_CONFIG_PROVIDER_TYPE_UNSPECIFIED" + TenantAuthConfigProviderTypeAuthConfigProviderTypeGoogle TenantAuthConfigProviderType = "AUTH_CONFIG_PROVIDER_TYPE_GOOGLE" + TenantAuthConfigProviderTypeAuthConfigProviderTypeMicrosoft TenantAuthConfigProviderType = "AUTH_CONFIG_PROVIDER_TYPE_MICROSOFT" + TenantAuthConfigProviderTypeAuthConfigProviderTypeOkta TenantAuthConfigProviderType = "AUTH_CONFIG_PROVIDER_TYPE_OKTA" + TenantAuthConfigProviderTypeAuthConfigProviderTypeOnelogin TenantAuthConfigProviderType = "AUTH_CONFIG_PROVIDER_TYPE_ONELOGIN" + TenantAuthConfigProviderTypeAuthConfigProviderTypeJumpcloud TenantAuthConfigProviderType = "AUTH_CONFIG_PROVIDER_TYPE_JUMPCLOUD" + TenantAuthConfigProviderTypeAuthConfigProviderTypePingone TenantAuthConfigProviderType = "AUTH_CONFIG_PROVIDER_TYPE_PINGONE" + TenantAuthConfigProviderTypeAuthConfigProviderTypeOidc TenantAuthConfigProviderType = "AUTH_CONFIG_PROVIDER_TYPE_OIDC" + TenantAuthConfigProviderTypeAuthConfigProviderTypeC1Local TenantAuthConfigProviderType = "AUTH_CONFIG_PROVIDER_TYPE_C1_LOCAL" +) + +func (e TenantAuthConfigProviderType) ToPointer() *TenantAuthConfigProviderType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *TenantAuthConfigProviderType) IsExact() bool { + if e != nil { + switch *e { + case "AUTH_CONFIG_PROVIDER_TYPE_UNSPECIFIED", "AUTH_CONFIG_PROVIDER_TYPE_GOOGLE", "AUTH_CONFIG_PROVIDER_TYPE_MICROSOFT", "AUTH_CONFIG_PROVIDER_TYPE_OKTA", "AUTH_CONFIG_PROVIDER_TYPE_ONELOGIN", "AUTH_CONFIG_PROVIDER_TYPE_JUMPCLOUD", "AUTH_CONFIG_PROVIDER_TYPE_PINGONE", "AUTH_CONFIG_PROVIDER_TYPE_OIDC", "AUTH_CONFIG_PROVIDER_TYPE_C1_LOCAL": + return true + } + } + return false +} + +// TenantAuthConfigStatus - The status field. +type TenantAuthConfigStatus string + +const ( + TenantAuthConfigStatusAuthConfigStatusUnspecified TenantAuthConfigStatus = "AUTH_CONFIG_STATUS_UNSPECIFIED" + TenantAuthConfigStatusAuthConfigStatusActive TenantAuthConfigStatus = "AUTH_CONFIG_STATUS_ACTIVE" + TenantAuthConfigStatusAuthConfigStatusDeprecated TenantAuthConfigStatus = "AUTH_CONFIG_STATUS_DEPRECATED" + TenantAuthConfigStatusAuthConfigStatusDisabled TenantAuthConfigStatus = "AUTH_CONFIG_STATUS_DISABLED" +) + +func (e TenantAuthConfigStatus) ToPointer() *TenantAuthConfigStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *TenantAuthConfigStatus) IsExact() bool { + if e != nil { + switch *e { + case "AUTH_CONFIG_STATUS_UNSPECIFIED", "AUTH_CONFIG_STATUS_ACTIVE", "AUTH_CONFIG_STATUS_DEPRECATED", "AUTH_CONFIG_STATUS_DISABLED": + return true + } + } + return false +} + +// The TenantAuthConfig message. +// +// This message contains a oneof named provider_config. Only a single field of the following list may be set at a time: +// - google +// - microsoft +// - okta +// - onelogin +// - jumpcloud +// - pingone +// - oidc +// - c1Local +type TenantAuthConfig struct { + // The AuthConfigC1Local message. + AuthConfigC1Local *AuthConfigC1Local `json:"c1Local,omitempty"` + // The AuthConfigGoogle message. + AuthConfigGoogle *AuthConfigGoogle `json:"google,omitempty"` + // The AuthConfigJumpCloud message. + AuthConfigJumpCloud *AuthConfigJumpCloud `json:"jumpcloud,omitempty"` + // The AuthConfigMicrosoft message. + AuthConfigMicrosoft *AuthConfigMicrosoft `json:"microsoft,omitempty"` + // The AuthConfigOIDC message. + AuthConfigOIDC *AuthConfigOIDC `json:"oidc,omitempty"` + // The AuthConfigOkta message. + AuthConfigOkta *AuthConfigOkta `json:"okta,omitempty"` + // The AuthConfigOneLogin message. + AuthConfigOneLogin *AuthConfigOneLogin `json:"onelogin,omitempty"` + // The AuthConfigPingOne message. + AuthConfigPingOne *AuthConfigPingOne `json:"pingone,omitempty"` + // Bootstrap routing: email domains that route unknown users to this config. + BootstrapDomains []string `json:"bootstrapDomains,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + DeprecationDeadline *time.Time `json:"deprecationDeadline,omitempty"` + // User-visible message shown when status=DEPRECATED. + DeprecationMessage *string `json:"deprecationMessage,omitempty"` + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + // The isDefaultBootstrap field. + IsDefaultBootstrap *bool `json:"isDefaultBootstrap,omitempty"` + // Provider type (read-only after creation — provider config determines type). + ProviderType *TenantAuthConfigProviderType `json:"providerType,omitempty"` + // The status field. + Status *TenantAuthConfigStatus `json:"status,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (t TenantAuthConfig) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TenantAuthConfig) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil { + return err + } + return nil +} + +func (t *TenantAuthConfig) GetAuthConfigC1Local() *AuthConfigC1Local { + if t == nil { + return nil + } + return t.AuthConfigC1Local +} + +func (t *TenantAuthConfig) GetAuthConfigGoogle() *AuthConfigGoogle { + if t == nil { + return nil + } + return t.AuthConfigGoogle +} + +func (t *TenantAuthConfig) GetAuthConfigJumpCloud() *AuthConfigJumpCloud { + if t == nil { + return nil + } + return t.AuthConfigJumpCloud +} + +func (t *TenantAuthConfig) GetAuthConfigMicrosoft() *AuthConfigMicrosoft { + if t == nil { + return nil + } + return t.AuthConfigMicrosoft +} + +func (t *TenantAuthConfig) GetAuthConfigOIDC() *AuthConfigOIDC { + if t == nil { + return nil + } + return t.AuthConfigOIDC +} + +func (t *TenantAuthConfig) GetAuthConfigOkta() *AuthConfigOkta { + if t == nil { + return nil + } + return t.AuthConfigOkta +} + +func (t *TenantAuthConfig) GetAuthConfigOneLogin() *AuthConfigOneLogin { + if t == nil { + return nil + } + return t.AuthConfigOneLogin +} + +func (t *TenantAuthConfig) GetAuthConfigPingOne() *AuthConfigPingOne { + if t == nil { + return nil + } + return t.AuthConfigPingOne +} + +func (t *TenantAuthConfig) GetBootstrapDomains() []string { + if t == nil { + return nil + } + return t.BootstrapDomains +} + +func (t *TenantAuthConfig) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *TenantAuthConfig) GetDeprecationDeadline() *time.Time { + if t == nil { + return nil + } + return t.DeprecationDeadline +} + +func (t *TenantAuthConfig) GetDeprecationMessage() *string { + if t == nil { + return nil + } + return t.DeprecationMessage +} + +func (t *TenantAuthConfig) GetDisplayName() *string { + if t == nil { + return nil + } + return t.DisplayName +} + +func (t *TenantAuthConfig) GetID() *string { + if t == nil { + return nil + } + return t.ID +} + +func (t *TenantAuthConfig) GetIsDefaultBootstrap() *bool { + if t == nil { + return nil + } + return t.IsDefaultBootstrap +} + +func (t *TenantAuthConfig) GetProviderType() *TenantAuthConfigProviderType { + if t == nil { + return nil + } + return t.ProviderType +} + +func (t *TenantAuthConfig) GetStatus() *TenantAuthConfigStatus { + if t == nil { + return nil + } + return t.Status +} + +func (t *TenantAuthConfig) GetUpdatedAt() *time.Time { + if t == nil { + return nil + } + return t.UpdatedAt +} + +// TenantAuthConfigInput - The TenantAuthConfig message. +// +// This message contains a oneof named provider_config. Only a single field of the following list may be set at a time: +// - google +// - microsoft +// - okta +// - onelogin +// - jumpcloud +// - pingone +// - oidc +// - c1Local +type TenantAuthConfigInput struct { + // The AuthConfigC1Local message. + AuthConfigC1Local *AuthConfigC1Local `json:"c1Local,omitempty"` + // The AuthConfigGoogle message. + AuthConfigGoogle *AuthConfigGoogle `json:"google,omitempty"` + // The AuthConfigJumpCloud message. + AuthConfigJumpCloud *AuthConfigJumpCloud `json:"jumpcloud,omitempty"` + // The AuthConfigMicrosoft message. + AuthConfigMicrosoft *AuthConfigMicrosoft `json:"microsoft,omitempty"` + // The AuthConfigOIDC message. + AuthConfigOIDC *AuthConfigOIDC `json:"oidc,omitempty"` + // The AuthConfigOkta message. + AuthConfigOkta *AuthConfigOkta `json:"okta,omitempty"` + // The AuthConfigOneLogin message. + AuthConfigOneLogin *AuthConfigOneLogin `json:"onelogin,omitempty"` + // The AuthConfigPingOne message. + AuthConfigPingOne *AuthConfigPingOne `json:"pingone,omitempty"` + // Bootstrap routing: email domains that route unknown users to this config. + BootstrapDomains []string `json:"bootstrapDomains,omitempty"` + DeprecationDeadline *time.Time `json:"deprecationDeadline,omitempty"` + // User-visible message shown when status=DEPRECATED. + DeprecationMessage *string `json:"deprecationMessage,omitempty"` + // The displayName field. + DisplayName *string `json:"displayName,omitempty"` + // The id field. + ID *string `json:"id,omitempty"` + // The isDefaultBootstrap field. + IsDefaultBootstrap *bool `json:"isDefaultBootstrap,omitempty"` + // The status field. + Status *TenantAuthConfigStatus `json:"status,omitempty"` +} + +func (t TenantAuthConfigInput) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TenantAuthConfigInput) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil { + return err + } + return nil +} + +func (t *TenantAuthConfigInput) GetAuthConfigC1Local() *AuthConfigC1Local { + if t == nil { + return nil + } + return t.AuthConfigC1Local +} + +func (t *TenantAuthConfigInput) GetAuthConfigGoogle() *AuthConfigGoogle { + if t == nil { + return nil + } + return t.AuthConfigGoogle +} + +func (t *TenantAuthConfigInput) GetAuthConfigJumpCloud() *AuthConfigJumpCloud { + if t == nil { + return nil + } + return t.AuthConfigJumpCloud +} + +func (t *TenantAuthConfigInput) GetAuthConfigMicrosoft() *AuthConfigMicrosoft { + if t == nil { + return nil + } + return t.AuthConfigMicrosoft +} + +func (t *TenantAuthConfigInput) GetAuthConfigOIDC() *AuthConfigOIDC { + if t == nil { + return nil + } + return t.AuthConfigOIDC +} + +func (t *TenantAuthConfigInput) GetAuthConfigOkta() *AuthConfigOkta { + if t == nil { + return nil + } + return t.AuthConfigOkta +} + +func (t *TenantAuthConfigInput) GetAuthConfigOneLogin() *AuthConfigOneLogin { + if t == nil { + return nil + } + return t.AuthConfigOneLogin +} + +func (t *TenantAuthConfigInput) GetAuthConfigPingOne() *AuthConfigPingOne { + if t == nil { + return nil + } + return t.AuthConfigPingOne +} + +func (t *TenantAuthConfigInput) GetBootstrapDomains() []string { + if t == nil { + return nil + } + return t.BootstrapDomains +} + +func (t *TenantAuthConfigInput) GetDeprecationDeadline() *time.Time { + if t == nil { + return nil + } + return t.DeprecationDeadline +} + +func (t *TenantAuthConfigInput) GetDeprecationMessage() *string { + if t == nil { + return nil + } + return t.DeprecationMessage +} + +func (t *TenantAuthConfigInput) GetDisplayName() *string { + if t == nil { + return nil + } + return t.DisplayName +} + +func (t *TenantAuthConfigInput) GetID() *string { + if t == nil { + return nil + } + return t.ID +} + +func (t *TenantAuthConfigInput) GetIsDefaultBootstrap() *bool { + if t == nil { + return nil + } + return t.IsDefaultBootstrap +} + +func (t *TenantAuthConfigInput) GetStatus() *TenantAuthConfigStatus { + if t == nil { + return nil + } + return t.Status +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicecreaterequest.go new file mode 100644 index 00000000..a94a1fd2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicecreaterequest.go @@ -0,0 +1,183 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// TenantAuthConfigServiceCreateRequestStatus - The initial status of the authentication provider. +type TenantAuthConfigServiceCreateRequestStatus string + +const ( + TenantAuthConfigServiceCreateRequestStatusAuthConfigStatusUnspecified TenantAuthConfigServiceCreateRequestStatus = "AUTH_CONFIG_STATUS_UNSPECIFIED" + TenantAuthConfigServiceCreateRequestStatusAuthConfigStatusActive TenantAuthConfigServiceCreateRequestStatus = "AUTH_CONFIG_STATUS_ACTIVE" + TenantAuthConfigServiceCreateRequestStatusAuthConfigStatusDeprecated TenantAuthConfigServiceCreateRequestStatus = "AUTH_CONFIG_STATUS_DEPRECATED" + TenantAuthConfigServiceCreateRequestStatusAuthConfigStatusDisabled TenantAuthConfigServiceCreateRequestStatus = "AUTH_CONFIG_STATUS_DISABLED" +) + +func (e TenantAuthConfigServiceCreateRequestStatus) ToPointer() *TenantAuthConfigServiceCreateRequestStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *TenantAuthConfigServiceCreateRequestStatus) IsExact() bool { + if e != nil { + switch *e { + case "AUTH_CONFIG_STATUS_UNSPECIFIED", "AUTH_CONFIG_STATUS_ACTIVE", "AUTH_CONFIG_STATUS_DEPRECATED", "AUTH_CONFIG_STATUS_DISABLED": + return true + } + } + return false +} + +// The TenantAuthConfigServiceCreateRequest message. +// +// This message contains a oneof named provider_config. Only a single field of the following list may be set at a time: +// - google +// - microsoft +// - okta +// - onelogin +// - jumpcloud +// - pingone +// - oidc +// - c1Local +type TenantAuthConfigServiceCreateRequest struct { + // The AuthConfigC1Local message. + AuthConfigC1Local *AuthConfigC1Local `json:"c1Local,omitempty"` + // The AuthConfigGoogle message. + AuthConfigGoogle *AuthConfigGoogle `json:"google,omitempty"` + // The AuthConfigJumpCloud message. + AuthConfigJumpCloud *AuthConfigJumpCloud `json:"jumpcloud,omitempty"` + // The AuthConfigMicrosoft message. + AuthConfigMicrosoft *AuthConfigMicrosoft `json:"microsoft,omitempty"` + // The AuthConfigOIDC message. + AuthConfigOIDC *AuthConfigOIDC `json:"oidc,omitempty"` + // The AuthConfigOkta message. + AuthConfigOkta *AuthConfigOkta `json:"okta,omitempty"` + // The AuthConfigOneLogin message. + AuthConfigOneLogin *AuthConfigOneLogin `json:"onelogin,omitempty"` + // The AuthConfigPingOne message. + AuthConfigPingOne *AuthConfigPingOne `json:"pingone,omitempty"` + // Email domains that route unknown users to this authentication provider during login. + BootstrapDomains []string `json:"bootstrapDomains,omitempty"` + DeprecationDeadline *time.Time `json:"deprecationDeadline,omitempty"` + // A user-visible message explaining why the provider is deprecated. + DeprecationMessage *string `json:"deprecationMessage,omitempty"` + // The human-readable name for this authentication provider. + DisplayName string `json:"displayName"` + // Whether this provider is the default for users whose email domain has no explicit mapping. + IsDefaultBootstrap *bool `json:"isDefaultBootstrap,omitempty"` + // The initial status of the authentication provider. + Status *TenantAuthConfigServiceCreateRequestStatus `json:"status,omitempty"` +} + +func (t TenantAuthConfigServiceCreateRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TenantAuthConfigServiceCreateRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil { + return err + } + return nil +} + +func (t *TenantAuthConfigServiceCreateRequest) GetAuthConfigC1Local() *AuthConfigC1Local { + if t == nil { + return nil + } + return t.AuthConfigC1Local +} + +func (t *TenantAuthConfigServiceCreateRequest) GetAuthConfigGoogle() *AuthConfigGoogle { + if t == nil { + return nil + } + return t.AuthConfigGoogle +} + +func (t *TenantAuthConfigServiceCreateRequest) GetAuthConfigJumpCloud() *AuthConfigJumpCloud { + if t == nil { + return nil + } + return t.AuthConfigJumpCloud +} + +func (t *TenantAuthConfigServiceCreateRequest) GetAuthConfigMicrosoft() *AuthConfigMicrosoft { + if t == nil { + return nil + } + return t.AuthConfigMicrosoft +} + +func (t *TenantAuthConfigServiceCreateRequest) GetAuthConfigOIDC() *AuthConfigOIDC { + if t == nil { + return nil + } + return t.AuthConfigOIDC +} + +func (t *TenantAuthConfigServiceCreateRequest) GetAuthConfigOkta() *AuthConfigOkta { + if t == nil { + return nil + } + return t.AuthConfigOkta +} + +func (t *TenantAuthConfigServiceCreateRequest) GetAuthConfigOneLogin() *AuthConfigOneLogin { + if t == nil { + return nil + } + return t.AuthConfigOneLogin +} + +func (t *TenantAuthConfigServiceCreateRequest) GetAuthConfigPingOne() *AuthConfigPingOne { + if t == nil { + return nil + } + return t.AuthConfigPingOne +} + +func (t *TenantAuthConfigServiceCreateRequest) GetBootstrapDomains() []string { + if t == nil { + return nil + } + return t.BootstrapDomains +} + +func (t *TenantAuthConfigServiceCreateRequest) GetDeprecationDeadline() *time.Time { + if t == nil { + return nil + } + return t.DeprecationDeadline +} + +func (t *TenantAuthConfigServiceCreateRequest) GetDeprecationMessage() *string { + if t == nil { + return nil + } + return t.DeprecationMessage +} + +func (t *TenantAuthConfigServiceCreateRequest) GetDisplayName() string { + if t == nil { + return "" + } + return t.DisplayName +} + +func (t *TenantAuthConfigServiceCreateRequest) GetIsDefaultBootstrap() *bool { + if t == nil { + return nil + } + return t.IsDefaultBootstrap +} + +func (t *TenantAuthConfigServiceCreateRequest) GetStatus() *TenantAuthConfigServiceCreateRequestStatus { + if t == nil { + return nil + } + return t.Status +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicecreateresponse.go new file mode 100644 index 00000000..25742eae --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicecreateresponse.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TenantAuthConfigServiceCreateResponse message. +type TenantAuthConfigServiceCreateResponse struct { + // The TenantAuthConfig message. + // + // This message contains a oneof named provider_config. Only a single field of the following list may be set at a time: + // - google + // - microsoft + // - okta + // - onelogin + // - jumpcloud + // - pingone + // - oidc + // - c1Local + // + TenantAuthConfig *TenantAuthConfig `json:"authConfig,omitempty"` +} + +func (t *TenantAuthConfigServiceCreateResponse) GetTenantAuthConfig() *TenantAuthConfig { + if t == nil { + return nil + } + return t.TenantAuthConfig +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicedeleterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicedeleterequest.go new file mode 100644 index 00000000..54f3490c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicedeleterequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TenantAuthConfigServiceDeleteRequest message. +type TenantAuthConfigServiceDeleteRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicedeleteresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicedeleteresponse.go new file mode 100644 index 00000000..97e500eb --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicedeleteresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TenantAuthConfigServiceDeleteResponse message. +type TenantAuthConfigServiceDeleteResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicegetresponse.go new file mode 100644 index 00000000..b896a310 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicegetresponse.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TenantAuthConfigServiceGetResponse message. +type TenantAuthConfigServiceGetResponse struct { + // The TenantAuthConfig message. + // + // This message contains a oneof named provider_config. Only a single field of the following list may be set at a time: + // - google + // - microsoft + // - okta + // - onelogin + // - jumpcloud + // - pingone + // - oidc + // - c1Local + // + TenantAuthConfig *TenantAuthConfig `json:"authConfig,omitempty"` +} + +func (t *TenantAuthConfigServiceGetResponse) GetTenantAuthConfig() *TenantAuthConfig { + if t == nil { + return nil + } + return t.TenantAuthConfig +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicelistresponse.go new file mode 100644 index 00000000..fe7756bc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigservicelistresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TenantAuthConfigServiceListResponse message. +type TenantAuthConfigServiceListResponse struct { + // The list of authentication provider configurations. + List []TenantAuthConfig `json:"list,omitempty"` + // A token to retrieve the next page of results, or empty if there are no more results. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (t *TenantAuthConfigServiceListResponse) GetList() []TenantAuthConfig { + if t == nil { + return nil + } + return t.List +} + +func (t *TenantAuthConfigServiceListResponse) GetNextPageToken() *string { + if t == nil { + return nil + } + return t.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigserviceupdaterequest.go new file mode 100644 index 00000000..5e763362 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigserviceupdaterequest.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TenantAuthConfigServiceUpdateRequest message. +type TenantAuthConfigServiceUpdateRequest struct { + // The TenantAuthConfig message. + // + // This message contains a oneof named provider_config. Only a single field of the following list may be set at a time: + // - google + // - microsoft + // - okta + // - onelogin + // - jumpcloud + // - pingone + // - oidc + // - c1Local + // + TenantAuthConfig *TenantAuthConfigInput `json:"authConfig,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` +} + +func (t *TenantAuthConfigServiceUpdateRequest) GetTenantAuthConfig() *TenantAuthConfigInput { + if t == nil { + return nil + } + return t.TenantAuthConfig +} + +func (t *TenantAuthConfigServiceUpdateRequest) GetUpdateMask() *string { + if t == nil { + return nil + } + return t.UpdateMask +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigserviceupdateresponse.go new file mode 100644 index 00000000..b297091f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantauthconfigserviceupdateresponse.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TenantAuthConfigServiceUpdateResponse message. +type TenantAuthConfigServiceUpdateResponse struct { + // The TenantAuthConfig message. + // + // This message contains a oneof named provider_config. Only a single field of the following list may be set at a time: + // - google + // - microsoft + // - okta + // - onelogin + // - jumpcloud + // - pingone + // - oidc + // - c1Local + // + TenantAuthConfig *TenantAuthConfig `json:"authConfig,omitempty"` +} + +func (t *TenantAuthConfigServiceUpdateResponse) GetTenantAuthConfig() *TenantAuthConfig { + if t == nil { + return nil + } + return t.TenantAuthConfig +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantemailprovider.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantemailprovider.go new file mode 100644 index 00000000..23e0d55f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantemailprovider.go @@ -0,0 +1,128 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// TenantEmailProvider is the API representation of the tenant's email provider. +// +// This message contains a oneof named provider. Only a single field of the following list may be set at a time: +// - c1Builtin +// - awsSes +// - sendgrid +// - microsoftGraph +// - googleWorkspace +type TenantEmailProvider struct { + // AWSSESProviderConfig configures sending via a customer's AWS SES account. + AWSSESProviderConfig *AWSSESProviderConfig `json:"awsSes,omitempty"` + // C1BuiltInProviderConfig selects the ConductorOne built-in email provider. + // Emails are sent from no-reply@conductorone.com via the platform SendGrid account. + // Only supports sending to C1 users — external email addresses are not supported. + // No configuration fields required. + C1BuiltInProviderConfig *C1BuiltInProviderConfig `json:"c1Builtin,omitempty"` + // GoogleWorkspaceProviderConfig configures sending via Google Workspace Gmail API + // using domain-wide delegation with a service account. + // Requires: customer Workspace super admin grants DWD to the service account's + // OAuth client ID for the gmail.send scope. + GoogleWorkspaceProviderConfig *GoogleWorkspaceProviderConfig `json:"googleWorkspace,omitempty"` + // MicrosoftGraphProviderConfig configures sending via Microsoft Graph sendMail API. + // Requires an Azure AD app registration with Mail.Send application permission (admin-consented). + MicrosoftGraphProviderConfig *MicrosoftGraphProviderConfig `json:"microsoftGraph,omitempty"` + // SendGridProviderConfig configures sending via a customer's SendGrid account. + SendGridProviderConfig *SendGridProviderConfig `json:"sendgrid,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Sender email address. Must be verified with the provider. + // Ignored when using the C1 built-in provider (uses no-reply@conductorone.com). + FromAddress *string `json:"fromAddress,omitempty"` + // Sender display name shown in the recipient's inbox (e.g., "Acme Corp IT"). + // Used as the RFC 5322 display-name: "Acme Corp IT" . + // Ignored when using the C1 built-in provider. + FromName *string `json:"fromName,omitempty"` + // Optional reply-to address. + ReplyToAddress *string `json:"replyToAddress,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (t TenantEmailProvider) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TenantEmailProvider) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil { + return err + } + return nil +} + +func (t *TenantEmailProvider) GetAWSSESProviderConfig() *AWSSESProviderConfig { + if t == nil { + return nil + } + return t.AWSSESProviderConfig +} + +func (t *TenantEmailProvider) GetC1BuiltInProviderConfig() *C1BuiltInProviderConfig { + if t == nil { + return nil + } + return t.C1BuiltInProviderConfig +} + +func (t *TenantEmailProvider) GetGoogleWorkspaceProviderConfig() *GoogleWorkspaceProviderConfig { + if t == nil { + return nil + } + return t.GoogleWorkspaceProviderConfig +} + +func (t *TenantEmailProvider) GetMicrosoftGraphProviderConfig() *MicrosoftGraphProviderConfig { + if t == nil { + return nil + } + return t.MicrosoftGraphProviderConfig +} + +func (t *TenantEmailProvider) GetSendGridProviderConfig() *SendGridProviderConfig { + if t == nil { + return nil + } + return t.SendGridProviderConfig +} + +func (t *TenantEmailProvider) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *TenantEmailProvider) GetFromAddress() *string { + if t == nil { + return nil + } + return t.FromAddress +} + +func (t *TenantEmailProvider) GetFromName() *string { + if t == nil { + return nil + } + return t.FromName +} + +func (t *TenantEmailProvider) GetReplyToAddress() *string { + if t == nil { + return nil + } + return t.ReplyToAddress +} + +func (t *TenantEmailProvider) GetUpdatedAt() *time.Time { + if t == nil { + return nil + } + return t.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantemailproviderinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantemailproviderinput.go new file mode 100644 index 00000000..d3507793 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/tenantemailproviderinput.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// TenantEmailProviderInput - TenantEmailProvider is the API representation of the tenant's email provider. +// +// This message contains a oneof named provider. Only a single field of the following list may be set at a time: +// - c1Builtin +// - awsSes +// - sendgrid +// - microsoftGraph +// - googleWorkspace +type TenantEmailProviderInput struct { + // AWSSESProviderConfig configures sending via a customer's AWS SES account. + AWSSESProviderConfig *AWSSESProviderConfig `json:"awsSes,omitempty"` + // C1BuiltInProviderConfig selects the ConductorOne built-in email provider. + // Emails are sent from no-reply@conductorone.com via the platform SendGrid account. + // Only supports sending to C1 users — external email addresses are not supported. + // No configuration fields required. + C1BuiltInProviderConfig *C1BuiltInProviderConfig `json:"c1Builtin,omitempty"` + // GoogleWorkspaceProviderConfig configures sending via Google Workspace Gmail API + // using domain-wide delegation with a service account. + // Requires: customer Workspace super admin grants DWD to the service account's + // OAuth client ID for the gmail.send scope. + GoogleWorkspaceProviderConfig *GoogleWorkspaceProviderConfig `json:"googleWorkspace,omitempty"` + // MicrosoftGraphProviderConfig configures sending via Microsoft Graph sendMail API. + // Requires an Azure AD app registration with Mail.Send application permission (admin-consented). + MicrosoftGraphProviderConfig *MicrosoftGraphProviderConfig `json:"microsoftGraph,omitempty"` + // SendGridProviderConfig configures sending via a customer's SendGrid account. + SendGridProviderConfig *SendGridProviderConfig `json:"sendgrid,omitempty"` + // Sender email address. Must be verified with the provider. + // Ignored when using the C1 built-in provider (uses no-reply@conductorone.com). + FromAddress *string `json:"fromAddress,omitempty"` + // Sender display name shown in the recipient's inbox (e.g., "Acme Corp IT"). + // Used as the RFC 5322 display-name: "Acme Corp IT" . + // Ignored when using the C1 built-in provider. + FromName *string `json:"fromName,omitempty"` + // Optional reply-to address. + ReplyToAddress *string `json:"replyToAddress,omitempty"` +} + +func (t *TenantEmailProviderInput) GetAWSSESProviderConfig() *AWSSESProviderConfig { + if t == nil { + return nil + } + return t.AWSSESProviderConfig +} + +func (t *TenantEmailProviderInput) GetC1BuiltInProviderConfig() *C1BuiltInProviderConfig { + if t == nil { + return nil + } + return t.C1BuiltInProviderConfig +} + +func (t *TenantEmailProviderInput) GetGoogleWorkspaceProviderConfig() *GoogleWorkspaceProviderConfig { + if t == nil { + return nil + } + return t.GoogleWorkspaceProviderConfig +} + +func (t *TenantEmailProviderInput) GetMicrosoftGraphProviderConfig() *MicrosoftGraphProviderConfig { + if t == nil { + return nil + } + return t.MicrosoftGraphProviderConfig +} + +func (t *TenantEmailProviderInput) GetSendGridProviderConfig() *SendGridProviderConfig { + if t == nil { + return nil + } + return t.SendGridProviderConfig +} + +func (t *TenantEmailProviderInput) GetFromAddress() *string { + if t == nil { + return nil + } + return t.FromAddress +} + +func (t *TenantEmailProviderInput) GetFromName() *string { + if t == nil { + return nil + } + return t.FromName +} + +func (t *TenantEmailProviderInput) GetReplyToAddress() *string { + if t == nil { + return nil + } + return t.ReplyToAddress +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testaccountprovisionpolicyrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testaccountprovisionpolicyrequest.go index e1529f3f..df6d29e4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testaccountprovisionpolicyrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testaccountprovisionpolicyrequest.go @@ -2,9 +2,9 @@ package shared -// The TestAccountProvisionPolicyRequest message. +// TestAccountProvisionPolicyRequest is the request for testing an account provision policy. type TestAccountProvisionPolicyRequest struct { - // The cel field. + // The CEL expression to evaluate for the account provision policy. Cel *string `json:"cel,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testaccountprovisionpolicyresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testaccountprovisionpolicyresponse.go index c5feeb19..d201d055 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testaccountprovisionpolicyresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testaccountprovisionpolicyresponse.go @@ -2,11 +2,11 @@ package shared -// The TestAccountProvisionPolicyResponse message. +// TestAccountProvisionPolicyResponse is the response for testing an account provision policy. type TestAccountProvisionPolicyResponse struct { - // The type field. + // The data type of the computed result value. Type *string `json:"type,omitempty"` - // The value field. + // The computed result value of the CEL expression evaluation. Value *string `json:"value,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testsourceiprequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testsourceiprequest.go index d95159ba..92583b7b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testsourceiprequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testsourceiprequest.go @@ -4,9 +4,11 @@ package shared // The TestSourceIPRequest message. type TestSourceIPRequest struct { - // The allowCidr field. + // The CIDR allowlist rules to test against. If empty, uses the tenant's current allowlist. + // Accepts IPv4 (e.g. 10.0.0.0/24) or IPv6 (e.g. 2001:db8::/32) CIDRs. AllowCidr []string `json:"allowCidr,omitempty"` - // if unset, uses the source IP of the request + // if unset, uses the source IP of the request. + // Accepts IPv4 (e.g. 10.0.0.5) or IPv6 (e.g. 2001:db8::1) addresses, optionally with a CIDR prefix. SourceIP *string `json:"sourceIp,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testsourceipresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testsourceipresponse.go index 00b8ba04..9de26829 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testsourceipresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testsourceipresponse.go @@ -12,9 +12,9 @@ type TestSourceIPResponse struct { // You can find out more about this error model and how to work with it in the // [API Design Guide](https://cloud.google.com/apis/design/errors). Status *Status `json:"details,omitempty"` - // The allowed field. + // Whether the tested IP address is allowed by the CIDR rules. Allowed *bool `json:"allowed,omitempty"` - // The checkedIp field. + // The IP address that was checked, either from the request or inferred from the caller. CheckedIP *string `json:"checkedIp,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testtenantemailproviderrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testtenantemailproviderrequest.go new file mode 100644 index 00000000..1db3d23c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testtenantemailproviderrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TestTenantEmailProviderRequest message. +type TestTenantEmailProviderRequest struct { + // The email address to send the test email to. + TestRecipientEmail *string `json:"testRecipientEmail,omitempty"` +} + +func (t *TestTenantEmailProviderRequest) GetTestRecipientEmail() *string { + if t == nil { + return nil + } + return t.TestRecipientEmail +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testtenantemailproviderresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testtenantemailproviderresponse.go new file mode 100644 index 00000000..043bcf9f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testtenantemailproviderresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TestTenantEmailProviderResponse message. +type TestTenantEmailProviderResponse struct { + // Human-readable detail about the result. + Message *string `json:"message,omitempty"` + // Whether the test email was sent successfully. + Success *bool `json:"success,omitempty"` +} + +func (t *TestTenantEmailProviderResponse) GetMessage() *string { + if t == nil { + return nil + } + return t.Message +} + +func (t *TestTenantEmailProviderResponse) GetSuccess() *bool { + if t == nil { + return nil + } + return t.Success +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testtokenstepresult.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testtokenstepresult.go new file mode 100644 index 00000000..567116a7 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/testtokenstepresult.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// TestTokenStepResult represents the result of a single validation step. +type TestTokenStepResult struct { + // Actual value from the token. + Actual *string `json:"actual,omitempty"` + // Human-readable detail message. + Detail *string `json:"detail,omitempty"` + // Expected value (for comparison steps). + Expected *string `json:"expected,omitempty"` + // Whether this step passed. + Passed *bool `json:"passed,omitempty"` + // Whether this step was skipped (e.g., CIDR check when no allowlist configured). + Skipped *bool `json:"skipped,omitempty"` + // Step name for display (e.g., "JWT decode", "Issuer match"). + StepName *string `json:"stepName,omitempty"` +} + +func (t *TestTokenStepResult) GetActual() *string { + if t == nil { + return nil + } + return t.Actual +} + +func (t *TestTokenStepResult) GetDetail() *string { + if t == nil { + return nil + } + return t.Detail +} + +func (t *TestTokenStepResult) GetExpected() *string { + if t == nil { + return nil + } + return t.Expected +} + +func (t *TestTokenStepResult) GetPassed() *bool { + if t == nil { + return nil + } + return t.Passed +} + +func (t *TestTokenStepResult) GetSkipped() *bool { + if t == nil { + return nil + } + return t.Skipped +} + +func (t *TestTokenStepResult) GetStepName() *string { + if t == nil { + return nil + } + return t.StepName +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/textcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/textcomponent.go new file mode 100644 index 00000000..cceabf4a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/textcomponent.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// TextComponent displays text content. +type TextComponent struct { + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"text,omitempty"` + // The markdown field. + Markdown *bool `json:"markdown,omitempty"` +} + +func (t *TextComponent) GetDynamicString() *DynamicString { + if t == nil { + return nil + } + return t.DynamicString +} + +func (t *TextComponent) GetMarkdown() *bool { + if t == nil { + return nil + } + return t.Markdown +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/textfield.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/textfield.go index 09e8990f..74ef6001 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/textfield.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/textfield.go @@ -6,6 +6,8 @@ package shared type TextField struct { // The multiline field. Multiline *bool `json:"multiline,omitempty"` + // Static text displayed as an end adornment (e.g. ".example.com" for domain fields). + Suffix *string `json:"suffix,omitempty"` } func (t *TextField) GetMultiline() *bool { @@ -14,3 +16,10 @@ func (t *TextField) GetMultiline() *bool { } return t.Multiline } + +func (t *TextField) GetSuffix() *string { + if t == nil { + return nil + } + return t.Suffix +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/textfieldcomponent.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/textfieldcomponent.go new file mode 100644 index 00000000..39b37490 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/textfieldcomponent.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// TextFieldComponentVariant - The variant field. +type TextFieldComponentVariant string + +const ( + TextFieldComponentVariantTextFieldVariantUnspecified TextFieldComponentVariant = "TEXT_FIELD_VARIANT_UNSPECIFIED" + TextFieldComponentVariantTextFieldVariantShortText TextFieldComponentVariant = "TEXT_FIELD_VARIANT_SHORT_TEXT" + TextFieldComponentVariantTextFieldVariantLongText TextFieldComponentVariant = "TEXT_FIELD_VARIANT_LONG_TEXT" + TextFieldComponentVariantTextFieldVariantNumber TextFieldComponentVariant = "TEXT_FIELD_VARIANT_NUMBER" + TextFieldComponentVariantTextFieldVariantObscured TextFieldComponentVariant = "TEXT_FIELD_VARIANT_OBSCURED" +) + +func (e TextFieldComponentVariant) ToPointer() *TextFieldComponentVariant { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *TextFieldComponentVariant) IsExact() bool { + if e != nil { + switch *e { + case "TEXT_FIELD_VARIANT_UNSPECIFIED", "TEXT_FIELD_VARIANT_SHORT_TEXT", "TEXT_FIELD_VARIANT_LONG_TEXT", "TEXT_FIELD_VARIANT_NUMBER", "TEXT_FIELD_VARIANT_OBSCURED": + return true + } + } + return false +} + +// TextFieldComponent is a text input field. +type TextFieldComponent struct { + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString *DynamicString `json:"label,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString1 *DynamicString `json:"placeholder,omitempty"` + // DynamicString can be a literal value, a JSON pointer path, or a function call. + // + // This message contains a oneof named value. Only a single field of the following list may be set at a time: + // - literal + // - path + // - call + // + DynamicString2 *DynamicString `json:"value,omitempty"` + // The checks field. + Checks []*FunctionCall `json:"checks,omitempty"` + // The variant field. + Variant *TextFieldComponentVariant `json:"variant,omitempty"` +} + +func (t *TextFieldComponent) GetDynamicString() *DynamicString { + if t == nil { + return nil + } + return t.DynamicString +} + +func (t *TextFieldComponent) GetDynamicString1() *DynamicString { + if t == nil { + return nil + } + return t.DynamicString1 +} + +func (t *TextFieldComponent) GetDynamicString2() *DynamicString { + if t == nil { + return nil + } + return t.DynamicString2 +} + +func (t *TextFieldComponent) GetChecks() []*FunctionCall { + if t == nil { + return nil + } + return t.Checks +} + +func (t *TextFieldComponent) GetVariant() *TextFieldComponentVariant { + if t == nil { + return nil + } + return t.Variant +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggeranalysisrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggeranalysisrequest.go new file mode 100644 index 00000000..53df3616 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggeranalysisrequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TriggerAnalysisRequest message. +type TriggerAnalysisRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggeranalysisresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggeranalysisresponse.go new file mode 100644 index 00000000..859caa9c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggeranalysisresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TriggerAnalysisResponse message. +type TriggerAnalysisResponse struct { + // The ID of the newly created analysis run. + RunID *string `json:"runId,omitempty"` +} + +func (t *TriggerAnalysisResponse) GetRunID() *string { + if t == nil { + return nil + } + return t.RunID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggercustomanalysisrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggercustomanalysisrequest.go new file mode 100644 index 00000000..617bc1e0 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggercustomanalysisrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TriggerCustomAnalysisRequest message. +type TriggerCustomAnalysisRequest struct { + // The profileFilters field. + ProfileFilters []ProfileFilter `json:"profileFilters,omitempty"` +} + +func (t *TriggerCustomAnalysisRequest) GetProfileFilters() []ProfileFilter { + if t == nil { + return nil + } + return t.ProfileFilters +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggercustomanalysisresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggercustomanalysisresponse.go new file mode 100644 index 00000000..2c09c451 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/triggercustomanalysisresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The TriggerCustomAnalysisResponse message. +type TriggerCustomAnalysisResponse struct { + // The id field. + ID *string `json:"id,omitempty"` +} + +func (t *TriggerCustomAnalysisResponse) GetID() *string { + if t == nil { + return nil + } + return t.ID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/uint32rules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/uint32rules.go index dba6fa3a..9976e0d5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/uint32rules.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/uint32rules.go @@ -86,3 +86,6 @@ func (u *UInt32Rules) GetNotIn() []int64 { } return u.NotIn } + +// #region class-body-uint32rules +// #endregion class-body-uint32rules diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/uint64rules.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/uint64rules.go index 076b216e..01be862e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/uint64rules.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/uint64rules.go @@ -86,3 +86,6 @@ func (u *UInt64Rules) GetNotIn() []string { } return u.NotIn } + +// #region class-body-uint64rules +// #endregion class-body-uint64rules diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/unsuppressaction.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/unsuppressaction.go new file mode 100644 index 00000000..30f68193 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/unsuppressaction.go @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// UnsuppressAction parameters for UpdateFindingState. +// +// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. +type UnsuppressAction struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateautomationresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateautomationresponse.go index 2f259ba4..c142e113 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateautomationresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateautomationresponse.go @@ -10,7 +10,12 @@ type UpdateAutomationResponse struct { // - circuitBreaker // Automation *Automation `json:"automation,omitempty"` - // If we create a new trigger with an HMAC secret we return the HMAC on this field + // One-time absolute webhook URL for capability URL authentication, shown once when the trigger is saved. + // Contains the full URL including the embedded token (e.g. https://tenant.conductorone.com/api/v1/webhooks/incoming/{id}/t/{token}). + // Populated only when the webhook trigger uses capability URL authentication. + WebhookCapabilityURL *string `json:"webhookCapabilityUrl,omitempty"` + // One-time HMAC shared secret, shown once when the trigger is saved. + // Populated only when the webhook trigger uses HMAC authentication. WebhookHmacSecret *string `json:"webhookHmacSecret,omitempty"` } @@ -21,6 +26,13 @@ func (u *UpdateAutomationResponse) GetAutomation() *Automation { return u.Automation } +func (u *UpdateAutomationResponse) GetWebhookCapabilityURL() *string { + if u == nil { + return nil + } + return u.WebhookCapabilityURL +} + func (u *UpdateAutomationResponse) GetWebhookHmacSecret() *string { if u == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateconnectorschedulerequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateconnectorschedulerequest.go index 53bec318..1ee3fa15 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateconnectorschedulerequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateconnectorschedulerequest.go @@ -2,12 +2,12 @@ package shared -// The UpdateConnectorScheduleRequest message. +// The UpdateConnectorScheduleRequest message contains the fields required to update a connector's sync schedule. // // This message contains a oneof named schedule. Only a single field of the following list may be set at a time: // - cron type UpdateConnectorScheduleRequest struct { - // The ConnectorScheduleCron message. + // A cron-based schedule definition for connector syncs. ConnectorScheduleCron *ConnectorScheduleCron `json:"cron,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateconnectorscheduleresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateconnectorscheduleresponse.go index 4e423bb1..d90b6818 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateconnectorscheduleresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateconnectorscheduleresponse.go @@ -2,6 +2,6 @@ package shared -// The UpdateConnectorScheduleResponse message. +// UpdateConnectorScheduleResponse - Empty response body. Status code indicates success. type UpdateConnectorScheduleResponse struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatecontactsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatecontactsrequest.go new file mode 100644 index 00000000..8a4e99da --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatecontactsrequest.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateContactsRequest message. +type UpdateContactsRequest struct { + // Contacts represents the contact configuration for an organization. + Contacts *ContactsInput `json:"contacts,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` +} + +func (u *UpdateContactsRequest) GetContacts() *ContactsInput { + if u == nil { + return nil + } + return u.Contacts +} + +func (u *UpdateContactsRequest) GetUpdateMask() *string { + if u == nil { + return nil + } + return u.UpdateMask +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatecontactsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatecontactsresponse.go new file mode 100644 index 00000000..71b83bd6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatecontactsresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateContactsResponse message. +type UpdateContactsResponse struct { + // Contacts represents the contact configuration for an organization. + Contacts *Contacts `json:"contacts,omitempty"` +} + +func (u *UpdateContactsResponse) GetContacts() *Contacts { + if u == nil { + return nil + } + return u.Contacts +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingroutingrulerequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingroutingrulerequest.go new file mode 100644 index 00000000..42f68e96 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingroutingrulerequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateFindingRoutingRuleRequest message. +type UpdateFindingRoutingRuleRequest struct { + // The FindingRoutingRule message. + FindingRoutingRule *FindingRoutingRule `json:"routingRule,omitempty"` +} + +func (u *UpdateFindingRoutingRuleRequest) GetFindingRoutingRule() *FindingRoutingRule { + if u == nil { + return nil + } + return u.FindingRoutingRule +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingroutingruleresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingroutingruleresponse.go new file mode 100644 index 00000000..82dab976 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingroutingruleresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateFindingRoutingRuleResponse message. +type UpdateFindingRoutingRuleResponse struct { + // The FindingRoutingRule message. + FindingRoutingRule *FindingRoutingRule `json:"routingRule,omitempty"` +} + +func (u *UpdateFindingRoutingRuleResponse) GetFindingRoutingRule() *FindingRoutingRule { + if u == nil { + return nil + } + return u.FindingRoutingRule +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingstaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingstaterequest.go new file mode 100644 index 00000000..b32e2e22 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingstaterequest.go @@ -0,0 +1,71 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateFindingStateRequest message. +// +// This message contains a oneof named action. Only a single field of the following list may be set at a time: +// - snooze +// - suppress +// - acceptRisk +// - unsuppress +// - resolve +// - reopen +type UpdateFindingStateRequest struct { + // AcceptRiskAction parameters for UpdateFindingState. + AcceptRiskAction *AcceptRiskAction `json:"acceptRisk,omitempty"` + // ReopenAction parameters for UpdateFindingState. + ReopenAction *ReopenAction `json:"reopen,omitempty"` + // ResolveAction parameters for UpdateFindingState (manual resolve). + ResolveAction *ResolveAction `json:"resolve,omitempty"` + // SnoozeAction parameters for UpdateFindingState. + SnoozeAction *SnoozeAction `json:"snooze,omitempty"` + // SuppressStateAction parameters for UpdateFindingState. + SuppressStateAction *SuppressStateAction `json:"suppress,omitempty"` + // UnsuppressAction parameters for UpdateFindingState. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + UnsuppressAction *UnsuppressAction `json:"unsuppress,omitempty"` +} + +func (u *UpdateFindingStateRequest) GetAcceptRiskAction() *AcceptRiskAction { + if u == nil { + return nil + } + return u.AcceptRiskAction +} + +func (u *UpdateFindingStateRequest) GetReopenAction() *ReopenAction { + if u == nil { + return nil + } + return u.ReopenAction +} + +func (u *UpdateFindingStateRequest) GetResolveAction() *ResolveAction { + if u == nil { + return nil + } + return u.ResolveAction +} + +func (u *UpdateFindingStateRequest) GetSnoozeAction() *SnoozeAction { + if u == nil { + return nil + } + return u.SnoozeAction +} + +func (u *UpdateFindingStateRequest) GetSuppressStateAction() *SuppressStateAction { + if u == nil { + return nil + } + return u.SuppressStateAction +} + +func (u *UpdateFindingStateRequest) GetUnsuppressAction() *UnsuppressAction { + if u == nil { + return nil + } + return u.UnsuppressAction +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingstateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingstateresponse.go new file mode 100644 index 00000000..b1a2e78b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatefindingstateresponse.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateFindingStateResponse message. +type UpdateFindingStateResponse struct { + // The Finding message. + // + // This message contains a oneof named finding_type. Only a single field of the following list may be set at a time: + // - similarUsernameMatch + // - serviceAccountMisclassification + // + // + // This message contains a oneof named target. Only a single field of the following list may be set at a time: + // - identityUserTarget + // - appUserTarget + // + // + // This message contains a oneof named evidence. Only a single field of the following list may be set at a time: + // - similarUsernameMatchEvidence + // - serviceAccountMisclassificationEvidence + // + Finding *Finding `json:"finding,omitempty"` +} + +func (u *UpdateFindingStateResponse) GetFinding() *Finding { + if u == nil { + return nil + } + return u.Finding +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updategrantdurationrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updategrantdurationrequest.go index 16e65e0d..b2e8af07 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updategrantdurationrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updategrantdurationrequest.go @@ -7,7 +7,7 @@ import ( "time" ) -// The UpdateGrantDurationRequest message. +// UpdateGrantDurationRequest - The request message for updating the duration of an existing grant. type UpdateGrantDurationRequest struct { NewDeprovisionAt *time.Time `json:"newDeprovisionAt,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updategrantdurationresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updategrantdurationresponse.go index 38e39ef2..6e8c5903 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updategrantdurationresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updategrantdurationresponse.go @@ -2,7 +2,7 @@ package shared -// The UpdateGrantDurationResponse message. +// UpdateGrantDurationResponse - The response message for updating the duration of a grant. type UpdateGrantDurationResponse struct { // The AppEntitlementUserBinding represents the relationship that gives an app user access to an app entitlement AppEntitlementUserBinding *AppEntitlementUserBinding `json:"binding,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatemanuallymanagedresourcetyperequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatemanuallymanagedresourcetyperequest.go index 7aebcbfd..92ea5f4a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatemanuallymanagedresourcetyperequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatemanuallymanagedresourcetyperequest.go @@ -2,7 +2,7 @@ package shared -// The UpdateManuallyManagedResourceTypeRequest message. +// UpdateManuallyManagedResourceTypeRequest - The request message for updating a manually managed resource type. type UpdateManuallyManagedResourceTypeRequest struct { // The AppResourceType is referenced by an app entitlement defining its resource types. Commonly things like Group or Role. AppResourceType *AppResourceTypeInput `json:"appResourceType,omitempty"` diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatemanuallymanagedresourcetyperesponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatemanuallymanagedresourcetyperesponse.go index 56c76060..bc52ea41 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatemanuallymanagedresourcetyperesponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatemanuallymanagedresourcetyperesponse.go @@ -38,11 +38,11 @@ func (u *UpdateManuallyManagedResourceTypeResponseExpanded) GetAdditionalPropert return u.AdditionalProperties } -// The UpdateManuallyManagedResourceTypeResponse message. +// UpdateManuallyManagedResourceTypeResponse - The response message for updating a manually managed resource type. type UpdateManuallyManagedResourceTypeResponse struct { // The AppResourceType is referenced by an app entitlement defining its resource types. Commonly things like Group or Role. AppResourceType *AppResourceType `json:"appResourceType,omitempty"` - // The expanded field. + // List of serialized related objects. Expanded []UpdateManuallyManagedResourceTypeResponseExpanded `json:"expanded,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateonboardingsettingsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateonboardingsettingsrequest.go new file mode 100644 index 00000000..cb8d56fe --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateonboardingsettingsrequest.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// UpdateOnboardingSettingsRequestStatus - The new onboarding status to set. +type UpdateOnboardingSettingsRequestStatus string + +const ( + UpdateOnboardingSettingsRequestStatusOnboardingStatusUnspecified UpdateOnboardingSettingsRequestStatus = "ONBOARDING_STATUS_UNSPECIFIED" + UpdateOnboardingSettingsRequestStatusOnboardingStatusNotStarted UpdateOnboardingSettingsRequestStatus = "ONBOARDING_STATUS_NOT_STARTED" + UpdateOnboardingSettingsRequestStatusOnboardingStatusInProgress UpdateOnboardingSettingsRequestStatus = "ONBOARDING_STATUS_IN_PROGRESS" + UpdateOnboardingSettingsRequestStatusOnboardingStatusComplete UpdateOnboardingSettingsRequestStatus = "ONBOARDING_STATUS_COMPLETE" + UpdateOnboardingSettingsRequestStatusOnboardingStatusDismissed UpdateOnboardingSettingsRequestStatus = "ONBOARDING_STATUS_DISMISSED" +) + +func (e UpdateOnboardingSettingsRequestStatus) ToPointer() *UpdateOnboardingSettingsRequestStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *UpdateOnboardingSettingsRequestStatus) IsExact() bool { + if e != nil { + switch *e { + case "ONBOARDING_STATUS_UNSPECIFIED", "ONBOARDING_STATUS_NOT_STARTED", "ONBOARDING_STATUS_IN_PROGRESS", "ONBOARDING_STATUS_COMPLETE", "ONBOARDING_STATUS_DISMISSED": + return true + } + } + return false +} + +// The UpdateOnboardingSettingsRequest message. +type UpdateOnboardingSettingsRequest struct { + // The identifier of the onboarding conversation thread to associate. + ConversationID *string `json:"conversationId,omitempty"` + // The new onboarding status to set. + Status *UpdateOnboardingSettingsRequestStatus `json:"status,omitempty"` +} + +func (u *UpdateOnboardingSettingsRequest) GetConversationID() *string { + if u == nil { + return nil + } + return u.ConversationID +} + +func (u *UpdateOnboardingSettingsRequest) GetStatus() *UpdateOnboardingSettingsRequestStatus { + if u == nil { + return nil + } + return u.Status +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateonboardingsettingsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateonboardingsettingsresponse.go new file mode 100644 index 00000000..eac8aba3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateonboardingsettingsresponse.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// UpdateOnboardingSettingsResponseStatus - The updated onboarding status. +type UpdateOnboardingSettingsResponseStatus string + +const ( + UpdateOnboardingSettingsResponseStatusOnboardingStatusUnspecified UpdateOnboardingSettingsResponseStatus = "ONBOARDING_STATUS_UNSPECIFIED" + UpdateOnboardingSettingsResponseStatusOnboardingStatusNotStarted UpdateOnboardingSettingsResponseStatus = "ONBOARDING_STATUS_NOT_STARTED" + UpdateOnboardingSettingsResponseStatusOnboardingStatusInProgress UpdateOnboardingSettingsResponseStatus = "ONBOARDING_STATUS_IN_PROGRESS" + UpdateOnboardingSettingsResponseStatusOnboardingStatusComplete UpdateOnboardingSettingsResponseStatus = "ONBOARDING_STATUS_COMPLETE" + UpdateOnboardingSettingsResponseStatusOnboardingStatusDismissed UpdateOnboardingSettingsResponseStatus = "ONBOARDING_STATUS_DISMISSED" +) + +func (e UpdateOnboardingSettingsResponseStatus) ToPointer() *UpdateOnboardingSettingsResponseStatus { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *UpdateOnboardingSettingsResponseStatus) IsExact() bool { + if e != nil { + switch *e { + case "ONBOARDING_STATUS_UNSPECIFIED", "ONBOARDING_STATUS_NOT_STARTED", "ONBOARDING_STATUS_IN_PROGRESS", "ONBOARDING_STATUS_COMPLETE", "ONBOARDING_STATUS_DISMISSED": + return true + } + } + return false +} + +// The UpdateOnboardingSettingsResponse message. +type UpdateOnboardingSettingsResponse struct { + // The updated onboarding status. + Status *UpdateOnboardingSettingsResponseStatus `json:"status,omitempty"` +} + +func (u *UpdateOnboardingSettingsResponse) GetStatus() *UpdateOnboardingSettingsResponseStatus { + if u == nil { + return nil + } + return u.Status +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgdomainrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgdomainrequest.go index 3a609e73..552a859e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgdomainrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgdomainrequest.go @@ -4,7 +4,7 @@ package shared // The UpdateOrgDomainRequest message. type UpdateOrgDomainRequest struct { - // The newDomains field. + // The complete list of domain names that should be set as the tenant's verified domains. NewDomains []string `json:"newDomains,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgdomainresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgdomainresponse.go index 4b7125c0..0f43668d 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgdomainresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgdomainresponse.go @@ -4,7 +4,7 @@ package shared // The UpdateOrgDomainResponse message. type UpdateOrgDomainResponse struct { - // The list field. + // The resulting list of verified domains after the update. List []OrgDomain `json:"list,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgnotificationsettingsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgnotificationsettingsrequest.go new file mode 100644 index 00000000..7bdd9cce --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgnotificationsettingsrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateOrgNotificationSettingsRequest message. +type UpdateOrgNotificationSettingsRequest struct { + // ChannelSettings groups notification preferences for all supported channels. + ChannelSettings *ChannelSettings `json:"channelSettings,omitempty"` +} + +func (u *UpdateOrgNotificationSettingsRequest) GetChannelSettings() *ChannelSettings { + if u == nil { + return nil + } + return u.ChannelSettings +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgnotificationsettingsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgnotificationsettingsresponse.go new file mode 100644 index 00000000..28850c83 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateorgnotificationsettingsresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateOrgNotificationSettingsResponse message. +type UpdateOrgNotificationSettingsResponse struct { + // OrgNotificationSettings contains organization-wide notification channel configurations and default preferences. + OrgNotificationSettings *OrgNotificationSettings `json:"orgNotificationSettings,omitempty"` +} + +func (u *UpdateOrgNotificationSettingsResponse) GetOrgNotificationSettings() *OrgNotificationSettings { + if u == nil { + return nil + } + return u.OrgNotificationSettings +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatepolicyrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatepolicyrequest.go index d38a5b19..e35ef79a 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatepolicyrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatepolicyrequest.go @@ -4,7 +4,10 @@ package shared // The UpdatePolicyRequest message contains the policy object to update and a field mask to indicate which fields to update. It uses URL value for input. type UpdatePolicyRequest struct { - // A policy describes the behavior of the ConductorOne system when processing a task. You can describe the type, approvers, fallback behavior, and escalation processes. + // A policy defines a workflow (sequence of steps) that runs when processing + // access requests, reviews, or revocations. Policies support conditional + // routing: different conditions can trigger different step sequences, with a + // baseline fallback. Policy *PolicyInput `json:"policy,omitempty"` UpdateMask *string `json:"updateMask,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatepolicyresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatepolicyresponse.go index 24454e2e..8102e649 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatepolicyresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatepolicyresponse.go @@ -4,7 +4,10 @@ package shared // The UpdatePolicyResponse message contains the updated policy object. type UpdatePolicyResponse struct { - // A policy describes the behavior of the ConductorOne system when processing a task. You can describe the type, approvers, fallback behavior, and escalation processes. + // A policy defines a workflow (sequence of steps) that runs when processing + // access requests, reviews, or revocations. Policies support conditional + // routing: different conditions can trigger different step sequences, with a + // baseline fallback. Policy *Policy `json:"policy,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateroleminingconfigrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateroleminingconfigrequest.go new file mode 100644 index 00000000..5fdfa8e8 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateroleminingconfigrequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateRoleMiningConfigRequest message. +type UpdateRoleMiningConfigRequest struct { + // Hints that guide the analysis to prioritize specific user attributes and values when forming cohorts. + CohortHints []CohortHintInput `json:"cohortHints,omitempty"` + // Maximum number of suggestions the analysis should produce per run. + MaxSuggestions *int `json:"maxSuggestions,omitempty"` + // Minimum number of users a cohort must contain to generate a suggestion. + MinCohortSize *int `json:"minCohortSize,omitempty"` +} + +func (u *UpdateRoleMiningConfigRequest) GetCohortHints() []CohortHintInput { + if u == nil { + return nil + } + return u.CohortHints +} + +func (u *UpdateRoleMiningConfigRequest) GetMaxSuggestions() *int { + if u == nil { + return nil + } + return u.MaxSuggestions +} + +func (u *UpdateRoleMiningConfigRequest) GetMinCohortSize() *int { + if u == nil { + return nil + } + return u.MinCohortSize +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateroleminingconfigresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateroleminingconfigresponse.go new file mode 100644 index 00000000..86059161 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateroleminingconfigresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateRoleMiningConfigResponse message. +type UpdateRoleMiningConfigResponse struct { + // The RoleMiningManagementConfig message. + RoleMiningManagementConfig *RoleMiningManagementConfig `json:"config,omitempty"` +} + +func (u *UpdateRoleMiningConfigResponse) GetRoleMiningManagementConfig() *RoleMiningManagementConfig { + if u == nil { + return nil + } + return u.RoleMiningManagementConfig +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesessionsettingsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesessionsettingsrequest.go index 18b6294e..04a19835 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesessionsettingsrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesessionsettingsrequest.go @@ -4,7 +4,7 @@ package shared // The UpdateSessionSettingsRequest message. type UpdateSessionSettingsRequest struct { - // The SessionSettings message. + // SessionSettings configures session security for the tenant, including timeouts and per-role IP restrictions. SessionSettings *SessionSettings `json:"sessionSettings,omitempty"` UpdateMask *string `json:"updateMask,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesessionsettingsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesessionsettingsresponse.go index 7178799a..76e2aaf1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesessionsettingsresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesessionsettingsresponse.go @@ -4,7 +4,7 @@ package shared // The UpdateSessionSettingsResponse message. type UpdateSessionSettingsResponse struct { - // The SessionSettings message. + // SessionSettings configures session security for the tenant, including timeouts and per-role IP restrictions. SessionSettings *SessionSettings `json:"sessionSettings,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupproviderrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupproviderrequest.go index 35895e6d..58173bee 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupproviderrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupproviderrequest.go @@ -4,7 +4,7 @@ package shared // The UpdateStepUpProviderRequest message. type UpdateStepUpProviderRequest struct { - // The StepUpProvider message. + // StepUpProvider represents a configured step-up authentication integration (e.g., Duo, custom OIDC). // // This message contains a oneof named settings. Only a single field of the following list may be set at a time: // - oauth2 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupproviderresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupproviderresponse.go index 002da072..6f9a2450 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupproviderresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupproviderresponse.go @@ -4,7 +4,7 @@ package shared // The UpdateStepUpProviderResponse message. type UpdateStepUpProviderResponse struct { - // The StepUpProvider message. + // StepUpProvider represents a configured step-up authentication integration (e.g., Duo, custom OIDC). // // This message contains a oneof named settings. Only a single field of the following list may be set at a time: // - oauth2 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupprovidersecretrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupprovidersecretrequest.go index eee714dd..2bc83d31 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupprovidersecretrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupprovidersecretrequest.go @@ -4,7 +4,7 @@ package shared // The UpdateStepUpProviderSecretRequest message. type UpdateStepUpProviderSecretRequest struct { - // The clientSecret field. + // The new OAuth2 client secret. Write-only; never returned in responses. ClientSecret *string `json:"clientSecret,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupprovidersecretresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupprovidersecretresponse.go index 6080018b..3ad507bd 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupprovidersecretresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatestepupprovidersecretresponse.go @@ -4,7 +4,7 @@ package shared // The UpdateStepUpProviderSecretResponse message. type UpdateStepUpProviderSecretResponse struct { - // The StepUpProvider message. + // StepUpProvider represents a configured step-up authentication integration (e.g., Duo, custom OIDC). // // This message contains a oneof named settings. Only a single field of the following list may be set at a time: // - oauth2 diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesuggestionstaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesuggestionstaterequest.go new file mode 100644 index 00000000..aeb3809f --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesuggestionstaterequest.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// UpdateSuggestionStateRequestState - The new state to transition the suggestion to. +type UpdateSuggestionStateRequestState string + +const ( + UpdateSuggestionStateRequestStateSuggestionStateUnspecified UpdateSuggestionStateRequestState = "SUGGESTION_STATE_UNSPECIFIED" + UpdateSuggestionStateRequestStateSuggestionStateNew UpdateSuggestionStateRequestState = "SUGGESTION_STATE_NEW" + UpdateSuggestionStateRequestStateSuggestionStateDismissed UpdateSuggestionStateRequestState = "SUGGESTION_STATE_DISMISSED" + UpdateSuggestionStateRequestStateSuggestionStateAccepted UpdateSuggestionStateRequestState = "SUGGESTION_STATE_ACCEPTED" +) + +func (e UpdateSuggestionStateRequestState) ToPointer() *UpdateSuggestionStateRequestState { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *UpdateSuggestionStateRequestState) IsExact() bool { + if e != nil { + switch *e { + case "SUGGESTION_STATE_UNSPECIFIED", "SUGGESTION_STATE_NEW", "SUGGESTION_STATE_DISMISSED", "SUGGESTION_STATE_ACCEPTED": + return true + } + } + return false +} + +// The UpdateSuggestionStateRequest message. +type UpdateSuggestionStateRequest struct { + // The ID of the access profile created from this suggestion, set when accepting. + CreatedCatalogID *string `json:"createdCatalogId,omitempty"` + // The new state to transition the suggestion to. + State *UpdateSuggestionStateRequestState `json:"state,omitempty"` +} + +func (u *UpdateSuggestionStateRequest) GetCreatedCatalogID() *string { + if u == nil { + return nil + } + return u.CreatedCatalogID +} + +func (u *UpdateSuggestionStateRequest) GetState() *UpdateSuggestionStateRequestState { + if u == nil { + return nil + } + return u.State +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesuggestionstateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesuggestionstateresponse.go new file mode 100644 index 00000000..8240f9b5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatesuggestionstateresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateSuggestionStateResponse message. +type UpdateSuggestionStateResponse struct { + // The RoleMiningManagementSuggestion message. + RoleMiningManagementSuggestion *RoleMiningManagementSuggestion `json:"suggestion,omitempty"` +} + +func (u *UpdateSuggestionStateResponse) GetRoleMiningManagementSuggestion() *RoleMiningManagementSuggestion { + if u == nil { + return nil + } + return u.RoleMiningManagementSuggestion +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatetenantemailproviderrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatetenantemailproviderrequest.go new file mode 100644 index 00000000..03f54723 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatetenantemailproviderrequest.go @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateTenantEmailProviderRequest message. +type UpdateTenantEmailProviderRequest struct { + // TenantEmailProvider is the API representation of the tenant's email provider. + // + // This message contains a oneof named provider. Only a single field of the following list may be set at a time: + // - c1Builtin + // - awsSes + // - sendgrid + // - microsoftGraph + // - googleWorkspace + // + TenantEmailProvider *TenantEmailProviderInput `json:"emailProvider,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` +} + +func (u *UpdateTenantEmailProviderRequest) GetTenantEmailProvider() *TenantEmailProviderInput { + if u == nil { + return nil + } + return u.TenantEmailProvider +} + +func (u *UpdateTenantEmailProviderRequest) GetUpdateMask() *string { + if u == nil { + return nil + } + return u.UpdateMask +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatetenantemailproviderresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatetenantemailproviderresponse.go new file mode 100644 index 00000000..e2a23e5c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updatetenantemailproviderresponse.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateTenantEmailProviderResponse message. +type UpdateTenantEmailProviderResponse struct { + // TenantEmailProvider is the API representation of the tenant's email provider. + // + // This message contains a oneof named provider. Only a single field of the following list may be set at a time: + // - c1Builtin + // - awsSes + // - sendgrid + // - microsoftGraph + // - googleWorkspace + // + TenantEmailProvider *TenantEmailProvider `json:"emailProvider,omitempty"` +} + +func (u *UpdateTenantEmailProviderResponse) GetTenantEmailProvider() *TenantEmailProvider { + if u == nil { + return nil + } + return u.TenantEmailProvider +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateusernotificationsettingsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateusernotificationsettingsrequest.go new file mode 100644 index 00000000..ccf922ba --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateusernotificationsettingsrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateUserNotificationSettingsRequest message. +type UpdateUserNotificationSettingsRequest struct { + // ChannelSettings groups notification preferences for all supported channels. + ChannelSettings *ChannelSettings `json:"channelSettings,omitempty"` +} + +func (u *UpdateUserNotificationSettingsRequest) GetChannelSettings() *ChannelSettings { + if u == nil { + return nil + } + return u.ChannelSettings +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateusernotificationsettingsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateusernotificationsettingsresponse.go new file mode 100644 index 00000000..62ad1925 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/updateusernotificationsettingsresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The UpdateUserNotificationSettingsResponse message. +type UpdateUserNotificationSettingsResponse struct { + // UserNotificationSettings contains the calling user's personal notification preferences. + UserNotificationSettings *UserNotificationSettings `json:"userNotificationSettings,omitempty"` +} + +func (u *UpdateUserNotificationSettingsResponse) GetUserNotificationSettings() *UserNotificationSettings { + if u == nil { + return nil + } + return u.UserNotificationSettings +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/user.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/user.go index 82210c2c..6bc5e469 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/user.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/user.go @@ -32,6 +32,31 @@ func (e *DirectoryStatus) IsExact() bool { return false } +// UserOrigin - The origin of the user, describing who owns the user's lifecycle. +type UserOrigin string + +const ( + UserOriginUserOriginUnspecified UserOrigin = "USER_ORIGIN_UNSPECIFIED" + UserOriginUserOriginDirectory UserOrigin = "USER_ORIGIN_DIRECTORY" + UserOriginUserOriginLocal UserOrigin = "USER_ORIGIN_LOCAL" + UserOriginUserOriginSystem UserOrigin = "USER_ORIGIN_SYSTEM" +) + +func (e UserOrigin) ToPointer() *UserOrigin { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *UserOrigin) IsExact() bool { + if e != nil { + switch *e { + case "USER_ORIGIN_UNSPECIFIED", "USER_ORIGIN_DIRECTORY", "USER_ORIGIN_LOCAL", "USER_ORIGIN_SYSTEM": + return true + } + } + return false +} + // UserSchemasStatus - The status of the user in the system. type UserSchemasStatus string @@ -129,7 +154,9 @@ type User struct { ManagerIds []string `json:"managerIds,omitempty"` // A list of objects mapped based on managerId attribute mappings configured in the system. ManagerSources []UserAttributeMappingSource `json:"managerSources,omitempty"` - Profile map[string]any `json:"profile,omitempty"` + // The origin of the user, describing who owns the user's lifecycle. + Origin *UserOrigin `json:"origin,omitempty"` + Profile map[string]any `json:"profile,omitempty"` // A list of unique identifiers that maps to ConductorOne's user roles let you assign users permissions tailored to the work they do in the software. RoleIds []string `json:"roleIds,omitempty"` // The status of the user in the system. @@ -317,6 +344,13 @@ func (u *User) GetManagerSources() []UserAttributeMappingSource { return u.ManagerSources } +func (u *User) GetOrigin() *UserOrigin { + if u == nil { + return nil + } + return u.Origin +} + func (u *User) GetProfile() map[string]any { if u == nil { return nil @@ -372,3 +406,34 @@ func (u *User) GetUsernames() []string { } return u.Usernames } + +// UserInput - The User object provides all of the details for an user, as well as some configuration. +type UserInput struct { + // The id of the user to whom tasks will be automatically reassigned to. + DelegatedUserID *string `json:"delegatedUserId,omitempty"` + // A list of unique identifiers that maps to ConductorOne's user roles let you assign users permissions tailored to the work they do in the software. + RoleIds []string `json:"roleIds,omitempty"` + // The status of the user in the system. + Status *UserSchemasStatus `json:"status,omitempty"` +} + +func (u *UserInput) GetDelegatedUserID() *string { + if u == nil { + return nil + } + return u.DelegatedUserID +} + +func (u *UserInput) GetRoleIds() []string { + if u == nil { + return nil + } + return u.RoleIds +} + +func (u *UserInput) GetStatus() *UserSchemasStatus { + if u == nil { + return nil + } + return u.Status +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/usernotificationsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/usernotificationsettings.go new file mode 100644 index 00000000..23fed958 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/usernotificationsettings.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// UserNotificationSettings contains the calling user's personal notification preferences. +type UserNotificationSettings struct { + // ChannelSettings groups notification preferences for all supported channels. + ChannelSettings *ChannelSettings `json:"channelSettings,omitempty"` +} + +func (u *UserNotificationSettings) GetChannelSettings() *ChannelSettings { + if u == nil { + return nil + } + return u.ChannelSettings +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/userownershipentry.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/userownershipentry.go new file mode 100644 index 00000000..62327a6c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/userownershipentry.go @@ -0,0 +1,108 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// OwnershipType - The type of ownership. +type OwnershipType string + +const ( + OwnershipTypeUserOwnershipTypeUnspecified OwnershipType = "USER_OWNERSHIP_TYPE_UNSPECIFIED" + OwnershipTypeUserOwnershipTypeApp OwnershipType = "USER_OWNERSHIP_TYPE_APP" + OwnershipTypeUserOwnershipTypeResource OwnershipType = "USER_OWNERSHIP_TYPE_RESOURCE" + OwnershipTypeUserOwnershipTypeEntitlement OwnershipType = "USER_OWNERSHIP_TYPE_ENTITLEMENT" +) + +func (e OwnershipType) ToPointer() *OwnershipType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *OwnershipType) IsExact() bool { + if e != nil { + switch *e { + case "USER_OWNERSHIP_TYPE_UNSPECIFIED", "USER_OWNERSHIP_TYPE_APP", "USER_OWNERSHIP_TYPE_RESOURCE", "USER_OWNERSHIP_TYPE_ENTITLEMENT": + return true + } + } + return false +} + +// UserOwnershipEntry - A single ownership entry. Fields are populated based on ownership_type: +// +// APP — only app_id and app_display_name are set. +// RESOURCE — app_id, app_display_name, resource_type_id, resource_id, and resource_display_name are set. +// ENTITLEMENT — app_id, app_display_name, resource_type_id, entitlement_id, and entitlement_display_name are set. +type UserOwnershipEntry struct { + // The app display name. + AppDisplayName *string `json:"appDisplayName,omitempty"` + // The app ID. + AppID *string `json:"appId,omitempty"` + // The entitlement display name, if applicable. + EntitlementDisplayName *string `json:"entitlementDisplayName,omitempty"` + // The entitlement ID, if applicable. + EntitlementID *string `json:"entitlementId,omitempty"` + // The type of ownership. + OwnershipType *OwnershipType `json:"ownershipType,omitempty"` + // The resource display name, if applicable. + ResourceDisplayName *string `json:"resourceDisplayName,omitempty"` + // The resource ID, if applicable. + ResourceID *string `json:"resourceId,omitempty"` + // The resource type ID, if applicable. + ResourceTypeID *string `json:"resourceTypeId,omitempty"` +} + +func (u *UserOwnershipEntry) GetAppDisplayName() *string { + if u == nil { + return nil + } + return u.AppDisplayName +} + +func (u *UserOwnershipEntry) GetAppID() *string { + if u == nil { + return nil + } + return u.AppID +} + +func (u *UserOwnershipEntry) GetEntitlementDisplayName() *string { + if u == nil { + return nil + } + return u.EntitlementDisplayName +} + +func (u *UserOwnershipEntry) GetEntitlementID() *string { + if u == nil { + return nil + } + return u.EntitlementID +} + +func (u *UserOwnershipEntry) GetOwnershipType() *OwnershipType { + if u == nil { + return nil + } + return u.OwnershipType +} + +func (u *UserOwnershipEntry) GetResourceDisplayName() *string { + if u == nil { + return nil + } + return u.ResourceDisplayName +} + +func (u *UserOwnershipEntry) GetResourceID() *string { + if u == nil { + return nil + } + return u.ResourceID +} + +func (u *UserOwnershipEntry) GetResourceTypeID() *string { + if u == nil { + return nil + } + return u.ResourceTypeID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/userprovisioner.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/userprovisioner.go new file mode 100644 index 00000000..19c57b23 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/userprovisioner.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// UserProvisioner assigns specific users as provisioners. +type UserProvisioner struct { + // Whether the provisioner can reassign the task. + AllowReassignment *bool `json:"allowReassignment,omitempty"` + // The user IDs to assign as provisioners. + UserIds []string `json:"userIds,omitempty"` +} + +func (u *UserProvisioner) GetAllowReassignment() *bool { + if u == nil { + return nil + } + return u.AllowReassignment +} + +func (u *UserProvisioner) GetUserIds() []string { + if u == nil { + return nil + } + return u.UserIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/userwithappentitlementuserbindingview.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/userwithappentitlementuserbindingview.go index 57bfde70..6ab09c25 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/userwithappentitlementuserbindingview.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/userwithappentitlementuserbindingview.go @@ -6,11 +6,11 @@ package shared type UserWithAppEntitlementUserBindingView struct { // The User object provides all of the details for an user, as well as some configuration. User *User `json:"user,omitempty"` - // The appEntitlementId field. + // The ID of the app entitlement. AppEntitlementID *string `json:"appEntitlementId,omitempty"` - // The appId field. + // The ID of the app that contains the entitlement. AppID *string `json:"appId,omitempty"` - // The appUserId field. + // The ID of the app user associated with this binding. AppUserID *string `json:"appUserId,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/validationcheck.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/validationcheck.go new file mode 100644 index 00000000..6e3b9acd --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/validationcheck.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// ValidationCheck for client-side validation rules. +// +// This message contains a oneof named check. Only a single field of the following list may be set at a time: +// - call +// - and +// - or +type ValidationCheck struct { + // AndCheck requires all checks to pass. + AndCheck *AndCheck `json:"and,omitempty"` + // FunctionCall represents a client-side function invocation. + FunctionCall *FunctionCall `json:"call,omitempty"` + // OrCheck requires at least one check to pass. + OrCheck *OrCheck `json:"or,omitempty"` +} + +func (v *ValidationCheck) GetAndCheck() *AndCheck { + if v == nil { + return nil + } + return v.AndCheck +} + +func (v *ValidationCheck) GetFunctionCall() *FunctionCall { + if v == nil { + return nil + } + return v.FunctionCall +} + +func (v *ValidationCheck) GetOrCheck() *OrCheck { + if v == nil { + return nil + } + return v.OrCheck +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vault.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vault.go index 5a789bc1..e3eee53f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vault.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vault.go @@ -7,24 +7,24 @@ import ( "time" ) -// The Vault message. +// Vault represents an external secret storage integration used to store connector credentials securely. // // This message contains a oneof named vault. Only a single field of the following list may be set at a time: // - groupAuthzVault // - magicVault type Vault struct { - // The GroupAuthzVault message. + // GroupAuthzVault configures a vault that uses group-based authorization to control access to stored credentials. GroupAuthzVault *GroupAuthzVault `json:"groupAuthzVault,omitempty"` - // The MagicVault message. + // MagicVault configures a vault that grants time-limited credential access via magic links. MagicVault *MagicVault `json:"magicVault,omitempty"` CreatedAt *time.Time `json:"createdAt,omitempty"` CredentialExpirationDuration *string `json:"credentialExpirationDuration,omitempty"` DeletedAt *time.Time `json:"deletedAt,omitempty"` - // The description field. + // A free-text description of the vault's purpose or configuration. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name of the vault. DisplayName *string `json:"displayName,omitempty"` - // The id field. + // The unique identifier of the vault. ID *string `json:"id,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultinput.go index cdd64ebf..95783c40 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultinput.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultinput.go @@ -2,22 +2,22 @@ package shared -// VaultInput - The Vault message. +// VaultInput - Vault represents an external secret storage integration used to store connector credentials securely. // // This message contains a oneof named vault. Only a single field of the following list may be set at a time: // - groupAuthzVault // - magicVault type VaultInput struct { - // The GroupAuthzVault message. + // GroupAuthzVault configures a vault that uses group-based authorization to control access to stored credentials. GroupAuthzVault *GroupAuthzVault `json:"groupAuthzVault,omitempty"` - // The MagicVault message. + // MagicVault configures a vault that grants time-limited credential access via magic links. MagicVault *MagicVault `json:"magicVault,omitempty"` CredentialExpirationDuration *string `json:"credentialExpirationDuration,omitempty"` - // The description field. + // A free-text description of the vault's purpose or configuration. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name of the vault. DisplayName *string `json:"displayName,omitempty"` - // The id field. + // The unique identifier of the vault. ID *string `json:"id,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicecreaterequest.go index fb8ec2e3..1e59279b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicecreaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicecreaterequest.go @@ -2,21 +2,21 @@ package shared -// The VaultServiceCreateRequest message. +// VaultServiceCreateRequest is the request message for creating a new vault. // // This message contains a oneof named vault. Only a single field of the following list may be set at a time: // - groupAuthzVault // - magicVault type VaultServiceCreateRequest struct { - // The GroupAuthzVault message. + // GroupAuthzVault configures a vault that uses group-based authorization to control access to stored credentials. GroupAuthzVault *GroupAuthzVault `json:"groupAuthzVault,omitempty"` - // The MagicVault message. + // MagicVault configures a vault that grants time-limited credential access via magic links. MagicVault *MagicVault `json:"magicVault,omitempty"` - // The description field. + // A free-text description of the vault's purpose or configuration. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name for the new vault. DisplayName string `json:"displayName"` - // The ownerIds field. + // The IDs of users to assign as owners of this vault. OwnerIds []string `json:"ownerIds,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicecreateresponse.go index 8be2853e..0d8d3dbf 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicecreateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicecreateresponse.go @@ -2,9 +2,9 @@ package shared -// The VaultServiceCreateResponse message. +// VaultServiceCreateResponse is the response message for creating a new vault. type VaultServiceCreateResponse struct { - // The Vault message. + // Vault represents an external secret storage integration used to store connector credentials securely. // // This message contains a oneof named vault. Only a single field of the following list may be set at a time: // - groupAuthzVault diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicedeleterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicedeleterequest.go index 5bab2094..b447c16b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicedeleterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicedeleterequest.go @@ -2,6 +2,6 @@ package shared -// The VaultServiceDeleteRequest message. +// VaultServiceDeleteRequest is the request message for deleting a vault. type VaultServiceDeleteRequest struct { } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicegetresponse.go index 90b72998..d6697b93 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicegetresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultservicegetresponse.go @@ -2,9 +2,9 @@ package shared -// The VaultServiceGetResponse message. +// VaultServiceGetResponse is the response message containing the requested vault. type VaultServiceGetResponse struct { - // The Vault message. + // Vault represents an external secret storage integration used to store connector credentials securely. // // This message contains a oneof named vault. Only a single field of the following list may be set at a time: // - groupAuthzVault diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultserviceupdaterequest.go index a929bfca..80cfc9cd 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultserviceupdaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultserviceupdaterequest.go @@ -4,7 +4,7 @@ package shared // The VaultServiceUpdateRequest message contains the vault object to update and a field mask to indicate which fields to update. type VaultServiceUpdateRequest struct { - // The Vault message. + // Vault represents an external secret storage integration used to store connector credentials securely. // // This message contains a oneof named vault. Only a single field of the following list may be set at a time: // - groupAuthzVault diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultserviceupdateresponse.go index b77c6922..24b7bee1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultserviceupdateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/vaultserviceupdateresponse.go @@ -2,9 +2,9 @@ package shared -// The VaultServiceUpdateResponse message. +// VaultServiceUpdateResponse is the response message containing the updated vault. type VaultServiceUpdateResponse struct { - // The Vault message. + // Vault represents an external secret storage integration used to store connector credentials securely. // // This message contains a oneof named vault. Only a single field of the following list may be set at a time: // - groupAuthzVault diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhook1.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhook1.go deleted file mode 100644 index adc30924..00000000 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhook1.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -import ( - "github.com/conductorone/conductorone-sdk-go/pkg/utils" - "time" -) - -// Webhook1 - The Webhook message. -type Webhook1 struct { - CreatedAt *time.Time `json:"createdAt,omitempty"` - DeletedAt *time.Time `json:"deletedAt,omitempty"` - // The description field. - Description *string `json:"description,omitempty"` - // The displayName field. - DisplayName *string `json:"displayName,omitempty"` - // The id field. - ID *string `json:"id,omitempty"` - UpdatedAt *time.Time `json:"updatedAt,omitempty"` - // The url field. - URL *string `json:"url,omitempty"` -} - -func (w Webhook1) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(w, "", false) -} - -func (w *Webhook1) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &w, "", false, nil); err != nil { - return err - } - return nil -} - -func (w *Webhook1) GetCreatedAt() *time.Time { - if w == nil { - return nil - } - return w.CreatedAt -} - -func (w *Webhook1) GetDeletedAt() *time.Time { - if w == nil { - return nil - } - return w.DeletedAt -} - -func (w *Webhook1) GetDescription() *string { - if w == nil { - return nil - } - return w.Description -} - -func (w *Webhook1) GetDisplayName() *string { - if w == nil { - return nil - } - return w.DisplayName -} - -func (w *Webhook1) GetID() *string { - if w == nil { - return nil - } - return w.ID -} - -func (w *Webhook1) GetUpdatedAt() *time.Time { - if w == nil { - return nil - } - return w.UpdatedAt -} - -func (w *Webhook1) GetURL() *string { - if w == nil { - return nil - } - return w.URL -} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookautomationtrigger.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookautomationtrigger.go index 61f610fd..14822049 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookautomationtrigger.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookautomationtrigger.go @@ -7,7 +7,13 @@ package shared // This message contains a oneof named auth_config. Only a single field of the following list may be set at a time: // - jwt // - hmac +// - capabilityUrl type WebhookAutomationTrigger struct { + // Capability URL authentication: the URL itself contains an unguessable token that acts + // as the credential. This is simpler to integrate but less secure than JWT or HMAC because + // the token can leak via server logs, referrer headers, and URL sharing. + // See https://www.w3.org/TR/capability-urls/ for background. + WebhookListenerAuthCapabilityURL *WebhookListenerAuthCapabilityURL `json:"capabilityUrl,omitempty"` // The WebhookListenerAuthHMAC message. WebhookListenerAuthHMAC *WebhookListenerAuthHMAC `json:"hmac,omitempty"` // The WebhookListenerAuthJWT message. @@ -16,6 +22,13 @@ type WebhookAutomationTrigger struct { ListenerID *string `json:"listenerId,omitempty"` } +func (w *WebhookAutomationTrigger) GetWebhookListenerAuthCapabilityURL() *WebhookListenerAuthCapabilityURL { + if w == nil { + return nil + } + return w.WebhookListenerAuthCapabilityURL +} + func (w *WebhookAutomationTrigger) GetWebhookListenerAuthHMAC() *WebhookListenerAuthHMAC { if w == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookendpoint.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookendpoint.go new file mode 100644 index 00000000..ff814f4d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookendpoint.go @@ -0,0 +1,91 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// WebhookEndpoint - The Webhook message. +type WebhookEndpoint struct { + CallbackTimeout *string `json:"callbackTimeout,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + DeletedAt *time.Time `json:"deletedAt,omitempty"` + // An optional description of the webhook's purpose. + Description *string `json:"description,omitempty"` + // The human-readable name of the webhook. + DisplayName *string `json:"displayName,omitempty"` + // The unique identifier of the webhook. + ID *string `json:"id,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + // The destination URL that receives event notification HTTP callbacks. + URL *string `json:"url,omitempty"` +} + +func (w WebhookEndpoint) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(w, "", false) +} + +func (w *WebhookEndpoint) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &w, "", false, nil); err != nil { + return err + } + return nil +} + +func (w *WebhookEndpoint) GetCallbackTimeout() *string { + if w == nil { + return nil + } + return w.CallbackTimeout +} + +func (w *WebhookEndpoint) GetCreatedAt() *time.Time { + if w == nil { + return nil + } + return w.CreatedAt +} + +func (w *WebhookEndpoint) GetDeletedAt() *time.Time { + if w == nil { + return nil + } + return w.DeletedAt +} + +func (w *WebhookEndpoint) GetDescription() *string { + if w == nil { + return nil + } + return w.Description +} + +func (w *WebhookEndpoint) GetDisplayName() *string { + if w == nil { + return nil + } + return w.DisplayName +} + +func (w *WebhookEndpoint) GetID() *string { + if w == nil { + return nil + } + return w.ID +} + +func (w *WebhookEndpoint) GetUpdatedAt() *time.Time { + if w == nil { + return nil + } + return w.UpdatedAt +} + +func (w *WebhookEndpoint) GetURL() *string { + if w == nil { + return nil + } + return w.URL +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookendpointinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookendpointinput.go new file mode 100644 index 00000000..ecd85748 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookendpointinput.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// WebhookEndpointInput - The Webhook message. +type WebhookEndpointInput struct { + CallbackTimeout *string `json:"callbackTimeout,omitempty"` + // An optional description of the webhook's purpose. + Description *string `json:"description,omitempty"` + // The human-readable name of the webhook. + DisplayName *string `json:"displayName,omitempty"` + // The unique identifier of the webhook. + ID *string `json:"id,omitempty"` + // The destination URL that receives event notification HTTP callbacks. + URL *string `json:"url,omitempty"` +} + +func (w *WebhookEndpointInput) GetCallbackTimeout() *string { + if w == nil { + return nil + } + return w.CallbackTimeout +} + +func (w *WebhookEndpointInput) GetDescription() *string { + if w == nil { + return nil + } + return w.Description +} + +func (w *WebhookEndpointInput) GetDisplayName() *string { + if w == nil { + return nil + } + return w.DisplayName +} + +func (w *WebhookEndpointInput) GetID() *string { + if w == nil { + return nil + } + return w.ID +} + +func (w *WebhookEndpointInput) GetURL() *string { + if w == nil { + return nil + } + return w.URL +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookinput.go deleted file mode 100644 index df4000d8..00000000 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookinput.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -// WebhookInput - The Webhook message. -type WebhookInput struct { - // The description field. - Description *string `json:"description,omitempty"` - // The displayName field. - DisplayName *string `json:"displayName,omitempty"` - // The id field. - ID *string `json:"id,omitempty"` - // The url field. - URL *string `json:"url,omitempty"` -} - -func (w *WebhookInput) GetDescription() *string { - if w == nil { - return nil - } - return w.Description -} - -func (w *WebhookInput) GetDisplayName() *string { - if w == nil { - return nil - } - return w.DisplayName -} - -func (w *WebhookInput) GetID() *string { - if w == nil { - return nil - } - return w.ID -} - -func (w *WebhookInput) GetURL() *string { - if w == nil { - return nil - } - return w.URL -} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooklistenerauthcapabilityurl.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooklistenerauthcapabilityurl.go new file mode 100644 index 00000000..d510b30e --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooklistenerauthcapabilityurl.go @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// WebhookListenerAuthCapabilityURL - Capability URL authentication: the URL itself contains an unguessable token that acts +// +// as the credential. This is simpler to integrate but less secure than JWT or HMAC because +// the token can leak via server logs, referrer headers, and URL sharing. +// See https://www.w3.org/TR/capability-urls/ for background. +type WebhookListenerAuthCapabilityURL struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookref.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookref.go index a9bb325c..2e596264 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookref.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookref.go @@ -4,7 +4,7 @@ package shared // The WebhookRef message. type WebhookRef struct { - // The id field. + // The ID of the referenced webhook. ID *string `json:"id,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksourceworkflowstep.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksourceworkflowstep.go index 17e3ca58..0e3bcf59 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksourceworkflowstep.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksourceworkflowstep.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" +) + // The WebhookSourceWorkflowStep message. type WebhookSourceWorkflowStep struct { // The workflowExecutionId field. @@ -10,6 +14,17 @@ type WebhookSourceWorkflowStep struct { WorkflowStepID *string `json:"workflowStepId,omitempty"` } +func (w WebhookSourceWorkflowStep) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(w, "", false) +} + +func (w *WebhookSourceWorkflowStep) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &w, "", false, nil); err != nil { + return err + } + return nil +} + func (w *WebhookSourceWorkflowStep) GetWorkflowExecutionID() *int64 { if w == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookssearchrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookssearchrequest.go index 81f164f1..a23d2b67 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookssearchrequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookssearchrequest.go @@ -4,13 +4,13 @@ package shared // The WebhooksSearchRequest message. type WebhooksSearchRequest struct { - // The pageSize field. + // The maximum number of webhooks to return per page. PageSize *int `json:"pageSize,omitempty"` - // The pageToken field. + // The pagination token from a previous search response to fetch the next page. PageToken *string `json:"pageToken,omitempty"` - // The query field. + // A text query to match against webhook names and descriptions. Query *string `json:"query,omitempty"` - // The refs field. + // Optional set of webhook references to restrict the search to specific webhooks. Refs []WebhookRef `json:"refs,omitempty"` } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookssearchresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookssearchresponse.go index 1730e345..b2e33869 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookssearchresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhookssearchresponse.go @@ -4,13 +4,13 @@ package shared // The WebhooksSearchResponse message. type WebhooksSearchResponse struct { - // The list field. - List []Webhook1 `json:"list,omitempty"` - // The nextPageToken field. + // The list of webhooks matching the search criteria. + List []WebhookEndpoint `json:"list,omitempty"` + // A token to retrieve the next page of results, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } -func (w *WebhooksSearchResponse) GetList() []Webhook1 { +func (w *WebhooksSearchResponse) GetList() []WebhookEndpoint { if w == nil { return nil } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicecreaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicecreaterequest.go index 8cfcd390..cdac9029 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicecreaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicecreaterequest.go @@ -4,14 +4,22 @@ package shared // The WebhooksServiceCreateRequest message. type WebhooksServiceCreateRequest struct { - // The description field. + CallbackTimeout *string `json:"callbackTimeout,omitempty"` + // An optional description of the webhook's purpose. Description *string `json:"description,omitempty"` - // The displayName field. + // The human-readable name for the new webhook. DisplayName string `json:"displayName"` - // The url field. + // The destination URL that will receive event notification HTTP callbacks. URL string `json:"url"` } +func (w *WebhooksServiceCreateRequest) GetCallbackTimeout() *string { + if w == nil { + return nil + } + return w.CallbackTimeout +} + func (w *WebhooksServiceCreateRequest) GetDescription() *string { if w == nil { return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicecreateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicecreateresponse.go index f2821508..ef9270d3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicecreateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicecreateresponse.go @@ -5,12 +5,12 @@ package shared // The WebhooksServiceCreateResponse message. type WebhooksServiceCreateResponse struct { // The Webhook message. - Webhook *Webhook1 `json:"webhook,omitempty"` + WebhookEndpoint *WebhookEndpoint `json:"webhook,omitempty"` } -func (w *WebhooksServiceCreateResponse) GetWebhook() *Webhook1 { +func (w *WebhooksServiceCreateResponse) GetWebhookEndpoint() *WebhookEndpoint { if w == nil { return nil } - return w.Webhook + return w.WebhookEndpoint } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicegetresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicegetresponse.go index 0a834087..3508f6c6 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicegetresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicegetresponse.go @@ -5,12 +5,12 @@ package shared // The WebhooksServiceGetResponse message. type WebhooksServiceGetResponse struct { // The Webhook message. - Webhook *Webhook1 `json:"webhook,omitempty"` + WebhookEndpoint *WebhookEndpoint `json:"webhook,omitempty"` } -func (w *WebhooksServiceGetResponse) GetWebhook() *Webhook1 { +func (w *WebhooksServiceGetResponse) GetWebhookEndpoint() *WebhookEndpoint { if w == nil { return nil } - return w.Webhook + return w.WebhookEndpoint } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicelistresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicelistresponse.go index 636242bc..5ac05b8f 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicelistresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksservicelistresponse.go @@ -4,13 +4,13 @@ package shared // The WebhooksServiceListResponse message. type WebhooksServiceListResponse struct { - // The list field. - List []Webhook1 `json:"list,omitempty"` - // The nextPageToken field. + // The list of webhooks for the current page. + List []WebhookEndpoint `json:"list,omitempty"` + // A token to retrieve the next page of results, or empty if there are no more results. NextPageToken *string `json:"nextPageToken,omitempty"` } -func (w *WebhooksServiceListResponse) GetList() []Webhook1 { +func (w *WebhooksServiceListResponse) GetList() []WebhookEndpoint { if w == nil { return nil } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksserviceupdaterequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksserviceupdaterequest.go index 7b9b4fce..b81644c3 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksserviceupdaterequest.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksserviceupdaterequest.go @@ -5,15 +5,15 @@ package shared // The WebhooksServiceUpdateRequest message contains the webhook object to update and a field mask to indicate which fields to update. It uses URL value for input. type WebhooksServiceUpdateRequest struct { // The Webhook message. - Webhook *WebhookInput `json:"webhook,omitempty"` - UpdateMask *string `json:"updateMask,omitempty"` + WebhookEndpoint *WebhookEndpointInput `json:"webhook,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` } -func (w *WebhooksServiceUpdateRequest) GetWebhook() *WebhookInput { +func (w *WebhooksServiceUpdateRequest) GetWebhookEndpoint() *WebhookEndpointInput { if w == nil { return nil } - return w.Webhook + return w.WebhookEndpoint } func (w *WebhooksServiceUpdateRequest) GetUpdateMask() *string { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksserviceupdateresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksserviceupdateresponse.go index 93ae13e0..d27d9fc1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksserviceupdateresponse.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/webhooksserviceupdateresponse.go @@ -5,12 +5,12 @@ package shared // The WebhooksServiceUpdateResponse message. type WebhooksServiceUpdateResponse struct { // The Webhook message. - Webhook *Webhook1 `json:"webhook,omitempty"` + WebhookEndpoint *WebhookEndpoint `json:"webhook,omitempty"` } -func (w *WebhooksServiceUpdateResponse) GetWebhook() *Webhook1 { +func (w *WebhooksServiceUpdateResponse) GetWebhookEndpoint() *WebhookEndpoint { if w == nil { return nil } - return w.Webhook + return w.WebhookEndpoint } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationprovider.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationprovider.go new file mode 100644 index 00000000..ab86cdf1 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationprovider.go @@ -0,0 +1,123 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// WellKnownProvider - Well-known provider type. Drives UX (wizard presets, docs, icons). +// +// Set at creation time, immutable. +type WellKnownProvider string + +const ( + WellKnownProviderWellKnownWorkloadProviderUnspecified WellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_UNSPECIFIED" + WellKnownProviderWellKnownWorkloadProviderCustom WellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_CUSTOM" + WellKnownProviderWellKnownWorkloadProviderGithubActions WellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_GITHUB_ACTIONS" + WellKnownProviderWellKnownWorkloadProviderGitlabCi WellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_GITLAB_CI" + WellKnownProviderWellKnownWorkloadProviderHcpTerraform WellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_HCP_TERRAFORM" + WellKnownProviderWellKnownWorkloadProviderAwsIamOutbound WellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_AWS_IAM_OUTBOUND" +) + +func (e WellKnownProvider) ToPointer() *WellKnownProvider { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *WellKnownProvider) IsExact() bool { + if e != nil { + switch *e { + case "WELL_KNOWN_WORKLOAD_PROVIDER_UNSPECIFIED", "WELL_KNOWN_WORKLOAD_PROVIDER_CUSTOM", "WELL_KNOWN_WORKLOAD_PROVIDER_GITHUB_ACTIONS", "WELL_KNOWN_WORKLOAD_PROVIDER_GITLAB_CI", "WELL_KNOWN_WORKLOAD_PROVIDER_HCP_TERRAFORM", "WELL_KNOWN_WORKLOAD_PROVIDER_AWS_IAM_OUTBOUND": + return true + } + } + return false +} + +// WorkloadFederationProvider represents a tenant-level OIDC issuer registration. +type WorkloadFederationProvider struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + // A description of what this provider is for. + Description *string `json:"description,omitempty"` + // Whether the provider is disabled. Disabled providers reject all token exchanges. + Disabled *bool `json:"disabled,omitempty"` + // The display name of the provider. + DisplayName *string `json:"displayName,omitempty"` + // The unique ID of the provider. + ID *string `json:"id,omitempty"` + // The OIDC issuer URL. Immutable after creation. + IssuerURL *string `json:"issuerUrl,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + // Well-known provider type. Drives UX (wizard presets, docs, icons). + // Set at creation time, immutable. + WellKnownProvider *WellKnownProvider `json:"wellKnownProvider,omitempty"` +} + +func (w WorkloadFederationProvider) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(w, "", false) +} + +func (w *WorkloadFederationProvider) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &w, "", false, nil); err != nil { + return err + } + return nil +} + +func (w *WorkloadFederationProvider) GetCreatedAt() *time.Time { + if w == nil { + return nil + } + return w.CreatedAt +} + +func (w *WorkloadFederationProvider) GetDescription() *string { + if w == nil { + return nil + } + return w.Description +} + +func (w *WorkloadFederationProvider) GetDisabled() *bool { + if w == nil { + return nil + } + return w.Disabled +} + +func (w *WorkloadFederationProvider) GetDisplayName() *string { + if w == nil { + return nil + } + return w.DisplayName +} + +func (w *WorkloadFederationProvider) GetID() *string { + if w == nil { + return nil + } + return w.ID +} + +func (w *WorkloadFederationProvider) GetIssuerURL() *string { + if w == nil { + return nil + } + return w.IssuerURL +} + +func (w *WorkloadFederationProvider) GetUpdatedAt() *time.Time { + if w == nil { + return nil + } + return w.UpdatedAt +} + +func (w *WorkloadFederationProvider) GetWellKnownProvider() *WellKnownProvider { + if w == nil { + return nil + } + return w.WellKnownProvider +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationproviderinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationproviderinput.go new file mode 100644 index 00000000..b4e992a4 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationproviderinput.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// WorkloadFederationProviderInput - WorkloadFederationProvider represents a tenant-level OIDC issuer registration. +type WorkloadFederationProviderInput struct { + // A description of what this provider is for. + Description *string `json:"description,omitempty"` + // Whether the provider is disabled. Disabled providers reject all token exchanges. + Disabled *bool `json:"disabled,omitempty"` + // The display name of the provider. + DisplayName *string `json:"displayName,omitempty"` +} + +func (w *WorkloadFederationProviderInput) GetDescription() *string { + if w == nil { + return nil + } + return w.Description +} + +func (w *WorkloadFederationProviderInput) GetDisabled() *bool { + if w == nil { + return nil + } + return w.Disabled +} + +func (w *WorkloadFederationProviderInput) GetDisplayName() *string { + if w == nil { + return nil + } + return w.DisplayName +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreateproviderrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreateproviderrequest.go new file mode 100644 index 00000000..cc7aa12d --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreateproviderrequest.go @@ -0,0 +1,74 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// WorkloadFederationServiceCreateProviderRequestWellKnownProvider - Well-known provider type. Required -- UNSPECIFIED is rejected. +// +// When set to a named source, the backend validates issuer_url consistency. +type WorkloadFederationServiceCreateProviderRequestWellKnownProvider string + +const ( + WorkloadFederationServiceCreateProviderRequestWellKnownProviderWellKnownWorkloadProviderUnspecified WorkloadFederationServiceCreateProviderRequestWellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_UNSPECIFIED" + WorkloadFederationServiceCreateProviderRequestWellKnownProviderWellKnownWorkloadProviderCustom WorkloadFederationServiceCreateProviderRequestWellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_CUSTOM" + WorkloadFederationServiceCreateProviderRequestWellKnownProviderWellKnownWorkloadProviderGithubActions WorkloadFederationServiceCreateProviderRequestWellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_GITHUB_ACTIONS" + WorkloadFederationServiceCreateProviderRequestWellKnownProviderWellKnownWorkloadProviderGitlabCi WorkloadFederationServiceCreateProviderRequestWellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_GITLAB_CI" + WorkloadFederationServiceCreateProviderRequestWellKnownProviderWellKnownWorkloadProviderHcpTerraform WorkloadFederationServiceCreateProviderRequestWellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_HCP_TERRAFORM" + WorkloadFederationServiceCreateProviderRequestWellKnownProviderWellKnownWorkloadProviderAwsIamOutbound WorkloadFederationServiceCreateProviderRequestWellKnownProvider = "WELL_KNOWN_WORKLOAD_PROVIDER_AWS_IAM_OUTBOUND" +) + +func (e WorkloadFederationServiceCreateProviderRequestWellKnownProvider) ToPointer() *WorkloadFederationServiceCreateProviderRequestWellKnownProvider { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *WorkloadFederationServiceCreateProviderRequestWellKnownProvider) IsExact() bool { + if e != nil { + switch *e { + case "WELL_KNOWN_WORKLOAD_PROVIDER_UNSPECIFIED", "WELL_KNOWN_WORKLOAD_PROVIDER_CUSTOM", "WELL_KNOWN_WORKLOAD_PROVIDER_GITHUB_ACTIONS", "WELL_KNOWN_WORKLOAD_PROVIDER_GITLAB_CI", "WELL_KNOWN_WORKLOAD_PROVIDER_HCP_TERRAFORM", "WELL_KNOWN_WORKLOAD_PROVIDER_AWS_IAM_OUTBOUND": + return true + } + } + return false +} + +// The WorkloadFederationServiceCreateProviderRequest message. +type WorkloadFederationServiceCreateProviderRequest struct { + // A description of what this provider is for. + Description *string `json:"description,omitempty"` + // The display name for the new provider. + DisplayName *string `json:"displayName,omitempty"` + // The OIDC issuer URL. Will be validated via OIDC discovery. + // Normalized on write: lowercase host, no trailing slash, HTTPS only. + IssuerURL *string `json:"issuerUrl,omitempty"` + // Well-known provider type. Required -- UNSPECIFIED is rejected. + // When set to a named source, the backend validates issuer_url consistency. + WellKnownProvider *WorkloadFederationServiceCreateProviderRequestWellKnownProvider `json:"wellKnownProvider,omitempty"` +} + +func (w *WorkloadFederationServiceCreateProviderRequest) GetDescription() *string { + if w == nil { + return nil + } + return w.Description +} + +func (w *WorkloadFederationServiceCreateProviderRequest) GetDisplayName() *string { + if w == nil { + return nil + } + return w.DisplayName +} + +func (w *WorkloadFederationServiceCreateProviderRequest) GetIssuerURL() *string { + if w == nil { + return nil + } + return w.IssuerURL +} + +func (w *WorkloadFederationServiceCreateProviderRequest) GetWellKnownProvider() *WorkloadFederationServiceCreateProviderRequestWellKnownProvider { + if w == nil { + return nil + } + return w.WellKnownProvider +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreateproviderresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreateproviderresponse.go new file mode 100644 index 00000000..ac0c23c9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreateproviderresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceCreateProviderResponse message. +type WorkloadFederationServiceCreateProviderResponse struct { + // WorkloadFederationProvider represents a tenant-level OIDC issuer registration. + WorkloadFederationProvider *WorkloadFederationProvider `json:"provider,omitempty"` +} + +func (w *WorkloadFederationServiceCreateProviderResponse) GetWorkloadFederationProvider() *WorkloadFederationProvider { + if w == nil { + return nil + } + return w.WorkloadFederationProvider +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreatetrustrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreatetrustrequest.go new file mode 100644 index 00000000..fbea2712 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreatetrustrequest.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceCreateTrustRequest message. +type WorkloadFederationServiceCreateTrustRequest struct { + // IP allowlist for token exchange requests matching this trust. + // Accepts IPv4 (e.g. 10.0.0.0/24) or IPv6 (e.g. 2001:db8::/32) CIDRs. + AllowSourceCidrs []string `json:"allowSourceCidrs,omitempty"` + // CEL expression evaluated against JWT claims. Must return bool. + // Compiled and validated before storage. + ConditionExpression *string `json:"conditionExpression,omitempty"` + // A description of what this trust policy matches. + Description *string `json:"description,omitempty"` + // The display name for the trust. + DisplayName *string `json:"displayName,omitempty"` + // JWT claim names from the subject token to copy into the issued C1 token. + PassthroughClaims []string `json:"passthroughClaims,omitempty"` + // The provider this trust references. + ProviderID *string `json:"providerId,omitempty"` + // Scoped role IDs. Effective permissions = min(SP roles, trust.scoped_role_ids). + ScopedRoleIds []string `json:"scopedRoleIds,omitempty"` +} + +func (w *WorkloadFederationServiceCreateTrustRequest) GetAllowSourceCidrs() []string { + if w == nil { + return nil + } + return w.AllowSourceCidrs +} + +func (w *WorkloadFederationServiceCreateTrustRequest) GetConditionExpression() *string { + if w == nil { + return nil + } + return w.ConditionExpression +} + +func (w *WorkloadFederationServiceCreateTrustRequest) GetDescription() *string { + if w == nil { + return nil + } + return w.Description +} + +func (w *WorkloadFederationServiceCreateTrustRequest) GetDisplayName() *string { + if w == nil { + return nil + } + return w.DisplayName +} + +func (w *WorkloadFederationServiceCreateTrustRequest) GetPassthroughClaims() []string { + if w == nil { + return nil + } + return w.PassthroughClaims +} + +func (w *WorkloadFederationServiceCreateTrustRequest) GetProviderID() *string { + if w == nil { + return nil + } + return w.ProviderID +} + +func (w *WorkloadFederationServiceCreateTrustRequest) GetScopedRoleIds() []string { + if w == nil { + return nil + } + return w.ScopedRoleIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreatetrustresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreatetrustresponse.go new file mode 100644 index 00000000..1e7146af --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicecreatetrustresponse.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceCreateTrustResponse message. +type WorkloadFederationServiceCreateTrustResponse struct { + // WorkloadFederationTrust represents a per-SP trust policy that references + // a tenant-level provider and defines a CEL condition for claim matching. + WorkloadFederationTrust *WorkloadFederationTrust `json:"trust,omitempty"` +} + +func (w *WorkloadFederationServiceCreateTrustResponse) GetWorkloadFederationTrust() *WorkloadFederationTrust { + if w == nil { + return nil + } + return w.WorkloadFederationTrust +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeleteproviderrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeleteproviderrequest.go new file mode 100644 index 00000000..c17631d3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeleteproviderrequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceDeleteProviderRequest message. +type WorkloadFederationServiceDeleteProviderRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeleteproviderresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeleteproviderresponse.go new file mode 100644 index 00000000..35e8152a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeleteproviderresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceDeleteProviderResponse message. +type WorkloadFederationServiceDeleteProviderResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeletetrustrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeletetrustrequest.go new file mode 100644 index 00000000..fd64b352 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeletetrustrequest.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceDeleteTrustRequest message. +type WorkloadFederationServiceDeleteTrustRequest struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeletetrustresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeletetrustresponse.go new file mode 100644 index 00000000..6137f931 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicedeletetrustresponse.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceDeleteTrustResponse message. +type WorkloadFederationServiceDeleteTrustResponse struct { +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicegetproviderresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicegetproviderresponse.go new file mode 100644 index 00000000..33377fcc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicegetproviderresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceGetProviderResponse message. +type WorkloadFederationServiceGetProviderResponse struct { + // WorkloadFederationProvider represents a tenant-level OIDC issuer registration. + WorkloadFederationProvider *WorkloadFederationProvider `json:"provider,omitempty"` +} + +func (w *WorkloadFederationServiceGetProviderResponse) GetWorkloadFederationProvider() *WorkloadFederationProvider { + if w == nil { + return nil + } + return w.WorkloadFederationProvider +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicegettrustresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicegettrustresponse.go new file mode 100644 index 00000000..975c8b7c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicegettrustresponse.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceGetTrustResponse message. +type WorkloadFederationServiceGetTrustResponse struct { + // WorkloadFederationTrust represents a per-SP trust policy that references + // a tenant-level provider and defines a CEL condition for claim matching. + WorkloadFederationTrust *WorkloadFederationTrust `json:"trust,omitempty"` +} + +func (w *WorkloadFederationServiceGetTrustResponse) GetWorkloadFederationTrust() *WorkloadFederationTrust { + if w == nil { + return nil + } + return w.WorkloadFederationTrust +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicelistprovidersresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicelistprovidersresponse.go new file mode 100644 index 00000000..9cdc22b3 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicelistprovidersresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceListProvidersResponse message. +type WorkloadFederationServiceListProvidersResponse struct { + // The list field. + List []WorkloadFederationProvider `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (w *WorkloadFederationServiceListProvidersResponse) GetList() []WorkloadFederationProvider { + if w == nil { + return nil + } + return w.List +} + +func (w *WorkloadFederationServiceListProvidersResponse) GetNextPageToken() *string { + if w == nil { + return nil + } + return w.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicelisttrustsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicelisttrustsresponse.go new file mode 100644 index 00000000..d4f2cb6b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicelisttrustsresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceListTrustsResponse message. +type WorkloadFederationServiceListTrustsResponse struct { + // The list field. + List []WorkloadFederationTrust `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (w *WorkloadFederationServiceListTrustsResponse) GetList() []WorkloadFederationTrust { + if w == nil { + return nil + } + return w.List +} + +func (w *WorkloadFederationServiceListTrustsResponse) GetNextPageToken() *string { + if w == nil { + return nil + } + return w.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicesearchtrustsrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicesearchtrustsrequest.go new file mode 100644 index 00000000..2c61476c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicesearchtrustsrequest.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceSearchTrustsRequest message. +type WorkloadFederationServiceSearchTrustsRequest struct { + // The pageSize field. + PageSize *int `json:"pageSize,omitempty"` + // The pageToken field. + PageToken *string `json:"pageToken,omitempty"` + // Optional: filter trusts by provider ID. + ProviderID *string `json:"providerId,omitempty"` + // Optional: full-text search on trust display name and description. + Query *string `json:"query,omitempty"` + // Optional: filter trusts by service principal ID. + ServicePrincipalID *string `json:"servicePrincipalId,omitempty"` +} + +func (w *WorkloadFederationServiceSearchTrustsRequest) GetPageSize() *int { + if w == nil { + return nil + } + return w.PageSize +} + +func (w *WorkloadFederationServiceSearchTrustsRequest) GetPageToken() *string { + if w == nil { + return nil + } + return w.PageToken +} + +func (w *WorkloadFederationServiceSearchTrustsRequest) GetProviderID() *string { + if w == nil { + return nil + } + return w.ProviderID +} + +func (w *WorkloadFederationServiceSearchTrustsRequest) GetQuery() *string { + if w == nil { + return nil + } + return w.Query +} + +func (w *WorkloadFederationServiceSearchTrustsRequest) GetServicePrincipalID() *string { + if w == nil { + return nil + } + return w.ServicePrincipalID +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicesearchtrustsresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicesearchtrustsresponse.go new file mode 100644 index 00000000..97f38463 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicesearchtrustsresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceSearchTrustsResponse message. +type WorkloadFederationServiceSearchTrustsResponse struct { + // The list field. + List []WorkloadFederationTrust `json:"list,omitempty"` + // The nextPageToken field. + NextPageToken *string `json:"nextPageToken,omitempty"` +} + +func (w *WorkloadFederationServiceSearchTrustsResponse) GetList() []WorkloadFederationTrust { + if w == nil { + return nil + } + return w.List +} + +func (w *WorkloadFederationServiceSearchTrustsResponse) GetNextPageToken() *string { + if w == nil { + return nil + } + return w.NextPageToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetestcelrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetestcelrequest.go new file mode 100644 index 00000000..ed36e389 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetestcelrequest.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceTestCELRequest message. +type WorkloadFederationServiceTestCELRequest struct { + // The claims to evaluate against, as a JSON string. + // Parsed into map[string]any for CEL evaluation. + ClaimsJSON *string `json:"claimsJson,omitempty"` + // The CEL expression to evaluate. Must return bool. + Expression *string `json:"expression,omitempty"` +} + +func (w *WorkloadFederationServiceTestCELRequest) GetClaimsJSON() *string { + if w == nil { + return nil + } + return w.ClaimsJSON +} + +func (w *WorkloadFederationServiceTestCELRequest) GetExpression() *string { + if w == nil { + return nil + } + return w.Expression +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetestcelresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetestcelresponse.go new file mode 100644 index 00000000..0b1d591a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetestcelresponse.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceTestCELResponse message. +type WorkloadFederationServiceTestCELResponse struct { + // Error message if compilation or evaluation failed. + Error *string `json:"error,omitempty"` + // The expression that was evaluated (echo back). + Expression *string `json:"expression,omitempty"` + // Whether the expression matched (returned true). + Matched *bool `json:"matched,omitempty"` +} + +func (w *WorkloadFederationServiceTestCELResponse) GetError() *string { + if w == nil { + return nil + } + return w.Error +} + +func (w *WorkloadFederationServiceTestCELResponse) GetExpression() *string { + if w == nil { + return nil + } + return w.Expression +} + +func (w *WorkloadFederationServiceTestCELResponse) GetMatched() *bool { + if w == nil { + return nil + } + return w.Matched +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetesttokenrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetesttokenrequest.go new file mode 100644 index 00000000..4e700dfa --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetesttokenrequest.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceTestTokenRequest message. +type WorkloadFederationServiceTestTokenRequest struct { + // Optional: override source IP for CIDR testing. + // If empty, uses the request's source IP. + // Accepts IPv4 (e.g. 10.0.0.5) or IPv6 (e.g. 2001:db8::1) addresses, optionally with a CIDR prefix. + SourceIP *string `json:"sourceIp,omitempty"` + // The raw JWT to validate (the subject_token from a CI job). + SubjectToken *string `json:"subjectToken,omitempty"` +} + +func (w *WorkloadFederationServiceTestTokenRequest) GetSourceIP() *string { + if w == nil { + return nil + } + return w.SourceIP +} + +func (w *WorkloadFederationServiceTestTokenRequest) GetSubjectToken() *string { + if w == nil { + return nil + } + return w.SubjectToken +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetesttokenresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetesttokenresponse.go new file mode 100644 index 00000000..4dce0925 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationservicetesttokenresponse.go @@ -0,0 +1,89 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceTestTokenResponse message. +type WorkloadFederationServiceTestTokenResponse struct { + // TestTokenStepResult represents the result of a single validation step. + TestTokenStepResult *TestTokenStepResult `json:"audienceValidation,omitempty"` + // TestTokenStepResult represents the result of a single validation step. + TestTokenStepResult1 *TestTokenStepResult `json:"celEvaluation,omitempty"` + // TestTokenStepResult represents the result of a single validation step. + TestTokenStepResult2 *TestTokenStepResult `json:"cidrCheck,omitempty"` + // TestTokenStepResult represents the result of a single validation step. + TestTokenStepResult3 *TestTokenStepResult `json:"issuerMatch,omitempty"` + // TestTokenStepResult represents the result of a single validation step. + TestTokenStepResult4 *TestTokenStepResult `json:"jwtDecode,omitempty"` + // TestTokenStepResult represents the result of a single validation step. + TestTokenStepResult5 *TestTokenStepResult `json:"signatureValidation,omitempty"` + // TestTokenStepResult represents the result of a single validation step. + TestTokenStepResult6 *TestTokenStepResult `json:"tokenFreshness,omitempty"` + // The decoded JWT claims (best-effort, even if signature fails). + // Returned as JSON string for display. + DecodedClaimsJSON *string `json:"decodedClaimsJson,omitempty"` + // Overall result: true only if ALL steps passed. + OverallResult *bool `json:"overallResult,omitempty"` +} + +func (w *WorkloadFederationServiceTestTokenResponse) GetTestTokenStepResult() *TestTokenStepResult { + if w == nil { + return nil + } + return w.TestTokenStepResult +} + +func (w *WorkloadFederationServiceTestTokenResponse) GetTestTokenStepResult1() *TestTokenStepResult { + if w == nil { + return nil + } + return w.TestTokenStepResult1 +} + +func (w *WorkloadFederationServiceTestTokenResponse) GetTestTokenStepResult2() *TestTokenStepResult { + if w == nil { + return nil + } + return w.TestTokenStepResult2 +} + +func (w *WorkloadFederationServiceTestTokenResponse) GetTestTokenStepResult3() *TestTokenStepResult { + if w == nil { + return nil + } + return w.TestTokenStepResult3 +} + +func (w *WorkloadFederationServiceTestTokenResponse) GetTestTokenStepResult4() *TestTokenStepResult { + if w == nil { + return nil + } + return w.TestTokenStepResult4 +} + +func (w *WorkloadFederationServiceTestTokenResponse) GetTestTokenStepResult5() *TestTokenStepResult { + if w == nil { + return nil + } + return w.TestTokenStepResult5 +} + +func (w *WorkloadFederationServiceTestTokenResponse) GetTestTokenStepResult6() *TestTokenStepResult { + if w == nil { + return nil + } + return w.TestTokenStepResult6 +} + +func (w *WorkloadFederationServiceTestTokenResponse) GetDecodedClaimsJSON() *string { + if w == nil { + return nil + } + return w.DecodedClaimsJSON +} + +func (w *WorkloadFederationServiceTestTokenResponse) GetOverallResult() *bool { + if w == nil { + return nil + } + return w.OverallResult +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdateproviderrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdateproviderrequest.go new file mode 100644 index 00000000..2782b8b6 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdateproviderrequest.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceUpdateProviderRequest message. +type WorkloadFederationServiceUpdateProviderRequest struct { + // WorkloadFederationProvider represents a tenant-level OIDC issuer registration. + WorkloadFederationProvider *WorkloadFederationProviderInput `json:"provider,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` +} + +func (w *WorkloadFederationServiceUpdateProviderRequest) GetWorkloadFederationProvider() *WorkloadFederationProviderInput { + if w == nil { + return nil + } + return w.WorkloadFederationProvider +} + +func (w *WorkloadFederationServiceUpdateProviderRequest) GetUpdateMask() *string { + if w == nil { + return nil + } + return w.UpdateMask +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdateproviderresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdateproviderresponse.go new file mode 100644 index 00000000..f1225ea5 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdateproviderresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceUpdateProviderResponse message. +type WorkloadFederationServiceUpdateProviderResponse struct { + // WorkloadFederationProvider represents a tenant-level OIDC issuer registration. + WorkloadFederationProvider *WorkloadFederationProvider `json:"provider,omitempty"` +} + +func (w *WorkloadFederationServiceUpdateProviderResponse) GetWorkloadFederationProvider() *WorkloadFederationProvider { + if w == nil { + return nil + } + return w.WorkloadFederationProvider +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdatetrustrequest.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdatetrustrequest.go new file mode 100644 index 00000000..2f013a65 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdatetrustrequest.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceUpdateTrustRequest message. +type WorkloadFederationServiceUpdateTrustRequest struct { + // WorkloadFederationTrust represents a per-SP trust policy that references + // a tenant-level provider and defines a CEL condition for claim matching. + WorkloadFederationTrust *WorkloadFederationTrustInput `json:"trust,omitempty"` + UpdateMask *string `json:"updateMask,omitempty"` +} + +func (w *WorkloadFederationServiceUpdateTrustRequest) GetWorkloadFederationTrust() *WorkloadFederationTrustInput { + if w == nil { + return nil + } + return w.WorkloadFederationTrust +} + +func (w *WorkloadFederationServiceUpdateTrustRequest) GetUpdateMask() *string { + if w == nil { + return nil + } + return w.UpdateMask +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdatetrustresponse.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdatetrustresponse.go new file mode 100644 index 00000000..dce3a474 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationserviceupdatetrustresponse.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// The WorkloadFederationServiceUpdateTrustResponse message. +type WorkloadFederationServiceUpdateTrustResponse struct { + // WorkloadFederationTrust represents a per-SP trust policy that references + // a tenant-level provider and defines a CEL condition for claim matching. + WorkloadFederationTrust *WorkloadFederationTrust `json:"trust,omitempty"` +} + +func (w *WorkloadFederationServiceUpdateTrustResponse) GetWorkloadFederationTrust() *WorkloadFederationTrust { + if w == nil { + return nil + } + return w.WorkloadFederationTrust +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationtrust.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationtrust.go new file mode 100644 index 00000000..b4f529cc --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationtrust.go @@ -0,0 +1,136 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "time" +) + +// WorkloadFederationTrust represents a per-SP trust policy that references +// +// a tenant-level provider and defines a CEL condition for claim matching. +type WorkloadFederationTrust struct { + // IP allowlist for token exchange requests matching this trust. + AllowSourceCidrs []string `json:"allowSourceCidrs,omitempty"` + // The full client ID of the trust (e.g., "clever-fox-42195@acme.conductorone.com/wfe"). + // Used as the client_id parameter in RFC 8693 token exchange requests. + ClientID *string `json:"clientId,omitempty"` + // CEL expression evaluated against JWT claims. Must return bool. + // Example: claims.sub.startsWith("repo:acme/infra:") && claims.environment == "production" + ConditionExpression *string `json:"conditionExpression,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // A description of what this trust policy matches. + Description *string `json:"description,omitempty"` + // Whether the trust is disabled. + Disabled *bool `json:"disabled,omitempty"` + // The display name of the trust. + DisplayName *string `json:"displayName,omitempty"` + // JWT claim names from the subject token to copy into the issued C1 token. + // Values are placed in the "c1wfc" claim as a map[string]string. + // Only string-valued claims are copied; non-string claims are silently skipped. + // Example: ["repository", "repository_owner", "job_workflow_ref"] + PassthroughClaims []string `json:"passthroughClaims,omitempty"` + // The provider ID this trust references. Immutable after creation. + ProviderID *string `json:"providerId,omitempty"` + // Scoped role IDs. Effective permissions = min(SP roles, trust.scoped_role_ids). + ScopedRoleIds []string `json:"scopedRoleIds,omitempty"` + // The service principal user ID this trust belongs to. + ServicePrincipalID *string `json:"servicePrincipalId,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +func (w WorkloadFederationTrust) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(w, "", false) +} + +func (w *WorkloadFederationTrust) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &w, "", false, nil); err != nil { + return err + } + return nil +} + +func (w *WorkloadFederationTrust) GetAllowSourceCidrs() []string { + if w == nil { + return nil + } + return w.AllowSourceCidrs +} + +func (w *WorkloadFederationTrust) GetClientID() *string { + if w == nil { + return nil + } + return w.ClientID +} + +func (w *WorkloadFederationTrust) GetConditionExpression() *string { + if w == nil { + return nil + } + return w.ConditionExpression +} + +func (w *WorkloadFederationTrust) GetCreatedAt() *time.Time { + if w == nil { + return nil + } + return w.CreatedAt +} + +func (w *WorkloadFederationTrust) GetDescription() *string { + if w == nil { + return nil + } + return w.Description +} + +func (w *WorkloadFederationTrust) GetDisabled() *bool { + if w == nil { + return nil + } + return w.Disabled +} + +func (w *WorkloadFederationTrust) GetDisplayName() *string { + if w == nil { + return nil + } + return w.DisplayName +} + +func (w *WorkloadFederationTrust) GetPassthroughClaims() []string { + if w == nil { + return nil + } + return w.PassthroughClaims +} + +func (w *WorkloadFederationTrust) GetProviderID() *string { + if w == nil { + return nil + } + return w.ProviderID +} + +func (w *WorkloadFederationTrust) GetScopedRoleIds() []string { + if w == nil { + return nil + } + return w.ScopedRoleIds +} + +func (w *WorkloadFederationTrust) GetServicePrincipalID() *string { + if w == nil { + return nil + } + return w.ServicePrincipalID +} + +func (w *WorkloadFederationTrust) GetUpdatedAt() *time.Time { + if w == nil { + return nil + } + return w.UpdatedAt +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationtrustinput.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationtrustinput.go new file mode 100644 index 00000000..bc65f1a7 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/workloadfederationtrustinput.go @@ -0,0 +1,76 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// WorkloadFederationTrustInput - WorkloadFederationTrust represents a per-SP trust policy that references +// +// a tenant-level provider and defines a CEL condition for claim matching. +type WorkloadFederationTrustInput struct { + // IP allowlist for token exchange requests matching this trust. + AllowSourceCidrs []string `json:"allowSourceCidrs,omitempty"` + // CEL expression evaluated against JWT claims. Must return bool. + // Example: claims.sub.startsWith("repo:acme/infra:") && claims.environment == "production" + ConditionExpression *string `json:"conditionExpression,omitempty"` + // A description of what this trust policy matches. + Description *string `json:"description,omitempty"` + // Whether the trust is disabled. + Disabled *bool `json:"disabled,omitempty"` + // The display name of the trust. + DisplayName *string `json:"displayName,omitempty"` + // JWT claim names from the subject token to copy into the issued C1 token. + // Values are placed in the "c1wfc" claim as a map[string]string. + // Only string-valued claims are copied; non-string claims are silently skipped. + // Example: ["repository", "repository_owner", "job_workflow_ref"] + PassthroughClaims []string `json:"passthroughClaims,omitempty"` + // Scoped role IDs. Effective permissions = min(SP roles, trust.scoped_role_ids). + ScopedRoleIds []string `json:"scopedRoleIds,omitempty"` +} + +func (w *WorkloadFederationTrustInput) GetAllowSourceCidrs() []string { + if w == nil { + return nil + } + return w.AllowSourceCidrs +} + +func (w *WorkloadFederationTrustInput) GetConditionExpression() *string { + if w == nil { + return nil + } + return w.ConditionExpression +} + +func (w *WorkloadFederationTrustInput) GetDescription() *string { + if w == nil { + return nil + } + return w.Description +} + +func (w *WorkloadFederationTrustInput) GetDisabled() *bool { + if w == nil { + return nil + } + return w.Disabled +} + +func (w *WorkloadFederationTrustInput) GetDisplayName() *string { + if w == nil { + return nil + } + return w.DisplayName +} + +func (w *WorkloadFederationTrustInput) GetPassthroughClaims() []string { + if w == nil { + return nil + } + return w.PassthroughClaims +} + +func (w *WorkloadFederationTrustInput) GetScopedRoleIds() []string { + if w == nil { + return nil + } + return w.ScopedRoleIds +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/writeauthorizationconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/writeauthorizationconfig.go new file mode 100644 index 00000000..f43f0718 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/models/shared/writeauthorizationconfig.go @@ -0,0 +1,54 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +type BlockedClassifications string + +const ( + BlockedClassificationsToolClassificationUnspecified BlockedClassifications = "TOOL_CLASSIFICATION_UNSPECIFIED" + BlockedClassificationsToolClassificationRead BlockedClassifications = "TOOL_CLASSIFICATION_READ" + BlockedClassificationsToolClassificationWrite BlockedClassifications = "TOOL_CLASSIFICATION_WRITE" + BlockedClassificationsToolClassificationDestructive BlockedClassifications = "TOOL_CLASSIFICATION_DESTRUCTIVE" + BlockedClassificationsToolClassificationSensitive BlockedClassifications = "TOOL_CLASSIFICATION_SENSITIVE" + BlockedClassificationsToolClassificationDangerous BlockedClassifications = "TOOL_CLASSIFICATION_DANGEROUS" +) + +func (e BlockedClassifications) ToPointer() *BlockedClassifications { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *BlockedClassifications) IsExact() bool { + if e != nil { + switch *e { + case "TOOL_CLASSIFICATION_UNSPECIFIED", "TOOL_CLASSIFICATION_READ", "TOOL_CLASSIFICATION_WRITE", "TOOL_CLASSIFICATION_DESTRUCTIVE", "TOOL_CLASSIFICATION_SENSITIVE", "TOOL_CLASSIFICATION_DANGEROUS": + return true + } + } + return false +} + +// WriteAuthorizationConfig blocks tool calls whose ToolClassification is in +// +// blocked_classifications, optionally permitting them within business hours. +type WriteAuthorizationConfig struct { + // BusinessHours defines a weekly time window in a specific timezone. + BusinessHours *BusinessHours `json:"businessHours,omitempty"` + // Tool classifications to block. Must have at least one entry; a hook + // with no blocked classifications would be a silent misconfiguration. + BlockedClassifications []BlockedClassifications `json:"blockedClassifications,omitempty"` +} + +func (w *WriteAuthorizationConfig) GetBusinessHours() *BusinessHours { + if w == nil { + return nil + } + return w.BusinessHours +} + +func (w *WriteAuthorizationConfig) GetBlockedClassifications() []BlockedClassifications { + if w == nil { + return nil + } + return w.BlockedClassifications +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/retry/config.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/retry/config.go index aa809fcc..5b3dc7c1 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/retry/config.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/retry/config.go @@ -114,7 +114,7 @@ func retryIntervalFromResponse(res *http.Response) time.Duration { parsedDate, err := time.Parse(time.RFC1123, retryVal) if err == nil { - delta := parsedDate.Sub(time.Now()) + delta := time.Until(parsedDate) if delta < 0 { return 0 } else { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/headers.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/headers.go index 11c0107c..d60fa466 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/headers.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/headers.go @@ -45,6 +45,12 @@ func populateHeaders(headers interface{}, globals interface{}, reqHeaders http.H continue } + defaultConstValue := handleDefaultConstHeaderValue(valType, fieldType.Tag) + if defaultConstValue != "" { + reqHeaders.Add(tag.ParamName, defaultConstValue) + continue + } + value := serializeHeader(fieldType.Type, valType, tag.Explode) if value != "" { reqHeaders.Add(tag.ParamName, value) @@ -54,6 +60,22 @@ func populateHeaders(headers interface{}, globals interface{}, reqHeaders http.H return globalsAlreadyPopulated } +func handleDefaultConstHeaderValue(v reflect.Value, tag reflect.StructTag) string { + constTag := tag.Get("const") + if constTag != "" { + return constTag + } + + if isNil(v.Type(), v) { + defaultTag := tag.Get("default") + if defaultTag != "" { + return defaultTag + } + } + + return "" +} + func serializeHeader(objType reflect.Type, objValue reflect.Value, explode bool) string { if isNil(objType, objValue) { return "" @@ -91,10 +113,19 @@ func serializeHeader(objType reflect.Type, objValue reflect.Value, explode bool) continue } + var value string + + defaultConstValue := handleDefaultConstHeaderValue(valType, fieldType.Tag) + if defaultConstValue != "" { + value = defaultConstValue + } else { + value = valToString(valType.Interface()) + } + if explode { - items = append(items, fmt.Sprintf("%s=%s", fieldName, valToString(valType.Interface()))) + items = append(items, fmt.Sprintf("%s=%s", fieldName, value)) } else { - items = append(items, fieldName, valToString(valType.Interface())) + items = append(items, fieldName, value) } } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/json.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/json.go index addfe8d7..2d8bf18e 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/json.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/json.go @@ -76,6 +76,13 @@ func MarshalJSON(v interface{}, tag reflect.StructTag, topLevel bool) ([]byte, e continue } + if omitEmpty && fieldVal.Kind() != reflect.Struct && fieldVal.IsZero() { + continue + } + + if omitEmpty && isEmptyContainer(field.Type, fieldVal) { + continue + } } if !field.IsExported() && field.Tag.Get("const") == "" { @@ -341,6 +348,12 @@ func marshalValue(v interface{}, tag reflect.StructTag) (json.RawMessage, error) return []byte("null"), nil } + // []byte is special-cased by encoding/json to use base64 encoding. + // Delegate directly to avoid treating individual bytes as array elements. + if typ.Elem().Kind() == reflect.Uint8 { + return json.Marshal(val.Interface()) + } + out := []json.RawMessage{} for i := 0; i < val.Len(); i++ { @@ -525,9 +538,23 @@ func unmarshalValue(value json.RawMessage, v reflect.Value, tag reflect.StructTa m.SetMapIndex(reflect.ValueOf(k), itemVal.Elem()) } + // Dereference pointer before setting the map value. + // v may be a pointer to a map (e.g., from reflect.ValueOf(&mapVar)). + if v.Kind() == reflect.Ptr { + v = v.Elem() + } v.Set(m) return nil case reflect.Slice, reflect.Array: + // []byte is special-cased by encoding/json to use base64 encoding. + // Delegate directly to avoid treating the base64 string as a JSON array. + if typ.Elem().Kind() == reflect.Uint8 { + if v.CanAddr() { + return json.Unmarshal(value, v.Addr().Interface()) + } + return json.Unmarshal(value, v.Interface()) + } + var unmarshaled []json.RawMessage if err := json.Unmarshal(value, &unmarshaled); err != nil { @@ -569,7 +596,7 @@ func unmarshalValue(value json.RawMessage, v reflect.Value, tag reflect.StructTa } if v.Kind() == reflect.Ptr { - if v.IsNil() { + if v.IsNil() && v.CanSet() { v.Set(reflect.New(typ)) } v = v.Elem() @@ -617,7 +644,7 @@ func unmarshalValue(value json.RawMessage, v reflect.Value, tag reflect.StructTa } if v.Kind() == reflect.Ptr { - if v.IsNil() { + if v.IsNil() && v.CanSet() { v.Set(reflect.New(typ)) } v = v.Elem() diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/requestbody.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/requestbody.go index b7ed0b98..a48c2fe8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/requestbody.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/requestbody.go @@ -281,7 +281,9 @@ func encodeMultipartFormDataFile(w *multipart.Writer, fieldName string, fieldTyp // Reset seek position to 0 if the reader supports seeking if seeker, ok := reader.(io.Seeker); ok { - _, _ = seeker.Seek(0, io.SeekStart) + if _, err := seeker.Seek(0, io.SeekStart); err != nil { + return err + } } return nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/retries.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/retries.go index bb78bc67..a39f8559 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/retries.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/retries.go @@ -10,11 +10,13 @@ import ( "io" "math" "math/rand" + "net" "net/http" "net/url" "slices" "strconv" "strings" + "syscall" "time" ) @@ -97,12 +99,11 @@ func Retry(ctx context.Context, r Retries, operation func() (*http.Response, err } } - // syscall detection is not available on every platform, so - // fallback to best effort string detection. - isBrokenPipeError := strings.Contains(err.Error(), "broken pipe") - isConnectionResetError := strings.Contains(err.Error(), "connection reset") + var networkOperationError *net.OpError + isBrokenPipeOrConnectionReset := errors.As(err, &networkOperationError) && + (errors.Is(err, syscall.EPIPE) || errors.Is(err, syscall.ECONNRESET)) - if (isBrokenPipeError || isConnectionResetError) && isIdempotentHTTPMethod { + if isBrokenPipeOrConnectionReset && isIdempotentHTTPMethod { return err } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/security.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/security.go index 19dfa6f4..a2332ee8 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/security.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/security.go @@ -16,15 +16,16 @@ const ( ) type securityTag struct { - Option bool - Scheme bool - Name string - Type string - SubType string - Env string + Option bool + Scheme bool + Composite bool + Name string + Type string + SubType string + Env string } -func PopulateSecurity(ctx context.Context, req *http.Request, securitySource func(context.Context) (interface{}, error)) error { +func PopulateSecurity(ctx context.Context, req *http.Request, securitySource func(context.Context) (interface{}, error), allowedFields ...string) error { if securitySource == nil { return nil } @@ -49,34 +50,7 @@ func PopulateSecurity(ctx context.Context, req *http.Request, securitySource fun securityValType = securityValType.Elem() } - for i := 0; i < securityStructType.NumField(); i++ { - fieldType := securityStructType.Field(i) - valType := securityValType.Field(i) - - kind := valType.Kind() - - if isNil(fieldType.Type, valType) { - continue - } - - if fieldType.Type.Kind() == reflect.Pointer { - kind = valType.Elem().Kind() - } - - secTag := parseSecurityTag(fieldType) - if secTag != nil { - if secTag.Option { - handleSecurityOption(headers, queryParams, valType.Interface()) - } else if secTag.Scheme { - // Special case for basic auth which could be a flattened struct - if secTag.SubType == "basic" && kind != reflect.Struct { - parseSecurityScheme(headers, queryParams, secTag, security) - } else { - parseSecurityScheme(headers, queryParams, secTag, valType.Interface()) - } - } - } - } + populateSecurityFields(headers, queryParams, securityStructType, securityValType, security, allowedFields) for key, value := range headers { req.Header.Add(key, value) @@ -91,6 +65,61 @@ func PopulateSecurity(ctx context.Context, req *http.Request, securitySource fun return nil } +func populateSecurityFields(headers, queryParams map[string]string, securityStructType reflect.Type, securityValType reflect.Value, security interface{}, allowedFields []string) { + type fieldPair struct { + fieldType reflect.StructField + valType reflect.Value + } + + var fields []fieldPair + if len(allowedFields) > 0 { + for _, name := range allowedFields { + ft, ok := securityStructType.FieldByName(name) + if !ok { + continue + } + fields = append(fields, fieldPair{ft, securityValType.FieldByName(name)}) + } + } else { + for i := 0; i < securityStructType.NumField(); i++ { + fields = append(fields, fieldPair{securityStructType.Field(i), securityValType.Field(i)}) + } + } + + for _, f := range fields { + kind := f.valType.Kind() + + if isNil(f.fieldType.Type, f.valType) { + continue + } + + if f.fieldType.Type.Kind() == reflect.Pointer { + kind = f.valType.Elem().Kind() + } + + secTag := parseSecurityTag(f.fieldType) + if secTag == nil { + continue + } + + if secTag.Option { + handleSecurityOption(headers, queryParams, f.valType.Interface()) + return + } else if secTag.Scheme { + // Special case for basic auth which could be a flattened struct + if secTag.SubType == "basic" && kind != reflect.Struct { + parseSecurityScheme(headers, queryParams, secTag, security) + } else { + parseSecurityScheme(headers, queryParams, secTag, f.valType.Interface()) + } + + if !secTag.Composite { + return + } + } + } +} + func handleSecurityOption(headers, queryParams map[string]string, option interface{}) { optionValType := trueReflectValue(reflect.ValueOf(option)) optionStructType := optionValType.Type() @@ -104,9 +133,16 @@ func handleSecurityOption(headers, queryParams map[string]string, option interfa valType := optionValType.Field(i) secTag := parseSecurityTag(fieldType) - if secTag != nil && secTag.Scheme { - parseSecurityScheme(headers, queryParams, secTag, valType.Interface()) + if secTag == nil || !secTag.Scheme { + continue } + + if secTag.Type == "http" && secTag.SubType == "basic" && valType.Kind() != reflect.Struct { + handleBasicAuthScheme(headers, optionValType.Interface()) + return + } + + parseSecurityScheme(headers, queryParams, secTag, valType.Interface()) } } @@ -176,6 +212,8 @@ func parseSecuritySchemeValue(headers, queryParams map[string]string, schemeTag switch schemeTag.SubType { case "bearer": headers[secTag.Name] = prefixBearer(valToString(val)) + case "basic": + headers[secTag.Name] = valToString(val) case "custom": default: panic("not supported") @@ -231,6 +269,7 @@ func parseSecurityTag(field reflect.StructField) *securityTag { option := false scheme := false + composite := false name := "" securityType := "" securitySubType := "" @@ -254,20 +293,21 @@ func parseSecurityTag(field reflect.StructField) *securityTag { option = true case "scheme": scheme = true + case "composite": + composite = true case "env": env = parts[1] } } - // TODO: validate tag? - return &securityTag{ - Option: option, - Scheme: scheme, - Name: name, - Type: securityType, - SubType: securitySubType, - Env: env, + Option: option, + Scheme: scheme, + Composite: composite, + Name: name, + Type: securityType, + SubType: securitySubType, + Env: env, } } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/utils.go b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/utils.go index 0415b536..a614e376 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/utils.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/pkg/utils/utils.go @@ -45,6 +45,14 @@ func UnmarshalJsonFromResponseBody(body io.Reader, out interface{}, tag string) return nil } +func UnmarshalJsonFromString(json string, out interface{}, tag string) error { + if err := UnmarshalJSON([]byte(json), out, reflect.StructTag(tag), true, nil); err != nil { + return fmt.Errorf("error unmarshalling json response body: %w", err) + } + + return nil +} + func ReplaceParameters(stringWithParams string, params map[string]string) string { if len(params) == 0 { return stringWithParams @@ -265,13 +273,20 @@ func contains(arr []string, str string) bool { return false } +func DrainBody(res *http.Response) { + io.Copy(io.Discard, res.Body) + res.Body.Close() + res.Body = io.NopCloser(bytes.NewReader(nil)) +} + func ConsumeRawBody(res *http.Response) ([]byte, error) { + defer res.Body.Close() + rawBody, err := io.ReadAll(res.Body) if err != nil { return nil, fmt.Errorf("error reading response body: %w", err) } - res.Body.Close() res.Body = io.NopCloser(bytes.NewBuffer(rawBody)) return rawBody, nil diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/policysearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/policysearch.go index 6173abd9..2a2d9ba9 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/policysearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/policysearch.go @@ -235,19 +235,11 @@ func (s *PolicySearch) Search(ctx context.Context, request *shared.SearchPolicie return nil, nil } } + request.PageToken = &nCVal return s.Search( ctx, - &shared.SearchPoliciesRequest{ - DisplayName: request.DisplayName, - ExcludePolicyIds: request.ExcludePolicyIds, - IncludeDeleted: request.IncludeDeleted, - PageSize: request.PageSize, - PageToken: &nCVal, - PolicyTypes: request.PolicyTypes, - Query: request.Query, - Refs: request.Refs, - }, + request, opts..., ) } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/policyvalidate.go b/vendor/github.com/conductorone/conductorone-sdk-go/policyvalidate.go index 8322d684..621356a5 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/policyvalidate.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/policyvalidate.go @@ -33,7 +33,7 @@ func newPolicyValidate(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfigurati // ValidateCEL - Validate Cel // Validate policies -func (s *PolicyValidate) ValidateCEL(ctx context.Context, request *shared.EditorValidateRequest, opts ...operations.Option) (*operations.C1APIPolicyV1PolicyValidateValidateCELResponse, error) { +func (s *PolicyValidate) ValidateCEL(ctx context.Context, request *shared.PolicyEditorValidateRequest, opts ...operations.Option) (*operations.C1APIPolicyV1PolicyValidateValidateCELResponse, error) { o := operations.Options{} supportedOptions := []string{ operations.SupportedOptionRetries, @@ -206,12 +206,12 @@ func (s *PolicyValidate) ValidateCEL(ctx context.Context, request *shared.Editor return nil, err } - var out shared.EditorValidateResponse + var out shared.PolicyEditorValidateResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.EditorValidateResponse = &out + res.PolicyEditorValidateResponse = &out default: rawBody, err := utils.ConsumeRawBody(httpRes) if err != nil { diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/principal.go b/vendor/github.com/conductorone/conductorone-sdk-go/principal.go new file mode 100644 index 00000000..28a0d3ea --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/principal.go @@ -0,0 +1,2776 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type Principal struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newPrincipal(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Principal { + return &Principal{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// AddBinding - Add Binding +// AddBinding links a tenant-scoped subject (a function today; future kinds +// +// tomorrow) to a service principal. Outbound c1-api calls made on the +// subject's behalf can then be minted as user: via +// an RFC 8693 token-exchange (act-as) flow. Many-aware: a subject may +// hold multiple bindings at the storage layer. Idempotent on +// (subject, service_principal_id) — adds the row if missing, +// resurrects it if soft-deleted, no-op if already active. Consumers +// that need 0-or-1 cardinality (Functions today) enforce it +// client-side via ListBindings + DeleteBinding. Requires the +// SERVICE_PRINCIPALS feature flag. +func (s *Principal) AddBinding(ctx context.Context, request *shared.ServicePrincipalServiceAddBindingRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceAddBindingResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/service_principals/bindings") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.AddBinding", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceAddBindingResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceAddBindingResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceAddBindingResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Create +// Create creates a new service principal. +func (s *Principal) Create(ctx context.Context, request *shared.ServicePrincipalServiceCreateRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceCreateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/service_principals") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.Create", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceCreateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceCreateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceCreateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateCredential - Create Credential +// CreateCredential creates a new client credential for a service principal. +func (s *Principal) CreateCredential(ctx context.Context, request operations.C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/credentials", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.CreateCredential", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ServicePrincipalServiceCreateCredentialRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceCreateCredentialResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceCreateCredentialResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceCreateCredentialResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Delete +// Delete deletes a service principal and all its credentials. +func (s *Principal) Delete(ctx context.Context, request operations.C1APIServicePrincipalV1ServicePrincipalServiceDeleteRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceDeleteResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.Delete", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ServicePrincipalServiceDeleteRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceDeleteResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceDeleteResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceDeleteResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteBinding - Delete Binding +// DeleteBinding removes a single (subject, service_principal_id) binding +// +// row. At-most-one delete — does not touch other bindings the subject +// may hold against different service principals. Idempotent — succeeds +// even if no matching row exists. +func (s *Principal) DeleteBinding(ctx context.Context, request *shared.ServicePrincipalServiceDeleteBindingRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceDeleteBindingResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/service_principals/bindings/delete") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.DeleteBinding", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceDeleteBindingResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceDeleteBindingResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceDeleteBindingResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Get +// Get returns a service principal by ID. +func (s *Principal) Get(ctx context.Context, request operations.C1APIServicePrincipalV1ServicePrincipalServiceGetRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceGetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceGetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetCredential - Get Credential +// GetCredential returns a single client credential for a service principal. +func (s *Principal) GetCredential(ctx context.Context, request operations.C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/credentials/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.GetCredential", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceGetCredentialResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceGetCredentialResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceGetCredentialResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// List +// List lists service principals for the tenant. +func (s *Principal) List(ctx context.Context, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceListResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/service_principals") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.List", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceListResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceListResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceListResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// ListBindings - List Bindings +// ListBindings returns every active binding held by a subject. Empty +// +// list when the subject is unbound. The response is unordered. +func (s *Principal) ListBindings(ctx context.Context, request *shared.ServicePrincipalServiceListBindingsRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceListBindingsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/service_principals/bindings/list") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.ListBindings", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceListBindingsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceListBindingsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceListBindingsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// ListCredentials - List Credentials +// ListCredentials lists client credentials for a service principal. +func (s *Principal) ListCredentials(ctx context.Context, request operations.C1APIServicePrincipalV1ServicePrincipalServiceListCredentialsRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceListCredentialsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/credentials", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.ListCredentials", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceListCredentialsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceListCredentialsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceListCredentialsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// RevokeCredential - Revoke Credential +// RevokeCredential revokes (deletes) a client credential for a service principal. +func (s *Principal) RevokeCredential(ctx context.Context, request operations.C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/credentials/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.RevokeCredential", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ServicePrincipalServiceRevokeCredentialRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceRevokeCredentialResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceRevokeCredentialResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceRevokeCredentialResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Update +// Update updates a service principal's display name. +func (s *Principal) Update(ctx context.Context, request operations.C1APIServicePrincipalV1ServicePrincipalServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceUpdateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.Update", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ServicePrincipalServiceUpdateRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceUpdateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceUpdateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceUpdateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// UpdateCredential - Update Credential +// UpdateCredential updates a client credential for a service principal. +func (s *Principal) UpdateCredential(ctx context.Context, request operations.C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialRequest, opts ...operations.Option) (*operations.C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/credentials/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.service_principal.v1.ServicePrincipalService.UpdateCredential", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "ServicePrincipalServiceUpdateCredentialRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIServicePrincipalV1ServicePrincipalServiceUpdateCredentialResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ServicePrincipalServiceUpdateCredentialResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ServicePrincipalServiceUpdateCredentialResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/requestcatalogmanagement.go b/vendor/github.com/conductorone/conductorone-sdk-go/requestcatalogmanagement.go index f0d390d0..b10da8f4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/requestcatalogmanagement.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/requestcatalogmanagement.go @@ -668,7 +668,7 @@ func (s *RequestCatalogManagement) Create(ctx context.Context, request *shared.R } // CreateBundleAutomation - Create Bundle Automation -// Invokes the c1.api.requestcatalog.v1.RequestCatalogManagementService.CreateBundleAutomation method. +// Create a new bundle automation rule for a catalog that automatically syncs catalog membership from a query. func (s *RequestCatalogManagement) CreateBundleAutomation(ctx context.Context, request operations.C1APIRequestcatalogV1RequestCatalogManagementServiceCreateBundleAutomationRequest, opts ...operations.Option) (*operations.C1APIRequestcatalogV1RequestCatalogManagementServiceCreateBundleAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1304,7 +1304,7 @@ func (s *RequestCatalogManagement) Delete(ctx context.Context, request operation } // DeleteBundleAutomation - Delete Bundle Automation -// Invokes the c1.api.requestcatalog.v1.RequestCatalogManagementService.DeleteBundleAutomation method. +// Delete the bundle automation rule for a catalog, stopping automatic membership syncing. func (s *RequestCatalogManagement) DeleteBundleAutomation(ctx context.Context, request operations.C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteBundleAutomationRequest, opts ...operations.Option) (*operations.C1APIRequestcatalogV1RequestCatalogManagementServiceDeleteBundleAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1728,7 +1728,7 @@ func (s *RequestCatalogManagement) DeleteRequestableEntry(ctx context.Context, r } // ForceRunBundleAutomation - Force Run Bundle Automation -// Invokes the c1.api.requestcatalog.v1.RequestCatalogManagementService.ForceRunBundleAutomation method. +// Trigger an immediate execution of a catalog's bundle automation, bypassing the normal schedule. func (s *RequestCatalogManagement) ForceRunBundleAutomation(ctx context.Context, request operations.C1APIRequestcatalogV1RequestCatalogManagementServiceForceRunBundleAutomationRequest, opts ...operations.Option) (*operations.C1APIRequestcatalogV1RequestCatalogManagementServiceForceRunBundleAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -2764,7 +2764,7 @@ func (s *RequestCatalogManagement) List(ctx context.Context, request operations. } // ListAllEntitlementIdsPerApp - List All Entitlement Ids Per App -// Invokes the c1.api.requestcatalog.v1.RequestCatalogManagementService.ListAllEntitlementIdsPerApp method. +// List all requestable entitlement IDs in a catalog without pagination. func (s *RequestCatalogManagement) ListAllEntitlementIdsPerApp(ctx context.Context, request operations.C1APIRequestcatalogV1RequestCatalogManagementServiceListAllEntitlementIdsPerAppRequest, opts ...operations.Option) (*operations.C1APIRequestcatalogV1RequestCatalogManagementServiceListAllEntitlementIdsPerAppResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -3387,7 +3387,7 @@ func (s *RequestCatalogManagement) ListEntitlementsPerCatalog(ctx context.Contex } // RemoveAccessEntitlements - Remove Access Entitlements -// Remove visibility bindings (access entitlements) to a catalog. +// Remove visibility bindings (access entitlements) from a catalog. func (s *RequestCatalogManagement) RemoveAccessEntitlements(ctx context.Context, request operations.C1APIRequestcatalogV1RequestCatalogManagementServiceRemoveAccessEntitlementsRequest, opts ...operations.Option) (*operations.C1APIRequestcatalogV1RequestCatalogManagementServiceRemoveAccessEntitlementsResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -3811,7 +3811,7 @@ func (s *RequestCatalogManagement) RemoveAppEntitlements(ctx context.Context, re } // ResumePausedBundleAutomation - Resume Paused Bundle Automation -// Invokes the c1.api.requestcatalog.v1.RequestCatalogManagementService.ResumePausedBundleAutomation method. +// Resume a bundle automation that was paused by the circuit breaker after detecting excessive membership changes. func (s *RequestCatalogManagement) ResumePausedBundleAutomation(ctx context.Context, request operations.C1APIRequestcatalogV1RequestCatalogManagementServiceResumePausedBundleAutomationRequest, opts ...operations.Option) (*operations.C1APIRequestcatalogV1RequestCatalogManagementServiceResumePausedBundleAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -4023,7 +4023,7 @@ func (s *RequestCatalogManagement) ResumePausedBundleAutomation(ctx context.Cont } // SetBundleAutomation - Set Bundle Automation -// Invokes the c1.api.requestcatalog.v1.RequestCatalogManagementService.SetBundleAutomation method. +// Create or update the bundle automation rule for a catalog that automatically syncs catalog membership. func (s *RequestCatalogManagement) SetBundleAutomation(ctx context.Context, request operations.C1APIRequestcatalogV1RequestCatalogManagementServiceSetBundleAutomationRequest, opts ...operations.Option) (*operations.C1APIRequestcatalogV1RequestCatalogManagementServiceSetBundleAutomationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -4447,7 +4447,7 @@ func (s *RequestCatalogManagement) Update(ctx context.Context, request operation } // UpdateAppEntitlements - Update App Entitlements -// Invokes the c1.api.requestcatalog.v1.RequestCatalogManagementService.UpdateAppEntitlements method. +// Replace the full set of requestable entitlements in a catalog with the provided list. func (s *RequestCatalogManagement) UpdateAppEntitlements(ctx context.Context, request operations.C1APIRequestcatalogV1RequestCatalogManagementServiceUpdateAppEntitlementsRequest, opts ...operations.Option) (*operations.C1APIRequestcatalogV1RequestCatalogManagementServiceUpdateAppEntitlementsResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/requestschema.go b/vendor/github.com/conductorone/conductorone-sdk-go/requestschema.go index fd46d624..1cd8d94b 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/requestschema.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/requestschema.go @@ -32,7 +32,7 @@ func newRequestSchema(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguratio } // Create -// Invokes the c1.api.request_schema.v1.RequestSchemaService.Create method. +// Create a new request schema that defines a form template for access requests. func (s *RequestSchema) Create(ctx context.Context, request *shared.RequestSchemaServiceCreateRequest, opts ...operations.Option) (*operations.C1APIRequestSchemaV1RequestSchemaServiceCreateResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -244,7 +244,7 @@ func (s *RequestSchema) Create(ctx context.Context, request *shared.RequestSchem } // CreateEntitlementBinding - Create Entitlement Binding -// Invokes the c1.api.request_schema.v1.RequestSchemaService.CreateEntitlementBinding method. +// Link a request schema to a single app entitlement so the form is shown when requesting that entitlement. func (s *RequestSchema) CreateEntitlementBinding(ctx context.Context, request *shared.RequestSchemaServiceCreateEntitlementBindingRequest, opts ...operations.Option) (*operations.C1APIRequestSchemaV1RequestSchemaServiceCreateEntitlementBindingResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -456,7 +456,7 @@ func (s *RequestSchema) CreateEntitlementBinding(ctx context.Context, request *s } // Delete -// Invokes the c1.api.request_schema.v1.RequestSchemaService.Delete method. +// Delete a request schema by ID. Associated entitlement bindings are also deleted. func (s *RequestSchema) Delete(ctx context.Context, request operations.C1APIRequestSchemaV1RequestSchemaServiceDeleteRequest, opts ...operations.Option) (*operations.C1APIRequestSchemaV1RequestSchemaServiceDeleteResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -668,7 +668,7 @@ func (s *RequestSchema) Delete(ctx context.Context, request operations.C1APIRequ } // FindBindingForAppEntitlement - Find Binding For App Entitlement -// Invokes the c1.api.request_schema.v1.RequestSchemaService.FindBindingForAppEntitlement method. +// Look up which request schema is bound to a given app entitlement. func (s *RequestSchema) FindBindingForAppEntitlement(ctx context.Context, request *shared.RequestSchemaServiceFindBindingForAppEntitlementRequest, opts ...operations.Option) (*operations.C1APIRequestSchemaV1RequestSchemaServiceFindBindingForAppEntitlementResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -880,7 +880,7 @@ func (s *RequestSchema) FindBindingForAppEntitlement(ctx context.Context, reques } // Get -// Invokes the c1.api.request_schema.v1.RequestSchemaService.Get method. +// Retrieve a single request schema by ID. func (s *RequestSchema) Get(ctx context.Context, request operations.C1APIRequestSchemaV1RequestSchemaServiceGetRequest, opts ...operations.Option) (*operations.C1APIRequestSchemaV1RequestSchemaServiceGetResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1085,7 +1085,7 @@ func (s *RequestSchema) Get(ctx context.Context, request operations.C1APIRequest } // RemoveEntitlementBinding - Remove Entitlement Binding -// Invokes the c1.api.request_schema.v1.RequestSchemaService.RemoveEntitlementBinding method. +// Remove the link between a request schema and a single app entitlement. func (s *RequestSchema) RemoveEntitlementBinding(ctx context.Context, request *shared.RequestSchemaServiceRemoveEntitlementBindingRequest, opts ...operations.Option) (*operations.C1APIRequestSchemaV1RequestSchemaServiceRemoveEntitlementBindingResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1297,7 +1297,7 @@ func (s *RequestSchema) RemoveEntitlementBinding(ctx context.Context, request *s } // Update -// Invokes the c1.api.request_schema.v1.RequestSchemaService.Update method. +// Update an existing request schema's form definition or settings. func (s *RequestSchema) Update(ctx context.Context, request operations.C1APIRequestSchemaV1RequestSchemaServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIRequestSchemaV1RequestSchemaServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/roleminingmanagement.go b/vendor/github.com/conductorone/conductorone-sdk-go/roleminingmanagement.go new file mode 100644 index 00000000..c17b1421 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/roleminingmanagement.go @@ -0,0 +1,2537 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type RoleMiningManagement struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newRoleMiningManagement(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *RoleMiningManagement { + return &RoleMiningManagement{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// CreateAccessProfileFromCohort - Create Access Profile From Cohort +// CreateAccessProfileFromCohort creates an access profile from a cohort definition, +// +// adds the specified entitlements, and sets up dynamic membership automation using +// a CEL expression derived from the profile filters. +func (s *RoleMiningManagement) CreateAccessProfileFromCohort(ctx context.Context, request *shared.CreateAccessProfileFromCohortRequest, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceCreateAccessProfileFromCohortResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/role-mining/access-profiles") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.CreateAccessProfileFromCohort", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceCreateAccessProfileFromCohortResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.CreateAccessProfileFromCohortResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.CreateAccessProfileFromCohortResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetCustomAnalysisResult - Get Custom Analysis Result +// Invokes the c1.api.role_mining_management.v1.RoleMiningManagementService.GetCustomAnalysisResult method. +func (s *RoleMiningManagement) GetCustomAnalysisResult(ctx context.Context, request operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceGetCustomAnalysisResultRequest, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceGetCustomAnalysisResultResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/role-mining/custom-analysis/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.GetCustomAnalysisResult", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceGetCustomAnalysisResultResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetCustomAnalysisResultResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetCustomAnalysisResultResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetLatestRun - Get Latest Run +// Retrieve the most recent role mining analysis run, including its status and results summary. +func (s *RoleMiningManagement) GetLatestRun(ctx context.Context, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceGetLatestRunResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/role-mining/runs/latest") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.GetLatestRun", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceGetLatestRunResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetLatestRunResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetLatestRunResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetRoleMiningConfig - Get Role Mining Config +// Retrieve the current role mining configuration, including cohort hints and threshold settings. +func (s *RoleMiningManagement) GetRoleMiningConfig(ctx context.Context, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceGetRoleMiningConfigResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/role-mining/config") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.GetRoleMiningConfig", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceGetRoleMiningConfigResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetRoleMiningConfigResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetRoleMiningConfigResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetSuggestion - Get Suggestion +// Retrieve a single role suggestion by ID, including its cohort filters, entitlements, and confidence score. +func (s *RoleMiningManagement) GetSuggestion(ctx context.Context, request operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceGetSuggestionRequest, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceGetSuggestionResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/role-mining/suggestions/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.GetSuggestion", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceGetSuggestionResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetSuggestionResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetSuggestionResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// ListRuns - List Runs +// List role mining analysis runs in reverse chronological order. +func (s *RoleMiningManagement) ListRuns(ctx context.Context, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceListRunsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/role-mining/runs") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.ListRuns", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceListRunsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ListRunsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ListRunsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// ListSuggestions - List Suggestions +// List role suggestions generated by analysis runs, optionally filtered by state. +func (s *RoleMiningManagement) ListSuggestions(ctx context.Context, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceListSuggestionsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/role-mining/suggestions") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.ListSuggestions", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceListSuggestionsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ListSuggestionsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ListSuggestionsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SearchCohortUsers - Search Cohort Users +// Search for users that belong to a suggestion's cohort, with optional additional profile filters. +func (s *RoleMiningManagement) SearchCohortUsers(ctx context.Context, request operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersRequest, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/role-mining/suggestions/{suggestion_id}/users", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.SearchCohortUsers", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SearchCohortUsersRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceSearchCohortUsersResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SearchCohortUsersResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SearchCohortUsersResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// TriggerAnalysis - Trigger Analysis +// Start a new role mining analysis job that scans existing access patterns to generate role suggestions. +func (s *RoleMiningManagement) TriggerAnalysis(ctx context.Context, request *shared.TriggerAnalysisRequest, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerAnalysisResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/role-mining/trigger") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.TriggerAnalysis", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerAnalysisResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.TriggerAnalysisResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.TriggerAnalysisResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// TriggerCustomAnalysis - Trigger Custom Analysis +// Invokes the c1.api.role_mining_management.v1.RoleMiningManagementService.TriggerCustomAnalysis method. +func (s *RoleMiningManagement) TriggerCustomAnalysis(ctx context.Context, request *shared.TriggerCustomAnalysisRequest, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerCustomAnalysisResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/role-mining/custom-analysis/trigger") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.TriggerCustomAnalysis", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceTriggerCustomAnalysisResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.TriggerCustomAnalysisResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.TriggerCustomAnalysisResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// UpdateRoleMiningConfig - Update Role Mining Config +// Update the role mining configuration, such as cohort hints, max suggestions, and minimum cohort size. +func (s *RoleMiningManagement) UpdateRoleMiningConfig(ctx context.Context, request *shared.UpdateRoleMiningConfigRequest, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateRoleMiningConfigResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/role-mining/config") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.UpdateRoleMiningConfig", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateRoleMiningConfigResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UpdateRoleMiningConfigResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UpdateRoleMiningConfigResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// UpdateSuggestionState - Update Suggestion State +// Transition a role suggestion to a new state, such as accepted, rejected, or dismissed. +func (s *RoleMiningManagement) UpdateSuggestionState(ctx context.Context, request operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateRequest, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/role-mining/suggestions/{id}/state", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementService.UpdateSuggestionState", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "UpdateSuggestionStateRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementServiceUpdateSuggestionStateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UpdateSuggestionStateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UpdateSuggestionStateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/roleminingmanagementsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/roleminingmanagementsearch.go new file mode 100644 index 00000000..b5cdc999 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/roleminingmanagementsearch.go @@ -0,0 +1,244 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type RoleMiningManagementSearch struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newRoleMiningManagementSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *RoleMiningManagementSearch { + return &RoleMiningManagementSearch{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Search +// Search role mining suggestions by name, description, or cohort filter values with optional state and type filters. +func (s *RoleMiningManagementSearch) Search(ctx context.Context, request *shared.RoleMiningSearchSuggestionsRequest, opts ...operations.Option) (*operations.C1APIRoleMiningManagementV1RoleMiningManagementSearchServiceSearchResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/role-mining/suggestions") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.role_mining_management.v1.RoleMiningManagementSearchService.Search", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIRoleMiningManagementV1RoleMiningManagementSearchServiceSearchResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.RoleMiningSearchSuggestionsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.RoleMiningSearchSuggestionsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/sessionsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/sessionsettings.go index 4407c693..20b776e4 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/sessionsettings.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/sessionsettings.go @@ -32,7 +32,7 @@ func newSessionSettings(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfigurat } // Get -// Invokes the c1.api.settings.v1.SessionSettingsService.Get method. +// Get retrieves the current session security settings for the tenant. func (s *SessionSettings) Get(ctx context.Context, opts ...operations.Option) (*operations.C1APISettingsV1SessionSettingsServiceGetResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -237,7 +237,7 @@ func (s *SessionSettings) Get(ctx context.Context, opts ...operations.Option) (* } // TestSourceIP - Test Source Ip -// Invokes the c1.api.settings.v1.SessionSettingsService.TestSourceIP method. +// TestSourceIP checks whether a given IP address would be allowed by the specified CIDR allowlist rules. func (s *SessionSettings) TestSourceIP(ctx context.Context, request *shared.TestSourceIPRequest, opts ...operations.Option) (*operations.C1APISettingsV1SessionSettingsServiceTestSourceIPResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -449,7 +449,7 @@ func (s *SessionSettings) TestSourceIP(ctx context.Context, request *shared.Test } // Update -// Invokes the c1.api.settings.v1.SessionSettingsService.Update method. +// Update modifies the session security settings for the tenant, such as session length and IP allowlists. func (s *SessionSettings) Update(ctx context.Context, request *shared.UpdateSessionSettingsRequest, opts ...operations.Option) (*operations.C1APISettingsV1SessionSettingsServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/ssfreceiverevent.go b/vendor/github.com/conductorone/conductorone-sdk-go/ssfreceiverevent.go new file mode 100644 index 00000000..aa6762b9 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/ssfreceiverevent.go @@ -0,0 +1,240 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" +) + +type SSFReceiverEvent struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newSSFReceiverEvent(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *SSFReceiverEvent { + return &SSFReceiverEvent{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// List +// List returns a paginated list of events received on a specific SSF receiver stream, ordered by receipt time. +func (s *SSFReceiverEvent) List(ctx context.Context, request operations.C1APISSFReceiverV1SSFReceiverEventServiceListRequest, opts ...operations.Option) (*operations.C1APISSFReceiverV1SSFReceiverEventServiceListResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/ssf-receiver-streams/{stream_id}/events", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.ssf_receiver.v1.SSFReceiverEventService.List", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISSFReceiverV1SSFReceiverEventServiceListResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SSFReceiverEventServiceListResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SSFReceiverEventServiceListResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/ssfreceivereventsearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/ssfreceivereventsearch.go new file mode 100644 index 00000000..b21ca60b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/ssfreceivereventsearch.go @@ -0,0 +1,244 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type SSFReceiverEventSearch struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newSSFReceiverEventSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *SSFReceiverEventSearch { + return &SSFReceiverEventSearch{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Search +// Search performs a full-text search across received SSF events with optional filters for stream, event type, outcome, and matched user. +func (s *SSFReceiverEventSearch) Search(ctx context.Context, request *shared.SSFReceiverEventSearchServiceSearchRequest, opts ...operations.Option) (*operations.C1APISSFReceiverV1SSFReceiverEventSearchServiceSearchResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/ssf-receiver-events") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.ssf_receiver.v1.SSFReceiverEventSearchService.Search", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISSFReceiverV1SSFReceiverEventSearchServiceSearchResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SSFReceiverEventSearchServiceSearchResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SSFReceiverEventSearchServiceSearchResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/ssfreceiverstream.go b/vendor/github.com/conductorone/conductorone-sdk-go/ssfreceiverstream.go new file mode 100644 index 00000000..2cdd460c --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/ssfreceiverstream.go @@ -0,0 +1,1499 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type SSFReceiverStream struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newSSFReceiverStream(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *SSFReceiverStream { + return &SSFReceiverStream{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Create +// Create registers a new SSF receiver stream with the specified configuration and returns the created stream along with the push auth token (if push delivery). +func (s *SSFReceiverStream) Create(ctx context.Context, request *shared.SSFReceiverStreamServiceCreateRequest, opts ...operations.Option) (*operations.C1APISSFReceiverV1SSFReceiverStreamServiceCreateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/ssf-receiver-streams") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.ssf_receiver.v1.SSFReceiverStreamService.Create", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISSFReceiverV1SSFReceiverStreamServiceCreateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SSFReceiverStreamServiceCreateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SSFReceiverStreamServiceCreateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Delete +// Delete removes an SSF receiver stream and stops receiving events from the associated transmitter. +func (s *SSFReceiverStream) Delete(ctx context.Context, request operations.C1APISSFReceiverV1SSFReceiverStreamServiceDeleteRequest, opts ...operations.Option) (*operations.C1APISSFReceiverV1SSFReceiverStreamServiceDeleteResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/ssf-receiver-streams/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.ssf_receiver.v1.SSFReceiverStreamService.Delete", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SSFReceiverStreamServiceDeleteRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISSFReceiverV1SSFReceiverStreamServiceDeleteResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SSFReceiverStreamServiceDeleteResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SSFReceiverStreamServiceDeleteResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Get +// Get retrieves a single SSF receiver stream by its ID. +func (s *SSFReceiverStream) Get(ctx context.Context, request operations.C1APISSFReceiverV1SSFReceiverStreamServiceGetRequest, opts ...operations.Option) (*operations.C1APISSFReceiverV1SSFReceiverStreamServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/ssf-receiver-streams/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.ssf_receiver.v1.SSFReceiverStreamService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISSFReceiverV1SSFReceiverStreamServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SSFReceiverStreamServiceGetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SSFReceiverStreamServiceGetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetStats - Get Stats +// GetStats retrieves event processing statistics for a specific SSF receiver stream, including counts of received, acted-on, and failed events. +func (s *SSFReceiverStream) GetStats(ctx context.Context, request operations.C1APISSFReceiverV1SSFReceiverStreamServiceGetStatsRequest, opts ...operations.Option) (*operations.C1APISSFReceiverV1SSFReceiverStreamServiceGetStatsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/ssf-receiver-streams/{stream_id}/stats", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.ssf_receiver.v1.SSFReceiverStreamService.GetStats", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISSFReceiverV1SSFReceiverStreamServiceGetStatsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SSFReceiverStreamServiceGetStatsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SSFReceiverStreamServiceGetStatsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// List +// List returns a paginated list of all SSF receiver streams configured for the tenant. +func (s *SSFReceiverStream) List(ctx context.Context, request operations.C1APISSFReceiverV1SSFReceiverStreamServiceListRequest, opts ...operations.Option) (*operations.C1APISSFReceiverV1SSFReceiverStreamServiceListResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/ssf-receiver-streams") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.ssf_receiver.v1.SSFReceiverStreamService.List", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISSFReceiverV1SSFReceiverStreamServiceListResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SSFReceiverStreamServiceListResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SSFReceiverStreamServiceListResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Test +// Test validates an SSF receiver stream's configuration by checking JWKS reachability, identity resolution, and action preview without processing real events. +func (s *SSFReceiverStream) Test(ctx context.Context, request operations.C1APISSFReceiverV1SSFReceiverStreamServiceTestRequest, opts ...operations.Option) (*operations.C1APISSFReceiverV1SSFReceiverStreamServiceTestResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/ssf-receiver-streams/{id}/test", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.ssf_receiver.v1.SSFReceiverStreamService.Test", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SSFReceiverStreamServiceTestRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISSFReceiverV1SSFReceiverStreamServiceTestResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SSFReceiverStreamServiceTestResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SSFReceiverStreamServiceTestResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Update +// Update modifies an existing SSF receiver stream's configuration. Only fields specified in the update mask are changed. +func (s *SSFReceiverStream) Update(ctx context.Context, request operations.C1APISSFReceiverV1SSFReceiverStreamServiceUpdateRequest, opts ...operations.Option) (*operations.C1APISSFReceiverV1SSFReceiverStreamServiceUpdateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/ssf-receiver-streams/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.ssf_receiver.v1.SSFReceiverStreamService.Update", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SSFReceiverStreamServiceUpdateRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISSFReceiverV1SSFReceiverStreamServiceUpdateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SSFReceiverStreamServiceUpdateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SSFReceiverStreamServiceUpdateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/stepupprovider.go b/vendor/github.com/conductorone/conductorone-sdk-go/stepupprovider.go index 12a4f834..73ace463 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/stepupprovider.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/stepupprovider.go @@ -32,7 +32,7 @@ func newStepUpProvider(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfigurati } // Create -// Invokes the c1.api.stepup.v1.StepUpProviderService.Create method. +// Create registers a new step-up authentication provider for the tenant. func (s *StepUpProvider) Create(ctx context.Context, request *shared.CreateStepUpProviderRequest, opts ...operations.Option) (*operations.C1APIStepupV1StepUpProviderServiceCreateResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -244,7 +244,7 @@ func (s *StepUpProvider) Create(ctx context.Context, request *shared.CreateStepU } // Delete -// Invokes the c1.api.stepup.v1.StepUpProviderService.Delete method. +// Delete removes a step-up authentication provider from the tenant. func (s *StepUpProvider) Delete(ctx context.Context, request operations.C1APIStepupV1StepUpProviderServiceDeleteRequest, opts ...operations.Option) (*operations.C1APIStepupV1StepUpProviderServiceDeleteResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -456,7 +456,7 @@ func (s *StepUpProvider) Delete(ctx context.Context, request operations.C1APISte } // Get -// Invokes the c1.api.stepup.v1.StepUpProviderService.Get method. +// Get retrieves a single step-up authentication provider by its ID. func (s *StepUpProvider) Get(ctx context.Context, request operations.C1APIStepupV1StepUpProviderServiceGetRequest, opts ...operations.Option) (*operations.C1APIStepupV1StepUpProviderServiceGetResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -661,7 +661,7 @@ func (s *StepUpProvider) Get(ctx context.Context, request operations.C1APIStepup } // List -// Invokes the c1.api.stepup.v1.StepUpProviderService.List method. +// List returns all step-up authentication providers configured for the tenant. func (s *StepUpProvider) List(ctx context.Context, opts ...operations.Option) (*operations.C1APIStepupV1StepUpProviderServiceListResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1078,7 +1078,7 @@ func (s *StepUpProvider) Search(ctx context.Context, request *shared.SearchStepU } // Test -// Invokes the c1.api.stepup.v1.StepUpProviderService.Test method. +// Test initiates a test authentication flow against a step-up provider and returns a redirect URL for the caller to complete verification. func (s *StepUpProvider) Test(ctx context.Context, request operations.C1APIStepupV1StepUpProviderServiceTestRequest, opts ...operations.Option) (*operations.C1APIStepupV1StepUpProviderServiceTestResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1290,7 +1290,7 @@ func (s *StepUpProvider) Test(ctx context.Context, request operations.C1APIStepu } // Update -// Invokes the c1.api.stepup.v1.StepUpProviderService.Update method. +// Update modifies an existing step-up authentication provider's configuration. Use the update mask to specify which fields to change. func (s *StepUpProvider) Update(ctx context.Context, request operations.C1APIStepupV1StepUpProviderServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIStepupV1StepUpProviderServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1502,7 +1502,7 @@ func (s *StepUpProvider) Update(ctx context.Context, request operations.C1APISte } // UpdateSecret - Update Secret -// Invokes the c1.api.stepup.v1.StepUpProviderService.UpdateSecret method. +// UpdateSecret rotates the client secret for a step-up authentication provider without modifying other settings. func (s *StepUpProvider) UpdateSecret(ctx context.Context, request operations.C1APIStepupV1StepUpProviderServiceUpdateSecretRequest, opts ...operations.Option) (*operations.C1APIStepupV1StepUpProviderServiceUpdateSecretResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/systemlog.go b/vendor/github.com/conductorone/conductorone-sdk-go/systemlog.go index 6bc75c54..c8973b93 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/systemlog.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/systemlog.go @@ -34,7 +34,7 @@ func newSystemLog(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, h // ListEvents - List Events // ListEvents pulls Events from the ConductorOne system. // -// This endpoint should be used to synchorize the +// This endpoint should be used to synchronize the // system log events to external systems. func (s *SystemLog) ListEvents(ctx context.Context, request *shared.SystemLogServiceListEventsRequest, opts ...operations.Option) (*operations.C1APISystemlogV1SystemLogServiceListEventsResponse, error) { o := operations.Options{} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/task.go b/vendor/github.com/conductorone/conductorone-sdk-go/task.go index 4fc5190c..4d4b354c 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/task.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/task.go @@ -244,7 +244,7 @@ func (s *Task) CreateGrantTask(ctx context.Context, request *shared.TaskServiceC } // CreateOffboardingTask - Create Offboarding Task -// Invokes the c1.api.task.v1.TaskService.CreateOffboardingTask method. +// Create an offboarding task to remove a user's access across applications. func (s *Task) CreateOffboardingTask(ctx context.Context, request *shared.TaskServiceCreateOffboardingRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskServiceCreateOffboardingTaskResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/taskactions.go b/vendor/github.com/conductorone/conductorone-sdk-go/taskactions.go index 736fa9ae..e2581128 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/taskactions.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/taskactions.go @@ -31,7 +31,7 @@ func newTaskActions(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, } // Approve -// Invokes the c1.api.task.v1.TaskActionsService.Approve method. +// Approve the specified policy step on a task. func (s *TaskActions) Approve(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceApproveRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceApproveResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -243,7 +243,7 @@ func (s *TaskActions) Approve(ctx context.Context, request operations.C1APITaskV } // ApproveWithStepUp - Approve With Step Up -// Invokes the c1.api.task.v1.TaskActionsService.ApproveWithStepUp method. +// Approve a task that requires step-up authentication. If a verified step-up transaction ID is provided, the approval is processed immediately. Otherwise, a redirect URL is returned for the caller to complete authentication first. func (s *TaskActions) ApproveWithStepUp(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceApproveWithStepUpRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceApproveWithStepUpResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -455,7 +455,7 @@ func (s *TaskActions) ApproveWithStepUp(ctx context.Context, request operations. } // Close -// Invokes the c1.api.task.v1.TaskActionsService.Close method. +// Close a task, ending its workflow. func (s *TaskActions) Close(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceCloseRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceCloseResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -667,7 +667,7 @@ func (s *TaskActions) Close(ctx context.Context, request operations.C1APITaskV1T } // Comment -// Invokes the c1.api.task.v1.TaskActionsService.Comment method. +// Post a comment on a task without changing its state. func (s *TaskActions) Comment(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceCommentRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceCommentResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -879,7 +879,7 @@ func (s *TaskActions) Comment(ctx context.Context, request operations.C1APITaskV } // Deny -// Invokes the c1.api.task.v1.TaskActionsService.Deny method. +// Deny the specified policy step on a task. In multi-step policies, this may route to fallback steps rather than finalizing the task outcome. func (s *TaskActions) Deny(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceDenyRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceDenyResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1091,7 +1091,7 @@ func (s *TaskActions) Deny(ctx context.Context, request operations.C1APITaskV1Ta } // EscalateToEmergencyAccess - Escalate To Emergency Access -// Invokes the c1.api.task.v1.TaskActionsService.EscalateToEmergencyAccess method. +// Escalate a grant task to use the emergency access policy, bypassing the normal approval flow. Only valid for grant tasks. func (s *TaskActions) EscalateToEmergencyAccess(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceEscalateToEmergencyAccessRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceEscalateToEmergencyAccessResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1303,7 +1303,7 @@ func (s *TaskActions) EscalateToEmergencyAccess(ctx context.Context, request ope } // HardReset - Hard Reset -// Invokes the c1.api.task.v1.TaskActionsService.HardReset method. +// Reset a task and recalculate its policy from scratch. Unlike Restart, this re-evaluates which policy applies to the task. func (s *TaskActions) HardReset(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceHardResetRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceHardResetResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1515,7 +1515,7 @@ func (s *TaskActions) HardReset(ctx context.Context, request operations.C1APITas } // ProcessNow - Process Now -// Invokes the c1.api.task.v1.TaskActionsService.ProcessNow method. +// Trigger immediate processing of a task, bypassing any scheduled wait. For tasks linked to an external system, this also attempts to sync the external state. func (s *TaskActions) ProcessNow(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceProcessNowRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceProcessNowResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1727,7 +1727,7 @@ func (s *TaskActions) ProcessNow(ctx context.Context, request operations.C1APITa } // Reassign -// Invokes the c1.api.task.v1.TaskActionsService.Reassign method. +// Reassign a task's current policy step to a different set of users. The target step must be an approval, provision, or form step. func (s *TaskActions) Reassign(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceReassignRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceReassignResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1939,7 +1939,7 @@ func (s *TaskActions) Reassign(ctx context.Context, request operations.C1APITask } // Restart -// Invokes the c1.api.task.v1.TaskActionsService.Restart method. +// Restart a task, returning it to the beginning of its current policy workflow. func (s *TaskActions) Restart(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceRestartRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceRestartResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -2151,7 +2151,7 @@ func (s *TaskActions) Restart(ctx context.Context, request operations.C1APITaskV } // SkipStep - Skip Step -// Invokes the c1.api.task.v1.TaskActionsService.SkipStep method. +// Skip a specific policy step in a task, advancing the task to the next step in the workflow. func (s *TaskActions) SkipStep(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceSkipStepRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceSkipStepResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -2363,7 +2363,7 @@ func (s *TaskActions) SkipStep(ctx context.Context, request operations.C1APITask } // UpdateGrantDuration - Update Grant Duration -// Invokes the c1.api.task.v1.TaskActionsService.UpdateGrantDuration method. +// Update the grant duration for a task. Only applies to grant tasks with a single entitlement that are not in a provision step. The new duration must not exceed the entitlement's maximum allowed provision time. func (s *TaskActions) UpdateGrantDuration(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceUpdateGrantDurationRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceUpdateGrantDurationResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -2575,7 +2575,7 @@ func (s *TaskActions) UpdateGrantDuration(ctx context.Context, request operation } // UpdateRequestData - Update Request Data -// Invokes the c1.api.task.v1.TaskActionsService.UpdateRequestData method. +// Update the request data on a task that is currently in a form step. The submitted data is validated against the form schema before being applied. func (s *TaskActions) UpdateRequestData(ctx context.Context, request operations.C1APITaskV1TaskActionsServiceUpdateRequestDataRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskActionsServiceUpdateRequestDataResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/taskaudit.go b/vendor/github.com/conductorone/conductorone-sdk-go/taskaudit.go index 29eb699e..09391b48 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/taskaudit.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/taskaudit.go @@ -32,7 +32,7 @@ func newTaskAudit(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, h } // List -// Invokes the c1.api.task.v1.TaskAudit.List method. +// List audit trail events for a task. func (s *TaskAudit) List(ctx context.Context, request *shared.TaskAuditListRequest, opts ...operations.Option) (*operations.C1APITaskV1TaskAuditListResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/tenantauthconfig.go b/vendor/github.com/conductorone/conductorone-sdk-go/tenantauthconfig.go new file mode 100644 index 00000000..1fe251b2 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/tenantauthconfig.go @@ -0,0 +1,1082 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type TenantAuthConfig struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newTenantAuthConfig(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *TenantAuthConfig { + return &TenantAuthConfig{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Create +// Create registers a new authentication provider configuration for the tenant. +func (s *TenantAuthConfig) Create(ctx context.Context, request *shared.TenantAuthConfigServiceCreateRequest, opts ...operations.Option) (*operations.C1APIAuthConfigV1TenantAuthConfigServiceCreateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/auth-configs") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.auth_config.v1.TenantAuthConfigService.Create", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAuthConfigV1TenantAuthConfigServiceCreateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.TenantAuthConfigServiceCreateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.TenantAuthConfigServiceCreateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Delete +// Delete removes an authentication provider configuration from the tenant. +func (s *TenantAuthConfig) Delete(ctx context.Context, request operations.C1APIAuthConfigV1TenantAuthConfigServiceDeleteRequest, opts ...operations.Option) (*operations.C1APIAuthConfigV1TenantAuthConfigServiceDeleteResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/auth-configs/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.auth_config.v1.TenantAuthConfigService.Delete", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "TenantAuthConfigServiceDeleteRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAuthConfigV1TenantAuthConfigServiceDeleteResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.TenantAuthConfigServiceDeleteResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.TenantAuthConfigServiceDeleteResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Get +// Get retrieves a single authentication provider configuration by its ID. +func (s *TenantAuthConfig) Get(ctx context.Context, request operations.C1APIAuthConfigV1TenantAuthConfigServiceGetRequest, opts ...operations.Option) (*operations.C1APIAuthConfigV1TenantAuthConfigServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/auth-configs/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.auth_config.v1.TenantAuthConfigService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAuthConfigV1TenantAuthConfigServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.TenantAuthConfigServiceGetResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.TenantAuthConfigServiceGetResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// List +// List returns all authentication provider configurations for the tenant. +func (s *TenantAuthConfig) List(ctx context.Context, request operations.C1APIAuthConfigV1TenantAuthConfigServiceListRequest, opts ...operations.Option) (*operations.C1APIAuthConfigV1TenantAuthConfigServiceListResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/auth-configs") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.auth_config.v1.TenantAuthConfigService.List", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAuthConfigV1TenantAuthConfigServiceListResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.TenantAuthConfigServiceListResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.TenantAuthConfigServiceListResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Update +// Update modifies an existing authentication provider configuration. Use the update mask to specify which fields to change. +func (s *TenantAuthConfig) Update(ctx context.Context, request operations.C1APIAuthConfigV1TenantAuthConfigServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIAuthConfigV1TenantAuthConfigServiceUpdateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/auth-configs/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.auth_config.v1.TenantAuthConfigService.Update", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "TenantAuthConfigServiceUpdateRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIAuthConfigV1TenantAuthConfigServiceUpdateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.TenantAuthConfigServiceUpdateResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.TenantAuthConfigServiceUpdateResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/tenantemailprovider.go b/vendor/github.com/conductorone/conductorone-sdk-go/tenantemailprovider.go new file mode 100644 index 00000000..9f2b8d26 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/tenantemailprovider.go @@ -0,0 +1,1082 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type TenantEmailProvider struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newTenantEmailProvider(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *TenantEmailProvider { + return &TenantEmailProvider{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Get +// Get retrieves the current tenant email provider configuration. +func (s *TenantEmailProvider) Get(ctx context.Context, opts ...operations.Option) (*operations.C1APISettingsV1TenantEmailProviderServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/email-provider") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.TenantEmailProviderService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1TenantEmailProviderServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetTenantEmailProviderResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetTenantEmailProviderResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetEmailCapabilities - Get Email Capabilities +// GetEmailCapabilities returns a lightweight summary of email capabilities +// +// for the current tenant. Intended for non-admin users (automation builders, +// secret sharers) to check if external email is available without exposing +// provider configuration details. +func (s *TenantEmailProvider) GetEmailCapabilities(ctx context.Context, opts ...operations.Option) (*operations.C1APISettingsV1TenantEmailProviderServiceGetEmailCapabilitiesResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/email-capabilities") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.TenantEmailProviderService.GetEmailCapabilities", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1TenantEmailProviderServiceGetEmailCapabilitiesResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetEmailCapabilitiesResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetEmailCapabilitiesResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SearchAuditEvents - Search Audit Events +// SearchAuditEvents returns email audit events for the tenant. +func (s *TenantEmailProvider) SearchAuditEvents(ctx context.Context, request *shared.SearchEmailAuditEventsRequest, opts ...operations.Option) (*operations.C1APISettingsV1TenantEmailProviderServiceSearchAuditEventsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/email-provider/audit-events") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.TenantEmailProviderService.SearchAuditEvents", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1TenantEmailProviderServiceSearchAuditEventsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.SearchEmailAuditEventsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SearchEmailAuditEventsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Test +// Test sends a test email to verify the provider configuration works end-to-end. +func (s *TenantEmailProvider) Test(ctx context.Context, request *shared.TestTenantEmailProviderRequest, opts ...operations.Option) (*operations.C1APISettingsV1TenantEmailProviderServiceTestResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/email-provider/test") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.TenantEmailProviderService.Test", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1TenantEmailProviderServiceTestResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.TestTenantEmailProviderResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.TestTenantEmailProviderResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Update +// Update creates or updates the tenant email provider configuration. +func (s *TenantEmailProvider) Update(ctx context.Context, request *shared.UpdateTenantEmailProviderRequest, opts ...operations.Option) (*operations.C1APISettingsV1TenantEmailProviderServiceUpdateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/email-provider") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.TenantEmailProviderService.Update", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1TenantEmailProviderServiceUpdateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UpdateTenantEmailProviderResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UpdateTenantEmailProviderResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/token_exchange.go b/vendor/github.com/conductorone/conductorone-sdk-go/token_exchange.go new file mode 100644 index 00000000..dfe6333b --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/token_exchange.go @@ -0,0 +1,101 @@ +package conductoronesdkgo + +import ( + "context" + "net/http" + "net/url" + "strings" + "time" + + "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" + "golang.org/x/oauth2" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "gopkg.in/square/go-jose.v2/json" + + "github.com/conductorone/conductorone-sdk-go/uhttp" +) + +const ( + grantTypeTokenExchange = "urn:ietf:params:oauth:grant-type:token-exchange" + subjectTokenTypeJWT = "urn:ietf:params:oauth:token-type:jwt" +) + +// tokenExchangeSource implements oauth2.TokenSource by exchanging an external +// OIDC JWT for a ConductorOne access token via RFC 8693 token exchange. +type tokenExchangeSource struct { + oidcToken string + clientID string + tokenHost string + httpClient *http.Client +} + +func (t *tokenExchangeSource) Token() (*oauth2.Token, error) { + body := url.Values{ + "grant_type": []string{grantTypeTokenExchange}, + "subject_token": []string{t.oidcToken}, + "subject_token_type": []string{subjectTokenTypeJWT}, + "client_id": []string{t.clientID}, + } + + tokenURL := url.URL{ + Scheme: "https", + Host: t.tokenHost, + Path: "auth/v1/token", + } + + req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, tokenURL.String(), strings.NewReader(body.Encode())) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + + resp, err := t.httpClient.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + return nil, status.Errorf(codes.Unauthenticated, "token exchange failed: %s", resp.Status) + } + + c1t := &c1Token{} + err = json.NewDecoder(resp.Body).Decode(c1t) + if err != nil { + return nil, err + } + + if c1t.AccessToken == "" { + return nil, status.Errorf(codes.Unauthenticated, "token exchange failed: empty access token") + } + + return &oauth2.Token{ + AccessToken: c1t.AccessToken, + TokenType: c1t.TokenType, + Expiry: time.Now().Add(time.Duration(c1t.Expiry) * time.Second), + }, nil +} + +// NewTokenExchangeSource creates an oauth2.TokenSource that exchanges an external +// OIDC token for a ConductorOne access token via RFC 8693 token exchange. +// +// Parameters: +// - oidcToken: the raw JWT from the external OIDC provider (e.g. GitHub Actions, HCP Terraform) +// - clientID: the workload federation trust client ID (e.g. "clever-fox@acme.conductorone.com/wfe") +// - serverURL: the ConductorOne server URL (e.g. "https://acme.conductor.one") +func NewTokenExchangeSource(ctx context.Context, oidcToken, clientID, serverURL string) (oauth2.TokenSource, error) { + httpClient, err := uhttp.NewClient(ctx, uhttp.WithLogger(true, ctxzap.Extract(ctx)), uhttp.WithUserAgent("conductorone-sdk-go-wfe")) + if err != nil { + return nil, err + } + + tokenHost := strings.TrimPrefix(serverURL, "https://") + + return oauth2.ReuseTokenSource(nil, &tokenExchangeSource{ + oidcToken: oidcToken, + clientID: clientID, + tokenHost: tokenHost, + httpClient: httpClient, + }), nil +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/user.go b/vendor/github.com/conductorone/conductorone-sdk-go/user.go index 97db5779..b4c65193 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/user.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/user.go @@ -237,7 +237,7 @@ func (s *User) Get(ctx context.Context, request operations.C1APIUserV1UserServic } // GetUserProfileTypes - Get User Profile Types -// Invokes the c1.api.user.v1.UserService.GetUserProfileTypes method. +// Retrieve the profile types associated with a user across their connected apps. func (s *User) GetUserProfileTypes(ctx context.Context, request operations.C1APIUserV1UserServiceGetUserProfileTypesRequest, opts ...operations.Option) (*operations.C1APIUserV1UserServiceGetUserProfileTypesResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -651,7 +651,7 @@ func (s *User) List(ctx context.Context, request operations.C1APIUserV1UserServi } // SetExpiringUserDelegationBindingByAdmin - Set Expiring User Delegation Binding By Admin -// Invokes the c1.api.user.v1.UserService.SetExpiringUserDelegationBindingByAdmin method. +// Set or update an expiring delegation binding for a user, allowing an admin to designate a temporary delegate. func (s *User) SetExpiringUserDelegationBindingByAdmin(ctx context.Context, request operations.C1APIUserV1UserServiceSetExpiringUserDelegationBindingByAdminRequest, opts ...operations.Option) (*operations.C1APIUserV1UserServiceSetExpiringUserDelegationBindingByAdminResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/usernotificationsettings.go b/vendor/github.com/conductorone/conductorone-sdk-go/usernotificationsettings.go new file mode 100644 index 00000000..1c9c096a --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/usernotificationsettings.go @@ -0,0 +1,449 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type UserNotificationSettings struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newUserNotificationSettings(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *UserNotificationSettings { + return &UserNotificationSettings{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// Get +// Get retrieves the calling user's notification preferences, merged with organization-level defaults. +func (s *UserNotificationSettings) Get(ctx context.Context, opts ...operations.Option) (*operations.C1APISettingsV1UserNotificationSettingsServiceGetResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/notifications/user") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.UserNotificationSettingsService.Get", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1UserNotificationSettingsServiceGetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.GetUserNotificationSettingsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.GetUserNotificationSettingsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// Update +// Update modifies the calling user's personal notification preferences for each channel. +func (s *UserNotificationSettings) Update(ctx context.Context, request *shared.UpdateUserNotificationSettingsRequest, opts ...operations.Option) (*operations.C1APISettingsV1UserNotificationSettingsServiceUpdateResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/settings/notifications/user") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.settings.v1.UserNotificationSettingsService.Update", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APISettingsV1UserNotificationSettingsServiceUpdateResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UpdateUserNotificationSettingsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UpdateUserNotificationSettingsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/usersearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/usersearch.go index 9e5a8cde..97aa94eb 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/usersearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/usersearch.go @@ -235,25 +235,11 @@ func (s *UserSearch) Search(ctx context.Context, request *shared.SearchUsersRequ return nil, nil } } + request.PageToken = &nCVal return s.Search( ctx, - &shared.SearchUsersRequest{ - UserExpandMask: request.UserExpandMask, - Departments: request.Departments, - Email: request.Email, - ExcludeIds: request.ExcludeIds, - ExcludeTypes: request.ExcludeTypes, - Ids: request.Ids, - JobTitles: request.JobTitles, - ManagerIds: request.ManagerIds, - PageSize: request.PageSize, - PageToken: &nCVal, - Query: request.Query, - Refs: request.Refs, - RoleIds: request.RoleIds, - UserStatuses: request.UserStatuses, - }, + request, opts..., ) } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/vault.go b/vendor/github.com/conductorone/conductorone-sdk-go/vault.go index ba38d924..136ba017 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/vault.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/vault.go @@ -32,7 +32,7 @@ func newVault(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks } // Create -// Invokes the c1.api.vault.v1.VaultService.Create method. +// Create provisions a new external secret storage vault and returns it. func (s *Vault) Create(ctx context.Context, request *shared.VaultServiceCreateRequest, opts ...operations.Option) (*operations.C1APIVaultV1VaultServiceCreateResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -244,7 +244,7 @@ func (s *Vault) Create(ctx context.Context, request *shared.VaultServiceCreateRe } // Delete -// Invokes the c1.api.vault.v1.VaultService.Delete method. +// Delete a vault by its ID. Active connectors using this vault will no longer be able to access their stored credentials. func (s *Vault) Delete(ctx context.Context, request operations.C1APIVaultV1VaultServiceDeleteRequest, opts ...operations.Option) (*operations.C1APIVaultV1VaultServiceDeleteResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -456,7 +456,7 @@ func (s *Vault) Delete(ctx context.Context, request operations.C1APIVaultV1Vault } // Get -// Invokes the c1.api.vault.v1.VaultService.Get method. +// Get returns a single vault by its ID. func (s *Vault) Get(ctx context.Context, request operations.C1APIVaultV1VaultServiceGetRequest, opts ...operations.Option) (*operations.C1APIVaultV1VaultServiceGetResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -661,7 +661,7 @@ func (s *Vault) Get(ctx context.Context, request operations.C1APIVaultV1VaultSer } // Update -// Invokes the c1.api.vault.v1.VaultService.Update method. +// Update modifies an existing vault's properties using a field mask. func (s *Vault) Update(ctx context.Context, request operations.C1APIVaultV1VaultServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIVaultV1VaultServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/webhooks.go b/vendor/github.com/conductorone/conductorone-sdk-go/webhooks.go index ca5eae6b..58e99d88 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/webhooks.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/webhooks.go @@ -32,7 +32,7 @@ func newWebhooks(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, ho } // Create -// Invokes the c1.api.webhooks.v1.WebhooksService.Create method. +// Create a new webhook subscription to receive event notifications at the specified URL. func (s *Webhooks) Create(ctx context.Context, request *shared.WebhooksServiceCreateRequest, opts ...operations.Option) (*operations.C1APIWebhooksV1WebhooksServiceCreateResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -244,7 +244,7 @@ func (s *Webhooks) Create(ctx context.Context, request *shared.WebhooksServiceCr } // Delete -// Invokes the c1.api.webhooks.v1.WebhooksService.Delete method. +// Delete a webhook subscription, stopping all future event deliveries to its URL. func (s *Webhooks) Delete(ctx context.Context, request operations.C1APIWebhooksV1WebhooksServiceDeleteRequest, opts ...operations.Option) (*operations.C1APIWebhooksV1WebhooksServiceDeleteResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -456,7 +456,7 @@ func (s *Webhooks) Delete(ctx context.Context, request operations.C1APIWebhooksV } // Get -// Invokes the c1.api.webhooks.v1.WebhooksService.Get method. +// Retrieve a single webhook by its ID. func (s *Webhooks) Get(ctx context.Context, request operations.C1APIWebhooksV1WebhooksServiceGetRequest, opts ...operations.Option) (*operations.C1APIWebhooksV1WebhooksServiceGetResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -661,7 +661,7 @@ func (s *Webhooks) Get(ctx context.Context, request operations.C1APIWebhooksV1We } // List -// Invokes the c1.api.webhooks.v1.WebhooksService.List method. +// List all webhook subscriptions in the tenant, with pagination. func (s *Webhooks) List(ctx context.Context, request operations.C1APIWebhooksV1WebhooksServiceListRequest, opts ...operations.Option) (*operations.C1APIWebhooksV1WebhooksServiceListResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -870,7 +870,7 @@ func (s *Webhooks) List(ctx context.Context, request operations.C1APIWebhooksV1W } // Test -// Invokes the c1.api.webhooks.v1.WebhooksService.Test method. +// Send a sample event to the webhook URL to verify that the endpoint is reachable and responding correctly. func (s *Webhooks) Test(ctx context.Context, request operations.C1APIWebhooksV1WebhooksServiceTestRequest, opts ...operations.Option) (*operations.C1APIWebhooksV1WebhooksServiceTestResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -1082,7 +1082,7 @@ func (s *Webhooks) Test(ctx context.Context, request operations.C1APIWebhooksV1W } // Update -// Invokes the c1.api.webhooks.v1.WebhooksService.Update method. +// Update an existing webhook subscription's properties, such as its URL or display name. func (s *Webhooks) Update(ctx context.Context, request operations.C1APIWebhooksV1WebhooksServiceUpdateRequest, opts ...operations.Option) (*operations.C1APIWebhooksV1WebhooksServiceUpdateResponse, error) { o := operations.Options{} supportedOptions := []string{ diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/webhookssearch.go b/vendor/github.com/conductorone/conductorone-sdk-go/webhookssearch.go index dec757b0..bf94d794 100644 --- a/vendor/github.com/conductorone/conductorone-sdk-go/webhookssearch.go +++ b/vendor/github.com/conductorone/conductorone-sdk-go/webhookssearch.go @@ -35,7 +35,7 @@ func newWebhooksSearch(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfigurati } // Search -// Invokes the c1.api.webhooks.v1.WebhooksSearch.Search method. +// Search for webhook subscriptions by query string or specific webhook references. func (s *WebhooksSearch) Search(ctx context.Context, request *shared.WebhooksSearchRequest, opts ...operations.Option) (*operations.C1APIWebhooksV1WebhooksSearchSearchResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -235,15 +235,11 @@ func (s *WebhooksSearch) Search(ctx context.Context, request *shared.WebhooksSea return nil, nil } } + request.PageToken = &nCVal return s.Search( ctx, - &shared.WebhooksSearchRequest{ - PageSize: request.PageSize, - PageToken: &nCVal, - Query: request.Query, - Refs: request.Refs, - }, + request, opts..., ) } diff --git a/vendor/github.com/conductorone/conductorone-sdk-go/workloadfederation.go b/vendor/github.com/conductorone/conductorone-sdk-go/workloadfederation.go new file mode 100644 index 00000000..99702f95 --- /dev/null +++ b/vendor/github.com/conductorone/conductorone-sdk-go/workloadfederation.go @@ -0,0 +1,2772 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package conductoronesdkgo + +import ( + "bytes" + "context" + "fmt" + "github.com/conductorone/conductorone-sdk-go/internal/config" + "github.com/conductorone/conductorone-sdk-go/internal/hooks" + "github.com/conductorone/conductorone-sdk-go/pkg/models/operations" + "github.com/conductorone/conductorone-sdk-go/pkg/models/sdkerrors" + "github.com/conductorone/conductorone-sdk-go/pkg/models/shared" + "github.com/conductorone/conductorone-sdk-go/pkg/retry" + "github.com/conductorone/conductorone-sdk-go/pkg/utils" + "net/http" + "net/url" +) + +type WorkloadFederation struct { + rootSDK *ConductoroneAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newWorkloadFederation(rootSDK *ConductoroneAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *WorkloadFederation { + return &WorkloadFederation{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// CreateProvider - Create Provider +// CreateProvider registers a new external OIDC issuer for the tenant. +// +// Validates the issuer URL via OIDC discovery synchronously. +func (s *WorkloadFederation) CreateProvider(ctx context.Context, request *shared.WorkloadFederationServiceCreateProviderRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceCreateProviderResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/workload_federation/providers") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.CreateProvider", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceCreateProviderResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceCreateProviderResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceCreateProviderResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateTrust - Create Trust +// CreateTrust creates a trust policy for a service principal. +// +// Validates the CEL condition_expression at creation time. +func (s *WorkloadFederation) CreateTrust(ctx context.Context, request operations.C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/trusts", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.CreateTrust", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "WorkloadFederationServiceCreateTrustRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceCreateTrustResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceCreateTrustResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceCreateTrustResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteProvider - Delete Provider +// DeleteProvider deletes a provider. Fails if active trusts reference it. +func (s *WorkloadFederation) DeleteProvider(ctx context.Context, request operations.C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/workload_federation/providers/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.DeleteProvider", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "WorkloadFederationServiceDeleteProviderRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceDeleteProviderResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceDeleteProviderResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceDeleteProviderResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteTrust - Delete Trust +// DeleteTrust deletes a trust for a service principal. +func (s *WorkloadFederation) DeleteTrust(ctx context.Context, request operations.C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/trusts/{client_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.DeleteTrust", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "WorkloadFederationServiceDeleteTrustRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceDeleteTrustResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceDeleteTrustResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceDeleteTrustResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetProvider - Get Provider +// GetProvider returns a provider by ID. +func (s *WorkloadFederation) GetProvider(ctx context.Context, request operations.C1APIWorkloadFederationV1WorkloadFederationServiceGetProviderRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceGetProviderResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/workload_federation/providers/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.GetProvider", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceGetProviderResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceGetProviderResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceGetProviderResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetTrust - Get Trust +// GetTrust returns a trust by ID for a service principal. +func (s *WorkloadFederation) GetTrust(ctx context.Context, request operations.C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/trusts/{client_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.GetTrust", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceGetTrustResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceGetTrustResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceGetTrustResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// ListProviders - List Providers +// ListProviders lists all providers for the tenant. +func (s *WorkloadFederation) ListProviders(ctx context.Context, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceListProvidersResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/workload_federation/providers") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.ListProviders", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceListProvidersResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceListProvidersResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceListProvidersResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// ListTrusts - List Trusts +// ListTrusts lists trusts for a service principal. +func (s *WorkloadFederation) ListTrusts(ctx context.Context, request operations.C1APIWorkloadFederationV1WorkloadFederationServiceListTrustsRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceListTrustsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/trusts", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.ListTrusts", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceListTrustsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceListTrustsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceListTrustsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// SearchTrusts - Search Trusts +// SearchTrusts searches trusts across all service principals with optional filters. +// +// Used by the admin providers page to list trusts referencing a provider. +func (s *WorkloadFederation) SearchTrusts(ctx context.Context, request *shared.WorkloadFederationServiceSearchTrustsRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceSearchTrustsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/search/workload_federation_trusts") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.SearchTrusts", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceSearchTrustsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceSearchTrustsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceSearchTrustsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// TestCEL - Test Cel +// TestCEL evaluates a CEL expression against provided claims without +// +// requiring a JWT, provider, or trust. Used for expression authoring. +func (s *WorkloadFederation) TestCEL(ctx context.Context, request *shared.WorkloadFederationServiceTestCELRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceTestCELResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/api/v1/workload_federation/test-cel") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.TestCEL", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceTestCELResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceTestCELResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceTestCELResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// TestToken - Test Token +// TestToken validates a JWT against a specific trust's configuration without +// +// issuing an access token. Returns per-step validation results for debugging. +func (s *WorkloadFederation) TestToken(ctx context.Context, request operations.C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/trusts/{client_id}/test", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.TestToken", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "WorkloadFederationServiceTestTokenRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceTestTokenResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceTestTokenResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceTestTokenResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// UpdateProvider - Update Provider +// UpdateProvider updates a provider's mutable fields (display_name, description, disabled). +// +// The issuer_url is immutable after creation. +func (s *WorkloadFederation) UpdateProvider(ctx context.Context, request operations.C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/workload_federation/providers/{id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.UpdateProvider", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "WorkloadFederationServiceUpdateProviderRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceUpdateProviderResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceUpdateProviderResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceUpdateProviderResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// UpdateTrust - Update Trust +// UpdateTrust updates a trust's mutable fields. The provider_id is immutable. +func (s *WorkloadFederation) UpdateTrust(ctx context.Context, request operations.C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustRequest, opts ...operations.Option) (*operations.C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/service_principals/{service_principal_id}/trusts/{client_id}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "c1.api.workload_federation.v1.WorkloadFederationService.UpdateTrust", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "WorkloadFederationServiceUpdateTrustRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.C1APIWorkloadFederationV1WorkloadFederationServiceUpdateTrustResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.WorkloadFederationServiceUpdateTrustResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkloadFederationServiceUpdateTrustResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/vendor/modules.txt b/vendor/modules.txt index c2f146fa..c4d65458 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -26,7 +26,7 @@ github.com/conductorone/baton-sdk/pb/c1/config/v1 github.com/conductorone/baton-sdk/pb/c1/connector/v2 github.com/conductorone/baton-sdk/pkg/crypto/providers github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk -# github.com/conductorone/conductorone-sdk-go v1.27.2-0.20260113184555-c2a4cbf81d4c +# github.com/conductorone/conductorone-sdk-go v1.28.2 ## explicit; go 1.21 github.com/conductorone/conductorone-sdk-go github.com/conductorone/conductorone-sdk-go/internal/config